You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for the rg.el package. I'm trying to set it up so that I can search all my org-mode files that are stored in lots of different directories under my home directory. I have a workflow from the shell, which is:
Step 1: find the .org files
This takes a few seconds to search through my home directory, and so I would like to cache the results in a file:
cd; fd -t f -e org > all-org.txt
(for context, there about nearly 1200 matches)
Step 2: search through that file list.
I can then use xargs to pass through the filenames (none of the filenames have spaces in them, else xargs -0 might be needed), and for example, here search for 'defun':
cd; xargs -a all-org.txt rg defun
How best might I use rg.el to do similar, such that the rg buffer is more useful? Should I look into defining a new search? I have confirmed that if I do C-u M-x rg then add the xargs ... at the start of the command, it will work, but I'd rather not do that every time.
note: there has been discussion, not yet implemented, about adding --files-from flag to rg for this case: BurntSushi/ripgrep#273
The text was updated successfully, but these errors were encountered:
This is not something that is currently not very well supported in this package. The main premise for this package are the three parameters, directory, query string and file-type/glob. Using full command line search means we can't modify the search parameters which cripples the result buffer. I know, the full command search is in there, just saying that this code path is not prioritized and is mostly there because of legacy compatibility with built-in grep package.
I do see the need for making this more flexible though, both for my own usage and some feature requests that pops up now and then.
To have this working I think we would have to modify rg-define-search a bit to accept full command searches as a special case.
Hi,
thanks for the rg.el package. I'm trying to set it up so that I can search all my org-mode files that are stored in lots of different directories under my home directory. I have a workflow from the shell, which is:
Step 1: find the .org files
This takes a few seconds to search through my home directory, and so I would like to cache the results in a file:
(for context, there about nearly 1200 matches)
Step 2: search through that file list.
I can then use xargs to pass through the filenames (none of the filenames have spaces in them, else xargs -0 might be needed), and for example, here search for 'defun':
How best might I use rg.el to do similar, such that the rg buffer is more useful? Should I look into defining a new search? I have confirmed that if I do
C-u M-x rg
then add the xargs ... at the start of the command, it will work, but I'd rather not do that every time.note: there has been discussion, not yet implemented, about adding --files-from flag to rg for this case: BurntSushi/ripgrep#273
The text was updated successfully, but these errors were encountered: