I was wondering if anyone knew of a way or recommend a method to save often use search and replace queries for future use after emacs restarts?
If you are asking how to save search queries then you need only save the variable
search-ring
orregexp-search-ring
(or both) -- those are your search histories. You can use optionsavehist-additional-variables
for that (and turn onsavehist-mode
:(savehist-mode 1)
.If you are how to save the results of searches then this is one way: Use Icicles and search using Icicles search. With that, the search hits for a given search query are completion candidates. And you can save the current completion candidates anytime and restore them later. You can save them persistently or just for the current session (e.g. across any number of different actions, including different searches).
(savehist-mode 1)
makes your minibuffer history lists persist between sessions. – phils Nov 24 '16 at 11:51