Open wd opened 3 years ago
There is no built-in support for this, but I wanted the same thing. I've got a workaround with advice that seems to work.
(defun my/use-deft-notes-dir (orig &rest args)
(let ((deft-directory my/notes-dir))
(apply orig args)))
(advice-add #'deft-absolute-filename :around #'my/use-deft-notes-dir)
This replaces the value for deft-directory
in the function the builds the absolute path for a new file. You can set your own notes directory, e.g. (defvar my/notes-dir (expand-file-name "notes" deft-directory))
.
So far it seems to work fine. Having deft provide a deft-new-file-directory
would be great though.
The new file will put under
deft-directory
by default, is there any settings that can put the file todeft-directory/notes
? I want to use deft to search from all files indeft-directory
, but want new file to put underdeft-directory/notes
.