org-ql icon indicating copy to clipboard operation
org-ql copied to clipboard

FEATURE REQUEST: allow for org-agenda-text-search-extra-files in org-ql-search

Open TitusMu opened this issue 2 years ago • 1 comments

At the moment, one can choose to search the current buffer, all Org buffers, all org-agenda-files or a list of certain files. Would it be possible to make it an option too, to search all files in the list of org-agenda-text-search-extra-files? There, I have used directory-files-recursively to search my directory and its subdirectories.

If I try to search the directory by entering the path at org-ql-search, I get the error "Not an Org buffer: PATH". So org-agenda-text-search-extra-files would be a great solution.

By the way, thank you for the great org-ql package!

TitusMu avatar Nov 01 '23 07:11 TitusMu

Hi,

On one hand I can understand that supporting this option would make it convenient to share configuration between org-ql and org-agenda. However, one of the reasons I wrote org-ql was to try to get away from the complicated configuration of org-agenda with the myriad of options like these. Org QL is meant to be easier to use by simply passing arguments to its functions as desired. As well, the more options like this Org QL supports, the more likely it is to have to add compatibility code as those features change in Org itself. So I would prefer not to add code to handle that option.

If you really want to do something like this, you could use advice in your Emacs config to add files to org-ql-search and/or org-ql-view--expand-buffers-files as desired.

Another option would be to enhance org-ql to allow each argument to also be a directory rather than just a file or buffer. I've been thinking about doing that, but I'm not sure if it's a good idea.

What do you think? Thanks.

alphapapa avatar Dec 16 '23 13:12 alphapapa