EFLS / zetteldeft

A Zettelkasten system! Or rather, some functions on top of the emacs deft package.
https://efls.github.io/zetteldeft
GNU General Public License v3.0
394 stars 42 forks source link

make the function to extract a title from a note customizable #137

Closed maw closed 1 year ago

maw commented 2 years ago

Background:

I have some code (PR coming soon) that creates zetteldeft--title-parsing-function zetteldeft-title-parsing-function. It defaults to deft-parse-title but it lets you replace it with a function that looks like this:

(defun my-title-parsing-function (file contents)
  (let ((title (hypothetical-code-that-uses file contents)))
    (if title
        title
      ;; still need a fallback -- I have a lot of notes in older formats
      (deft-parse-title file contents))))