diff options
author | jao <jao@gnu.org> | 2024-02-16 22:41:26 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2024-02-16 22:41:26 +0000 |
commit | 8c5de749f6ed6b99df314df6bc6d72f050fc55b2 (patch) | |
tree | 76aa17774caaedb8782f27b776bd242474918c27 /lib | |
parent | fbb243c45b71853d841fa491efe4558b65178898 (diff) | |
download | elibs-8c5de749f6ed6b99df314df6bc6d72f050fc55b2.tar.gz elibs-8c5de749f6ed6b99df314df6bc6d72f050fc55b2.tar.bz2 |
jao-org-notes: open-tags -> consult-tags
Diffstat (limited to 'lib')
-rw-r--r-- | lib/doc/jao-org-notes.el | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el index a91971e..2a166e9 100644 --- a/lib/doc/jao-org-notes.el +++ b/lib/doc/jao-org-notes.el @@ -141,18 +141,12 @@ (when-let (f (jao-org-notes--consult-rg "Search notes: ")) (find-file f))) -(defun jao-org-notes-open-tags () +(defun jao-org-notes-consult-tags () "Search for a note file, matching all tags with completion." (interactive) (let* ((tags (jao-org-notes--read-tags)) - (fn (lambda () - (prog1 (jao-org-notes--find-tag (car tags)) - (setq tags (cdr tags))))) - (res (funcall fn))) - (while (and res tags) (setq res (seq-intersection res (funcall fn)))) - (unless res (user-error "No notes found")) - (when-let (f (completing-read "Select file: " (mapcar #'car res))) - (find-file (cadr (assoc f res)))))) + (init (concat "^..tags: " (mapconcat #'identity tags " ")))) + (consult-ripgrep jao-org-notes-dir init))) (defun jao-org-notes-create () "Create a new note file, matching tags and titles with completion." |