Extensions
Search through the journal using consult
Giornata doesn't provide a search mechanism by default, we leave that choice to
the user. consult-grep
from the consult package is a good first
choice, just provide giornata-directory
as a parameter and wrap the call in an
interactive function.
I personally have a slightly more advanced use case in that my
giornata-directory
not only holds my journal but a bunch of miscellaneous
files that consult-grep
will annoyingly look through. I also don't like the
default prompt that consult-grep
displays, so consult--grep
provides me with
a bit more control. If you're in the same boat, you may find the following
function to be helpful.
(defun my/giornata-consult ()
"Search `giornata-directory' with `grep' via `consult' package."
(interactive)
;; you may need to (require 'giornata)
(let ((targets (directory-files giornata-directory t giornata--directory-regexp)))
(consult--grep "Search" #'consult--grep-make-builder targets nil)))