Closed spookylukey closed 5 years ago
Thanks for the report.
Regarding the saved search functionality. It should work from any buffer, then saving the last search you did, more specifically the buffer named *rg*
, otherwise it's a bug.
I don't know if that helps your use case much though.
For your main request, it's something I have considered but never wanted myself so never implemented it. I am open to adding it as a customization though since I can see that some people prefer that behavior.
I have never used ag.el
myself but if i understand you correctly you essentially want automatic save when you start a new search, is that correct?
I don't have much time implementing this now but it doesn't seem that hard to achieve since it seems like the main functionality of "saving" search buffer already exists. If you want to have a go an implement it I would gladly accept a pr.
As a workaround you could create an advice around the rg-run
defun to get this functionality.
You're right - it looks like just using advice to run rg-save-search
after every rg-run
does exactly what I need, and I can do this with advice so that I don't need to create wrappers for each of rg-project
, rg-dwim
etc. So I'm closing this, as this seems a more elegant solution. Thanks for your time, and for the great package.
If I run a search, and then another, the original search buffer is replaced. I would expect a new buffer to be created for each search.
I am aware of
rg-back-history
, but this doesn't help much for my very common use case:foo
and go down the list of the results. Critically, every time I switch back to the search results buffer, my place in the buffer is rememberedfoo
, I realize I also need to fixbar
, and so start a search for that.bar
, I can carry on my place fixingfoo
rg-back-history
puts my cursor back at the topOther tools e.g.
ag-project-regexp
fromag.el
behaves ideally in this respect - it opens a new buffer for each search. When you are done with a search, you close the buffer and go back to your exact place in the previous search.I've also tried the "saved search" functionality, but it's not very convenient. If I'm looking through a file, and want to do a search, I have to remember to use it. So before I do a search I have to first find the last search buffer, save it, then go back to where I was. I'm looking for something that will make
rg.el
always open a new search buffer - I can always close the ones I don't need any more, but if I lose one that I was half way through, I can't go back.Thanks for your consideration!