I can't make Emacs remember the history for *ielm*
buffers between sessions. As far as I can tell, such history is recorded in the buffer-local variable comint-input-ring
. Therefore I have added the following expression to my init file:
(setq desktop-locals-to-save
(append desktop-locals-to-save
'((comint-input-ring . 50))))
It doesn't work. I know that the desktop
package is working because Emacs remembers the global variables that I have added to desktop-globals-to-save
in my init file.
--
EDIT: savehist
does not work either. I suppose that is because comint-input-ring
is a buffer-local variable.
savehist.el
and adding this variable to the list of vars to save.savehist
already (sorry for not mentioning it). As far as I could see, it was for global variables only, whilstcomint-input-ring
is buffer-local. Now, I have tried it anyway, without success.comint.el
the following two lines of code:(put 'comint-input-ring 'permanent-local t)
and(make-local-variable 'comint-input-ring)
. Then, addcomint-input-ring
todesktop-locals-to-save
. Finally, re-byte-compile the applicable files, restart Emacs and enjoy living life to the fullest.