annotate etc/OTHER.EMACSES @ 43462:e4c4106d2160

(BASE_PURESIZE): Increase to 755000.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 22 Feb 2002 14:43:39 +0000
parents e96ffe544684
children 23a1cea22d13
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25853
Dave Love <fx@gnu.org>
parents:
diff changeset
1 How is this Emacs different from all other Emacses? -*-Outline-*-
Dave Love <fx@gnu.org>
parents:
diff changeset
2
Dave Love <fx@gnu.org>
parents:
diff changeset
3 This file describes the differences between GNU Emacs 19, Twenex
Dave Love <fx@gnu.org>
parents:
diff changeset
4 Emacs, Gosling Emacs (including the commercial versions by Unipress)
Dave Love <fx@gnu.org>
parents:
diff changeset
5 and CCA Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
6
Dave Love <fx@gnu.org>
parents:
diff changeset
7 * Copyright (c) 1985 Richard M. Stallman
Dave Love <fx@gnu.org>
parents:
diff changeset
8
Dave Love <fx@gnu.org>
parents:
diff changeset
9 Permission is granted to anyone to make or distribute verbatim copies
Dave Love <fx@gnu.org>
parents:
diff changeset
10 of this document as received, in any medium, provided that the
Dave Love <fx@gnu.org>
parents:
diff changeset
11 copyright notice and permission notice are preserved,
Dave Love <fx@gnu.org>
parents:
diff changeset
12 and that the distributor grants the recipient permission
Dave Love <fx@gnu.org>
parents:
diff changeset
13 for further redistribution as permitted by this notice.
Dave Love <fx@gnu.org>
parents:
diff changeset
14
Dave Love <fx@gnu.org>
parents:
diff changeset
15 Permission is granted to distribute modified versions
Dave Love <fx@gnu.org>
parents:
diff changeset
16 of this document, or of portions of it,
Dave Love <fx@gnu.org>
parents:
diff changeset
17 under the above conditions, provided also that they
Dave Love <fx@gnu.org>
parents:
diff changeset
18 carry prominent notices stating who last changed them.
Dave Love <fx@gnu.org>
parents:
diff changeset
19
Dave Love <fx@gnu.org>
parents:
diff changeset
20 Updated March 1993 for Emacs 19 by Eric S. Raymond
Dave Love <fx@gnu.org>
parents:
diff changeset
21
Dave Love <fx@gnu.org>
parents:
diff changeset
22
Dave Love <fx@gnu.org>
parents:
diff changeset
23 * How is this Emacs different from Twenex Emacs?
Dave Love <fx@gnu.org>
parents:
diff changeset
24
Dave Love <fx@gnu.org>
parents:
diff changeset
25 ** Fundamental concepts.
Dave Love <fx@gnu.org>
parents:
diff changeset
26
Dave Love <fx@gnu.org>
parents:
diff changeset
27 *** There is no concept of "typeout" in GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
28
Dave Love <fx@gnu.org>
parents:
diff changeset
29 Any time that a command wants to display some output,
Dave Love <fx@gnu.org>
parents:
diff changeset
30 it creates a buffer (usually with a name surrounded by asterisks)
Dave Love <fx@gnu.org>
parents:
diff changeset
31 and displays it in a window.
Dave Love <fx@gnu.org>
parents:
diff changeset
32
Dave Love <fx@gnu.org>
parents:
diff changeset
33 This provides some advantages:
Dave Love <fx@gnu.org>
parents:
diff changeset
34 you can edit some more while looking at the output;
Dave Love <fx@gnu.org>
parents:
diff changeset
35 you can copy parts of the output into other buffers.
Dave Love <fx@gnu.org>
parents:
diff changeset
36
Dave Love <fx@gnu.org>
parents:
diff changeset
37 It also has a disadvantage that you must type a command
Dave Love <fx@gnu.org>
parents:
diff changeset
38 in order to make the output disappear.
Dave Love <fx@gnu.org>
parents:
diff changeset
39 You can use C-x 1 to get rid of all windows except the
Dave Love <fx@gnu.org>
parents:
diff changeset
40 selected one. To be more selective, you can switch to
Dave Love <fx@gnu.org>
parents:
diff changeset
41 the window you want to get rid of and then type C-x 0
Dave Love <fx@gnu.org>
parents:
diff changeset
42 (delete-window).
Dave Love <fx@gnu.org>
parents:
diff changeset
43
Dave Love <fx@gnu.org>
parents:
diff changeset
44 You also need to type a command to scroll the other
Dave Love <fx@gnu.org>
parents:
diff changeset
45 window if not all the output fits in it. Meta-Control-v
Dave Love <fx@gnu.org>
parents:
diff changeset
46 will usually do the job.
Dave Love <fx@gnu.org>
parents:
diff changeset
47
Dave Love <fx@gnu.org>
parents:
diff changeset
48 *** There is no concept of a "subsystem" in GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
49
Dave Love <fx@gnu.org>
parents:
diff changeset
50 Where Twenex Emacs would use a subsystem, GNU Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
51 instead creates a buffer and redefines commands in it.
Dave Love <fx@gnu.org>
parents:
diff changeset
52
Dave Love <fx@gnu.org>
parents:
diff changeset
53 For example, when you send mail in GNU Emacs, you use
Dave Love <fx@gnu.org>
parents:
diff changeset
54 a buffer named *mail* which is in Mail Mode. You can
Dave Love <fx@gnu.org>
parents:
diff changeset
55 switch away from this buffer to any other buffer and
Dave Love <fx@gnu.org>
parents:
diff changeset
56 resume normal editing; then switch back and resume
Dave Love <fx@gnu.org>
parents:
diff changeset
57 composing mail. You do not have to "exit" from
Dave Love <fx@gnu.org>
parents:
diff changeset
58 composing mail in order to do ordinary editing.
Dave Love <fx@gnu.org>
parents:
diff changeset
59
Dave Love <fx@gnu.org>
parents:
diff changeset
60 This has many advantages, but it also has a disadvantage:
Dave Love <fx@gnu.org>
parents:
diff changeset
61 Subsystems in Emacs tend to have "exit" commands that return you
Dave Love <fx@gnu.org>
parents:
diff changeset
62 to whatever you were doing before entering the subsystem.
Dave Love <fx@gnu.org>
parents:
diff changeset
63 In GNU Emacs the idea of what to return to is not well defined,
Dave Love <fx@gnu.org>
parents:
diff changeset
64 so it is not clear what an "exit" command should do.
Dave Love <fx@gnu.org>
parents:
diff changeset
65 The only way to "exit" in general is to type C-x b, C-x C-f, or
Dave Love <fx@gnu.org>
parents:
diff changeset
66 some other suitable command to switch buffers. Some
Dave Love <fx@gnu.org>
parents:
diff changeset
67 subsystem-like major modes, such as Info and Mail mode, provide
Dave Love <fx@gnu.org>
parents:
diff changeset
68 commands to "exit" by switching to the previously selected
Dave Love <fx@gnu.org>
parents:
diff changeset
69 buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
70
Dave Love <fx@gnu.org>
parents:
diff changeset
71 *** Files are always visited in their own buffers.
Dave Love <fx@gnu.org>
parents:
diff changeset
72
Dave Love <fx@gnu.org>
parents:
diff changeset
73 Beginning users of Twenex Emacs were told how to edit
Dave Love <fx@gnu.org>
parents:
diff changeset
74 using a single buffer and reading one file after another
Dave Love <fx@gnu.org>
parents:
diff changeset
75 into that buffer. Use of a new buffer for each file was
Dave Love <fx@gnu.org>
parents:
diff changeset
76 regarded as a more advanced mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
77
Dave Love <fx@gnu.org>
parents:
diff changeset
78 In GNU Emacs, the idea of using a single buffer for various
Dave Love <fx@gnu.org>
parents:
diff changeset
79 files, one by one, has been dropped, given that the address
Dave Love <fx@gnu.org>
parents:
diff changeset
80 space is expected to be large enough for many buffers. C-x
Dave Love <fx@gnu.org>
parents:
diff changeset
81 C-f (find-file), which behaves nearly the same as in Twenex
Dave Love <fx@gnu.org>
parents:
diff changeset
82 Emacs, is in GNU Emacs the canonical way for all users to
Dave Love <fx@gnu.org>
parents:
diff changeset
83 visit files.
Dave Love <fx@gnu.org>
parents:
diff changeset
84
Dave Love <fx@gnu.org>
parents:
diff changeset
85 Various commands need to read files into Emacs in the course
Dave Love <fx@gnu.org>
parents:
diff changeset
86 of their execution. In Twenex Emacs the user must tell them
Dave Love <fx@gnu.org>
parents:
diff changeset
87 whether to reuse buffers or create new ones, using the variable
Dave Love <fx@gnu.org>
parents:
diff changeset
88 Tags Find File. In GNU Emacs, these commands always use
Dave Love <fx@gnu.org>
parents:
diff changeset
89 C-x C-f.
Dave Love <fx@gnu.org>
parents:
diff changeset
90
Dave Love <fx@gnu.org>
parents:
diff changeset
91 The command C-x C-v does still exist; it kills the current
Dave Love <fx@gnu.org>
parents:
diff changeset
92 buffer and reads the specified file into a new buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
93 It is equivalent to kill-buffer followed by find-file.
Dave Love <fx@gnu.org>
parents:
diff changeset
94
Dave Love <fx@gnu.org>
parents:
diff changeset
95 Since there is no reusing of buffers, there is no point in
Dave Love <fx@gnu.org>
parents:
diff changeset
96 calling the initial buffer "main". So the initial buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
97 in GNU Emacs is called "*scratch*" and is intended for typing
Dave Love <fx@gnu.org>
parents:
diff changeset
98 Lisp expressions to be evaluated.
Dave Love <fx@gnu.org>
parents:
diff changeset
99
Dave Love <fx@gnu.org>
parents:
diff changeset
100 *** File name defaulting.
Dave Love <fx@gnu.org>
parents:
diff changeset
101
Dave Love <fx@gnu.org>
parents:
diff changeset
102 GNU Emacs records a separate working directory for each buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
103 Normally this is the directory on which the buffer's file
Dave Love <fx@gnu.org>
parents:
diff changeset
104 resides; for buffers not visiting any file, it is copied from
Dave Love <fx@gnu.org>
parents:
diff changeset
105 the buffer that was current when it was created. The current buffer's
Dave Love <fx@gnu.org>
parents:
diff changeset
106 working directory can be printed with M-x pwd and set with M-x cd.
Dave Love <fx@gnu.org>
parents:
diff changeset
107
Dave Love <fx@gnu.org>
parents:
diff changeset
108 GNU Emacs shows you the default directory by inserting it in
Dave Love <fx@gnu.org>
parents:
diff changeset
109 the minibuffer when a file name is being read. You can type
Dave Love <fx@gnu.org>
parents:
diff changeset
110 the filename you want at the end of the default as if the
Dave Love <fx@gnu.org>
parents:
diff changeset
111 default were not there, or you can edit and alter the default.
Dave Love <fx@gnu.org>
parents:
diff changeset
112
Dave Love <fx@gnu.org>
parents:
diff changeset
113 If you want file /lose/big when the default /foo/defaultdir/
Dave Love <fx@gnu.org>
parents:
diff changeset
114 has been inserted for you, you need not kill the default; simply
Dave Love <fx@gnu.org>
parents:
diff changeset
115 type at the end of it: /foo/defaultdir//lose/big. Such a file
Dave Love <fx@gnu.org>
parents:
diff changeset
116 name is not ordinarily considered valid, but GNU Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
117 considers it equivalent to /lose/big.
Dave Love <fx@gnu.org>
parents:
diff changeset
118
Dave Love <fx@gnu.org>
parents:
diff changeset
119 Likewise, if you want file quux in your home directory, just add
Dave Love <fx@gnu.org>
parents:
diff changeset
120 ~/quux to the end of the supplied text, to get
Dave Love <fx@gnu.org>
parents:
diff changeset
121 /foo/defaultdir/~/quux. GNU Emacs sees "/~" and throws away
Dave Love <fx@gnu.org>
parents:
diff changeset
122 everything before the "~".
Dave Love <fx@gnu.org>
parents:
diff changeset
123
Dave Love <fx@gnu.org>
parents:
diff changeset
124 You can refer to environment variables also within file names.
Dave Love <fx@gnu.org>
parents:
diff changeset
125 $ followed by the environment variable name is replaced by the
Dave Love <fx@gnu.org>
parents:
diff changeset
126 variable's value. The variable name should either be followed
Dave Love <fx@gnu.org>
parents:
diff changeset
127 by a nonalphanumeric character (which counts as part of the
Dave Love <fx@gnu.org>
parents:
diff changeset
128 file name) or be surrounded by braces {...} (which do not count
Dave Love <fx@gnu.org>
parents:
diff changeset
129 as part of the file name). Thus, if variable USER has value "rms",
Dave Love <fx@gnu.org>
parents:
diff changeset
130 "x/$USER-foo" is expanded to "x/rms-foo", and "x${USER}foo"
Dave Love <fx@gnu.org>
parents:
diff changeset
131 is expanded to "xrmsfoo". Note that this substitution is not
Dave Love <fx@gnu.org>
parents:
diff changeset
132 performed by the primitive file operation functions of GNU Emacs,
Dave Love <fx@gnu.org>
parents:
diff changeset
133 but rather by the interactive file name reader. It is also
Dave Love <fx@gnu.org>
parents:
diff changeset
134 available as a separate primitive, in the function
Dave Love <fx@gnu.org>
parents:
diff changeset
135 substitute-in-file-name.
Dave Love <fx@gnu.org>
parents:
diff changeset
136
Dave Love <fx@gnu.org>
parents:
diff changeset
137 *** Exit commands C-z, C-x C-c and C-x C-z.
Dave Love <fx@gnu.org>
parents:
diff changeset
138
Dave Love <fx@gnu.org>
parents:
diff changeset
139 There are two ways to exit GNU Emacs: killing and suspending.
Dave Love <fx@gnu.org>
parents:
diff changeset
140 Killing is like what Control-c does to ordinary Unix programs.
Dave Love <fx@gnu.org>
parents:
diff changeset
141 In GNU Emacs, you type C-x C-c to kill it. (This offers to
Dave Love <fx@gnu.org>
parents:
diff changeset
142 save any modified file buffers before really killing Emacs.)
Dave Love <fx@gnu.org>
parents:
diff changeset
143 Suspending is like what Control-z does to ordinary Unix programs.
Dave Love <fx@gnu.org>
parents:
diff changeset
144 To suspend GNU Emacs, type C-x C-z, or type just C-z.
Dave Love <fx@gnu.org>
parents:
diff changeset
145 Note that C-z suspends ordinary programs instantly, but
Dave Love <fx@gnu.org>
parents:
diff changeset
146 Emacs does not suspend until it reads the C-z.
Dave Love <fx@gnu.org>
parents:
diff changeset
147
Dave Love <fx@gnu.org>
parents:
diff changeset
148 Usually it is better to suspend: once a system is smart
Dave Love <fx@gnu.org>
parents:
diff changeset
149 enough to have job control, why ever kill an editor?
Dave Love <fx@gnu.org>
parents:
diff changeset
150 You'll just have to make a new one in a minute.
Dave Love <fx@gnu.org>
parents:
diff changeset
151 This is why the convenient command C-z is provided for
Dave Love <fx@gnu.org>
parents:
diff changeset
152 suspending.
Dave Love <fx@gnu.org>
parents:
diff changeset
153
Dave Love <fx@gnu.org>
parents:
diff changeset
154 C-c is used as a prefix key for mode-specific commands and for users'
Dave Love <fx@gnu.org>
parents:
diff changeset
155 own commands. We deliberately do not make C-c ever kill Emacs,
Dave Love <fx@gnu.org>
parents:
diff changeset
156 because it should not be so easy to do something irreversible.
Dave Love <fx@gnu.org>
parents:
diff changeset
157
Dave Love <fx@gnu.org>
parents:
diff changeset
158 *** Quitting with C-g.
Dave Love <fx@gnu.org>
parents:
diff changeset
159
Dave Love <fx@gnu.org>
parents:
diff changeset
160 If you type C-g while GNU Emacs is waiting for input, it
Dave Love <fx@gnu.org>
parents:
diff changeset
161 is an ordinary command (which is defined to beep). If you
Dave Love <fx@gnu.org>
parents:
diff changeset
162 type C-g while Lisp code is executing, it sets a flag which
Dave Love <fx@gnu.org>
parents:
diff changeset
163 causes a special signal, nearly the same as an error, to
Dave Love <fx@gnu.org>
parents:
diff changeset
164 happen at the next safe place in Lisp execution. This usually
Dave Love <fx@gnu.org>
parents:
diff changeset
165 has the effect of aborting the current command in a safe way.
Dave Love <fx@gnu.org>
parents:
diff changeset
166
Dave Love <fx@gnu.org>
parents:
diff changeset
167 Because at times there have been bugs causing GNU Emacs to loop
Dave Love <fx@gnu.org>
parents:
diff changeset
168 without checking the quit flag, a special feature causes
Dave Love <fx@gnu.org>
parents:
diff changeset
169 GNU Emacs to be suspended immediately if you type a second C-g
Dave Love <fx@gnu.org>
parents:
diff changeset
170 while the flag is already set. So you can always get out
Dave Love <fx@gnu.org>
parents:
diff changeset
171 of GNU Emacs. Normally GNU Emacs recognizes and clears the quit flag
Dave Love <fx@gnu.org>
parents:
diff changeset
172 quickly enough to prevent this from happening.
Dave Love <fx@gnu.org>
parents:
diff changeset
173
Dave Love <fx@gnu.org>
parents:
diff changeset
174 When you resume GNU Emacs after a suspension caused by multiple C-g, it
Dave Love <fx@gnu.org>
parents:
diff changeset
175 asks two questions before resuming execution:
Dave Love <fx@gnu.org>
parents:
diff changeset
176 Checkpoint?
Dave Love <fx@gnu.org>
parents:
diff changeset
177 Dump core?
Dave Love <fx@gnu.org>
parents:
diff changeset
178 Answer each one with `y' or `n' and a Return.
Dave Love <fx@gnu.org>
parents:
diff changeset
179 `y' to Checkpoint? causes immediate auto-saving of all
Dave Love <fx@gnu.org>
parents:
diff changeset
180 buffers in which auto-saving is enabled.
Dave Love <fx@gnu.org>
parents:
diff changeset
181 `y' to Dump core? causes an illegal instruction to be executed.
Dave Love <fx@gnu.org>
parents:
diff changeset
182 This is to enable a wizard to figure out why GNU Emacs was
Dave Love <fx@gnu.org>
parents:
diff changeset
183 looping without checking for quits. Execution does not continue
Dave Love <fx@gnu.org>
parents:
diff changeset
184 after a core dump. If you answer `n', execution continues.
Dave Love <fx@gnu.org>
parents:
diff changeset
185 With luck, GNU Emacs will ultimately check the quit flag,
Dave Love <fx@gnu.org>
parents:
diff changeset
186 and quit normally. If not, and you type another C-g, it
Dave Love <fx@gnu.org>
parents:
diff changeset
187 is suspended again.
Dave Love <fx@gnu.org>
parents:
diff changeset
188
Dave Love <fx@gnu.org>
parents:
diff changeset
189 If GNU Emacs is not really hung, just slow, you may invoke
Dave Love <fx@gnu.org>
parents:
diff changeset
190 the double C-g feature without really meaning to. Then just
Dave Love <fx@gnu.org>
parents:
diff changeset
191 resume and answer `n' to both questions, and you will
Dave Love <fx@gnu.org>
parents:
diff changeset
192 arrive at your former state. Presumably the quit you
Dave Love <fx@gnu.org>
parents:
diff changeset
193 wanted will finish happening soon.
Dave Love <fx@gnu.org>
parents:
diff changeset
194
Dave Love <fx@gnu.org>
parents:
diff changeset
195 These questions are not asked if you suspend GNU Emacs with the C-z
Dave Love <fx@gnu.org>
parents:
diff changeset
196 command. Continuing GNU Emacs after a C-z takes you straight back
Dave Love <fx@gnu.org>
parents:
diff changeset
197 into editing.
Dave Love <fx@gnu.org>
parents:
diff changeset
198
Dave Love <fx@gnu.org>
parents:
diff changeset
199 *** Undoing with C-x u or C-_
Dave Love <fx@gnu.org>
parents:
diff changeset
200
Dave Love <fx@gnu.org>
parents:
diff changeset
201 You can undo many commands--up to 10,000 characters worth.
Dave Love <fx@gnu.org>
parents:
diff changeset
202 Each time you type C-x u or C-_, another command or batch of change
Dave Love <fx@gnu.org>
parents:
diff changeset
203 is undone. Undo information is stored per buffer, and the undo
Dave Love <fx@gnu.org>
parents:
diff changeset
204 command always applies to the current buffer. A numeric argument
Dave Love <fx@gnu.org>
parents:
diff changeset
205 serves as a repeat count.
Dave Love <fx@gnu.org>
parents:
diff changeset
206
Dave Love <fx@gnu.org>
parents:
diff changeset
207 Consecutive self-inserting characters are undone in groups of twenty.
Dave Love <fx@gnu.org>
parents:
diff changeset
208
Dave Love <fx@gnu.org>
parents:
diff changeset
209 *** Different character set.
Dave Love <fx@gnu.org>
parents:
diff changeset
210
Dave Love <fx@gnu.org>
parents:
diff changeset
211 GNU Emacs does not expect anyone ever to have a keyboard in which
Dave Love <fx@gnu.org>
parents:
diff changeset
212 the Control key sets an independent bit which may accompany any
Dave Love <fx@gnu.org>
parents:
diff changeset
213 character. The only control characters that can exist are the
Dave Love <fx@gnu.org>
parents:
diff changeset
214 ASCII control characters.
Dave Love <fx@gnu.org>
parents:
diff changeset
215
Dave Love <fx@gnu.org>
parents:
diff changeset
216 There is, as a result, no "control prefix" character.
Dave Love <fx@gnu.org>
parents:
diff changeset
217
Dave Love <fx@gnu.org>
parents:
diff changeset
218 *** Control-h is the Help character.
Dave Love <fx@gnu.org>
parents:
diff changeset
219
Dave Love <fx@gnu.org>
parents:
diff changeset
220 I'm amazed it took me so long to get this idea. In Twenex Emacs, C-h
Dave Love <fx@gnu.org>
parents:
diff changeset
221 and C-b are equivalent commands, making C-h redundant. C-h is not
Dave Love <fx@gnu.org>
parents:
diff changeset
222 only easy to type, it is mnemonic for "Help". So in GNU Emacs the
Dave Love <fx@gnu.org>
parents:
diff changeset
223 Help character is C-h.
Dave Love <fx@gnu.org>
parents:
diff changeset
224
Dave Love <fx@gnu.org>
parents:
diff changeset
225 *** Completion is done by TAB, not ESC.
Dave Love <fx@gnu.org>
parents:
diff changeset
226
Dave Love <fx@gnu.org>
parents:
diff changeset
227 ESC in the minibuffer is a Meta prefix, same as at top level.
Dave Love <fx@gnu.org>
parents:
diff changeset
228
Dave Love <fx@gnu.org>
parents:
diff changeset
229 *** The string-argument reader is the minibuffer is an editor window.
Dave Love <fx@gnu.org>
parents:
diff changeset
230
Dave Love <fx@gnu.org>
parents:
diff changeset
231 In GNU Emacs, the line at the bottom of the screen is the minibuffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
232 Commands that want string arguments always use this line to read them,
Dave Love <fx@gnu.org>
parents:
diff changeset
233 and you can use the ordinary Emacs editing commands to edit the
Dave Love <fx@gnu.org>
parents:
diff changeset
234 input. You can terminate input with Return because Return is defined
Dave Love <fx@gnu.org>
parents:
diff changeset
235 as the exit-minibuffer command when in the minibuffer. If you
Dave Love <fx@gnu.org>
parents:
diff changeset
236 are using a command that needs several arguments, terminate each
Dave Love <fx@gnu.org>
parents:
diff changeset
237 one with Return. You cannot separate arguments with Escape
Dave Love <fx@gnu.org>
parents:
diff changeset
238 the way you would in Twenex Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
239
Dave Love <fx@gnu.org>
parents:
diff changeset
240 The minibuffer window does not overlay other editor windows;
Dave Love <fx@gnu.org>
parents:
diff changeset
241 it is a nearly ordinary editor window which lacks a mode line
Dave Love <fx@gnu.org>
parents:
diff changeset
242 and is "turned off" when not in use. While it IS in use, you
Dave Love <fx@gnu.org>
parents:
diff changeset
243 can switch windows to and from the minibuffer, kill text in other
Dave Love <fx@gnu.org>
parents:
diff changeset
244 windows and yank in the minibuffer, etc.
Dave Love <fx@gnu.org>
parents:
diff changeset
245
Dave Love <fx@gnu.org>
parents:
diff changeset
246 You can even issue a command that uses the minibuffer while in the
Dave Love <fx@gnu.org>
parents:
diff changeset
247 minibuffer. This gets you temporarily into a recursive minibuffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
248 However, this is allowed only if you enable it, since it could be
Dave Love <fx@gnu.org>
parents:
diff changeset
249 confusing for beginners.
Dave Love <fx@gnu.org>
parents:
diff changeset
250
Dave Love <fx@gnu.org>
parents:
diff changeset
251 When you exit the minibuffer, the cursor immediately moves back to
Dave Love <fx@gnu.org>
parents:
diff changeset
252 column zero of the minibuffer line, to show you that the exit
Dave Love <fx@gnu.org>
parents:
diff changeset
253 command has been obeyed. The minibuffer contents remain on the screen
Dave Love <fx@gnu.org>
parents:
diff changeset
254 until the end of the command, unless some other text is displayed there.
Dave Love <fx@gnu.org>
parents:
diff changeset
255
Dave Love <fx@gnu.org>
parents:
diff changeset
256 A single Control-g exits the minibuffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
257
Dave Love <fx@gnu.org>
parents:
diff changeset
258 *** There are no &'s or ^R's or spaces in function names.
Dave Love <fx@gnu.org>
parents:
diff changeset
259
Dave Love <fx@gnu.org>
parents:
diff changeset
260 For example, the function which is called ^R Forward Word
Dave Love <fx@gnu.org>
parents:
diff changeset
261 in Twenex Emacs is called forward-word in GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
262
Dave Love <fx@gnu.org>
parents:
diff changeset
263 *** The extension language is Lisp rather than TECO.
Dave Love <fx@gnu.org>
parents:
diff changeset
264
Dave Love <fx@gnu.org>
parents:
diff changeset
265 Libraries must be written in Lisp. Meta-ESC reads a Lisp
Dave Love <fx@gnu.org>
parents:
diff changeset
266 expression, evaluates it, and prints the result. Note that
Dave Love <fx@gnu.org>
parents:
diff changeset
267 Meta-ESC is "disabled" by default, so that beginning users
Dave Love <fx@gnu.org>
parents:
diff changeset
268 do not get into the minibuffer by accident in a confusing way.
Dave Love <fx@gnu.org>
parents:
diff changeset
269
Dave Love <fx@gnu.org>
parents:
diff changeset
270 Data types available include integers (which double as characters),
Dave Love <fx@gnu.org>
parents:
diff changeset
271 strings, symbols, lists, vectors, buffers, buffer pointers,
Dave Love <fx@gnu.org>
parents:
diff changeset
272 windows, and process channels.
Dave Love <fx@gnu.org>
parents:
diff changeset
273
Dave Love <fx@gnu.org>
parents:
diff changeset
274 For now, to learn about writing Lisp code for GNU Emacs, read some of
Dave Love <fx@gnu.org>
parents:
diff changeset
275 the source code, which is in directory ../lisp. Read the GNU Emacs Lisp
Dave Love <fx@gnu.org>
parents:
diff changeset
276 Reference Manual. Also, all Lisp primitives have self-documentation you can
Dave Love <fx@gnu.org>
parents:
diff changeset
277 read with C-h f.
Dave Love <fx@gnu.org>
parents:
diff changeset
278
Dave Love <fx@gnu.org>
parents:
diff changeset
279 *** Enabling the error handler.
Dave Love <fx@gnu.org>
parents:
diff changeset
280
Dave Love <fx@gnu.org>
parents:
diff changeset
281 GNU Emacs has a Lisp debugger/stepper/trace package, but normally
Dave Love <fx@gnu.org>
parents:
diff changeset
282 errors do not enter the debugger because that is slow, and unlikely to
Dave Love <fx@gnu.org>
parents:
diff changeset
283 be of interest to most users. Set the variable debug-on-error to t to
Dave Love <fx@gnu.org>
parents:
diff changeset
284 cause errors to invoke the debugger. Set debug-on-quit to cause quit
Dave Love <fx@gnu.org>
parents:
diff changeset
285 signals (caused by C-g) to invoke the debugger.
Dave Love <fx@gnu.org>
parents:
diff changeset
286
Dave Love <fx@gnu.org>
parents:
diff changeset
287 ** Other changes.
Dave Love <fx@gnu.org>
parents:
diff changeset
288
Dave Love <fx@gnu.org>
parents:
diff changeset
289 *** More than two windows are allowed.
Dave Love <fx@gnu.org>
parents:
diff changeset
290
Dave Love <fx@gnu.org>
parents:
diff changeset
291 C-x 2 splits the current window into two windows,
Dave Love <fx@gnu.org>
parents:
diff changeset
292 one above the other. Initially they both display
Dave Love <fx@gnu.org>
parents:
diff changeset
293 the same buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
294
Dave Love <fx@gnu.org>
parents:
diff changeset
295 C-x 2 now accepts a numeric argument to specify the number of
Dave Love <fx@gnu.org>
parents:
diff changeset
296 lines to give to the uppermost of the two windows it makes.
Dave Love <fx@gnu.org>
parents:
diff changeset
297
Dave Love <fx@gnu.org>
parents:
diff changeset
298 C-x 0 kills the current window, making all others larger.
Dave Love <fx@gnu.org>
parents:
diff changeset
299 C-x 1 kills all windows except the current one.
Dave Love <fx@gnu.org>
parents:
diff changeset
300 C-x O switches to the next window down.
Dave Love <fx@gnu.org>
parents:
diff changeset
301 It rotates from the bottom one to the top one.
Dave Love <fx@gnu.org>
parents:
diff changeset
302 An argument serves as a repeat count; negative arguments
Dave Love <fx@gnu.org>
parents:
diff changeset
303 circulate in the reverse order.
Dave Love <fx@gnu.org>
parents:
diff changeset
304
Dave Love <fx@gnu.org>
parents:
diff changeset
305 If the same buffer is displayed in several windows,
Dave Love <fx@gnu.org>
parents:
diff changeset
306 changes made in it are redisplayed in all of them.
Dave Love <fx@gnu.org>
parents:
diff changeset
307
Dave Love <fx@gnu.org>
parents:
diff changeset
308 *** Side by side windows are supported.
Dave Love <fx@gnu.org>
parents:
diff changeset
309
Dave Love <fx@gnu.org>
parents:
diff changeset
310 The command C-x 3 splits the current window into
Dave Love <fx@gnu.org>
parents:
diff changeset
311 two side-by-side windows.
Dave Love <fx@gnu.org>
parents:
diff changeset
312
Dave Love <fx@gnu.org>
parents:
diff changeset
313 C-x } makes the selected window ARG columns wider at the
Dave Love <fx@gnu.org>
parents:
diff changeset
314 expense of the windows at its sides. C-x { makes the selected
Dave Love <fx@gnu.org>
parents:
diff changeset
315 window ARG columns narrower. An argument to C-x 5 specifies
Dave Love <fx@gnu.org>
parents:
diff changeset
316 how many columns to give to the leftmost of the two windows made.
Dave Love <fx@gnu.org>
parents:
diff changeset
317
Dave Love <fx@gnu.org>
parents:
diff changeset
318 *** Horizontal scrolling of the lines in a window is implemented.
Dave Love <fx@gnu.org>
parents:
diff changeset
319
Dave Love <fx@gnu.org>
parents:
diff changeset
320 C-x < (scroll-left) scrolls all displayed lines left,
Dave Love <fx@gnu.org>
parents:
diff changeset
321 with the numeric argument (default 1) saying how far to scroll.
Dave Love <fx@gnu.org>
parents:
diff changeset
322 When the window is scrolled left, some amount of the beginning
Dave Love <fx@gnu.org>
parents:
diff changeset
323 of each nonempty line is replaced by an "$".
Dave Love <fx@gnu.org>
parents:
diff changeset
324 C-x > scrolls right. If a window has no text hidden at the left
Dave Love <fx@gnu.org>
parents:
diff changeset
325 margin, it cannot be scrolled any farther right than that.
Dave Love <fx@gnu.org>
parents:
diff changeset
326 When nonzero leftwards scrolling is in effect in a window.
Dave Love <fx@gnu.org>
parents:
diff changeset
327 lines are automatically truncated at the window's right margin
Dave Love <fx@gnu.org>
parents:
diff changeset
328 regardless of the value of the variable truncate-lines in the
Dave Love <fx@gnu.org>
parents:
diff changeset
329 buffer being displayed.
Dave Love <fx@gnu.org>
parents:
diff changeset
330
Dave Love <fx@gnu.org>
parents:
diff changeset
331 *** Return key does not use up empty lines.
Dave Love <fx@gnu.org>
parents:
diff changeset
332
Dave Love <fx@gnu.org>
parents:
diff changeset
333 In Twenex Emacs, the Return command advances over an existing
Dave Love <fx@gnu.org>
parents:
diff changeset
334 empty line in some cases. In GNU Emacs, the Return command always
Dave Love <fx@gnu.org>
parents:
diff changeset
335 makes inserts a newline. Twenex Emacs was designed at a time when
Dave Love <fx@gnu.org>
parents:
diff changeset
336 most display terminals did not have the ability to scroll part
Dave Love <fx@gnu.org>
parents:
diff changeset
337 of the screen, and using existing empty lines made redisplay faster.
Dave Love <fx@gnu.org>
parents:
diff changeset
338 Nowadays, terminals that cannot scroll part of the screen are rare,
Dave Love <fx@gnu.org>
parents:
diff changeset
339 so there is no need to make Return behave in a more complicated manner.
Dave Love <fx@gnu.org>
parents:
diff changeset
340
Dave Love <fx@gnu.org>
parents:
diff changeset
341 *** Help m.
Dave Love <fx@gnu.org>
parents:
diff changeset
342
Dave Love <fx@gnu.org>
parents:
diff changeset
343 Typing C-h m displays documentation of the current major mode.,
Dave Love <fx@gnu.org>
parents:
diff changeset
344 telling you what special commands and features are available
Dave Love <fx@gnu.org>
parents:
diff changeset
345 and how to use them or get more information on them.
Dave Love <fx@gnu.org>
parents:
diff changeset
346
Dave Love <fx@gnu.org>
parents:
diff changeset
347 This is simply the documentation, as a function, of the
Dave Love <fx@gnu.org>
parents:
diff changeset
348 symbol which is the value of major-mode. Each major mode
Dave Love <fx@gnu.org>
parents:
diff changeset
349 function has been given documentation intended for C-h m.
Dave Love <fx@gnu.org>
parents:
diff changeset
350
Dave Love <fx@gnu.org>
parents:
diff changeset
351 *** Display-hiding features.
Dave Love <fx@gnu.org>
parents:
diff changeset
352
Dave Love <fx@gnu.org>
parents:
diff changeset
353 **** Hiding indented lines
Dave Love <fx@gnu.org>
parents:
diff changeset
354
Dave Love <fx@gnu.org>
parents:
diff changeset
355 The command C-x $ with numeric argument N causes lines indented by N
Dave Love <fx@gnu.org>
parents:
diff changeset
356 or more columns to become invisible. All you see is " ..." appended
Dave Love <fx@gnu.org>
parents:
diff changeset
357 to the previous line, in place of any number of consecutive invisible
Dave Love <fx@gnu.org>
parents:
diff changeset
358 lines.
Dave Love <fx@gnu.org>
parents:
diff changeset
359
Dave Love <fx@gnu.org>
parents:
diff changeset
360 **** Outline Mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
361
Dave Love <fx@gnu.org>
parents:
diff changeset
362 Outline mode is designed for editing outline-structured
Dave Love <fx@gnu.org>
parents:
diff changeset
363 files, such as this one.
Dave Love <fx@gnu.org>
parents:
diff changeset
364
Dave Love <fx@gnu.org>
parents:
diff changeset
365 Headings should be lines starting with one or more asterisks.
Dave Love <fx@gnu.org>
parents:
diff changeset
366 Major headings have one asterisk, subheadings two, etc.
Dave Love <fx@gnu.org>
parents:
diff changeset
367 Lines not starting with asterisks are body text.
Dave Love <fx@gnu.org>
parents:
diff changeset
368
Dave Love <fx@gnu.org>
parents:
diff changeset
369 You can make the body under a heading, or the subheadings
Dave Love <fx@gnu.org>
parents:
diff changeset
370 under a heading, temporarily invisible, or visible again.
Dave Love <fx@gnu.org>
parents:
diff changeset
371 Invisible lines are attached to the end of the previous line
Dave Love <fx@gnu.org>
parents:
diff changeset
372 so they go with it if you kill it and yank it back.
Dave Love <fx@gnu.org>
parents:
diff changeset
373
Dave Love <fx@gnu.org>
parents:
diff changeset
374 Commands:
Dave Love <fx@gnu.org>
parents:
diff changeset
375 Meta-} next-visible-heading move by visible headings
Dave Love <fx@gnu.org>
parents:
diff changeset
376 Meta-{ previous-visible-heading move by visible headings
Dave Love <fx@gnu.org>
parents:
diff changeset
377
Dave Love <fx@gnu.org>
parents:
diff changeset
378 Meta-x hide-body make all body text invisible (not headings).
Dave Love <fx@gnu.org>
parents:
diff changeset
379 Meta-x show-all make everything in buffer visible.
Dave Love <fx@gnu.org>
parents:
diff changeset
380
Dave Love <fx@gnu.org>
parents:
diff changeset
381 The remaining commands are used when dot is on a heading line.
Dave Love <fx@gnu.org>
parents:
diff changeset
382 They apply to some of the body or subheadings of that heading.
Dave Love <fx@gnu.org>
parents:
diff changeset
383 C-c C-h hide-subtree make text and subheadings invisible.
Dave Love <fx@gnu.org>
parents:
diff changeset
384 C-c C-s show-subtree make text and subheadings visible.
Dave Love <fx@gnu.org>
parents:
diff changeset
385 C-c C-i show-children make direct subheadings visible.
Dave Love <fx@gnu.org>
parents:
diff changeset
386 No effect on body, or subheadings 2 or more levels down.
Dave Love <fx@gnu.org>
parents:
diff changeset
387 With arg N, affects subheadings N levels down.
Dave Love <fx@gnu.org>
parents:
diff changeset
388 M-x hide-entry make immediately following body invisible.
Dave Love <fx@gnu.org>
parents:
diff changeset
389 M-x show-entry make it visible.
Dave Love <fx@gnu.org>
parents:
diff changeset
390 M-x hide-leaves make text under heading and under its subheadings invisible.
Dave Love <fx@gnu.org>
parents:
diff changeset
391 The subheadings remain visible.
Dave Love <fx@gnu.org>
parents:
diff changeset
392 M-x show-branches make all subheadings at all levels visible.
Dave Love <fx@gnu.org>
parents:
diff changeset
393
Dave Love <fx@gnu.org>
parents:
diff changeset
394 *** C mode is fancy.
Dave Love <fx@gnu.org>
parents:
diff changeset
395
Dave Love <fx@gnu.org>
parents:
diff changeset
396 C mode assumes that you put the initial open-brace of
Dave Love <fx@gnu.org>
parents:
diff changeset
397 a function definition at the beginning of a line.
Dave Love <fx@gnu.org>
parents:
diff changeset
398 If you use the popular indenting style that puts this
Dave Love <fx@gnu.org>
parents:
diff changeset
399 open-brace at the end of a line containing a type declaration,
Dave Love <fx@gnu.org>
parents:
diff changeset
400 YOU WILL LOSE: C mode does not know a function starts there.
Dave Love <fx@gnu.org>
parents:
diff changeset
401
Dave Love <fx@gnu.org>
parents:
diff changeset
402 Open-brace at the beginning of a line makes it possible
Dave Love <fx@gnu.org>
parents:
diff changeset
403 for C mode to find function boundaries with total reliability;
Dave Love <fx@gnu.org>
parents:
diff changeset
404 something I consider vital and which cannot be done
Dave Love <fx@gnu.org>
parents:
diff changeset
405 if the other style is used.
Dave Love <fx@gnu.org>
parents:
diff changeset
406
Dave Love <fx@gnu.org>
parents:
diff changeset
407 The Tab command indents C code very cleverly.
Dave Love <fx@gnu.org>
parents:
diff changeset
408 I know of only one cases in which Tab does not indent C code nicely:
Dave Love <fx@gnu.org>
parents:
diff changeset
409 Expressions continued over several lines with few parentheses.
Dave Love <fx@gnu.org>
parents:
diff changeset
410 Tab does not know the precedences of C operators, so it does
Dave Love <fx@gnu.org>
parents:
diff changeset
411 not know which lines of the expression should go where.
Dave Love <fx@gnu.org>
parents:
diff changeset
412 Using parentheses to indicate the nesting of operators
Dave Love <fx@gnu.org>
parents:
diff changeset
413 except within a line makes this problem go away.
Dave Love <fx@gnu.org>
parents:
diff changeset
414
Dave Love <fx@gnu.org>
parents:
diff changeset
415 The indenting algorithm is entirely written in Lisp.
Dave Love <fx@gnu.org>
parents:
diff changeset
416
Dave Love <fx@gnu.org>
parents:
diff changeset
417 Tab with a numeric argument in Twenex Emacs indents
Dave Love <fx@gnu.org>
parents:
diff changeset
418 that many lines. It is different in GNU Emacs: it means
Dave Love <fx@gnu.org>
parents:
diff changeset
419 to shift all the lines of a bracketed expression by the
Dave Love <fx@gnu.org>
parents:
diff changeset
420 same amount as the line being indented. For example, if you have
Dave Love <fx@gnu.org>
parents:
diff changeset
421 if (foo)
Dave Love <fx@gnu.org>
parents:
diff changeset
422 {
Dave Love <fx@gnu.org>
parents:
diff changeset
423 hack ();
Dave Love <fx@gnu.org>
parents:
diff changeset
424 /** Well? */
Dave Love <fx@gnu.org>
parents:
diff changeset
425 }
Dave Love <fx@gnu.org>
parents:
diff changeset
426 and type C-u Tab on the line with the open brace, you get
Dave Love <fx@gnu.org>
parents:
diff changeset
427 if (foo)
Dave Love <fx@gnu.org>
parents:
diff changeset
428 {
Dave Love <fx@gnu.org>
parents:
diff changeset
429 hack ();
Dave Love <fx@gnu.org>
parents:
diff changeset
430 /* Well? */
Dave Love <fx@gnu.org>
parents:
diff changeset
431 }
Dave Love <fx@gnu.org>
parents:
diff changeset
432 from indenting the brace line and then shifting the
Dave Love <fx@gnu.org>
parents:
diff changeset
433 lines within the braces rigidly with the first one.
Dave Love <fx@gnu.org>
parents:
diff changeset
434
Dave Love <fx@gnu.org>
parents:
diff changeset
435 Meta-Control-q works as in Lisp mode; it should be
Dave Love <fx@gnu.org>
parents:
diff changeset
436 used with dot just before a bracketed grouping, and
Dave Love <fx@gnu.org>
parents:
diff changeset
437 indents each line INSIDE that grouping using Tab.
Dave Love <fx@gnu.org>
parents:
diff changeset
438 If used instead of C-u Tab in the previous example, it makes
Dave Love <fx@gnu.org>
parents:
diff changeset
439 if (foo)
Dave Love <fx@gnu.org>
parents:
diff changeset
440 {
Dave Love <fx@gnu.org>
parents:
diff changeset
441 hack ();
Dave Love <fx@gnu.org>
parents:
diff changeset
442 /* Well? */
Dave Love <fx@gnu.org>
parents:
diff changeset
443 }
Dave Love <fx@gnu.org>
parents:
diff changeset
444
Dave Love <fx@gnu.org>
parents:
diff changeset
445 Meta-Control-h puts mark at the end of the current C function
Dave Love <fx@gnu.org>
parents:
diff changeset
446 and puts dot before it.
Dave Love <fx@gnu.org>
parents:
diff changeset
447
Dave Love <fx@gnu.org>
parents:
diff changeset
448 Most other Meta-Control commands intended for Lisp expressions
Dave Love <fx@gnu.org>
parents:
diff changeset
449 work usefully in C mode as well.
Dave Love <fx@gnu.org>
parents:
diff changeset
450
Dave Love <fx@gnu.org>
parents:
diff changeset
451 *** Meta-g (fill-region) is different.
Dave Love <fx@gnu.org>
parents:
diff changeset
452
Dave Love <fx@gnu.org>
parents:
diff changeset
453 In Twenex Emacs, Meta-g fills the region with no paragraph
Dave Love <fx@gnu.org>
parents:
diff changeset
454 boundaries except for blank and indented lines. In GNU Emacs,
Dave Love <fx@gnu.org>
parents:
diff changeset
455 it divides the region into paragraphs in the same manner as
Dave Love <fx@gnu.org>
parents:
diff changeset
456 Meta-], and fills each paragraph separately. There is also
Dave Love <fx@gnu.org>
parents:
diff changeset
457 the function fill-region-as-paragraph which fills the region
Dave Love <fx@gnu.org>
parents:
diff changeset
458 regarding at as a single paragraph regardless even of blank
Dave Love <fx@gnu.org>
parents:
diff changeset
459 or indented lines.
Dave Love <fx@gnu.org>
parents:
diff changeset
460
Dave Love <fx@gnu.org>
parents:
diff changeset
461 *** Indented Text Mode instead of Edit Indented Text.
Dave Love <fx@gnu.org>
parents:
diff changeset
462
Dave Love <fx@gnu.org>
parents:
diff changeset
463 Twenex Emacs has a command Edit Indented Text which temporarily
Dave Love <fx@gnu.org>
parents:
diff changeset
464 alters some commands for editing indented paragraphs.
Dave Love <fx@gnu.org>
parents:
diff changeset
465 GNU Emacs has instead a separate major mode, Indented Text Mode,
Dave Love <fx@gnu.org>
parents:
diff changeset
466 which is different from ordinary Text Mode in just the same
Dave Love <fx@gnu.org>
parents:
diff changeset
467 alterations. Specifically, in Indented Text Mode,
Dave Love <fx@gnu.org>
parents:
diff changeset
468 Tab runs the function indent-relative, and auto filling indents
Dave Love <fx@gnu.org>
parents:
diff changeset
469 the newly created lines.
Dave Love <fx@gnu.org>
parents:
diff changeset
470
Dave Love <fx@gnu.org>
parents:
diff changeset
471 *** But rectangle commands are implemented.
Dave Love <fx@gnu.org>
parents:
diff changeset
472
Dave Love <fx@gnu.org>
parents:
diff changeset
473 C-x r r stores the rectangle described by dot and mark
Dave Love <fx@gnu.org>
parents:
diff changeset
474 into a register; it reads the register name from the keyboard.
Dave Love <fx@gnu.org>
parents:
diff changeset
475 C-x r g, the command to insert the contents of a register,
Dave Love <fx@gnu.org>
parents:
diff changeset
476 can be used to reinsert the rectangle elsewhere.
Dave Love <fx@gnu.org>
parents:
diff changeset
477
Dave Love <fx@gnu.org>
parents:
diff changeset
478 Other rectangle commands include
Dave Love <fx@gnu.org>
parents:
diff changeset
479 open-rectangle:
Dave Love <fx@gnu.org>
parents:
diff changeset
480 insert a blank rectangle in the position and size
Dave Love <fx@gnu.org>
parents:
diff changeset
481 described by dot and mark, at its corners;
Dave Love <fx@gnu.org>
parents:
diff changeset
482 the existing text is pushed to the right.
Dave Love <fx@gnu.org>
parents:
diff changeset
483 clear-rectangle:
Dave Love <fx@gnu.org>
parents:
diff changeset
484 replace the rectangle described by dot ane mark
Dave Love <fx@gnu.org>
parents:
diff changeset
485 with blanks. The previous text is deleted.
Dave Love <fx@gnu.org>
parents:
diff changeset
486 delete-rectangle:
Dave Love <fx@gnu.org>
parents:
diff changeset
487 delete the text of the specified rectangle,
Dave Love <fx@gnu.org>
parents:
diff changeset
488 moving the text beyond it on each line leftward.
Dave Love <fx@gnu.org>
parents:
diff changeset
489 kill-rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
490 like delete-rectangle but also stores the text of
Dave Love <fx@gnu.org>
parents:
diff changeset
491 the rectangle in the "rectangle kill buffer".
Dave Love <fx@gnu.org>
parents:
diff changeset
492 More precisely, it stores the text as a list of strings
Dave Love <fx@gnu.org>
parents:
diff changeset
493 (one string for each line) in the variable killed-rectangle.
Dave Love <fx@gnu.org>
parents:
diff changeset
494 yank-rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
495 inserts the text of the last killed rectangle.
Dave Love <fx@gnu.org>
parents:
diff changeset
496 extract-rectangle and delete-extract-rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
497 these functions return the text of a rectangle
Dave Love <fx@gnu.org>
parents:
diff changeset
498 as a list of strings. They are for use in writing
Dave Love <fx@gnu.org>
parents:
diff changeset
499 other functions that operate on rectangles.
Dave Love <fx@gnu.org>
parents:
diff changeset
500
Dave Love <fx@gnu.org>
parents:
diff changeset
501 *** Keyboard Macros
Dave Love <fx@gnu.org>
parents:
diff changeset
502
Dave Love <fx@gnu.org>
parents:
diff changeset
503 The C-x ( command for defining a keyboard macro can in GNU Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
504 be given a numeric argument, which means that the new macro
Dave Love <fx@gnu.org>
parents:
diff changeset
505 starts out not empty but rather as the same as the last
Dave Love <fx@gnu.org>
parents:
diff changeset
506 keyboard macro entered. In addition, that last keyboard
Dave Love <fx@gnu.org>
parents:
diff changeset
507 macro is replayed when the C-x ( is typed. C-x ( with an
Dave Love <fx@gnu.org>
parents:
diff changeset
508 argument is thus equivalent to typing plain C-x ( and then
Dave Love <fx@gnu.org>
parents:
diff changeset
509 retyping the last keyboard macro entered.
Dave Love <fx@gnu.org>
parents:
diff changeset
510
Dave Love <fx@gnu.org>
parents:
diff changeset
511 The command write-kbd-macro and append-kbd-macro can be used to
Dave Love <fx@gnu.org>
parents:
diff changeset
512 save a keyboard macro definition in a file. It is represented as
Dave Love <fx@gnu.org>
parents:
diff changeset
513 a Lisp expression which, when evaluated, will define the keyboard
Dave Love <fx@gnu.org>
parents:
diff changeset
514 macro. write-kbd-macro writes the specified file from scratch,
Dave Love <fx@gnu.org>
parents:
diff changeset
515 whereas append-kbd-macro adds to any existing text in the file.
Dave Love <fx@gnu.org>
parents:
diff changeset
516 Both expect the keyboard macro to be saved to be specified by
Dave Love <fx@gnu.org>
parents:
diff changeset
517 name; this means you must use the command name-last-kbd-macro to
Dave Love <fx@gnu.org>
parents:
diff changeset
518 give the macro a name before you can save it.
Dave Love <fx@gnu.org>
parents:
diff changeset
519
Dave Love <fx@gnu.org>
parents:
diff changeset
520 *** The command to resume a terminated tags-search or tags-query-replace
Dave Love <fx@gnu.org>
parents:
diff changeset
521
Dave Love <fx@gnu.org>
parents:
diff changeset
522 is Meta-comma in GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
523
Dave Love <fx@gnu.org>
parents:
diff changeset
524 *** Auto Save is on by default.
Dave Love <fx@gnu.org>
parents:
diff changeset
525
Dave Love <fx@gnu.org>
parents:
diff changeset
526 Auto Save mode is enabled by default in all buffers
Dave Love <fx@gnu.org>
parents:
diff changeset
527 that are visiting files.
Dave Love <fx@gnu.org>
parents:
diff changeset
528
Dave Love <fx@gnu.org>
parents:
diff changeset
529 The file name used for auto saving is made by prepending
Dave Love <fx@gnu.org>
parents:
diff changeset
530 "#" to the file name visited.
Dave Love <fx@gnu.org>
parents:
diff changeset
531
Dave Love <fx@gnu.org>
parents:
diff changeset
532 *** Backup files.
Dave Love <fx@gnu.org>
parents:
diff changeset
533
Dave Love <fx@gnu.org>
parents:
diff changeset
534 Since Unix stupidly fails to have file version numbers,
Dave Love <fx@gnu.org>
parents:
diff changeset
535 GNU Emacs compensates slightly in the customary fashion:
Dave Love <fx@gnu.org>
parents:
diff changeset
536 when a file is modified and saved for the first time in
Dave Love <fx@gnu.org>
parents:
diff changeset
537 a particular GNU Emacs run, the original file is renamed,
Dave Love <fx@gnu.org>
parents:
diff changeset
538 appending "~" to its name. Thus, foo.c becomes foo.c~.
Dave Love <fx@gnu.org>
parents:
diff changeset
539
Dave Love <fx@gnu.org>
parents:
diff changeset
540 Emacs can also put a version number into the name of the backup file,
Dave Love <fx@gnu.org>
parents:
diff changeset
541 as in foo.c.~69~ for version number 69. This is an optional feature
Dave Love <fx@gnu.org>
parents:
diff changeset
542 that the user has to enable.
Dave Love <fx@gnu.org>
parents:
diff changeset
543
Dave Love <fx@gnu.org>
parents:
diff changeset
544 *** Mode Line differences.
Dave Love <fx@gnu.org>
parents:
diff changeset
545
Dave Love <fx@gnu.org>
parents:
diff changeset
546 Each window in GNU Emacs has its own mode line, which always
Dave Love <fx@gnu.org>
parents:
diff changeset
547 displays the status of that window's buffer and nothing else.
Dave Love <fx@gnu.org>
parents:
diff changeset
548 The mode line appears at the bottom of the window. It is
Dave Love <fx@gnu.org>
parents:
diff changeset
549 full of dashes, to emphasize the boundaries between windows,
Dave Love <fx@gnu.org>
parents:
diff changeset
550 and is displayed in inverse video if the terminal supports it.
Dave Love <fx@gnu.org>
parents:
diff changeset
551 The information usually available includes:
Dave Love <fx@gnu.org>
parents:
diff changeset
552
Dave Love <fx@gnu.org>
parents:
diff changeset
553 *** Local Modes feature changed slightly.
Dave Love <fx@gnu.org>
parents:
diff changeset
554
Dave Love <fx@gnu.org>
parents:
diff changeset
555 GNU Emacs supports local mode lists much like those in Twenex Emacs,
Dave Love <fx@gnu.org>
parents:
diff changeset
556 but you can only set variables, not commands. You write
Dave Love <fx@gnu.org>
parents:
diff changeset
557
Dave Love <fx@gnu.org>
parents:
diff changeset
558 Local variables:
Dave Love <fx@gnu.org>
parents:
diff changeset
559 tab-width: 10
Dave Love <fx@gnu.org>
parents:
diff changeset
560 end:
Dave Love <fx@gnu.org>
parents:
diff changeset
561
Dave Love <fx@gnu.org>
parents:
diff changeset
562 in the last page of a file, if you want to make tab-width be ten in a
Dave Love <fx@gnu.org>
parents:
diff changeset
563 file's buffer. The value you specify must be a Lisp object!
Dave Love <fx@gnu.org>
parents:
diff changeset
564 It will be read, but not evaluated. So, to specify a string,
Dave Love <fx@gnu.org>
parents:
diff changeset
565 you MUST use doublequotes. For "false", in variables whose
Dave Love <fx@gnu.org>
parents:
diff changeset
566 meanings are true or false, you MUST write nil .
Dave Love <fx@gnu.org>
parents:
diff changeset
567
Dave Love <fx@gnu.org>
parents:
diff changeset
568 Two variable names are special: "mode" and "eval".
Dave Love <fx@gnu.org>
parents:
diff changeset
569 Mode is used for specifying the major mode (as in Twenex Emacs).
Dave Love <fx@gnu.org>
parents:
diff changeset
570
Dave Love <fx@gnu.org>
parents:
diff changeset
571 mode: text
Dave Love <fx@gnu.org>
parents:
diff changeset
572
Dave Love <fx@gnu.org>
parents:
diff changeset
573 specifies text mode. Eval is used for requesting the evaluation
Dave Love <fx@gnu.org>
parents:
diff changeset
574 of a Lisp expression; its value is ignored. Thus,
Dave Love <fx@gnu.org>
parents:
diff changeset
575
Dave Love <fx@gnu.org>
parents:
diff changeset
576 eval: (set-syntax-table lisp-mode-syntax-table)
Dave Love <fx@gnu.org>
parents:
diff changeset
577
Dave Love <fx@gnu.org>
parents:
diff changeset
578 causes Lisp Mode syntax to be used.
Dave Love <fx@gnu.org>
parents:
diff changeset
579
Dave Love <fx@gnu.org>
parents:
diff changeset
580
Dave Love <fx@gnu.org>
parents:
diff changeset
581 Note that GNU Emacs looks for the string "Local variables:"
Dave Love <fx@gnu.org>
parents:
diff changeset
582 whereas Twenex Emacs looks for "Local modes:". This incompatibility
Dave Love <fx@gnu.org>
parents:
diff changeset
583 id deliberate, so that neither one will see local settings
Dave Love <fx@gnu.org>
parents:
diff changeset
584 intended for the other.
Dave Love <fx@gnu.org>
parents:
diff changeset
585
Dave Love <fx@gnu.org>
parents:
diff changeset
586 *** Lisp code libraries.
Dave Love <fx@gnu.org>
parents:
diff changeset
587
Dave Love <fx@gnu.org>
parents:
diff changeset
588 Libraries of commands, and init files, are written in Lisp.
Dave Love <fx@gnu.org>
parents:
diff changeset
589 libraries conventionally have names ending in .el, while the
Dave Love <fx@gnu.org>
parents:
diff changeset
590 init file is named .emacs and is in your home directory.
Dave Love <fx@gnu.org>
parents:
diff changeset
591
Dave Love <fx@gnu.org>
parents:
diff changeset
592 Use Meta-x load-library to load a library. Most standard libraries
Dave Love <fx@gnu.org>
parents:
diff changeset
593 load automatically if you try to use the commands in them.
Dave Love <fx@gnu.org>
parents:
diff changeset
594
Dave Love <fx@gnu.org>
parents:
diff changeset
595 Meta-x byte-compile-file filename
Dave Love <fx@gnu.org>
parents:
diff changeset
596 compiles the file into byte code which loads and runs faster
Dave Love <fx@gnu.org>
parents:
diff changeset
597 than Lisp source code. The file of byte code is given a name
Dave Love <fx@gnu.org>
parents:
diff changeset
598 made by appending "c" to the end of the input file name.
Dave Love <fx@gnu.org>
parents:
diff changeset
599
Dave Love <fx@gnu.org>
parents:
diff changeset
600 Meta-x byte-recompile-directory directoryname
Dave Love <fx@gnu.org>
parents:
diff changeset
601 compiles all files in the specified directory (globbing not allowed)
Dave Love <fx@gnu.org>
parents:
diff changeset
602 which have been compiled before but have been changed since then.
Dave Love <fx@gnu.org>
parents:
diff changeset
603
Dave Love <fx@gnu.org>
parents:
diff changeset
604 Meta-x load-library automatically checks for a compiled file
Dave Love <fx@gnu.org>
parents:
diff changeset
605 before loading the source file.
Dave Love <fx@gnu.org>
parents:
diff changeset
606
Dave Love <fx@gnu.org>
parents:
diff changeset
607 Libraries once loaded do not retain their identity within GNU
Dave Love <fx@gnu.org>
parents:
diff changeset
608 Emacs. Therefore, you cannot tell just what was loaded from a
Dave Love <fx@gnu.org>
parents:
diff changeset
609 library, and you cannot un-load a library. Normally, libraries
Dave Love <fx@gnu.org>
parents:
diff changeset
610 are written so that loading one has no effect on the editing
Dave Love <fx@gnu.org>
parents:
diff changeset
611 operations that you would have used if you had not loaded the
Dave Love <fx@gnu.org>
parents:
diff changeset
612 library.
Dave Love <fx@gnu.org>
parents:
diff changeset
613
Dave Love <fx@gnu.org>
parents:
diff changeset
614 *** Dired features.
Dave Love <fx@gnu.org>
parents:
diff changeset
615
Dave Love <fx@gnu.org>
parents:
diff changeset
616 You can do dired on partial directories --- any pattern
Dave Love <fx@gnu.org>
parents:
diff changeset
617 the shell can glob. Dired creates a buffer named after
Dave Love <fx@gnu.org>
parents:
diff changeset
618 the directory or pattern, so you can dired several different
Dave Love <fx@gnu.org>
parents:
diff changeset
619 directories. If you repeat dired on the same directory or
Dave Love <fx@gnu.org>
parents:
diff changeset
620 pattern, it just reselects the same buffer. Use Meta-x Revert
Dave Love <fx@gnu.org>
parents:
diff changeset
621 on that buffer to read in the current contents of the directory.
Dave Love <fx@gnu.org>
parents:
diff changeset
622
Dave Love <fx@gnu.org>
parents:
diff changeset
623 *** Directory listing features.
Dave Love <fx@gnu.org>
parents:
diff changeset
624
Dave Love <fx@gnu.org>
parents:
diff changeset
625 C-x C-d now uses the default output format of `ls',
Dave Love <fx@gnu.org>
parents:
diff changeset
626 which gives just file names in multiple columns.
Dave Love <fx@gnu.org>
parents:
diff changeset
627 C-u C-x C-d passes the -l switch to `ls'.
Dave Love <fx@gnu.org>
parents:
diff changeset
628
Dave Love <fx@gnu.org>
parents:
diff changeset
629 Both read a directory spec from the minibuffer. It can
Dave Love <fx@gnu.org>
parents:
diff changeset
630 be any pattern that the shell can glob.
Dave Love <fx@gnu.org>
parents:
diff changeset
631
Dave Love <fx@gnu.org>
parents:
diff changeset
632 *** Compiling other programs.
Dave Love <fx@gnu.org>
parents:
diff changeset
633
Dave Love <fx@gnu.org>
parents:
diff changeset
634 Meta-x compile allows you to run make, or any other compilation
Dave Love <fx@gnu.org>
parents:
diff changeset
635 command, underneath GNU Emacs. Error messages go into a buffer whose
Dave Love <fx@gnu.org>
parents:
diff changeset
636 name is *compilation*. If you get error messages, you can use the
Dave Love <fx@gnu.org>
parents:
diff changeset
637 command C-x ` (that is a backquote) to find the text of the next
Dave Love <fx@gnu.org>
parents:
diff changeset
638 error message.
Dave Love <fx@gnu.org>
parents:
diff changeset
639
Dave Love <fx@gnu.org>
parents:
diff changeset
640 You must specify the command to be run as an argument to M-x compile.
Dave Love <fx@gnu.org>
parents:
diff changeset
641 A default is placed in the minibuffer; you can kill it and start
Dave Love <fx@gnu.org>
parents:
diff changeset
642 fresh, edit it, or just type Return if it is what you want.
Dave Love <fx@gnu.org>
parents:
diff changeset
643 The default is the last compilation command you used; initially,
Dave Love <fx@gnu.org>
parents:
diff changeset
644 it is "make -k".
Dave Love <fx@gnu.org>
parents:
diff changeset
645
Dave Love <fx@gnu.org>
parents:
diff changeset
646 *** Searching multiple files.
Dave Love <fx@gnu.org>
parents:
diff changeset
647
Dave Love <fx@gnu.org>
parents:
diff changeset
648 Meta-x grep searches many files for a regexp by invoking grep
Dave Love <fx@gnu.org>
parents:
diff changeset
649 and reading the output of grep into a buffer. You can then
Dave Love <fx@gnu.org>
parents:
diff changeset
650 move to the text lines that grep found, using the C-x ` command
Dave Love <fx@gnu.org>
parents:
diff changeset
651 just as after M-x compile.
Dave Love <fx@gnu.org>
parents:
diff changeset
652
Dave Love <fx@gnu.org>
parents:
diff changeset
653 *** Running inferior shells.
Dave Love <fx@gnu.org>
parents:
diff changeset
654
Dave Love <fx@gnu.org>
parents:
diff changeset
655 Do Meta-x shell to make an inferior shell together with a buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
656 which serves to hold "terminal" input and output of the shell.
Dave Love <fx@gnu.org>
parents:
diff changeset
657 The shell used is specified by the environment variable ESHELL,
Dave Love <fx@gnu.org>
parents:
diff changeset
658 or by SHELL if ESHELL is not set.
Dave Love <fx@gnu.org>
parents:
diff changeset
659
Dave Love <fx@gnu.org>
parents:
diff changeset
660 Use C-h m whilst in the *shell* buffer to get more detailed info.
Dave Love <fx@gnu.org>
parents:
diff changeset
661
Dave Love <fx@gnu.org>
parents:
diff changeset
662 The inferior shell loads the file .emacs_csh or.emacs_sh
Dave Love <fx@gnu.org>
parents:
diff changeset
663 (or similar using whatever name the shell has) when it starts up.
Dave Love <fx@gnu.org>
parents:
diff changeset
664
Dave Love <fx@gnu.org>
parents:
diff changeset
665 M-! executes a shell command in an inferior shell
Dave Love <fx@gnu.org>
parents:
diff changeset
666 and displays the output from it. With a prefix argument,
Dave Love <fx@gnu.org>
parents:
diff changeset
667 it inserts the output in the current buffer after dot
Dave Love <fx@gnu.org>
parents:
diff changeset
668 and sets the mark after the output. The shell command
Dave Love <fx@gnu.org>
parents:
diff changeset
669 gets /dev/null as its standard input.
Dave Love <fx@gnu.org>
parents:
diff changeset
670
Dave Love <fx@gnu.org>
parents:
diff changeset
671 M-| is like M-! but passes the contents of the region
Dave Love <fx@gnu.org>
parents:
diff changeset
672 as input to the shell command. A prefix argument makes
Dave Love <fx@gnu.org>
parents:
diff changeset
673 the output from the command replace the contents of the region.
Dave Love <fx@gnu.org>
parents:
diff changeset
674
Dave Love <fx@gnu.org>
parents:
diff changeset
675 *** Sending mail.
Dave Love <fx@gnu.org>
parents:
diff changeset
676
Dave Love <fx@gnu.org>
parents:
diff changeset
677 Once you enter Mail Mode using C-x m or C-x 4 m or M-x mail,
Dave Love <fx@gnu.org>
parents:
diff changeset
678 C-c becomes a prefix character for mail-related editing commands.
Dave Love <fx@gnu.org>
parents:
diff changeset
679 C-c C-s is vital; that's how you send the message. C-c C-c sends
Dave Love <fx@gnu.org>
parents:
diff changeset
680 and then switches buffers or kills the current window.
Dave Love <fx@gnu.org>
parents:
diff changeset
681 Use C-h m to get a list of the others.
Dave Love <fx@gnu.org>
parents:
diff changeset
682
Dave Love <fx@gnu.org>
parents:
diff changeset
683 *** Regular expressions.
Dave Love <fx@gnu.org>
parents:
diff changeset
684
Dave Love <fx@gnu.org>
parents:
diff changeset
685 GNU Emacs has regular expression facilities like those of most
Dave Love <fx@gnu.org>
parents:
diff changeset
686 Unix editors, but more powerful:
Dave Love <fx@gnu.org>
parents:
diff changeset
687
Dave Love <fx@gnu.org>
parents:
diff changeset
688 **** -- + --
Dave Love <fx@gnu.org>
parents:
diff changeset
689
Dave Love <fx@gnu.org>
parents:
diff changeset
690 + specifies repetition of the preceding expression 1 or more
Dave Love <fx@gnu.org>
parents:
diff changeset
691 times. It is in other respect like *, which specifies repetition
Dave Love <fx@gnu.org>
parents:
diff changeset
692 0 or more times.
Dave Love <fx@gnu.org>
parents:
diff changeset
693
Dave Love <fx@gnu.org>
parents:
diff changeset
694 **** -- ? --
Dave Love <fx@gnu.org>
parents:
diff changeset
695
Dave Love <fx@gnu.org>
parents:
diff changeset
696 ? is like * but matches at most one repetition of the preceding
Dave Love <fx@gnu.org>
parents:
diff changeset
697 expression.
Dave Love <fx@gnu.org>
parents:
diff changeset
698
Dave Love <fx@gnu.org>
parents:
diff changeset
699 **** -- \| --
Dave Love <fx@gnu.org>
parents:
diff changeset
700
Dave Love <fx@gnu.org>
parents:
diff changeset
701 \| specifies an alternative. Two regular expressions A and B with \| in
Dave Love <fx@gnu.org>
parents:
diff changeset
702 between form an expression that matches anything that either A or B will
Dave Love <fx@gnu.org>
parents:
diff changeset
703 match. Thus, "foo\|bar" matches either "foo" or "bar" but no other
Dave Love <fx@gnu.org>
parents:
diff changeset
704 string.
Dave Love <fx@gnu.org>
parents:
diff changeset
705
Dave Love <fx@gnu.org>
parents:
diff changeset
706 \| applies to the larges possible surrounding expressions. Only a
Dave Love <fx@gnu.org>
parents:
diff changeset
707 surrounding \( ... \) grouping can limit the grouping power of \|.
Dave Love <fx@gnu.org>
parents:
diff changeset
708
Dave Love <fx@gnu.org>
parents:
diff changeset
709 Full backtracking capability exists when multiple \|'s are used.
Dave Love <fx@gnu.org>
parents:
diff changeset
710
Dave Love <fx@gnu.org>
parents:
diff changeset
711 **** -- \( ... \) --
Dave Love <fx@gnu.org>
parents:
diff changeset
712
Dave Love <fx@gnu.org>
parents:
diff changeset
713 \( ... \) are a grouping construct that serves three purposes:
Dave Love <fx@gnu.org>
parents:
diff changeset
714
Dave Love <fx@gnu.org>
parents:
diff changeset
715 1. To enclose a set of \| alternatives for other operations.
Dave Love <fx@gnu.org>
parents:
diff changeset
716 Thus, "\(foo\|bar\)x" matches either "foox" or "barx".
Dave Love <fx@gnu.org>
parents:
diff changeset
717 2. To enclose a complicated expression for * to operate on.
Dave Love <fx@gnu.org>
parents:
diff changeset
718 Thus, "ba\(na\)*" matches "bananana", etc., with any number
Dave Love <fx@gnu.org>
parents:
diff changeset
719 of na's (zero or more).
Dave Love <fx@gnu.org>
parents:
diff changeset
720 3. To mark a matched substring for future reference.
Dave Love <fx@gnu.org>
parents:
diff changeset
721
Dave Love <fx@gnu.org>
parents:
diff changeset
722 Application 3 is not a consequence of the idea of a parenthetical
Dave Love <fx@gnu.org>
parents:
diff changeset
723 grouping; it is a separate feature which happens to be assigned as a
Dave Love <fx@gnu.org>
parents:
diff changeset
724 second meaning to the same \( ... \) construct because there is no
Dave Love <fx@gnu.org>
parents:
diff changeset
725 conflict in practice between the two meanings. Here is an explanation
Dave Love <fx@gnu.org>
parents:
diff changeset
726 of this feature.
Dave Love <fx@gnu.org>
parents:
diff changeset
727
Dave Love <fx@gnu.org>
parents:
diff changeset
728 -- \digit --
Dave Love <fx@gnu.org>
parents:
diff changeset
729
Dave Love <fx@gnu.org>
parents:
diff changeset
730 After the end of a \( ... \) construct, the matcher remembers the
Dave Love <fx@gnu.org>
parents:
diff changeset
731 beginning and end of the text matched by that construct. Then, later on
Dave Love <fx@gnu.org>
parents:
diff changeset
732 in the regular expression, you can use \ followed by a digit to mean,
Dave Love <fx@gnu.org>
parents:
diff changeset
733 ``match the same text matched this time by the \( ... \) construct.''
Dave Love <fx@gnu.org>
parents:
diff changeset
734 The first nine \( ... \) constructs that appear in a regular expression
Dave Love <fx@gnu.org>
parents:
diff changeset
735 are assigned numbers 1 through 9 in order of their beginnings. \1
Dave Love <fx@gnu.org>
parents:
diff changeset
736 through \9 can be used to refer to the text matched by the corresponding
Dave Love <fx@gnu.org>
parents:
diff changeset
737 \( ... \) construct.
Dave Love <fx@gnu.org>
parents:
diff changeset
738
Dave Love <fx@gnu.org>
parents:
diff changeset
739 For example, "\(.*\)\1" matches any string that is composed of two
Dave Love <fx@gnu.org>
parents:
diff changeset
740 identical halves. The "\(.*\)" matches the first half, which can be
Dave Love <fx@gnu.org>
parents:
diff changeset
741 anything, but the \1 that follows must match the same exact text.
Dave Love <fx@gnu.org>
parents:
diff changeset
742
Dave Love <fx@gnu.org>
parents:
diff changeset
743 **** -- \` --
Dave Love <fx@gnu.org>
parents:
diff changeset
744
Dave Love <fx@gnu.org>
parents:
diff changeset
745 Matches the empty string, but only if it is at the beginning of the buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
746
Dave Love <fx@gnu.org>
parents:
diff changeset
747 **** -- \' --
Dave Love <fx@gnu.org>
parents:
diff changeset
748
Dave Love <fx@gnu.org>
parents:
diff changeset
749 Matches the empty string, but only if it is at the end of the buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
750
Dave Love <fx@gnu.org>
parents:
diff changeset
751 **** -- \b --
Dave Love <fx@gnu.org>
parents:
diff changeset
752
Dave Love <fx@gnu.org>
parents:
diff changeset
753 Matches the empty string, but only if it is at the beginning or end of
Dave Love <fx@gnu.org>
parents:
diff changeset
754 a word. Thus, "\bfoo\b" matches any occurrence of "foo" as a separate word.
Dave Love <fx@gnu.org>
parents:
diff changeset
755 "\bball\(s\|\)\b" matches "ball" or "balls" as a separate word.
Dave Love <fx@gnu.org>
parents:
diff changeset
756
Dave Love <fx@gnu.org>
parents:
diff changeset
757 **** -- \B --
Dave Love <fx@gnu.org>
parents:
diff changeset
758
Dave Love <fx@gnu.org>
parents:
diff changeset
759 Matches the empty string, provided it is NOT at the beginning or end of
Dave Love <fx@gnu.org>
parents:
diff changeset
760 a word.
Dave Love <fx@gnu.org>
parents:
diff changeset
761
Dave Love <fx@gnu.org>
parents:
diff changeset
762 **** -- \< --
Dave Love <fx@gnu.org>
parents:
diff changeset
763
Dave Love <fx@gnu.org>
parents:
diff changeset
764 Matches the empty string, provided it is at the beginning of a word.
Dave Love <fx@gnu.org>
parents:
diff changeset
765
Dave Love <fx@gnu.org>
parents:
diff changeset
766 **** -- \> --
Dave Love <fx@gnu.org>
parents:
diff changeset
767
Dave Love <fx@gnu.org>
parents:
diff changeset
768 Matches the empty string, provided it is at the end of a word.
Dave Love <fx@gnu.org>
parents:
diff changeset
769
Dave Love <fx@gnu.org>
parents:
diff changeset
770 **** -- \w --
Dave Love <fx@gnu.org>
parents:
diff changeset
771
Dave Love <fx@gnu.org>
parents:
diff changeset
772 Matches any word-constituent character. The editor syntax table determines
Dave Love <fx@gnu.org>
parents:
diff changeset
773 which characters these are.
Dave Love <fx@gnu.org>
parents:
diff changeset
774
Dave Love <fx@gnu.org>
parents:
diff changeset
775 **** -- \W --
Dave Love <fx@gnu.org>
parents:
diff changeset
776
Dave Love <fx@gnu.org>
parents:
diff changeset
777 Matches any character that is not a word-constituent.
Dave Love <fx@gnu.org>
parents:
diff changeset
778
Dave Love <fx@gnu.org>
parents:
diff changeset
779 **** -- \s<code> --
Dave Love <fx@gnu.org>
parents:
diff changeset
780
Dave Love <fx@gnu.org>
parents:
diff changeset
781 Matches any character whose syntax is <code>. <code> is a letter that
Dave Love <fx@gnu.org>
parents:
diff changeset
782 represents a syntax code: thus, "w" for word constituent, "-" for
Dave Love <fx@gnu.org>
parents:
diff changeset
783 whitespace, "(" for open-parenthesis, etc. Thus, "\s(" matches any
Dave Love <fx@gnu.org>
parents:
diff changeset
784 character with open-parenthesis syntax.
Dave Love <fx@gnu.org>
parents:
diff changeset
785
Dave Love <fx@gnu.org>
parents:
diff changeset
786 **** -- \S<code> --
Dave Love <fx@gnu.org>
parents:
diff changeset
787
Dave Love <fx@gnu.org>
parents:
diff changeset
788 Matches any character whose syntax is not <code>.
Dave Love <fx@gnu.org>
parents:
diff changeset
789
Dave Love <fx@gnu.org>
parents:
diff changeset
790 * How is this Emacs different from Gosling Emacs?
Dave Love <fx@gnu.org>
parents:
diff changeset
791
Dave Love <fx@gnu.org>
parents:
diff changeset
792 ** Advantages of Gosling Emacs:
Dave Love <fx@gnu.org>
parents:
diff changeset
793
Dave Love <fx@gnu.org>
parents:
diff changeset
794 1. The program itself is much smaller.
Dave Love <fx@gnu.org>
parents:
diff changeset
795 GNU Emacs uses about 250k more pure storage.
Dave Love <fx@gnu.org>
parents:
diff changeset
796 As a result, Gosling Emacs can run on machines
Dave Love <fx@gnu.org>
parents:
diff changeset
797 that cannot run GNU Emacs. There is not much difference
Dave Love <fx@gnu.org>
parents:
diff changeset
798 in the amount of impure storage in the two programs.
Dave Love <fx@gnu.org>
parents:
diff changeset
799
Dave Love <fx@gnu.org>
parents:
diff changeset
800 2. In some versions there is support for other forks to
Dave Love <fx@gnu.org>
parents:
diff changeset
801 establish communications channels to Emacs (using sockets?).
Dave Love <fx@gnu.org>
parents:
diff changeset
802
Dave Love <fx@gnu.org>
parents:
diff changeset
803 3. There is a direct interface to dbm (data bases).
Dave Love <fx@gnu.org>
parents:
diff changeset
804
Dave Love <fx@gnu.org>
parents:
diff changeset
805 ** Advantages of GNU Emacs:
Dave Love <fx@gnu.org>
parents:
diff changeset
806
Dave Love <fx@gnu.org>
parents:
diff changeset
807 *** True Lisp, not Mocklisp.
Dave Love <fx@gnu.org>
parents:
diff changeset
808
Dave Love <fx@gnu.org>
parents:
diff changeset
809 GNU Emacs's extension language has real symbols, lists
Dave Love <fx@gnu.org>
parents:
diff changeset
810 and vectors. Many extensions are much simpler, and some
Dave Love <fx@gnu.org>
parents:
diff changeset
811 become possible that were nearly impossible in Gosling Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
812 Many primitives can have cleaner interfaces, and some features
Dave Love <fx@gnu.org>
parents:
diff changeset
813 need not be put in as special primitives because you can do
Dave Love <fx@gnu.org>
parents:
diff changeset
814 them easily yourself.
Dave Love <fx@gnu.org>
parents:
diff changeset
815
Dave Love <fx@gnu.org>
parents:
diff changeset
816 *** But Mocklisp still works.
Dave Love <fx@gnu.org>
parents:
diff changeset
817
Dave Love <fx@gnu.org>
parents:
diff changeset
818 An automatic conversion package plus a run-time library
Dave Love <fx@gnu.org>
parents:
diff changeset
819 allows you to convert a Mocklisp library into a Lisp library.
Dave Love <fx@gnu.org>
parents:
diff changeset
820
Dave Love <fx@gnu.org>
parents:
diff changeset
821 *** Commands are better crafted.
Dave Love <fx@gnu.org>
parents:
diff changeset
822
Dave Love <fx@gnu.org>
parents:
diff changeset
823 For example, nearly every editing function for which a
Dave Love <fx@gnu.org>
parents:
diff changeset
824 numeric argument would make sense as a repeat count does
Dave Love <fx@gnu.org>
parents:
diff changeset
825 accept a repeat count, and does handle a negative argument
Dave Love <fx@gnu.org>
parents:
diff changeset
826 in the way you would expect.
Dave Love <fx@gnu.org>
parents:
diff changeset
827
Dave Love <fx@gnu.org>
parents:
diff changeset
828 *** The manual is clearer.
Dave Love <fx@gnu.org>
parents:
diff changeset
829
Dave Love <fx@gnu.org>
parents:
diff changeset
830 Everyone tells me it is a very good manual.
Dave Love <fx@gnu.org>
parents:
diff changeset
831
Dave Love <fx@gnu.org>
parents:
diff changeset
832 *** Better on-line documentation.
Dave Love <fx@gnu.org>
parents:
diff changeset
833
Dave Love <fx@gnu.org>
parents:
diff changeset
834 Both functions and variables have documentation strings that
Dave Love <fx@gnu.org>
parents:
diff changeset
835 describe exactly how to use them.
Dave Love <fx@gnu.org>
parents:
diff changeset
836
Dave Love <fx@gnu.org>
parents:
diff changeset
837 *** C mode is smart.
Dave Love <fx@gnu.org>
parents:
diff changeset
838
Dave Love <fx@gnu.org>
parents:
diff changeset
839 It really knows how to indent each line correctly,
Dave Love <fx@gnu.org>
parents:
diff changeset
840 for most popular indentation styles. (Some variables
Dave Love <fx@gnu.org>
parents:
diff changeset
841 control which style is used; popular named styles are also supported.)
Dave Love <fx@gnu.org>
parents:
diff changeset
842
Dave Love <fx@gnu.org>
parents:
diff changeset
843 *** Compatible with PDP-10 Emacs, Multics Emacs and Zmacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
844
Dave Love <fx@gnu.org>
parents:
diff changeset
845 The commands in GNU Emacs are nearly the same as in the
Dave Love <fx@gnu.org>
parents:
diff changeset
846 original Emacs and the other Emacses which imitated it.
Dave Love <fx@gnu.org>
parents:
diff changeset
847 (A few have been changed to fit the Unix environment better.)
Dave Love <fx@gnu.org>
parents:
diff changeset
848
Dave Love <fx@gnu.org>
parents:
diff changeset
849 *** Support for Gosling's Emacs commands.
Dave Love <fx@gnu.org>
parents:
diff changeset
850
Dave Love <fx@gnu.org>
parents:
diff changeset
851 M-x set-gosmacs-bindings rebinds many editing commands for
Dave Love <fx@gnu.org>
parents:
diff changeset
852 compatibility with Gosling's Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
853 M-x set-gnu-bindings reverses the change.
Dave Love <fx@gnu.org>
parents:
diff changeset
854
Dave Love <fx@gnu.org>
parents:
diff changeset
855 *** Side-by-side windows.
Dave Love <fx@gnu.org>
parents:
diff changeset
856
Dave Love <fx@gnu.org>
parents:
diff changeset
857 You can split a GNU Emacs window either horizontally or
Dave Love <fx@gnu.org>
parents:
diff changeset
858 vertically.
Dave Love <fx@gnu.org>
parents:
diff changeset
859
Dave Love <fx@gnu.org>
parents:
diff changeset
860 *** Redisplay is faster.
Dave Love <fx@gnu.org>
parents:
diff changeset
861
Dave Love <fx@gnu.org>
parents:
diff changeset
862 GNU Emacs sends about the same stuff to the terminal that
Dave Love <fx@gnu.org>
parents:
diff changeset
863 Gosling's does, but GNU Emacs uses much less CPU time to
Dave Love <fx@gnu.org>
parents:
diff changeset
864 decide what to do.
Dave Love <fx@gnu.org>
parents:
diff changeset
865
Dave Love <fx@gnu.org>
parents:
diff changeset
866 *** Entirely termcap-driven.
Dave Love <fx@gnu.org>
parents:
diff changeset
867
Dave Love <fx@gnu.org>
parents:
diff changeset
868 GNU Emacs has nearly no special code for any terminal type. Various
Dave Love <fx@gnu.org>
parents:
diff changeset
869 new termcap strings make it possible to handle all terminals nearly as
Dave Love <fx@gnu.org>
parents:
diff changeset
870 fast as they could be handled by special-case code.
Dave Love <fx@gnu.org>
parents:
diff changeset
871
Dave Love <fx@gnu.org>
parents:
diff changeset
872 *** Display-hiding features.
Dave Love <fx@gnu.org>
parents:
diff changeset
873
Dave Love <fx@gnu.org>
parents:
diff changeset
874 For example, Outline Mode makes it possible for you to edit
Dave Love <fx@gnu.org>
parents:
diff changeset
875 an outline, making entire sub-branches of the outline visible
Dave Love <fx@gnu.org>
parents:
diff changeset
876 or invisible when you wish.
Dave Love <fx@gnu.org>
parents:
diff changeset
877
Dave Love <fx@gnu.org>
parents:
diff changeset
878 *** You can interrupt with Control-G.
Dave Love <fx@gnu.org>
parents:
diff changeset
879
Dave Love <fx@gnu.org>
parents:
diff changeset
880 Even a looping Lisp program can be stopped this way.
Dave Love <fx@gnu.org>
parents:
diff changeset
881 And even a loop in C code does not stop you from killing
Dave Love <fx@gnu.org>
parents:
diff changeset
882 Emacs and getting back to your shell.
Dave Love <fx@gnu.org>
parents:
diff changeset
883
Dave Love <fx@gnu.org>
parents:
diff changeset
884 *** Per-buffer Undo.
Dave Love <fx@gnu.org>
parents:
diff changeset
885
Dave Love <fx@gnu.org>
parents:
diff changeset
886 You can undo the last several changes, in each buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
887 independently.
Dave Love <fx@gnu.org>
parents:
diff changeset
888
Dave Love <fx@gnu.org>
parents:
diff changeset
889 *** The editor code itself is clean.
Dave Love <fx@gnu.org>
parents:
diff changeset
890
Dave Love <fx@gnu.org>
parents:
diff changeset
891 Many people have remarked on how much they enjoy reading
Dave Love <fx@gnu.org>
parents:
diff changeset
892 the code for GNU Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
893
Dave Love <fx@gnu.org>
parents:
diff changeset
894 One other note: The program etc/cvtmail that comes with GNU Emacs can
Dave Love <fx@gnu.org>
parents:
diff changeset
895 be used to convert a mail directory for Gosling Emacs's Rmail into a
Dave Love <fx@gnu.org>
parents:
diff changeset
896 Unix mail file that you could read into GNU Emacs's Rmail.
Dave Love <fx@gnu.org>
parents:
diff changeset
897
Dave Love <fx@gnu.org>
parents:
diff changeset
898 * How is this Emacs different from CCA Emacs?
Dave Love <fx@gnu.org>
parents:
diff changeset
899
Dave Love <fx@gnu.org>
parents:
diff changeset
900 ** GNU Emacs Lisp vs CCA Elisp.
Dave Love <fx@gnu.org>
parents:
diff changeset
901
Dave Love <fx@gnu.org>
parents:
diff changeset
902 GNU Emacs Lisp does not have a distinction between Lisp functions
Dave Love <fx@gnu.org>
parents:
diff changeset
903 and Emacs functions, or between Lisp variables and Emacs variables.
Dave Love <fx@gnu.org>
parents:
diff changeset
904 The Lisp and the editor are integrated. A Lisp function defined
Dave Love <fx@gnu.org>
parents:
diff changeset
905 with defun is callable as an editor command if you put an
Dave Love <fx@gnu.org>
parents:
diff changeset
906 interactive calling spec in it; for example,
Dave Love <fx@gnu.org>
parents:
diff changeset
907 (defun forward-character (n)
Dave Love <fx@gnu.org>
parents:
diff changeset
908 (interactive "p")
Dave Love <fx@gnu.org>
parents:
diff changeset
909 (goto-char (+ (point) n)))
Dave Love <fx@gnu.org>
parents:
diff changeset
910 defines a function of one argument that moves point forward by
Dave Love <fx@gnu.org>
parents:
diff changeset
911 a specified number of characters. Programs could call this function,
Dave Love <fx@gnu.org>
parents:
diff changeset
912 as in (forward-character 6), or it could be assigned to a key,
Dave Love <fx@gnu.org>
parents:
diff changeset
913 in which case the "p" says to pass the prefix numeric arg as
Dave Love <fx@gnu.org>
parents:
diff changeset
914 the function's argument. As a result of this feature, you often
Dave Love <fx@gnu.org>
parents:
diff changeset
915 need not have two different functions, one to be called by programs
Dave Love <fx@gnu.org>
parents:
diff changeset
916 and another to read arguments from the user conveniently; the same
Dave Love <fx@gnu.org>
parents:
diff changeset
917 function can do both.
Dave Love <fx@gnu.org>
parents:
diff changeset
918
Dave Love <fx@gnu.org>
parents:
diff changeset
919 CCA Elisp tries to be a subset of Common Lisp and tries to
Dave Love <fx@gnu.org>
parents:
diff changeset
920 have as many Common Lisp functions as possible (though it is still
Dave Love <fx@gnu.org>
parents:
diff changeset
921 only a small fraction of full Common Lisp). GNU Emacs Lisp
Dave Love <fx@gnu.org>
parents:
diff changeset
922 is somewhat similar to Common Lisp just because of my Maclisp
Dave Love <fx@gnu.org>
parents:
diff changeset
923 and Lisp Machine background, but it has several distinct incompatibilities
Dave Love <fx@gnu.org>
parents:
diff changeset
924 in both syntax and semantics. Also, I have not attempted to
Dave Love <fx@gnu.org>
parents:
diff changeset
925 provide many Common Lisp functions that you could write in Lisp,
Dave Love <fx@gnu.org>
parents:
diff changeset
926 or others that provide no new capability in the circumstances.
Dave Love <fx@gnu.org>
parents:
diff changeset
927
Dave Love <fx@gnu.org>
parents:
diff changeset
928 GNU Emacs Lisp does not have packages, readtables, or character objects
Dave Love <fx@gnu.org>
parents:
diff changeset
929 (it uses integers to represent characters).
Dave Love <fx@gnu.org>
parents:
diff changeset
930
Dave Love <fx@gnu.org>
parents:
diff changeset
931 On the other hand, windows, buffers, relocatable markers and processes
Dave Love <fx@gnu.org>
parents:
diff changeset
932 are first class objects in GNU Emacs Lisp. You can get information about them
Dave Love <fx@gnu.org>
parents:
diff changeset
933 and do things to them in a Lispy fashion. Not so in CCA Emacs.
Dave Love <fx@gnu.org>
parents:
diff changeset
934
Dave Love <fx@gnu.org>
parents:
diff changeset
935 In GNU Emacs Lisp, you cannot open a file and read or write characters
Dave Love <fx@gnu.org>
parents:
diff changeset
936 or Lisp objects from it. This feature is painful to support, and
Dave Love <fx@gnu.org>
parents:
diff changeset
937 is not fundamentally necessary in an Emacs, because instead you
Dave Love <fx@gnu.org>
parents:
diff changeset
938 can read the file into a buffer, read or write characters or
Dave Love <fx@gnu.org>
parents:
diff changeset
939 Lisp objects in the buffer, and then write the buffer into the file.
Dave Love <fx@gnu.org>
parents:
diff changeset
940
Dave Love <fx@gnu.org>
parents:
diff changeset
941 On the other hand, GNU Emacs Lisp does allow you to rename, delete, add
Dave Love <fx@gnu.org>
parents:
diff changeset
942 names to, and copy files; also to find out whether a file is a
Dave Love <fx@gnu.org>
parents:
diff changeset
943 directory, whether it is a symbolic link and to what name, whether
Dave Love <fx@gnu.org>
parents:
diff changeset
944 you can read it or write it, find out its directory component,
Dave Love <fx@gnu.org>
parents:
diff changeset
945 expand a relative pathname, find completions of a file name, etc.,
Dave Love <fx@gnu.org>
parents:
diff changeset
946 which you cannot do in CCA Elisp.
Dave Love <fx@gnu.org>
parents:
diff changeset
947
Dave Love <fx@gnu.org>
parents:
diff changeset
948 GNU Emacs Lisp uses dynamic scope exclusively. This enables you to
Dave Love <fx@gnu.org>
parents:
diff changeset
949 bind variables which affect the execution of the editor, such as
Dave Love <fx@gnu.org>
parents:
diff changeset
950 indent-tabs-mode.
Dave Love <fx@gnu.org>
parents:
diff changeset
951
Dave Love <fx@gnu.org>
parents:
diff changeset
952 GNU Emacs Lisp code is normally compiled into byte code. Most of the
Dave Love <fx@gnu.org>
parents:
diff changeset
953 standard editing commands are written in Lisp, and many are
Dave Love <fx@gnu.org>
parents:
diff changeset
954 dumped, pure, in the Emacs that users normally run.
Dave Love <fx@gnu.org>
parents:
diff changeset
955
Dave Love <fx@gnu.org>
parents:
diff changeset
956 GNU Emacs allows you to interrupt a runaway Lisp program with
Dave Love <fx@gnu.org>
parents:
diff changeset
957 Control-g.
Dave Love <fx@gnu.org>
parents:
diff changeset
958
Dave Love <fx@gnu.org>
parents:
diff changeset
959 ** GNU Emacs Editing Advantages
Dave Love <fx@gnu.org>
parents:
diff changeset
960
Dave Love <fx@gnu.org>
parents:
diff changeset
961 GNU Emacs is faster for many things, especially insertion of text
Dave Love <fx@gnu.org>
parents:
diff changeset
962 and file I/O.
Dave Love <fx@gnu.org>
parents:
diff changeset
963
Dave Love <fx@gnu.org>
parents:
diff changeset
964 GNU Emacs allows you to undo more than just the last command
Dave Love <fx@gnu.org>
parents:
diff changeset
965 with the undo command (C-x u, or C-_). You can undo quite a ways back.
Dave Love <fx@gnu.org>
parents:
diff changeset
966 Undo information is separate for each buffer; changes in one buffer
Dave Love <fx@gnu.org>
parents:
diff changeset
967 do not affect your ability to undo in another buffer.
Dave Love <fx@gnu.org>
parents:
diff changeset
968
Dave Love <fx@gnu.org>
parents:
diff changeset
969 GNU Emacs commands that want to display some output do so by putting
Dave Love <fx@gnu.org>
parents:
diff changeset
970 it in a buffer and displaying that buffer in a window. This
Dave Love <fx@gnu.org>
parents:
diff changeset
971 technique comes from Gosling Emacs. It has both advantages and
Dave Love <fx@gnu.org>
parents:
diff changeset
972 disadvantages when compared with the technique, copied by CCA Emacs
Dave Love <fx@gnu.org>
parents:
diff changeset
973 from my original Emacs which inherited it from TECO, of having "type
Dave Love <fx@gnu.org>
parents:
diff changeset
974 out" which appears on top of the text in the current window but
Dave Love <fx@gnu.org>
parents:
diff changeset
975 disappears automatically at the next input character.
Dave Love <fx@gnu.org>
parents:
diff changeset
976
Dave Love <fx@gnu.org>
parents:
diff changeset
977 GNU Emacs does not use the concept of "subsystems". Instead, it uses
Dave Love <fx@gnu.org>
parents:
diff changeset
978 highly specialized major modes. For example, dired in GNU Emacs has
Dave Love <fx@gnu.org>
parents:
diff changeset
979 the same commands as dired does in other versions of Emacs, give or
Dave Love <fx@gnu.org>
parents:
diff changeset
980 take a few, but it is a major mode, not a subsystem. The advantage
Dave Love <fx@gnu.org>
parents:
diff changeset
981 of this is that you do not have to "exit" from dired and lose the
Dave Love <fx@gnu.org>
parents:
diff changeset
982 state of dired in order to edit files again. You can simply switch
Dave Love <fx@gnu.org>
parents:
diff changeset
983 to another buffer, and switch back to the dired buffer later. You
Dave Love <fx@gnu.org>
parents:
diff changeset
984 can also have several dired buffers, looking at different directories.
Dave Love <fx@gnu.org>
parents:
diff changeset
985
Dave Love <fx@gnu.org>
parents:
diff changeset
986 It is still possible to write a subsystem--your own command loop--
Dave Love <fx@gnu.org>
parents:
diff changeset
987 in GNU Emacs, but it is not recommended, since writing a major mode
Dave Love <fx@gnu.org>
parents:
diff changeset
988 for a special buffer is better.
Dave Love <fx@gnu.org>
parents:
diff changeset
989
Dave Love <fx@gnu.org>
parents:
diff changeset
990 Recursive edits are also rarely used, for the same reason: it is better
Dave Love <fx@gnu.org>
parents:
diff changeset
991 to make a new buffer and put it in a special major mode. Sending
Dave Love <fx@gnu.org>
parents:
diff changeset
992 mail is done this way.
Dave Love <fx@gnu.org>
parents:
diff changeset
993
Dave Love <fx@gnu.org>
parents:
diff changeset
994 GNU Emacs expects everyone to use find-file (C-x C-f) for reading
Dave Love <fx@gnu.org>
parents:
diff changeset
995 in files; its C-x C-v command kills the current buffer and then finds
Dave Love <fx@gnu.org>
parents:
diff changeset
996 the specified file.
Dave Love <fx@gnu.org>
parents:
diff changeset
997
Dave Love <fx@gnu.org>
parents:
diff changeset
998 As a result, users do not need to think about the complexities
Dave Love <fx@gnu.org>
parents:
diff changeset
999 of subsystems, recursive edits, and various ways to read in files
Dave Love <fx@gnu.org>
parents:
diff changeset
1000 or what to do if a buffer contains changes to some other file.
Dave Love <fx@gnu.org>
parents:
diff changeset
1001
Dave Love <fx@gnu.org>
parents:
diff changeset
1002 GNU Emacs uses its own format of tag table, made by the "etags"
Dave Love <fx@gnu.org>
parents:
diff changeset
1003 program. This format makes finding a tag much faster.
Dave Love <fx@gnu.org>
parents:
diff changeset
1004
Dave Love <fx@gnu.org>
parents:
diff changeset
1005 Dissociated Press is supported.
Dave Love <fx@gnu.org>
parents:
diff changeset
1006
Dave Love <fx@gnu.org>
parents:
diff changeset
1007
Dave Love <fx@gnu.org>
parents:
diff changeset
1008 ** GNU Emacs Editing Disadvantages.
Dave Love <fx@gnu.org>
parents:
diff changeset
1009
Dave Love <fx@gnu.org>
parents:
diff changeset
1010 GNU Emacs does not display the location of the mark.
Dave Love <fx@gnu.org>
parents:
diff changeset
1011
Dave Love <fx@gnu.org>
parents:
diff changeset
1012 GNU Emacs does not have a concept of numbers of buffers,
Dave Love <fx@gnu.org>
parents:
diff changeset
1013 or a permanent ordering of buffers, or searching through multiple
Dave Love <fx@gnu.org>
parents:
diff changeset
1014 buffers. The tags-search command provides a way to search
Dave Love <fx@gnu.org>
parents:
diff changeset
1015 through several buffers automatically.
Dave Love <fx@gnu.org>
parents:
diff changeset
1016
Dave Love <fx@gnu.org>
parents:
diff changeset
1017 GNU Emacs does not provide commands to visit files without
Dave Love <fx@gnu.org>
parents:
diff changeset
1018 setting the buffer's default directory. Users can write such
Dave Love <fx@gnu.org>
parents:
diff changeset
1019 commands in Lisp by copying the code of the standard file
Dave Love <fx@gnu.org>
parents:
diff changeset
1020 visiting commands and modifying them.
Dave Love <fx@gnu.org>
parents:
diff changeset
1021
Dave Love <fx@gnu.org>
parents:
diff changeset
1022 GNU Emacs does not support "plus options" in the command
Dave Love <fx@gnu.org>
parents:
diff changeset
1023 arguments or in buffer-selection commands, except for line numbers.
Dave Love <fx@gnu.org>
parents:
diff changeset
1024
Dave Love <fx@gnu.org>
parents:
diff changeset
1025 GNU Emacs does not support encryption. Down with security!
Dave Love <fx@gnu.org>
parents:
diff changeset
1026
Dave Love <fx@gnu.org>
parents:
diff changeset
1027 GNU Emacs does not support replaying keystroke files,
Dave Love <fx@gnu.org>
parents:
diff changeset
1028 and does not normally write keystroke files.
Dave Love <fx@gnu.org>
parents:
diff changeset
1029
Dave Love <fx@gnu.org>
parents:
diff changeset
1030
Dave Love <fx@gnu.org>
parents:
diff changeset
1031 ** Neutral Differences
Dave Love <fx@gnu.org>
parents:
diff changeset
1032
Dave Love <fx@gnu.org>
parents:
diff changeset
1033 GNU Emacs uses TAB, not ESC, to complete file names, buffer names,
Dave Love <fx@gnu.org>
parents:
diff changeset
1034 command names, etc.
Dave Love <fx@gnu.org>
parents:
diff changeset
1035
Dave Love <fx@gnu.org>
parents:
diff changeset
1036 GNU Emacs uses LFD to terminate searches, instead of
Dave Love <fx@gnu.org>
parents:
diff changeset
1037 the C-d uses by CCA Emacs. (Actually, this character is controlled
Dave Love <fx@gnu.org>
parents:
diff changeset
1038 by a parameter in GNU Emacs.) C-M-s in GNU Emacs is an interactive
Dave Love <fx@gnu.org>
parents:
diff changeset
1039 regular expression search, but you can get to a noninteractive
Dave Love <fx@gnu.org>
parents:
diff changeset
1040 one by typing ESC right after the C-M-s.
Dave Love <fx@gnu.org>
parents:
diff changeset
1041
Dave Love <fx@gnu.org>
parents:
diff changeset
1042 In GNU Emacs, C-x s asks, for each modified file buffer, whether
Dave Love <fx@gnu.org>
parents:
diff changeset
1043 to save it.
Dave Love <fx@gnu.org>
parents:
diff changeset
1044
Dave Love <fx@gnu.org>
parents:
diff changeset
1045 GNU Emacs indicates line continuation with "\" and line
Dave Love <fx@gnu.org>
parents:
diff changeset
1046 truncation (at either margin) with "$".
Dave Love <fx@gnu.org>
parents:
diff changeset
1047
Dave Love <fx@gnu.org>
parents:
diff changeset
1048 The command to resume a tags-search or tags-query-replace in
Dave Love <fx@gnu.org>
parents:
diff changeset
1049 GNU Emacs is Meta-Comma.