Mercurial > emacs
annotate doc/emacs/entering.texi @ 109453:af9e12929a95
Merge latest fix to xg_event_is_for_menubar.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 17 Jul 2010 10:43:41 -0400 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
84238 | 1 @c This is part of the Emacs manual. |
2 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 2001, 2002, 2003, | |
106815 | 3 @c 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
84238 | 4 @c See file emacs.texi for copying conditions. |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
5 @iftex |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
6 @chapter Entering and Exiting Emacs |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
7 |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
8 This chapter explains how to enter Emacs, and how to exit it. |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
9 @end iftex |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
10 |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
11 @ifnottex |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
12 @raisesections |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
13 @end ifnottex |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
14 |
96672
a1389f8b4976
(Entering Emacs): Update prev node.
Chong Yidong <cyd@stupidchicken.com>
parents:
87903
diff
changeset
|
15 @node Entering Emacs, Exiting, Commands, Top |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
16 @section Entering Emacs |
84238 | 17 @cindex entering Emacs |
18 @cindex starting Emacs | |
19 | |
20 The usual way to invoke Emacs is with the shell command | |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
21 @command{emacs}. From a terminal window running in the X Window |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
22 System, you can also run Emacs in the background with |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
23 @command{emacs&}; this way, Emacs won't tie up the terminal window, so |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
24 you can use it to run other shell commands. |
84238 | 25 |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
26 @cindex startup screen |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
27 When Emacs starts up, the initial frame displays a special buffer |
99418
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
28 named @samp{*GNU Emacs*}. This buffer contains some information about |
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
29 Emacs, and includes @dfn{links} to common tasks that might be useful |
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
30 to beginning users. For instance, activating the @samp{Emacs |
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
31 Tutorial} link opens the Emacs tutorial; this does the same thing as |
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
32 the command @kbd{C-h t} (@code{help-with-tutorial}). To activate a |
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
33 link, either move point onto it and type @kbd{@key{RET}}, or click on |
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
34 it with @kbd{mouse-1} (the left mouse button). |
84238 | 35 |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
36 Using a command line argument, you can tell Emacs to visit one or |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
37 more specific files as soon as it starts up. For example, |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
38 @command{emacs foo.txt} starts Emacs with a buffer displaying the |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
39 contents of the file @samp{foo.txt}. This feature exists mainly for |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
40 compatibility with other editors, which are designed to edit one file |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
41 at a time: once you are done with that file, you exit the editor, and |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
42 start it again the next time you need it. |
84238 | 43 |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
44 Using Emacs in this way---starting it afresh each time you want to |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
45 edit a file---is unnecessary and wasteful. Emacs can visit more than |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
46 one file in a single editing session, and exiting the Emacs session |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
47 loses valuable accumulated context, such as the kill ring, registers, |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
48 undo history, and mark ring. These features, described later in the |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
49 manual, are useful for performing edits across multiple files, or |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
50 continuing edits to a single file. |
84238 | 51 |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
52 The recommended way to use Emacs is to start it only once, just |
84238 | 53 after you log in, and do all your editing in the same Emacs session. |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
54 Each time you edit a file, visit it with the existing Emacs, which |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
55 eventually has many files in it ready for editing. @xref{Files}, for |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
56 more information on visiting more than one file. |
84238 | 57 |
58 To edit a file from another program while Emacs is running, you can | |
59 use the @command{emacsclient} helper program to open a file in the | |
60 already running Emacs. @xref{Emacs Server}. | |
61 | |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
62 Emacs accepts other command line arguments that tell it to load |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
63 certain Lisp files, call certain functions, and so forth. These |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
64 features exist mainly for advanced users. @xref{Emacs Invocation}. |
84238 | 65 |
99418
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
66 @vindex inhibit-startup-screen |
103044
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
67 If the variable @code{inhibit-startup-screen} is non-@code{nil}, |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
68 Emacs does not display the startup screen. In that case, if one or |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
69 more files were specified on the command line, Emacs simply displays |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
70 those files; otherwise, it displays a buffer named @samp{*scratch*}, |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
71 which can be used to evaluate Emacs Lisp expressions interactively. |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
72 @xref{Lisp Interaction}. You can set the variable |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
73 @code{inhibit-startup-screen} using the Customize facility |
99517
02ecf5b17db2
(Entering Emacs): Note that inhibit-startup-screen can't be changed in
Chong Yidong <cyd@stupidchicken.com>
parents:
99418
diff
changeset
|
74 (@pxref{Easy Customization}), or by editing your initialization file |
02ecf5b17db2
(Entering Emacs): Note that inhibit-startup-screen can't be changed in
Chong Yidong <cyd@stupidchicken.com>
parents:
99418
diff
changeset
|
75 (@pxref{Init File}).@footnote{Note that setting |
02ecf5b17db2
(Entering Emacs): Note that inhibit-startup-screen can't be changed in
Chong Yidong <cyd@stupidchicken.com>
parents:
99418
diff
changeset
|
76 @code{inhibit-startup-screen} in @file{site-start.el} doesn't work, |
02ecf5b17db2
(Entering Emacs): Note that inhibit-startup-screen can't be changed in
Chong Yidong <cyd@stupidchicken.com>
parents:
99418
diff
changeset
|
77 because the startup screen is set up before reading |
02ecf5b17db2
(Entering Emacs): Note that inhibit-startup-screen can't be changed in
Chong Yidong <cyd@stupidchicken.com>
parents:
99418
diff
changeset
|
78 @file{site-start.el}. @xref{Init File}, for information about |
02ecf5b17db2
(Entering Emacs): Note that inhibit-startup-screen can't be changed in
Chong Yidong <cyd@stupidchicken.com>
parents:
99418
diff
changeset
|
79 @file{site-start.el}.} |
99418
5e2ae9519997
(Entering Emacs): Document inhibit-startup-screen.
Chong Yidong <cyd@stupidchicken.com>
parents:
98611
diff
changeset
|
80 |
103044
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
81 You can also force Emacs to display a file or directory at startup |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
82 by setting the variable @code{initial-buffer-choice} to a |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
83 non-@code{nil} value. (In that case, even if you specify one or more |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
84 files on the command line, Emacs opens but does not display them.) |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
85 The value of @code{initial-buffer-choice} can be either the name of |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
86 the desired file or directory, or @code{t}, which means to display the |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
87 @samp{*scratch*} buffer. |
cede530821ca
* entering.texi (Entering Emacs): Document initial-buffer-choice.
Chong Yidong <cyd@stupidchicken.com>
parents:
100974
diff
changeset
|
88 |
84238 | 89 @node Exiting, Basic, Entering Emacs, Top |
90 @section Exiting Emacs | |
91 @cindex exiting | |
92 @cindex killing Emacs | |
93 @cindex leaving Emacs | |
94 @cindex quitting Emacs | |
95 | |
96 @table @kbd | |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
97 @item C-x C-c |
98611
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
98 Kill Emacs (@code{save-buffers-kill-terminal}). |
84238 | 99 @item C-z |
105118
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
100 On a text terminal, suspend Emacs; on a graphical display, |
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
101 ``minimize'' the selected frame (@code{suspend-emacs}). |
84238 | 102 @end table |
103 | |
104 @kindex C-x C-c | |
98611
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
105 @findex save-buffers-kill-terminal |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
106 @dfn{Killing} Emacs means terminating the Emacs program. To do |
98611
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
107 this, type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}). A |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
108 two-character key is used to make it harder to type by accident. If |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
109 there are any modified file-visiting buffers when you type @kbd{C-x |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
110 C-c}, Emacs first offers to save these buffers. If you do not save |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
111 them all, it asks for confirmation again, since the unsaved changes |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
112 will be lost. Emacs also asks for confirmation if any subprocesses |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
113 are still running, since killing Emacs will also kill the subprocesses |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
114 (@pxref{Shell}). |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
115 |
98611
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
116 @kbd{C-x C-c} behaves specially if you are using Emacs as a server. |
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
117 If you type it from a ``client frame'', it closes the client |
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
118 connection. @xref{Emacs Server}. |
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
119 |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
120 Emacs can, optionally, record certain session information when you |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
121 kill it, such as the files you were visiting at the time. This |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
122 information is then available the next time you start Emacs. |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
123 @xref{Saving Emacs Sessions}. |
84238 | 124 |
125 @vindex confirm-kill-emacs | |
126 If the value of the variable @code{confirm-kill-emacs} is | |
127 non-@code{nil}, @kbd{C-x C-c} assumes that its value is a predicate | |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
128 function, and calls that function. If the result of the function call |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
129 is non-@code{nil}, the session is killed, otherwise Emacs continues to |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
130 run. One convenient function to use as the value of |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
131 @code{confirm-kill-emacs} is the function @code{yes-or-no-p}. The |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
132 default value of @code{confirm-kill-emacs} is @code{nil}. |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
133 |
98611
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
134 @findex kill-emacs |
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
135 To kill Emacs without being prompted about saving, type @kbd{M-x |
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
136 kill-emacs}. |
11d68e001d21
(Exiting): Document change of C-x C-c to save-buffers-kill-terminal.
Chong Yidong <cyd@stupidchicken.com>
parents:
96679
diff
changeset
|
137 |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
138 @cindex minimizing a frame |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
139 @cindex iconifying |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
140 @cindex suspending |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
141 You can ``exit'' Emacs in two other ways. On a graphical display, |
105118
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
142 you can @dfn{minimize} (or @dfn{iconify}) an Emacs frame; depending on |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
143 the window system, this either replaces the Emacs frame with a tiny |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
144 ``icon'' or conceals the frame entirely (@pxref{Frames}). On a |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
145 text-only terminal, you can @dfn{suspend} Emacs; this means stopping |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
146 the Emacs program temporarily, returning control to its parent process |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
147 (usually a shell). |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
148 |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
149 @kindex C-z |
105118
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
150 @findex suspend-frame |
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
151 @kbd{C-z} runs the command @code{suspend-frame}. On a graphical |
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
152 display, this ``minimizes'' (or ``iconifies'') the selected Emacs |
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
153 frame. On a text terminal, this suspends the Emacs process. |
84238 | 154 |
105118
e73a8ec76227
* frames.texi (Frame Commands): C-z is now bound to suspend-frame.
Chong Yidong <cyd@stupidchicken.com>
parents:
103044
diff
changeset
|
155 After minimizing or suspending Emacs, you can return to it and |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
156 continue editing wherever you left off. The way to do this depends on |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
157 the window system or shell. In most common shells, you can resume |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
158 Emacs after suspending it with the shell command @command{%emacs}. |
84238 | 159 |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
160 @vindex cannot-suspend |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
161 On very old systems that don't support suspending programs, |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
162 @kbd{C-z} starts an inferior shell that communicates directly with the |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
163 terminal, and Emacs waits until you exit the subshell. (The way to |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
164 exit the subshell is usually @kbd{C-d} or @command{exit}.) On these |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
165 systems, you can only get back to the shell from which Emacs was run |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
166 (to log out, for example) when you kill Emacs. Suspending can also |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
167 fail if you run Emacs under a shell that doesn't support suspending |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
168 jobs, even if the system itself does support it. In this case, you |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
169 can set the variable @code{cannot-suspend} to a non-@code{nil} value |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
170 to force @kbd{C-z} to start an inferior shell. |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
171 |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
172 Text-only terminals usually listen for certain special characters |
84238 | 173 whose meaning is to kill or suspend the program you are running. |
96679
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
174 @b{This terminal feature is turned off while you are in Emacs.} The |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
175 meanings of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were inspired |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
176 by the use of @kbd{C-z} and @kbd{C-c} on several operating systems as |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
177 the characters for stopping or killing a program, but that is their |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
178 only relationship with the operating system. You can customize these |
63f9db422930
(Exiting): Don't describe text-only terminals as the
Chong Yidong <cyd@stupidchicken.com>
parents:
96672
diff
changeset
|
179 keys to run any commands of your choice (@pxref{Keymaps}). |
84238 | 180 |
181 @ifnottex | |
182 @lowersections | |
183 @end ifnottex | |
184 | |
185 @ignore | |
186 arch-tag: df798d8b-f253-4113-b585-f528f078a944 | |
187 @end ignore |