Is there a setting in emacs to remember the search/replace string across multiple sessions?
%> emacs -nw fileA
<replace X with Y>
%> emacs -nw fileB
<replace>
should automatically replace X
with Y
(without having to enter both again)
There's savehist-mode
specifically for that kind of saving/restoring:
(savehist-mode 1)
(add-to-list 'savehist-additional-variables 'query-replace-defaults)
savehist-additional-variables
is a void variable at the time the add-to-list
is executed.
add-to-list
command. I think initialization must be done via M-x in a live Emacs session, but in the init.el
it has to come after the add-to-list
commands
desktop.el
library (when activated) creates a destop file when killing Emacs, which when opened reveals a(setq search-ring . . .
and(setq regexp-search-ring . . .
, among other saved settings. However, I've never tried to do what you are proposing -- perhaps its worth looking into.