branch: externals/denote
commit 019cccfb1f1911d24a83bae3bdbe99647a5ec33a
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Create denote-directory if absent
---
 denote.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 07bcf4794d..2ed4dac60b 100644
--- a/denote.el
+++ b/denote.el
@@ -105,7 +105,10 @@ If nil, show the keywords in their given order."
 
 (defun denote--directory ()
   "Valid name format for `denote-directory'."
-  (file-name-as-directory denote-directory))
+  (let ((path denote-directory))
+    (unless (file-directory-p path)
+      (make-directory path t))
+    (file-name-as-directory path)))
 
 (defun denote--extract (regexp str &optional group)
   "Extract REGEXP from STR, with optional regexp GROUP."

Reply via email to