[emacs] Fix writeroom mode for nested roam dirs

This commit is contained in:
Correl Roush 2021-09-16 13:06:30 -04:00
parent 44117ca9bc
commit ddeec04ce4

View file

@ -1040,8 +1040,9 @@ Makes for a much nicer note-taking experience.
(add-hook 'hack-local-variables-hook
(lambda ()
(when (and org-roam-directory
(f-child-of? (or (buffer-file-name) default-directory)
(expand-file-name org-roam-directory)))
(f-ancestor-of?
(expand-file-name org-roam-directory)
(or (buffer-file-name) default-directory)))
(writeroom-mode t)))
nil t))