I have a question regarding the search term and how it's saved in Emacs, actually I want to know how to clear it.
You know how you can clear the search results highlighting with (evil-search-clear-highlight)
and such?
This only disables the display of the search terms, internally the search term is still "in memory", i.e. you can still try and go to the next/previous occurance and the highlighting would resume normally.
How do you actually "clear" the current search term?
In Vim you would actually do this to clear the current search term: :let @/ ""
@/
is the name of the "register" which holds the most recent search term.
By clearing the search register, the effect isn't only visual (no highlighting), but also it means that searching for next/prev occurance (n/N) would not work after clearing, because there is nothing to search for (empty string).
I'm looking for an Emacs equivalent to this and I don't know the terminology (is it a special killring or special kind of buffer? IDK).
Note also that you cannot simply enter an "empty" search term to overwrite the previous one via normal UI interactions a la /[ nothing / enter ]
(using evil-mode
), or C-s
/ M-s o
and then just press enter instead of a string (using holy-mode
).
I'm using Spacemacs with evil/vim-like-bindings, but I guess the question can be answered independently from the Emacs distribution.
Thanks for your help & suggestions in advance.