Closed kidd closed 5 years ago
Sounds like a great idea that would definitely fit well into this package. Some options that come to mind is:
ag.el
does this. Personally, I am not very fond of this since I don't like having random buffers floating around. This isn't exactly what you suggested either but would probably be very simple to implement with a defcustom
that let you choose if you want to enable this or not. The benefit of this is that searches are instantly available without repeating the search.rg-search
structs for this which would allow for the same interactions when navigating history as for new searches. One could also store the full command line but that would restrict history navigation to seeing the result of the search without the possibility to refine it.rg-result
mode but might not work with search term highlighting out of the box. Would also need a relatively large amount of storage compared to the other alternatives and not allow for modifying history results.My initial preference would be 2 with storing rg-search
structs if possible. What are your thoughts about the alternatives.
Yep , I think 2 is also best. In fact, I'm looking at using a similar approach to how Help buffers do it.
Stay tunned :)
@kidd: Are you working on this?
Unfortunately life kicked in before I could have anything half decent... :(
I got inspiration from emacs' help-go-back
and help-xref-stack
(even trying to reuse the same machinery), but couldn't finish this up (not sure it was the best approach but sounded like an easy one)
Right, no problem. Life is a constant problem. ;)
I got interested in this feature myself, that's why I am asking. I don't have time to work on it right now either so just checking the status really.
I'll start working on this myself unless you are doing work on this
:+1: go for it!
I've pushed a history branch in case you want to try it out. It needs some more fixes, tests and docs but should work pretty ok in the current state.
woah! nice!
Installed it already and I'm going to be using it during this next week. I'll report here any insights, nuances or anything.
Just dropping by to report that this is working great!
Great, this go stuck on the topic branch. Still some more tests and documentation missing. I will merge this to master now and do t he final additions there. Thanks for testing it out.
sometimes I find myself searching something with rg (using rg or rg-dwim), and just realize that I'd like to list results of the last search again. I'm thinking something like Help mode's
c-c c-b
andc-c c-f
. Do you think it's useful enough to be merged? which approach do you recommend? I'll try to send a PR