How to open files automatically when starting emacs?

后端 未结 4 745
再見小時候
再見小時候 2021-01-30 07:08

A newbie question and probably very bingable (had to use that word once :-)), but as I gather thats both ok for SO : How can you get files to open automatically when st

4条回答
  •  既然无缘
    2021-01-30 07:55

    Are you thinking of having it re-open files you've looked at before? The desktop package remembers files and re-opens them when you restart. Depending on your emacs version, you enable by simply adding this to your .emacs (for 22.1+ versions):

     (desktop-save-mode 1)
    

    And after that, it's pretty much automatic. Whatever files you had open before will be re-opened (provided you start from the same directory, b/c that's where the desktop configuration file is saved) - unless you add a change that forces a single desktop for all sessions.

    There are bunches of variants of that functionality, which are listed in the session management page.

提交回复
热议问题