You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is pretty cursed, in that it uses project.el-internal APIs to do this, but I'm still sharing it because a) it might be useful to someone else, and b) maybe someone will know how to make it better. Here it is:
(setq project-vc-extra-root-markers '(".dir-locals.el"))
(defundenote-silo (dir)
"Create a new directory DIR to function as a `denote' silo and add it to the project list."
(interactive (list (read-directory-name "Silo directory: ")))
(if (not (make-directory dir t))
(progn
(with-temp-file (file-name-concat dir ".dir-locals.el")
(insert (format";;; Directory Local Variables -*- no-byte-compile: t -*-;;; For more information see (info \"(emacs) Directory Variables\")((nil . ((denote-directory . \"%s\"))))" (expand-file-name dir))))
(add-to-list 'project--list `(,(expand-file-name dir)))
(project--write-project-list))))
The text was updated successfully, but these errors were encountered:
alexispurslane
changed the title
Extremely cursed but possibly useful: a way to automatically create denote silos and make them able to be managed via project.el
[suggestion for denote manual] A way to automatically create denote silos and make them able to be managed via project.el
May 22, 2024
This is pretty cursed, in that it uses
project.el
-internal APIs to do this, but I'm still sharing it because a) it might be useful to someone else, and b) maybe someone will know how to make it better. Here it is:The text was updated successfully, but these errors were encountered: