diff options
| author | Eli Zaretskii | 2018-02-11 19:59:00 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-02-11 19:59:00 +0200 |
| commit | f8a493c800252621403ef281d8a26e4d6d6acd9a (patch) | |
| tree | a11d783edcb0131187e8c493fc86279ee4cb512f /doc | |
| parent | 10637af91ac1bf777d880473cc8c804fd6dff4e2 (diff) | |
| download | emacs-f8a493c800252621403ef281d8a26e4d6d6acd9a.tar.gz emacs-f8a493c800252621403ef281d8a26e4d6d6acd9a.zip | |
Improve documentation of desktop restoring
* doc/emacs/misc.texi (Saving Emacs Sessions): Document
'desktop-auto-save-timeout', 'desktop-load-locked-desktop', and
how to restore desktop in daemon mode. (Bug#30421)
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/misc.texi | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 5babd5081a9..ae6f9446f28 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -2485,7 +2485,7 @@ since it bypasses the init file, where @code{desktop-save-mode} is | |||
| 2485 | usually turned on. | 2485 | usually turned on. |
| 2486 | 2486 | ||
| 2487 | @vindex desktop-restore-eager | 2487 | @vindex desktop-restore-eager |
| 2488 | By default, all the buffers in the desktop are restored at one go. | 2488 | By default, all the buffers in the desktop are restored in one go. |
| 2489 | However, this may be slow if there are a lot of buffers in the | 2489 | However, this may be slow if there are a lot of buffers in the |
| 2490 | desktop. You can specify the maximum number of buffers to restore | 2490 | desktop. You can specify the maximum number of buffers to restore |
| 2491 | immediately with the variable @code{desktop-restore-eager}; the | 2491 | immediately with the variable @code{desktop-restore-eager}; the |
| @@ -2504,6 +2504,35 @@ expression matching the names of buffers not to kill. | |||
| 2504 | If you want to save minibuffer history from one session to | 2504 | If you want to save minibuffer history from one session to |
| 2505 | another, use the @code{savehist} library. | 2505 | another, use the @code{savehist} library. |
| 2506 | 2506 | ||
| 2507 | @vindex desktop-auto-save-timeout | ||
| 2508 | While Emacs runs with @code{desktop-save-mode} turned on, it by | ||
| 2509 | default auto-saves the desktop whenever any of it changes. The | ||
| 2510 | variable @code{desktop-auto-save-timeout} determines how frequently | ||
| 2511 | Emacs checks for modifications to your desktop. | ||
| 2512 | |||
| 2513 | @vindex desktop-load-locked-desktop | ||
| 2514 | The file in which Emacs saves the desktop is locked while the | ||
| 2515 | session runs, to avoid inadvertently overwriting it from another Emacs | ||
| 2516 | session. That lock is normally removed when Emacs exits, but if Emacs | ||
| 2517 | or your system crashes, the lock stays, and when you restart Emacs, it | ||
| 2518 | will by default ask you whether to use the locked desktop file. You | ||
| 2519 | can avoid the question by customizing the variable | ||
| 2520 | @code{desktop-load-locked-desktop} to either @code{nil}, which means | ||
| 2521 | never load the desktop in this case, or @code{t}, which means load the | ||
| 2522 | desktop without asking. | ||
| 2523 | |||
| 2524 | @cindex desktop restore in daemon mode | ||
| 2525 | When Emacs starts in daemon mode, it cannot ask you any questions, | ||
| 2526 | so if it finds the desktop file locked, it will not load it, unless | ||
| 2527 | @code{desktop-load-locked-desktop} is @code{t}. Note that restoring | ||
| 2528 | the desktop in daemon mode is somewhat problematic for other reasons: | ||
| 2529 | e.g., the daemon cannot use GUI features, so parameters such as frame | ||
| 2530 | position, size, and decorations cannot be restored. For that reason, | ||
| 2531 | you may wish to delay restoring the desktop in daemon mode until the | ||
| 2532 | first client connects, by calling @code{desktop-read} in a hook | ||
| 2533 | function that you add to @code{after-make-frame-functions} | ||
| 2534 | (@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}). | ||
| 2535 | |||
| 2507 | @node Recursive Edit | 2536 | @node Recursive Edit |
| 2508 | @section Recursive Editing Levels | 2537 | @section Recursive Editing Levels |
| 2509 | @cindex recursive editing level | 2538 | @cindex recursive editing level |