summaryrefslogtreecommitdiffhomepage
path: root/attic/elisp
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-02-16 22:41:26 +0000
committerjao <jao@gnu.org>2024-02-16 22:41:26 +0000
commit8c5de749f6ed6b99df314df6bc6d72f050fc55b2 (patch)
tree76aa17774caaedb8782f27b776bd242474918c27 /attic/elisp
parentfbb243c45b71853d841fa491efe4558b65178898 (diff)
downloadelibs-8c5de749f6ed6b99df314df6bc6d72f050fc55b2.tar.gz
elibs-8c5de749f6ed6b99df314df6bc6d72f050fc55b2.tar.bz2
jao-org-notes: open-tags -> consult-tags
Diffstat (limited to 'attic/elisp')
-rw-r--r--attic/elisp/misc.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el
index 59a3c60..482f68a 100644
--- a/attic/elisp/misc.el
+++ b/attic/elisp/misc.el
@@ -808,6 +808,18 @@
(pulsar-global-mode 1)
;;; snippets
+(defun jao-org-notes-open-tags ()
+ "Search for a note file, matching all tags with completion."
+ (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))))))
+
(defun jao-sway-run-or-focus-tidal ()
(interactive)
(if (jao-shell-running-p "tidal-hifi")