From 0ced34adafa5b9190e77e2da6cd16764d8c8f110 Mon Sep 17 00:00:00 2001 From: Correl Date: Mon, 28 Jun 2021 19:39:52 -0400 Subject: [PATCH] [emacs] Fix org roam hook Don't trigger if we're not in an org-roam document. --- .doom.d/config.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.doom.d/config.org b/.doom.d/config.org index 3a4b61a..f942056 100644 --- a/.doom.d/config.org +++ b/.doom.d/config.org @@ -1006,8 +1006,9 @@ Makes for a much nicer note-taking experience. ;; set properly (add-hook 'hack-local-variables-hook (lambda () - (when (f-child-of? (or (buffer-file-name) default-directory) - (expand-file-name org-roam-directory)) + (when (and org-roam-directory + (f-child-of? (or (buffer-file-name) default-directory) + (expand-file-name org-roam-directory))) (writeroom-mode t))) nil t))