From e208e35cd8846112c41e0cc54c59a5db9e5d383f Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 17 Feb 2024 06:00:31 +0000 Subject: jao-org-notes: ripgrep and stats --- lib/doc/jao-org-notes.el | 11 +++++++++++ 1 file changed, 11 insertions(+) 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." -- cgit v1.2.3