emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 019cccfb1f 015/355: Create denote-directory if a


From: ELPA Syncer
Subject: [elpa] externals/denote 019cccfb1f 015/355: Create denote-directory if absent
Date: Sun, 26 Jun 2022 23:57:56 -0400 (EDT)

branch: externals/denote
commit 019cccfb1f1911d24a83bae3bdbe99647a5ec33a
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@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

[Prev in Thread] Current Thread [Next in Thread]