dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
480 stars 41 forks source link

Keep multiple search results' buffers #140

Closed jjnilton closed 2 years ago

jjnilton commented 2 years ago

I was wondering on how I could set it to keep previous search results' buffers instead of replacing with the new search, but I couldn't find that option.

The appropriate way would be to write a function that gives a unique name for the buffer?

Thanks for sharing this great package.

dajva commented 2 years ago

There are actually instructions for this in the docs: https://rgel.readthedocs.io/en/2.2.1/usage.html?highlight=save#command-rg-save-search This does not seem to work quite alright though. Let's see if I can fix that. Otherwise something like (add-hook 'rg-mode-hook 'rg-save-search) should work pretty well although you may not like that the current search buffer name is not consistent.

dajva commented 2 years ago

Should work now with the instructions in the doc.

jjnilton commented 2 years ago

Sorry, I missed this part in the docs. Thanks!