Joey_Green · 2022-05-21 14:34
When I click on a search item shown by \`counsel-ag\`, the editor jumps to the appropriate position, and the search buffer hides automatically. I don't want that, I want the search buffer to stay there after clicking, how can I do it?
*My research so far*: It seems that \`(ivy-call)\` can satisfy my requirement, which is bound by \`M-Enter\` by default, but I haven't found a way to override the clicking behavior with \`ivy-call\`.
__nautilus__ · 2022-05-21 17:17
I’d like to hear others’ solution for this also. Personally I use `embark-export`, which is bound to `C-; E`. That’s not a perfect t solution though, and there I times I would prefer a persistent search window
Extension_Try_6870 · 2022-05-21 17:31
One solution is to call
ivy-occur (C-c C-o) while the focus is in the mini buffer. This create a buffer with the search results.
oantolin · 2022-05-21 20:57
I'm a little confused: how would a "persistent search window" differ from what `ivy-occur` or `embark-export` gives you?
__nautilus__ · 2022-05-21 21:02
You can’t narrow an occur/export. I find the ivy/vertico search to be easy to accidentally dismiss.
oantolin · 2022-05-21 21:10
By "narrow" do you mean adding further search terms to get fewer matches (as opposed to Emacs's sense of narrowing a buffer)?
If so, I'm happy to report that function was recently added to Embark collect and export buffers! Pressing `g` (`revert-buffer`) will rerun the command that you got the candidates from, re-enter the input string you had in the minibuffer and leave you there. At that point you can modify your minibuffer input however you like, and if you want you can re-export or re-collect the results.
__nautilus__ · 2022-05-21 21:11
Yeah, that’s exactly what I was talking about. That’s super cool, I had no idea, thank you!