From 657a272347e96dcd4fcd825178b0f86124da32a1 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 14 Nov 2021 05:02:27 +0000 Subject: searching notes with consult-{rgrep, recoll} --- org.org | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'org.org') diff --git a/org.org b/org.org index 19a265a..d59ad91 100644 --- a/org.org +++ b/org.org @@ -204,12 +204,23 @@ (use-package jao-org-notes :commands (jao-org-notes-setup) :config + (defun jao-org-notes-note-p () + (string-prefix-p jao-org-notes-dir (buffer-file-name))) + + (defun jao-org-notes-recoll () + "Use consult-recoll to search notes." + (interactive) + (consult-recoll (format "dir:%s" jao-org-notes-dir))) + (jao-transient-major-mode+ org ["Notes" - ("i" "insert link" jao-org-notes-insert-link) - ("t" "insert tags" jao-org-notes-insert-tags) ("o" "find and open note" jao-org-notes-open) ("c" "open or create note" jao-org-notes-open-or-create) + ("\\" "grep notes" jao-org-notes-grep) + ("r" "recoll notes" jao-org-notes-recoll)] + ["Current note" :if jao-org-notes-note-p + ("i" "insert link" jao-org-notes-insert-link) + ("t" "insert tags" jao-org-notes-insert-tags) ("v" "show backlinks" jao-org-notes-backlinks)])) (jao-org-notes-setup "n") -- cgit v1.2.3