comparison man/trouble.texi @ 83507:81f2d90dee68

Merged from Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-188 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-189 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-190 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-191 Undo incorrect merge of etc/images/README from Gnus 5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-192 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-193 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-194 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-195 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-196 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-197 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-198 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-199 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-200 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-201 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-202 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-203 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-204 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-205 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-206 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-73 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-74 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-75 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-76 Update from CVS: README: Addition from 5.10.6 tar ball. * emacs@sv.gnu.org/gnus--rel--5.10--patch-77 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-78 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-79 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-80 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-547
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 10 Apr 2006 14:52:24 +0000
parents 601830ae280c
children 017a2a1beeee c156f6a9e7b5
comparison
equal deleted inserted replaced
83506:9905fc171253 83507:81f2d90dee68
32 Abort all recursive editing levels that are currently executing. 32 Abort all recursive editing levels that are currently executing.
33 @item C-x u 33 @item C-x u
34 Cancel a previously made change in the buffer contents (@code{undo}). 34 Cancel a previously made change in the buffer contents (@code{undo}).
35 @end table 35 @end table
36 36
37 There are two ways of canceling commands which are not finished 37 There are two ways of canceling a command before it has finished:
38 executing: @dfn{quitting} with @kbd{C-g}, and @dfn{aborting} with 38 @dfn{quitting} with @kbd{C-g}, and @dfn{aborting} with @kbd{C-]} or
39 @kbd{C-]} or @kbd{M-x top-level}. Quitting cancels a partially typed 39 @kbd{M-x top-level}. Quitting cancels a partially typed command, or
40 command or one which is already running. Aborting exits a recursive 40 one which is still running. Aborting exits a recursive editing level
41 editing level and cancels the command that invoked the recursive edit. 41 and cancels the command that invoked the recursive edit.
42 (@xref{Recursive Edit}.) 42 (@xref{Recursive Edit}.)
43 43
44 @cindex quitting 44 @cindex quitting
45 @kindex C-g 45 @kindex C-g
46 Quitting with @kbd{C-g} is used for getting rid of a partially typed 46 Quitting with @kbd{C-g} is the way to get rid of a partially typed
47 command, or a numeric argument that you don't want. It also stops a 47 command, or a numeric argument that you don't want. It also stops a
48 running command in the middle in a relatively safe way, so you can use 48 running command in the middle in a relatively safe way, so you can use
49 it if you accidentally give a command which takes a long time. In 49 it if you accidentally give a command which takes a long time. In
50 particular, it is safe to quit out of killing; either your text will 50 particular, it is safe to quit out of a kill command; either your text
51 @emph{all} still be in the buffer, or it will @emph{all} be in the kill 51 will @emph{all} still be in the buffer, or it will @emph{all} be in
52 ring (or maybe both). Quitting an incremental search does special 52 the kill ring, or maybe both. Quitting an incremental search does
53 things documented under searching; in general, it may take two 53 special things, documented under searching; it may take two successive
54 successive @kbd{C-g} characters to get out of a search 54 @kbd{C-g} characters to get out of a search (@pxref{Incremental
55 (@pxref{Incremental Search}). 55 Search}).
56 56
57 On MS-DOS, the character @kbd{C-@key{BREAK}} serves as a quit character 57 On MS-DOS, the character @kbd{C-@key{BREAK}} serves as a quit character
58 like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to 58 like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to
59 recognize @kbd{C-g} while a command is running, between interactions 59 recognize @kbd{C-g} while a command is running, between interactions
60 with the user. By contrast, it @emph{is} feasible to recognize 60 with the user. By contrast, it @emph{is} feasible to recognize
61 @kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard}. 61 @kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard,,,emacs-xtra,
62 Specialized Emacs Features}.
62 63
63 @findex keyboard-quit 64 @findex keyboard-quit
64 @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} 65 @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t}
65 the instant @kbd{C-g} is typed; Emacs Lisp checks this variable 66 the instant @kbd{C-g} is typed; Emacs Lisp checks this variable
66 frequently and quits if it is non-@code{nil}. @kbd{C-g} is only 67 frequently, and quits if it is non-@code{nil}. @kbd{C-g} is only
67 actually executed as a command if you type it while Emacs is waiting for 68 actually executed as a command if you type it while Emacs is waiting for
68 input. In that case, the command it runs is @code{keyboard-quit}. 69 input. In that case, the command it runs is @code{keyboard-quit}.
69 70
70 On a text terminal, if you quit with @kbd{C-g} a second time before 71 On a text terminal, if you quit with @kbd{C-g} a second time before
71 the first @kbd{C-g} is recognized, you activate the ``emergency 72 the first @kbd{C-g} is recognized, you activate the ``emergency
72 escape'' feature and return to the shell. @xref{Emergency Escape}. 73 escape'' feature and return to the shell. @xref{Emergency Escape}.
73 74
74 @cindex NFS and quitting 75 @cindex NFS and quitting
75 There may be times when you cannot quit. When Emacs is waiting for 76 There are some situations where you cannot quit. When Emacs is
76 the operating system to do something, quitting is impossible unless 77 waiting for the operating system to do something, quitting is
77 special pains are taken for the particular system call within Emacs 78 impossible unless special pains are taken for the particular system
78 where the waiting occurs. We have done this for the system calls that 79 call within Emacs where the waiting occurs. We have done this for the
79 users are likely to want to quit from, but it's possible you will find 80 system calls that users are likely to want to quit from, but it's
80 another. In one very common case---waiting for file input or output 81 possible you will a case not handled. In one very common
81 using NFS---Emacs itself knows how to quit, but many NFS implementations 82 case---waiting for file input or output using NFS---Emacs itself knows
82 simply do not allow user programs to stop waiting for NFS when the NFS 83 how to quit, but many NFS implementations simply do not allow user
83 server is hung. 84 programs to stop waiting for NFS when the NFS server is hung.
84 85
85 @cindex aborting recursive edit 86 @cindex aborting recursive edit
86 @findex abort-recursive-edit 87 @findex abort-recursive-edit
87 @kindex C-] 88 @kindex C-]
88 Aborting with @kbd{C-]} (@code{abort-recursive-edit}) is used to get 89 Aborting with @kbd{C-]} (@code{abort-recursive-edit}) is used to get
94 argument, you can cancel that argument with @kbd{C-g} and remain in the 95 argument, you can cancel that argument with @kbd{C-g} and remain in the
95 recursive edit. 96 recursive edit.
96 97
97 @findex keyboard-escape-quit 98 @findex keyboard-escape-quit
98 @kindex ESC ESC ESC 99 @kindex ESC ESC ESC
99 The command @kbd{@key{ESC} @key{ESC} @key{ESC}} 100 The sequence @kbd{@key{ESC} @key{ESC} @key{ESC}}
100 (@code{keyboard-escape-quit}) can either quit or abort. This key was 101 (@code{keyboard-escape-quit}) can either quit or abort. (We defined
101 defined because @key{ESC} is used to ``get out'' in many PC programs. 102 it this way because @key{ESC} means ``get out'' in many PC programs.)
102 It can cancel a prefix argument, clear a selected region, or get out of 103 It can cancel a prefix argument, clear a selected region, or get out
103 a Query Replace, like @kbd{C-g}. It can get out of the minibuffer or a 104 of a Query Replace, like @kbd{C-g}. It can get out of the minibuffer
104 recursive edit, like @kbd{C-]}. It can also get out of splitting the 105 or a recursive edit, like @kbd{C-]}. It can also get out of splitting
105 frame into multiple windows, like @kbd{C-x 1}. One thing it cannot do, 106 the frame into multiple windows, as with @kbd{C-x 1}. One thing it
106 however, is stop a command that is running. That's because it executes 107 cannot do, however, is stop a command that is running. That's because
107 as an ordinary command, and Emacs doesn't notice it until it is ready 108 it executes as an ordinary command, and Emacs doesn't notice it until
108 for a command. 109 it is ready for the next command.
109 110
110 @findex top-level 111 @findex top-level
111 The command @kbd{M-x top-level} is equivalent to ``enough'' @kbd{C-]} 112 The command @kbd{M-x top-level} is equivalent to ``enough'' @kbd{C-]}
112 commands to get you out of all the levels of recursive edits that you 113 commands to get you out of all the levels of recursive edits that you
113 are in. @kbd{C-]} gets you out one level at a time, but @kbd{M-x 114 are in. @kbd{C-]} gets you out one level at a time, but @kbd{M-x
135 @menu 136 @menu
136 * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete. 137 * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete.
137 * Stuck Recursive:: `[...]' in mode line around the parentheses. 138 * Stuck Recursive:: `[...]' in mode line around the parentheses.
138 * Screen Garbled:: Garbage on the screen. 139 * Screen Garbled:: Garbage on the screen.
139 * Text Garbled:: Garbage in the text. 140 * Text Garbled:: Garbage in the text.
140 * Unasked-for Search:: Spontaneous entry to incremental search.
141 * Memory Full:: How to cope when you run out of memory. 141 * Memory Full:: How to cope when you run out of memory.
142 * After a Crash:: Recovering editing in an Emacs session that crashed. 142 * After a Crash:: Recovering editing in an Emacs session that crashed.
143 * Emergency Escape:: Emergency escape--- 143 * Emergency Escape:: Emergency escape---
144 What to do if Emacs stops responding. 144 What to do if Emacs stops responding.
145 * Total Frustration:: When you are at your wits' end. 145 * Total Frustration:: When you are at your wits' end.
179 isn't. 179 isn't.
180 180
181 In all of those cases, the immediate remedy is the same: use the 181 In all of those cases, the immediate remedy is the same: use the
182 command @kbd{M-x normal-erase-is-backspace-mode}. This toggles 182 command @kbd{M-x normal-erase-is-backspace-mode}. This toggles
183 between the two modes that Emacs supports for handling @key{DEL}, so 183 between the two modes that Emacs supports for handling @key{DEL}, so
184 if Emacs starts in the wrong mode, it should switch to the right mode. 184 if Emacs starts in the wrong mode, this should switch to the right
185 On a text-only terminal, if you want to ask for help when @key{BS} is 185 mode. On a text-only terminal, if you want to ask for help when
186 treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also work, if it 186 @key{BS} is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also
187 sends character code 127. 187 work, if it sends character code 127.
188 188
189 @findex normal-erase-is-backspace-mode 189 @findex normal-erase-is-backspace-mode
190 To fix the problem automatically for every Emacs session, you can 190 To fix the problem automatically for every Emacs session, you can
191 put one of the following lines into your @file{.emacs} file 191 put one of the following lines into your @file{.emacs} file
192 (@pxref{Init File}). For the first case above, where @key{DELETE} 192 (@pxref{Init File}). For the first case above, where @key{DELETE}
242 see whether it is wrong in the buffer. Type @kbd{C-l} to redisplay 242 see whether it is wrong in the buffer. Type @kbd{C-l} to redisplay
243 the entire screen. If the screen appears correct after this, the 243 the entire screen. If the screen appears correct after this, the
244 problem was entirely in the previous screen update. (Otherwise, see 244 problem was entirely in the previous screen update. (Otherwise, see
245 the following section.) 245 the following section.)
246 246
247 Display updating problems often result from an incorrect termcap entry 247 Display updating problems often result from an incorrect terminfo
248 for the terminal you are using. The file @file{etc/TERMS} in the Emacs 248 entry for the terminal you are using. The file @file{etc/TERMS} in
249 distribution gives the fixes for known problems of this sort. 249 the Emacs distribution gives the fixes for known problems of this
250 @file{INSTALL} contains general advice for these problems in one of its 250 sort. @file{INSTALL} contains general advice for these problems in
251 sections. Very likely there is simply insufficient padding for certain 251 one of its sections. To investigate the possibility that you have
252 display operations. To investigate the possibility that you have this sort 252 this sort of problem, try Emacs on another terminal made by a
253 of problem, try Emacs on another terminal made by a different manufacturer. 253 different manufacturer. If problems happen frequently on one kind of
254 If problems happen frequently on one kind of terminal but not another kind, 254 terminal but not another kind, it is likely to be a bad terminfo entry,
255 it is likely to be a bad termcap entry, though it could also be due to a 255 though it could also be due to a bug in Emacs that appears for
256 bug in Emacs that appears for terminals that have or that lack specific 256 terminals that have or that lack specific features.
257 features.
258 257
259 @node Text Garbled 258 @node Text Garbled
260 @subsection Garbage in the Text 259 @subsection Garbage in the Text
261 260
262 If @kbd{C-l} shows that the text is wrong, try undoing the changes to it 261 If @kbd{C-l} shows that the text is wrong, first type @kbd{C-h l} to
263 using @kbd{C-x u} until it gets back to a state you consider correct. Also 262 see what commands you typed to produce the observed results. Then try
264 try @kbd{C-h l} to find out what command you typed to produce the observed 263 undoing the changes step by step using @kbd{C-x u}, until it gets back
265 results. 264 to a state you consider correct.
266 265
267 If a large portion of text appears to be missing at the beginning or 266 If a large portion of text appears to be missing at the beginning or
268 end of the buffer, check for the word @samp{Narrow} in the mode line. 267 end of the buffer, check for the word @samp{Narrow} in the mode line.
269 If it appears, the text you don't see is probably still present, but 268 If it appears, the text you don't see is probably still present, but
270 temporarily off-limits. To make it accessible again, type @kbd{C-x n 269 temporarily off-limits. To make it accessible again, type @kbd{C-x n
271 w}. @xref{Narrowing}. 270 w}. @xref{Narrowing}.
272
273 @node Unasked-for Search
274 @subsection Spontaneous Entry to Incremental Search
275
276 If Emacs spontaneously displays @samp{I-search:} at the bottom of the
277 screen, it means that the terminal is sending @kbd{C-s} and @kbd{C-q}
278 according to the poorly designed xon/xoff ``flow control'' protocol.
279
280 If this happens to you, your best recourse is to put the terminal in a
281 mode where it will not use flow control, or give it so much padding that
282 it will never send a @kbd{C-s}. (One way to increase the amount of
283 padding is to set the variable @code{baud-rate} to a larger value. Its
284 value is the terminal output speed, measured in the conventional units
285 of baud.)
286
287 @cindex flow control
288 @cindex xon-xoff
289 @findex enable-flow-control
290 If you don't succeed in turning off flow control, the next best thing
291 is to tell Emacs to cope with it. To do this, call the function
292 @code{enable-flow-control}.
293
294 @findex enable-flow-control-on
295 Typically there are particular terminal types with which you must use
296 flow control. You can conveniently ask for flow control on those
297 terminal types only, using @code{enable-flow-control-on}. For example,
298 if you find you must use flow control on VT-100 and H19 terminals, put
299 the following in your @file{.emacs} file:
300
301 @example
302 (enable-flow-control-on "vt100" "h19")
303 @end example
304
305 When flow control is enabled, you must type @kbd{C-\} to get the
306 effect of a @kbd{C-s}, and type @kbd{C-^} to get the effect of a
307 @kbd{C-q}.
308 271
309 @node Memory Full 272 @node Memory Full
310 @subsection Running out of Memory 273 @subsection Running out of Memory
311 @cindex memory full 274 @cindex memory full
312 @cindex out of memory 275 @cindex out of memory
340 This command initially displays a buffer which lists interrupted 303 This command initially displays a buffer which lists interrupted
341 session files, each with its date. You must choose which session to 304 session files, each with its date. You must choose which session to
342 recover from. Typically the one you want is the most recent one. Move 305 recover from. Typically the one you want is the most recent one. Move
343 point to the one you choose, and type @kbd{C-c C-c}. 306 point to the one you choose, and type @kbd{C-c C-c}.
344 307
345 Then @code{recover-session} asks about each of the files that you were 308 Then @code{recover-session} considers each of the files that you
346 editing during that session; it asks whether to recover that file. If 309 were editing during that session; for each such file, it asks whether
347 you answer @kbd{y} for a file, it shows the dates of that file and its 310 to recover that file. If you answer @kbd{y} for a file, it shows the
348 auto-save file, then asks once again whether to recover that file. For 311 dates of that file and its auto-save file, then asks once again
349 the second question, you must confirm with @kbd{yes}. If you do, Emacs 312 whether to recover that file. For the second question, you must
350 visits the file but gets the text from the auto-save file. 313 confirm with @kbd{yes}. If you do, Emacs visits the file but gets the
314 text from the auto-save file.
351 315
352 When @code{recover-session} is done, the files you've chosen to 316 When @code{recover-session} is done, the files you've chosen to
353 recover are present in Emacs buffers. You should then save them. Only 317 recover are present in Emacs buffers. You should then save them. Only
354 this---saving them---updates the files themselves. 318 this---saving them---updates the files themselves.
355 319
358 have recorded important changes, you can use the 322 have recorded important changes, you can use the
359 @file{etc/emacs-buffer.gdb} script with GDB (the GNU Debugger) to 323 @file{etc/emacs-buffer.gdb} script with GDB (the GNU Debugger) to
360 retrieve them from a core dump--provided that a core dump was saved, 324 retrieve them from a core dump--provided that a core dump was saved,
361 and that the Emacs executable was not stripped of its debugging 325 and that the Emacs executable was not stripped of its debugging
362 symbols. 326 symbols.
327
328 As soon as you get the core dump, rename it to another name such as
329 @file{core.emacs}, so that another crash won't overwrite it.
363 330
364 To use this script, run @code{gdb} with the file name of your Emacs 331 To use this script, run @code{gdb} with the file name of your Emacs
365 executable and the file name of the core dump, e.g. @samp{gdb 332 executable and the file name of the core dump, e.g. @samp{gdb
366 /usr/bin/emacs core.emacs}. At the @code{(gdb)} prompt, load the 333 /usr/bin/emacs core.emacs}. At the @code{(gdb)} prompt, load the
367 recovery script: @samp{source /usr/src/emacs/etc/emacs-buffer.gdb}. 334 recovery script: @samp{source /usr/src/emacs/etc/emacs-buffer.gdb}.
373 not make a backup of its old contents. 340 not make a backup of its old contents.
374 341
375 @node Emergency Escape 342 @node Emergency Escape
376 @subsection Emergency Escape 343 @subsection Emergency Escape
377 344
378 Because at times there have been bugs causing Emacs to loop without 345 On text-only terminals, the @dfn{emergency escape} feature suspends
379 checking @code{quit-flag}, a special feature causes Emacs to be suspended 346 Emacs immediately if you type @kbd{C-g} a second time before Emacs can
380 immediately if you type a second @kbd{C-g} while the flag is already set, 347 actually respond to the first one by quitting. This is so you can
381 so you can always get out of GNU Emacs. Normally Emacs recognizes and 348 always get out of GNU Emacs no matter how badly it might be hung.
382 clears @code{quit-flag} (and quits!) quickly enough to prevent this from 349 When things are working properly, Emacs recognizes and handles the
383 happening. (On MS-DOS and compatible systems, type @kbd{C-@key{BREAK}} 350 first @kbd{C-g} so fast that the second one won't trigger emergency
384 twice.) 351 escape. However, if some problem prevents Emacs from handling the
385 352 first @kbd{C-g} properly, then the second one will get you back to the
386 When you resume Emacs after a suspension caused by multiple @kbd{C-g}, it 353 shell.
387 asks two questions before going back to what it had been doing: 354
355 When you resume Emacs after a suspension caused by emergency escape,
356 it asks two questions before going back to what it had been doing:
388 357
389 @example 358 @example
390 Auto-save? (y or n) 359 Auto-save? (y or n)
391 Abort (and dump core)? (y or n) 360 Abort (and dump core)? (y or n)
392 @end example 361 @end example
393 362
394 @noindent 363 @noindent
395 Answer each one with @kbd{y} or @kbd{n} followed by @key{RET}. 364 Answer each one with @kbd{y} or @kbd{n} followed by @key{RET}.
396 365
397 Saying @kbd{y} to @samp{Auto-save?} causes immediate auto-saving of all 366 Saying @kbd{y} to @samp{Auto-save?} causes immediate auto-saving of
398 modified buffers in which auto-saving is enabled. 367 all modified buffers in which auto-saving is enabled. Saying @kbd{n}
399 368 skips this.
400 Saying @kbd{y} to @samp{Abort (and dump core)?} causes an illegal instruction to be 369
401 executed, dumping core. This is to enable a wizard to figure out why Emacs 370 Saying @kbd{y} to @samp{Abort (and dump core)?} causes Emacs to
402 was failing to quit in the first place. Execution does not continue 371 crash, dumping core. This is to enable a wizard to figure out why
403 after a core dump. If you answer @kbd{n}, execution does continue. With 372 Emacs was failing to quit in the first place. Execution does not
404 luck, GNU Emacs will ultimately check @code{quit-flag} and quit normally. 373 continue after a core dump.
405 If not, and you type another @kbd{C-g}, it is suspended again. 374
375 If you answer this question @kbd{n}, Emacs execution resumes. With
376 luck, Emacs will ultimately do the requested quit. If not, each
377 subsequent @kbd{C-g} invokes emergency escape again.
406 378
407 If Emacs is not really hung, just slow, you may invoke the double 379 If Emacs is not really hung, just slow, you may invoke the double
408 @kbd{C-g} feature without really meaning to. Then just resume and answer 380 @kbd{C-g} feature without really meaning to. Then just resume and
409 @kbd{n} to both questions, and you will arrive at your former state. 381 answer @kbd{n} to both questions, and you will get back to the former
410 Presumably the quit you requested will happen soon. 382 state. The quit you requested will happen by and by.
411 383
412 The double @kbd{C-g} feature is turned off when Emacs is running under 384 Emergency escape is active only for text terminals. On a graphical
413 the X Window System, since you can use the window manager to kill Emacs 385 display that supports multiple windows, you can use the window manager
414 or to create another window and run another program. 386 to kill Emacs, or to switch to some other program.
415 387
416 On MS-DOS and compatible systems, the emergency escape feature is 388 On MS-DOS, you must type @kbd{C-@key{BREAK}} (twice) to cause
417 sometimes unavailable, even if you press @kbd{C-@key{BREAK}} twice, when 389 emergency escape---but there are cases where it won't work, when
418 some system call (MS-DOS or BIOS) hangs, or when Emacs is stuck in a 390 system call hangs or when Emacs is stuck in a tight loop in C code.
419 very tight endless loop (in C code, @strong{not} in Lisp code).
420 391
421 @node Total Frustration 392 @node Total Frustration
422 @subsection Help for Total Frustration 393 @subsection Help for Total Frustration
423 @cindex Eliza 394 @cindex Eliza
424 @cindex doctor 395 @cindex doctor
431 @kbd{C-g C-g} to get out of it and then start a new one. 402 @kbd{C-g C-g} to get out of it and then start a new one.
432 403
433 @findex doctor 404 @findex doctor
434 Second, type @kbd{M-x doctor @key{RET}}. 405 Second, type @kbd{M-x doctor @key{RET}}.
435 406
436 The doctor will help you feel better. Each time you say something to 407 The Emacs psychotherapist will help you feel better. Each time you
437 the doctor, you must end it by typing @key{RET} @key{RET}. This lets 408 say something to the psychotherapist, you must end it by typing
438 the doctor know you are finished. 409 @key{RET} @key{RET}. This indicates you are finished typing.
439 410
440 @node Bugs, Contributing, Lossage, Top 411 @node Bugs, Contributing, Lossage, Top
441 @section Reporting Bugs 412 @section Reporting Bugs
442 413
443 @cindex bugs 414 @cindex bugs
465 @end menu 436 @end menu
466 437
467 @node Bug Criteria 438 @node Bug Criteria
468 @subsection When Is There a Bug 439 @subsection When Is There a Bug
469 440
470 If Emacs executes an illegal instruction, or dies with an operating 441 If Emacs accesses an invalid memory location (``segmentation
471 system error message that indicates a problem in the program (as opposed to 442 fault''), or exits with an operating system error message that
472 something like ``disk full''), then it is certainly a bug. 443 indicates a problem in the program (as opposed to something like
444 ``disk full''), then it is certainly a bug.
473 445
474 If Emacs updates the display in a way that does not correspond to what is 446 If Emacs updates the display in a way that does not correspond to what is
475 in the buffer, then it is certainly a bug. If a command seems to do the 447 in the buffer, then it is certainly a bug. If a command seems to do the
476 wrong thing but the problem corrects itself if you type @kbd{C-l}, it is a 448 wrong thing but the problem corrects itself if you type @kbd{C-l}, it is a
477 case of incorrect display updating. 449 case of incorrect display updating.
500 of problem, but it is also a matter of judgment. Also, it is easy to 472 of problem, but it is also a matter of judgment. Also, it is easy to
501 come to such a conclusion out of ignorance of some of the existing 473 come to such a conclusion out of ignorance of some of the existing
502 features. It is probably best not to complain about such a problem 474 features. It is probably best not to complain about such a problem
503 until you have checked the documentation in the usual ways, feel 475 until you have checked the documentation in the usual ways, feel
504 confident that you understand it, and know for certain that what you 476 confident that you understand it, and know for certain that what you
505 want is not available. If you are not sure what the command is 477 want is not available. Ask other Emacs users, too. If you are not
506 supposed to do after a careful reading of the manual, check the index 478 sure what the command is supposed to do after a careful reading of the
507 and glossary for any terms that may be unclear. 479 manual, check the index and glossary for any terms that may be
480 unclear.
508 481
509 If after careful rereading of the manual you still do not understand 482 If after careful rereading of the manual you still do not understand
510 what the command should do, that indicates a bug in the manual, which 483 what the command should do, that indicates a bug in the manual, which
511 you should report. The manual's job is to make everything clear to 484 you should report. The manual's job is to make everything clear to
512 people who are not Emacs experts---including you. It is just as 485 people who are not Emacs experts---including you. It is just as
531 facts. If the explanations are based on guesses about how Emacs is 504 facts. If the explanations are based on guesses about how Emacs is
532 implemented, they will be useless; meanwhile, lacking the facts, we will 505 implemented, they will be useless; meanwhile, lacking the facts, we will
533 have no real information about the bug. 506 have no real information about the bug.
534 507
535 For example, suppose that you type @kbd{C-x C-f /glorp/baz.ugh 508 For example, suppose that you type @kbd{C-x C-f /glorp/baz.ugh
536 @key{RET}}, visiting a file which (you know) happens to be rather large, 509 @key{RET}}, visiting a file which (you know) happens to be rather
537 and Emacs displayed @samp{I feel pretty today}. The best way to report 510 large, and Emacs displays @samp{I feel pretty today}. The best way to
538 the bug is with a sentence like the preceding one, because it gives all 511 report the bug is with a sentence like the preceding one, because it
539 the facts. 512 gives all the facts.
540 513
541 A bad way would be to assume that the problem is due to the size of 514 A bad way would be to assume that the problem is due to the size of
542 the file and say, ``I visited a large file, and Emacs displayed @samp{I 515 the file and say, ``I visited a large file, and Emacs displayed @samp{I
543 feel pretty today}.'' This is what we mean by ``guessing 516 feel pretty today}.'' This is what we mean by ``guessing
544 explanations.'' The problem is just as likely to be due to the fact 517 explanations.'' The problem is just as likely to be due to the fact
557 530
558 You should not even say ``visit a file'' instead of @kbd{C-x C-f} unless 531 You should not even say ``visit a file'' instead of @kbd{C-x C-f} unless
559 you @emph{know} that it makes no difference which visiting command is used. 532 you @emph{know} that it makes no difference which visiting command is used.
560 Similarly, rather than saying ``if I have three characters on the line,'' 533 Similarly, rather than saying ``if I have three characters on the line,''
561 say ``after I type @kbd{@key{RET} A B C @key{RET} C-p},'' if that is 534 say ``after I type @kbd{@key{RET} A B C @key{RET} C-p},'' if that is
562 the way you entered the text.@refill 535 the way you entered the text.
563 536
564 So please don't guess any explanations when you report a bug. If you 537 So please don't guess any explanations when you report a bug. If you
565 want to actually @emph{debug} the problem, and report explanations that 538 want to actually @emph{debug} the problem, and report explanations that
566 are more than guesses, that is useful---but please include the facts as 539 are more than guesses, that is useful---but please include the facts as
567 well. 540 well.
589 in order to ask you for more information. If your data is more than 562 in order to ask you for more information. If your data is more than
590 500,000 bytes, please don't include it directly in the bug report; 563 500,000 bytes, please don't include it directly in the bug report;
591 instead, offer to send it on request, or make it available by ftp and 564 instead, offer to send it on request, or make it available by ftp and
592 say where. 565 say where.
593 566
594 If you can't send electronic mail, then mail the bug report on paper
595 or machine-readable media to this address:
596
597 @format
598 GNU Emacs Bugs
599 Free Software Foundation
600 51 Franklin Street, Fifth Floor
601 Boston, MA 02110-1301 USA
602 @end format
603
604 We do not promise to fix the bug; but if the bug is serious,
605 or ugly, or easy to fix, chances are we will want to.
606
607 @findex report-emacs-bug 567 @findex report-emacs-bug
608 A convenient way to send a bug report for Emacs is to use the command 568 A convenient way to send a bug report for Emacs is to use the command
609 @kbd{M-x report-emacs-bug}. This sets up a mail buffer (@pxref{Sending 569 @kbd{M-x report-emacs-bug}. This sets up a mail buffer (@pxref{Sending
610 Mail}) and automatically inserts @emph{some} of the essential 570 Mail}) and automatically inserts @emph{some} of the essential
611 information. However, it cannot supply all the necessary information; 571 information. However, it cannot supply all the necessary information;
656 The complete text of any files needed to reproduce the bug. 616 The complete text of any files needed to reproduce the bug.
657 617
658 If you can tell us a way to cause the problem without visiting any files, 618 If you can tell us a way to cause the problem without visiting any files,
659 please do so. This makes it much easier to debug. If you do need files, 619 please do so. This makes it much easier to debug. If you do need files,
660 make sure you arrange for us to see their exact contents. For example, it 620 make sure you arrange for us to see their exact contents. For example, it
661 can often matter whether there are spaces at the ends of lines, or a 621 can matter whether there are spaces at the ends of lines, or a
662 newline after the last line in the buffer (nothing ought to care whether 622 newline after the last line in the buffer (nothing ought to care whether
663 the last line is terminated, but try telling the bugs that). 623 the last line is terminated, but try telling the bugs that).
664 624
665 @item 625 @item
666 The precise commands we need to type to reproduce the bug. 626 The precise commands we need to type to reproduce the bug.
667 627
668 @findex open-dribble-file 628 @findex open-dribble-file
669 @cindex dribble file 629 @cindex dribble file
670 @cindex logging keystrokes 630 @cindex logging keystrokes
671 The easy way to record the input to Emacs precisely is to write a 631 The easy way to record the input to Emacs precisely is to write a
672 dribble file. To start the file, execute the Lisp expression 632 dribble file. To start the file, execute the Lisp expression
673 633
674 @example 634 @example
675 (open-dribble-file "~/dribble") 635 (open-dribble-file "~/dribble")
676 @end example 636 @end example
703 your @file{.emacs} file so that the termscript file will be open when 663 your @file{.emacs} file so that the termscript file will be open when
704 Emacs displays the screen for the first time. 664 Emacs displays the screen for the first time.
705 665
706 Be warned: it is often difficult, and sometimes impossible, to fix a 666 Be warned: it is often difficult, and sometimes impossible, to fix a
707 terminal-dependent bug without access to a terminal of the type that 667 terminal-dependent bug without access to a terminal of the type that
708 stimulates the bug.@refill 668 stimulates the bug.
709 669
710 @item 670 @item
711 If non-@acronym{ASCII} text or internationalization is relevant, the locale that 671 If non-@acronym{ASCII} text or internationalization is relevant, the locale that
712 was current when you started Emacs. On GNU/Linux and Unix systems, or 672 was current when you started Emacs. On GNU/Linux and Unix systems, or
713 if you use a Posix-style shell such as Bash, you can use this shell 673 if you use a Posix-style shell such as Bash, you can use this shell
763 723
764 @findex toggle-debug-on-error 724 @findex toggle-debug-on-error
765 @pindex Edebug 725 @pindex Edebug
766 To make a backtrace for the error, use @kbd{M-x toggle-debug-on-error} 726 To make a backtrace for the error, use @kbd{M-x toggle-debug-on-error}
767 before the error happens (that is to say, you must give that command 727 before the error happens (that is to say, you must give that command
768 and then make the bug happen). This causes the error to run the Lisp 728 and then make the bug happen). This causes the error to start the Lisp
769 debugger, which shows you a backtrace. Copy the text of the 729 debugger, which shows you a backtrace. Copy the text of the
770 debugger's backtrace into the bug report. @xref{Debugger,, The Lisp 730 debugger's backtrace into the bug report. @xref{Debugger,, The Lisp
771 Debugger, elisp, the Emacs Lisp Reference Manual}, for information on 731 Debugger, elisp, the Emacs Lisp Reference Manual}, for information on
772 debugging Emacs Lisp programs with the Edebug package. 732 debugging Emacs Lisp programs with the Edebug package.
773 733
1026 you need not explain its purpose in the change log. Thus, if you add a 986 you need not explain its purpose in the change log. Thus, if you add a
1027 new function, all you need to say about it is that it is new. If you 987 new function, all you need to say about it is that it is new. If you
1028 feel that the purpose needs explaining, it probably does---but put the 988 feel that the purpose needs explaining, it probably does---but put the
1029 explanation in comments in the code. It will be more useful there. 989 explanation in comments in the code. It will be more useful there.
1030 990
1031 Please read the @file{ChangeLog} files in the @file{src} and @file{lisp} 991 Please read the @file{ChangeLog} files in the @file{src} and
1032 directories to see what sorts of information to put in, and to learn the 992 @file{lisp} directories to see what sorts of information to put in,
1033 style that we use. If you would like your name to appear in the header 993 and to learn the style that we use. @xref{Change Log}.
1034 line, showing who made the change, send us the header line.
1035 @xref{Change Log}.
1036 994
1037 @item 995 @item
1038 When you write the fix, keep in mind that we can't install a change that 996 When you write the fix, keep in mind that we can't install a change that
1039 would break other systems. Please think about what effect your change 997 would break other systems. Please think about what effect your change
1040 will have if compiled on another type of system. 998 will have if compiled on another type of system.
1069 possible to suggest ways to make your extension fit in better with the 1027 possible to suggest ways to make your extension fit in better with the
1070 rest of Emacs. 1028 rest of Emacs.
1071 1029
1072 The development version of Emacs can be downloaded from the CVS 1030 The development version of Emacs can be downloaded from the CVS
1073 repository where it is actively maintained by a group of developers. 1031 repository where it is actively maintained by a group of developers.
1074 See the Emacs project page http://savannah.gnu.org/projects/emacs/ for 1032 See the Emacs project page
1075 details. 1033 @url{http://savannah.gnu.org/projects/emacs/} for details.
1076 1034
1077 @node Service, Copying, Contributing, Top 1035 @node Service, Copying, Contributing, Top
1078 @section How To Get Help with GNU Emacs 1036 @section How To Get Help with GNU Emacs
1079 1037
1080 If you need help installing, using or changing GNU Emacs, there are two 1038 If you need help installing, using or changing GNU Emacs, there are two