Closed localauthor closed 2 years ago
Looks useful, thanks.
I'm trying to understand the code you added, could you explain what the following is meant for?
(let* ((dir (expand-file-name deft-directory)))
(unless (string-match (concat "^" dir) file)
(setq file (concat dir "/" file)))
It's a bit taken from deft-find-file
, which adds the deft-directory prefix back onto the note file name before calling deft-open-file.
Since zetteldeft-find-file
was just a thin wrapper around deft-find-file
, extending it required some slight unwrapping and borrowing.
Ah okay, that makes sense. Thanks for the clarification
Thanks, another improvement to this could be to have the same title-prefix, -suffix, and id-format as a the standard Zetteldeft note, so it's formatted exactly like any other Zetteldeft note.
It should do this already, since it uses zetteldeft-new-note
to create the new note, and zetteldeft-new-note
should take care of adding title-prefix, -suffix, and id-format. Is it not currently working that way on your end?
It doesn't work like that on my end. What is zetteldeft-new-note
? I can't find this function/variable.
Sorry, the function is actually zetteldeft-new-file
Thanks, weirdly enough, it's not working as it should, and I am using the updated package... it creates a blank file, without all the settings I have set for new files, such as (setq zetteldeft-title-prefix "#+TITLE: ")
and (setq zetteldeft-title-suffix "\n#+STARTUP: overview, indent\n#+LAST_MODIFIED:\n\n")
.
Fix #115
Adds option to use input as title for a new note.
cc: @iburunat