summaryrefslogtreecommitdiffhomepage
path: root/lib/doc/jao-org-notes.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/doc/jao-org-notes.el')
-rw-r--r--lib/doc/jao-org-notes.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el
index a1b9dbe..1b8c3f8 100644
--- a/lib/doc/jao-org-notes.el
+++ b/lib/doc/jao-org-notes.el
@@ -63,10 +63,11 @@
:history '(:input jao-org-notes--grep-history)
:sort nil)))
+(defun jao-org-notes-cats ()
+ (seq-difference (directory-files jao-org-notes-dir) '("." ".." "attic")))
+
(defun jao-org-notes--cat ()
- (let* ((cats (seq-difference (directory-files jao-org-notes-dir)
- '("." ".." "attic")))
- (cat (completing-read "Top level category: " cats)))
+ (let* ((cat (completing-read "Top level category: " (jao-org-notes-cats))))
(cond ((file-exists-p (expand-file-name cat jao-org-notes-dir)) cat)
((yes-or-no-p "New category, create?") cat)
(t (jao-roam--cat)))))