summaryrefslogtreecommitdiff
path: root/doc/emacs/misc.texi
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2023-01-10 09:51:57 +0100
committerStefan Kangas <stefankangas@gmail.com>2023-01-10 09:51:57 +0100
commit60240f54e5fed16a0522fb766ffef073db596f1f (patch)
treea8677abd38758e66c56900632756a39a0ebccb7b /doc/emacs/misc.texi
parent4d1d43e41fafaa5beecba57686f5d5f4146746c8 (diff)
parent55aabfea4accd04aed9424b5cdbe304d12be6224 (diff)
downloademacs-60240f54e5fed16a0522fb766ffef073db596f1f.tar.gz
Merge from origin/emacs-29
55aabfea4ac Fix c-ts-mode comment indent 8377ed5298f Highlight identifier in import statements in js-ts-mode aa9df1260c3 Don't print named tree-sitter nodes with parenthesizes (b... e385c099b8c Improve fontification for import-statements in typescript... 28dd6021384 Fix c-ts-mode indentation for 2nd line in block comment (... 8a36a0f44aa ; xref.el: Bump version f16cc7c49c7 ; project.el: Bump version ebc5263667b ; * src/callint.c (Finteractive): Doc string clarification. c1401d1c6c8 * lisp/vc/diff-mode.el (diff-font-lock-keywords): Check f... 1f8ad353d9f Minor improvement for tree-sitter explorer ef87c755660 Make sure NODE is not the root node in tree-sitter indent... 1238fa8e49b Fix label indent of GNU and Linux style in c-ts-mode (bug... dc911e4ba5c Improve go-ts-mode Imenu, navigation and electric pair (b... 20f36c8f6f9 ; ruby.rb: Fix pattern matching syntax and extend the exa... d46f7f4edcc Revert "Add c-or-c++-ts-mode (bug#59613)" 1469aac20d8 ; * src/pgtkfns.c (parse_resource_key): Use recursive sch... da96a1fd741 Add back renamed function 'font-lock-fontify-syntacticall... b1aa720671e ; * lisp/progmodes/ruby-ts-mode.el: Fix compilation warni... 5cb01ac5d78 ; * src/callint.c (Finteractive): Fix the doc string (bug... 53e64cfb852 Improve options and docs of M-x command completion fef4f18cc33 ; Fix NEWS e04b3d41bb4 Update to Org 9.6-90-ga6523f e3d806b4172 Fix string fontification on python-ts-mode (bug#60599) 800e15e3be0 Fix string-interpolation feature of python-ts-mode (bug#6... 38b63f4c3ce Add indentation rule for concatenated_string (bug#60572) 2cdd75a18ff Fix highlighting of variable-declarations in typescript-t... 73168793c01 Fix label indentation for Linux style in c-ts-mode (bug#6... 8575043f56b Remove duplicate entries in c-ts-mode's Imenu ef7f3c6388b Fix use of treesit-ready-p in c/c++-ts-mode cc1de953d4f ; * lisp/progmodes/gud.el (gud-tooltip-modes): Add ts- mo... 16f1e47ca8b ; * lisp/align.el (align-c++-modes): Add c/c++-ts-mode. 508389ad2bb Add documentation for c/c++-ts-mode (bug#60443) ee3e8d3f927 (ruby-ts--font-lock-settings): Improve highlighting in pa... 614f8c431d3 Optionally include the namespace in c-ts-mode--declarator... 7c356934fbb Support namespaces in c++-ts-mode (bug#60397) 757c2c25922 Fix c-ts-mode--looking-at-star 1df2826639c Add c-or-c++-ts-mode (bug#59613) 0cb686ffb6b Document the 'definition-name' property. 7f855b5297b ; Fix description of etc/DOC e9341119fe4 ; Fix documentation of etc/DOC 86a3462e3d2 (treesit-simple-indent-presets): Do that for 'or' as well. e0fef510b00 ; Minor rewording of tree-sitter terminology f58452e3ae7 Fix 'python-shell-buffer-substring' when START is in midd... 7f9588685a0 ; Fix last change e8b85f225d9 Rearrange the "Saving Emacs Sessions" section of the user... # Conflicts: # etc/NEWS # lisp/progmodes/c-ts-mode.el
Diffstat (limited to 'doc/emacs/misc.texi')
-rw-r--r--doc/emacs/misc.texi177
1 files changed, 97 insertions, 80 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index c706b727e6f..88d4188d144 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2702,40 +2702,16 @@ when point is on the first byte of a multibyte sequence in the file.
@cindex restore session
@cindex remember editing session
@cindex reload files
-@cindex desktop
-@vindex desktop-restore-frames
- Use the desktop library to save the state of Emacs from one session
-to another. Once you save the Emacs @dfn{desktop}---the buffers,
-their file names, major modes, buffer positions, and so on---then
-subsequent Emacs sessions reload the saved desktop. By default,
-the desktop also tries to save the frame and window configuration.
-To disable this, set @code{desktop-restore-frames} to @code{nil}.
-(See that variable's documentation for some related options
-that you can customize to fine-tune this behavior.)
-
-@vindex desktop-files-not-to-save
-Information about buffers visiting remote files is not saved by
-default. Customize the variable @code{desktop-files-not-to-save} to
-change this.
-
-@vindex frameset-filter-alist
- When the desktop restores the frame and window configuration, it
-uses the recorded values of frame parameters, disregarding any
-settings for those parameters you have in your init file (@pxref{Init
-File}). This means that frame parameters such as fonts and faces for
-the restored frames will come from the desktop file, where they were
-saved when you exited your previous Emacs session; any settings for
-those parameters in your init file will be ignored. To disable this,
-customize the value of @code{frameset-filter-alist} to filter out the
-frame parameters you don't want to be restored.
+@cindex desktop configuration
+ You can use the desktop library to save the state of Emacs from one
+session to another. The saved Emacs @dfn{desktop configuration}
+includes the buffers, their file names, major modes, buffer positions,
+window and frame configuration, and some important global variables.
-@findex desktop-save
@vindex desktop-save-mode
- You can save the desktop manually with the command @kbd{M-x
-desktop-save}. You can also enable automatic saving of the desktop
-when you exit Emacs, and automatic restoration of the last saved
-desktop when Emacs starts: use the Customization buffer (@pxref{Easy
+@findex desktop-save-mode
+ To enable this feature, use the Customization buffer (@pxref{Easy
Customization}) to set @code{desktop-save-mode} to @code{t} for future
sessions, or add this line in your init file (@pxref{Init File}):
@@ -2743,51 +2719,34 @@ sessions, or add this line in your init file (@pxref{Init File}):
(desktop-save-mode 1)
@end example
-@findex desktop-change-dir
-@findex desktop-revert
@vindex desktop-path
+@vindex desktop-auto-save-timeout
If you turn on @code{desktop-save-mode} in your init file, then when
-Emacs starts, it looks for a saved desktop in the current directory.
-(More precisely, it looks in the directories specified by
-@code{desktop-path}, and uses the first desktop it finds.)
-Thus, you can have separate saved desktops in different directories,
-and the starting directory determines which one Emacs reloads. You
-can save the current desktop and reload one saved in another directory
-by typing @kbd{M-x desktop-change-dir}. Typing @kbd{M-x
-desktop-revert} reverts to the desktop previously reloaded.
-
- Specify the option @samp{--no-desktop} on the command line when you
-don't want it to reload any saved desktop. This turns off
-@code{desktop-save-mode} for the current session. Starting Emacs with
-the @samp{--no-init-file} option also disables desktop reloading,
-since it bypasses the init file, where @code{desktop-save-mode} is
-usually turned on.
-
-@vindex desktop-restore-eager
- By default, all the buffers in the desktop are restored in one go.
-However, this may be slow if there are a lot of buffers in the
-desktop. You can specify the maximum number of buffers to restore
-immediately with the variable @code{desktop-restore-eager}; the
-remaining buffers are restored lazily, when Emacs is idle.
-
-@findex desktop-clear
-@vindex desktop-globals-to-clear
-@vindex desktop-clear-preserve-buffers-regexp
- Type @kbd{M-x desktop-clear} to empty the Emacs desktop. This kills
-all buffers except for internal ones, and clears the global variables
-listed in @code{desktop-globals-to-clear}. If you want this to
-preserve certain buffers, customize the variable
-@code{desktop-clear-preserve-buffers-regexp}, whose value is a regular
-expression matching the names of buffers not to kill.
+Emacs starts, it looks for a saved desktop in @code{desktop-path}
+(which defaults to @code{user-emacs-directory} and then your home
+directory) and uses the first desktop it finds. While Emacs runs with
+@code{desktop-save-mode} turned on, it by default auto-saves the
+desktop whenever any of the desktop configuration changes. The
+variable @code{desktop-auto-save-timeout} determines how frequently
+Emacs checks for modifications to your desktop. The desktop is also
+saved when you exit Emacs.
- If you want to save minibuffer history from one session to
-another, use the @code{savehist} library.
+@cindex disable restoring of desktop configuration
+ Specify the option @samp{--no-desktop} on the Emacs command line
+when you don't want it to reload any saved desktop configurations.
+This turns off @code{desktop-save-mode} for the current session.
+Starting Emacs with the @samp{--no-init-file} option also disables
+desktop reloading, since it bypasses the init file, where
+@code{desktop-save-mode} is usually turned on.
-@vindex desktop-auto-save-timeout
- While Emacs runs with @code{desktop-save-mode} turned on, it by
-default auto-saves the desktop whenever any of it changes. The
-variable @code{desktop-auto-save-timeout} determines how frequently
-Emacs checks for modifications to your desktop.
+@findex desktop-change-dir
+@findex desktop-revert
+ You can have separate saved desktop configurations in different
+directories; starting Emacs from a directory where you have a saved
+desktop configuration will restore that configuration. You can save
+the current desktop and reload the one saved in another directory by
+typing @kbd{M-x desktop-change-dir}. Typing @kbd{M-x desktop-revert}
+reverts to the previously reloaded desktop.
@vindex desktop-load-locked-desktop
The file in which Emacs saves the desktop is locked while the
@@ -2798,12 +2757,13 @@ will by default ask you whether to use the locked desktop file. You
can avoid the question by customizing the variable
@code{desktop-load-locked-desktop} to either @code{nil}, which means
never load the desktop in this case, or @code{t}, which means load the
-desktop without asking. Finally, the @code{check-pid} value means to
-load the file if the Emacs process that has locked the desktop is not
-running on the local machine. This should not be used in
-circumstances where the locking Emacs might still be running on
-another machine. This could be the case in multi-user environments
-where your home directory is mounted remotely using NFS or similar.
+desktop without asking. You can also customize the variable to the
+special value @code{check-pid}, which means to load the file if the
+Emacs process that has locked the desktop is not running on the local
+machine. This should not be used in circumstances where the locking
+Emacs might still be running on another machine, which could be the
+case in multi-user environments where your home directory is mounted
+remotely using NFS or similar.
@cindex desktop restore in daemon mode
When Emacs starts in daemon mode, it cannot ask you any questions,
@@ -2813,10 +2773,67 @@ the desktop in daemon mode is somewhat problematic for other reasons:
e.g., the daemon cannot use GUI features, so parameters such as frame
position, size, and decorations cannot be restored. For that reason,
you may wish to delay restoring the desktop in daemon mode until the
-first client connects, by calling @code{desktop-read} in a hook
-function that you add to @code{server-after-make-frame-hook}
+first client connects, by calling @code{desktop-read} (see below) in a
+hook function that you add to @code{server-after-make-frame-hook}
(@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}).
+@findex desktop-save
+@findex desktop-read
+ Whenever you want, you can use the command @kbd{M-x desktop-save} to
+force immediate saving of the current desktop. This is useful either
+if you do not want to use the automatic desktop restoration, and thus
+don't turn on @code{desktop-save-mode}, or when you have made
+significant changes to the desktop, and want to make sure the
+configuration doesn't get lost if Emacs or your system crashes. You
+can use @kbd{M-x desktop-read} to restore a previously-saved desktop
+if the current Emacs session didn't load any desktop yet.
+
+@vindex desktop-restore-frames
+ By default, the desktop tries to save and restore the frame and
+window configuration. To disable this, set
+@code{desktop-restore-frames} to @code{nil}. (See that variable's
+documentation for some related options that you can customize to
+fine-tune this behavior.)
+
+@vindex frameset-filter-alist
+ When the desktop restores the frame and window configuration, it
+uses the recorded values of frame parameters, disregarding any
+settings for those parameters you have in your init file (@pxref{Init
+File}). This means that frame parameters such as fonts and faces for
+the restored frames will come from the desktop file, where they were
+saved when you exited your previous Emacs session; any settings for
+those parameters in your init file will be ignored. To disable this,
+customize the value of @code{frameset-filter-alist} to filter out the
+frame parameters you don't want to be restored; they will then be set
+according to your customizations in the init file.
+
+@vindex desktop-files-not-to-save
+ Information about buffers visiting remote files is not saved by
+default. Customize the variable @code{desktop-files-not-to-save} to
+change this.
+
+@vindex desktop-restore-eager
+ By default, all the buffers in the desktop are restored in one go.
+However, this may be slow if there are a lot of buffers in the
+desktop. You can specify the maximum number of buffers to restore
+immediately with the variable @code{desktop-restore-eager}; the
+remaining buffers are restored lazily, when Emacs is idle.
+
+@findex desktop-clear
+@vindex desktop-globals-to-clear
+@vindex desktop-clear-preserve-buffers-regexp
+ Type @kbd{M-x desktop-clear} to empty the Emacs desktop; this can be
+useful, for example, if you want to switch to another desktop by
+invoking @kbd{M-x desktop-read} next. The @code{desktop-clear}
+command kills all buffers except for internal ones, and clears the
+global variables listed in @code{desktop-globals-to-clear}. If you
+want it to preserve certain buffers, customize the variable
+@code{desktop-clear-preserve-buffers-regexp}, whose value is a regular
+expression matching the names of buffers not to kill.
+
+ If you want to save minibuffer history from one session to
+another, use the @code{savehist} library.
+
@node Recursive Edit
@section Recursive Editing Levels
@cindex recursive editing level