jgru / consult-org-roam

A bunch of convenience functions for operating org-roam with the help of consult
GNU General Public License v3.0
121 stars 6 forks source link

Get only Org results #33

Closed larrasket closed 10 months ago

larrasket commented 10 months ago

For people who maintain other type of files under their roam directory, the search might be not very efficient by default. I believe there should be an option to search only org files.

My current workflow with ripgrep is appending -- -g *.org in the search query, not sure if that possible when using consult-grep as a consult-org-roam-grep-func value.

larrasket commented 10 months ago

This makes it a little bit more convenient, but I still think it make more sense to be a default option:

(defun salih/consult-org-roam-search-org-only () (interactive) (let ((consult-ripgrep-args (concat consult-ripgrep-args " -g *.org"))) (consult-org-roam-search)))

larrasket @.***> writes:

For people who maintain other type of files under their roam directory, the search might be not very efficient by default. I believe there should be an option to search only org files.

My current workflow with ripgrep is appending -- -g *.org in the search query, not sure if that possible when using consult-grep as a consult-org-roam-grep-func value.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

-- Regards, Salih

jgru commented 10 months ago

Hi @larrasket,

thanks for opening this issue and providing a workaround. I restricted the consult-org-roam-search to .org-files for grep and ripgrep in https://github.com/jgru/consult-org-roam/commit/6565c39940796a0e5fa4ecb6f9711d9ec133d0d8.

Hope this is convenient for you and other users who store other fileformats in their roam-directory.

Best, jgru