summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-02-17 06:00:31 +0000
committerjao <jao@gnu.org>2024-02-17 06:00:31 +0000
commite208e35cd8846112c41e0cc54c59a5db9e5d383f (patch)
treecbe923a59052da540209ff67669de55893a94e01
parent8c5de749f6ed6b99df314df6bc6d72f050fc55b2 (diff)
downloadelibs-e208e35cd8846112c41e0cc54c59a5db9e5d383f.tar.gz
elibs-e208e35cd8846112c41e0cc54c59a5db9e5d383f.tar.bz2
jao-org-notes: ripgrep and stats
-rw-r--r--lib/doc/jao-org-notes.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/doc/jao-org-notes.el b/lib/doc/jao-org-notes.el
index 2a166e9..af54422 100644
--- a/lib/doc/jao-org-notes.el
+++ b/lib/doc/jao-org-notes.el
@@ -148,6 +148,10 @@
(init (concat "^..tags: " (mapconcat #'identity tags " "))))
(consult-ripgrep jao-org-notes-dir init)))
+(defun jao-org-notes-consult-ripgrep (&optional initial cat)
+ (interactive)
+ (consult-ripgrep (expand-file-name (or cat "") jao-org-notes-dir) initial))
+
(defun jao-org-notes-create ()
"Create a new note file, matching tags and titles with completion."
(interactive)
@@ -187,6 +191,13 @@
(match-string 1))))))
(insert (format "[[file:%s][%s]]" rel-path title)))))
+(defun jao-org-notes-stats ()
+ (interactive)
+ (message "%d notes, %d tags in %s"
+ (length (jao-org-notes-list))
+ (length jao-org--notes-tags)
+ jao-org-notes-dir))
+
;;;###autoload
(defun jao-org-notes-setup (mnemonic)
"Set up the notes system, providing a mnemonic character for its org template."