Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I use the following, which works for me:</p> <pre><code>;; Automatically save and restore sessions (setq desktop-dirname "~/.emacs.d/desktop/" desktop-base-file-name "emacs.desktop" desktop-base-lock-name "lock" desktop-path (list desktop-dirname) desktop-save t desktop-files-not-to-save "^$" ;reload tramp paths desktop-load-locked-desktop nil desktop-auto-save-timeout 30) (desktop-save-mode 1) </code></pre> <p>Well, I actually set <code>(desktop-save-mode 0)</code> and then use <code>M-x my-desktop</code> to kick things off:</p> <pre><code>(defun my-desktop () "Load the desktop and enable autosaving" (interactive) (let ((desktop-load-locked-desktop "ask")) (desktop-read) (desktop-save-mode 1))) </code></pre> <p>But that's because my session is frequently in excess of 100 files, mostly via tramp, and so I prefer to make loading it a manual task, and not clobber the desktop file otherwise :)</p> <p>I recommend checking out the Emacs Wiki: <a href="http://www.emacswiki.org/emacs/DeskTop" rel="noreferrer">http://www.emacswiki.org/emacs/DeskTop</a></p> <p>There are some useful enhancements to the default functionality. In particular, I recommend adding some method of auto-saving your desktop mid-session, as it's <em>really</em> annoying if your system crashes when Emacs has been running for several days, and your desktop hasn't been saved in the interim.</p> <p>Since Emacs 24.4 the desktop file is auto-saved periodically by default. See the <code>desktop-auto-save-timeout</code> variable (which I've also added to the block above). Thanks to GDP2 and Dexter Morgan for their comments on this.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload