abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.31k stars 338 forks source link

Can counsel-grep provide the search string to evil-search-next and evil-search-previous, like swiper does? #2344

Open alienbogart opened 4 years ago

alienbogart commented 4 years ago

My Environment

Issue

When I run swiper to search example_string, after ivy-done example_string becomes available to evil-search-next and evil-search-previous, as if I had made the search using evil-search-forward (normal state keybinding: / ) or evil-search-backward (normal state keybinding: ?): they'll search for other instances of example_string

When I do the same with counsel-grep evil-search-next and evil-search-previous are not informed, and will search for whatever string was last stored by swiper or Evil commands.

So that's my question: is it possible to make counsel-grep behave like swiper in that regard?

Thanks!

Alexander-Shukaev commented 4 years ago

I have the following configuration gems:

(dolist (variable '(grep-regexp-history counsel-grep-history counsel-git-grep-history evil-ex-search-history swiper-history))
  (defvaralias variable 'regexp-search-ring))

See #1914 for a related discussion.

Alexander-Shukaev commented 4 years ago

Another duplicate was #1939.