Session. El
(Require 'session)
(Add-hook 'after-init-hook
'Session-Initialize)
The global variable when you left Emacs after using this extension
(Kill-ring, Command record ......), Local variables, registers, opened files, modified files, and last modified locations ,......
All are recorded.
After the session is loaded, there will be two more items in the menu: recently accessed files and recently modified files.
Desktop. El
(Load "desktop ")
(Desktop-load-default)
(Desktop-read)
If you want to save the last opened file record, you can use desktop. This is the built-in Emacs. You only need to add the above settings, and then M-x
Desktop-save. In the future, when Emacs is started, all
Buffer.
M-x Desktop-clear can delete the remembered content. You can use this method if you remember too many buffers. However, I suggest using
Ibuffer (see below)
To manage these buffers, because sometimes you will find that if you delete all the remembered buffers, you will need some time to open the files you frequently edit later!
If the session works with desktop, the next time you start Emacs, it will be the same as if you didn't close Emacs.