1 This is ../info/xemacs.info, produced by makeinfo version 4.0b from
4 INFO-DIR-SECTION XEmacs Editor
6 * XEmacs: (xemacs). XEmacs Editor.
9 This file documents the XEmacs editor.
11 Copyright (C) 1985, 1986, 1988 Richard M. Stallman. Copyright (C)
12 1991, 1992, 1993, 1994 Lucid, Inc. Copyright (C) 1993, 1994 Sun
13 Microsystems, Inc. Copyright (C) 1995 Amdahl Corporation.
15 Permission is granted to make and distribute verbatim copies of this
16 manual provided the copyright notice and this permission notice are
17 preserved on all copies.
19 Permission is granted to copy and distribute modified versions of
20 this manual under the conditions for verbatim copying, provided also
21 that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
22 General Public License" are included exactly as in the original, and
23 provided that the entire resulting derived work is distributed under the
24 terms of a permission notice identical to this one.
26 Permission is granted to copy and distribute translations of this
27 manual into another language, under the above conditions for modified
28 versions, except that the sections entitled "The GNU Manifesto",
29 "Distribution" and "GNU General Public License" may be included in a
30 translation approved by the author instead of in the original English.
33 File: xemacs.info, Node: Face Resources, Next: Widgets, Prev: Resource List, Up: X Resources
38 The attributes of faces are also per-frame. They can be specified as:
40 Emacs.FACE_NAME.parameter: value
44 Emacs*FRAME_NAME.FACE_NAME.parameter: value
46 Faces accept the following resources:
48 `attributeFont' (class `AttributeFont'): font-name
49 The font of this face.
51 `attributeForeground' (class `AttributeForeground'): color-name
52 `attributeBackground' (class `AttributeBackground'): color-name
53 The foreground and background colors of this face.
55 `attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name
56 The name of an XBM file (or XPM file, if your version of Emacs
57 supports XPM), to use as a background stipple.
59 `attributeUnderline' (class `AttributeUnderline'): boolean
60 Whether text in this face should be underlined.
62 All text is displayed in some face, defaulting to the face named
63 `default'. To set the font of normal text, use
64 `Emacs*default.attributeFont'. To set it in the frame named `fred', use
65 `Emacs*fred.default.attributeFont'.
67 These are the names of the predefined faces:
70 Everything inherits from this.
73 If this is not specified in the resource database, Emacs tries to
74 find a bold version of the font of the default face.
77 If this is not specified in the resource database, Emacs tries to
78 find an italic version of the font of the default face.
81 If this is not specified in the resource database, Emacs tries to
82 find a bold-italic version of the font of the default face.
85 This is the face that the modeline is displayed in. If not
86 specified in the resource database, it is determined from the
87 default face by reversing the foreground and background colors.
90 This is the face that highlighted extents (for example, Info
91 cross-references and possible completions, when the mouse passes
92 over them) are displayed in.
96 These are the faces that the left and right annotation margins are
100 This is the face that mouse selections are displayed in.
103 This is the face that the matched text being searched for is
107 This is the face of info menu items. If unspecified, it is copied
111 This is the face of info cross-references. If unspecified, it is
112 copied from `bold'. (Note that, when the mouse passes over a
113 cross-reference, the cross-reference's face is determined from a
114 combination of the `info-xref' and `highlight' faces.)
116 Other packages might define their own faces; to see a list of all
117 faces, use any of the interactive face-manipulation commands such as
118 `set-face-font' and type `?' when you are prompted for the name of a
121 If the `bold', `italic', and `bold-italic' faces are not specified
122 in the resource database, then XEmacs attempts to derive them from the
123 font of the default face. It can only succeed at this if you have
124 specified the default font using the XLFD (X Logical Font Description)
125 format, which looks like
127 *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
129 If you use any of the other, less strict font name formats, some of
132 lucidasanstypewriter-12
136 then XEmacs won't be able to guess the names of the bold and italic
137 versions. All X fonts can be referred to via XLFD-style names, so you
138 should use those forms. See the man pages for `X(1)', `xlsfonts(1)',
142 File: xemacs.info, Node: Widgets, Next: Menubar Resources, Prev: Face Resources, Up: X Resources
147 There are several structural widgets between the terminal EmacsFrame
148 widget and the top level ApplicationShell; the exact names and types of
149 these widgets change from release to release (for example, they changed
150 between 19.8 and 19.9, 19.9 and 19.10, and 19.10 and 19.12) and are
151 subject to further change in the future, so you should avoid mentioning
152 them in your resource database. The above-mentioned syntaxes should be
153 forward- compatible. As of 19.13, the exact widget hierarchy is as
156 INVOCATION-NAME "shell" "container" FRAME-NAME
157 x-emacs-application-class "EmacsShell" "EmacsManager" "EmacsFrame"
159 where INVOCATION-NAME is the terminal component of the name of the
160 XEmacs executable (usually `xemacs'), and `x-emacs-application-class'
161 is generally `Emacs'.
164 File: xemacs.info, Node: Menubar Resources, Prev: Widgets, Up: X Resources
169 As the menubar is implemented as a widget which is not a part of
170 XEmacs proper, it does not use the face mechanism for specifying fonts
171 and colors: It uses whatever resources are appropriate to the type of
172 widget which is used to implement it.
174 If Emacs was compiled to use only the Lucid Motif-lookalike menu
175 widgets, then one way to specify the font of the menubar would be
177 Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
179 If both the Lucid Motif-lookalike menu widgets and X Font Sets are
180 configured to allow multilingual menubars, then one uses
182 *menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
183 -*-*-*-*-*-*-*-120-*-jisx0208.1983-0
185 That would specify fonts for a Japanese menubar. Specifying only one
186 XLFD is acceptable; specifying more than one for a given registry
187 (language) is also allowed. When X Font Sets are configured, some .font
188 resources (eg, menubars) are ignored in favor of the corresponding
191 If the Motif library is being used, then one would have to use
193 Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
195 because the Motif library uses the `fontList' resource name instead
196 of `font', which has subtly different semantics.
198 The same is true of the scrollbars: They accept whichever resources
199 are appropriate for the toolkit in use.
202 File: xemacs.info, Node: Quitting, Next: Lossage, Prev: Customization, Up: Top
204 Quitting and Aborting
205 =====================
208 Quit. Cancel running or partially typed command.
211 Abort innermost recursive editing level and cancel the command
212 which invoked it (`abort-recursive-edit').
215 Abort all recursive editing levels that are currently executing.
218 Cancel an already-executed command, usually (`undo').
220 There are two ways of cancelling commands which are not finished
221 executing: "quitting" with `C-g', and "aborting" with `C-]' or `M-x
222 top-level'. Quitting is cancelling a partially typed command or one
223 which is already running. Aborting is getting out of a recursive
224 editing level and cancelling the command that invoked the recursive
227 Quitting with `C-g' is used for getting rid of a partially typed
228 command or a numeric argument that you don't want. It also stops a
229 running command in the middle in a relatively safe way, so you can use
230 it if you accidentally start executing a command that takes a long
231 time. In particular, it is safe to quit out of killing; either your
232 text will ALL still be there, or it will ALL be in the kill ring (or
233 maybe both). Quitting an incremental search does special things
234 documented under searching; in general, it may take two successive
235 `C-g' characters to get out of a search. `C-g' works by setting the
236 variable `quit-flag' to `t' the instant `C-g' is typed; Emacs Lisp
237 checks this variable frequently and quits if it is non-`nil'. `C-g' is
238 only actually executed as a command if it is typed while Emacs is
241 If you quit twice in a row before the first `C-g' is recognized, you
242 activate the "emergency escape" feature and return to the shell. *Note
245 You can use `C-]' (`abort-recursive-edit') to get out of a recursive
246 editing level and cancel the command which invoked it. Quitting with
247 `C-g' does not do this, and could not do this because it is used to
248 cancel a partially typed command within the recursive editing level.
249 Both operations are useful. For example, if you are in the Emacs
250 debugger (*note Lisp Debug::) and have typed `C-u 8' to enter a numeric
251 argument, you can cancel that argument with `C-g' and remain in the
254 The command `M-x top-level' is equivalent to "enough" `C-]' commands
255 to get you out of all the levels of recursive edits that you are in.
256 `C-]' only gets you out one level at a time, but `M-x top-level' goes
257 out all levels at once. Both `C-]' and `M-x top-level' are like all
258 other commands and unlike `C-g' in that they are effective only when
259 Emacs is ready for a command. `C-]' is an ordinary key and has its
260 meaning only because of its binding in the keymap. *Note Recursive
263 `C-x u' (`undo') is not strictly speaking a way of cancelling a
264 command, but you can think of it as cancelling a command already
265 finished executing. *Note Undo::.
268 File: xemacs.info, Node: Lossage, Next: Bugs, Prev: Quitting, Up: Top
270 Dealing With Emacs Trouble
271 ==========================
273 This section describes various conditions in which Emacs fails to
274 work, and how to recognize them and correct them.
278 * Stuck Recursive:: `[...]' in mode line around the parentheses.
279 * Screen Garbled:: Garbage on the screen.
280 * Text Garbled:: Garbage in the text.
281 * Unasked-for Search:: Spontaneous entry to incremental search.
282 * Emergency Escape:: Emergency escape---
283 What to do if Emacs stops responding.
284 * Total Frustration:: When you are at your wits' end.
287 File: xemacs.info, Node: Stuck Recursive, Next: Screen Garbled, Prev: Lossage, Up: Lossage
289 Recursive Editing Levels
290 ------------------------
292 Recursive editing levels are important and useful features of Emacs,
293 but they can seem like malfunctions to the user who does not understand
296 If the mode line has square brackets `[...]' around the parentheses
297 that contain the names of the major and minor modes, you have entered a
298 recursive editing level. If you did not do this on purpose, or if you
299 don't understand what that means, you should just get out of the
300 recursive editing level. To do so, type `M-x top-level'. This is
301 called getting back to top level. *Note Recursive Edit::.
304 File: xemacs.info, Node: Screen Garbled, Next: Text Garbled, Prev: Stuck Recursive, Up: Lossage
306 Garbage on the Screen
307 ---------------------
309 If the data on the screen looks wrong, the first thing to do is see
310 whether the text is actually wrong. Type `C-l', to redisplay the
311 entire screen. If the text appears correct after this, the problem was
312 entirely in the previous screen update.
314 Display updating problems often result from an incorrect termcap
315 entry for the terminal you are using. The file `etc/TERMS' in the Emacs
316 distribution gives the fixes for known problems of this sort.
317 `INSTALL' contains general advice for these problems in one of its
318 sections. Very likely there is simply insufficient padding for certain
319 display operations. To investigate the possibility that you have this
320 sort of problem, try Emacs on another terminal made by a different
321 manufacturer. If problems happen frequently on one kind of terminal but
322 not another kind, the real problem is likely to be a bad termcap entry,
323 though it could also be due to a bug in Emacs that appears for terminals
324 that have or lack specific features.
327 File: xemacs.info, Node: Text Garbled, Next: Unasked-for Search, Prev: Screen Garbled, Up: Lossage
332 If `C-l' shows that the text is wrong, try undoing the changes to it
333 using `C-x u' until it gets back to a state you consider correct. Also
334 try `C-h l' to find out what command you typed to produce the observed
337 If a large portion of text appears to be missing at the beginning or
338 end of the buffer, check for the word `Narrow' in the mode line. If it
339 appears, the text is still present, but marked off-limits. To make it
340 visible again, type `C-x n w'. *Note Narrowing::.
343 File: xemacs.info, Node: Unasked-for Search, Next: Emergency Escape, Prev: Text Garbled, Up: Lossage
345 Spontaneous Entry to Incremental Search
346 ---------------------------------------
348 If Emacs spontaneously displays `I-search:' at the bottom of the
349 screen, it means that the terminal is sending `C-s' and `C-q' according
350 to the poorly designed xon/xoff "flow control" protocol. You should
351 try to prevent this by putting the terminal in a mode where it will not
352 use flow control, or by giving it enough padding that it will never
353 send a `C-s'. If that cannot be done, you must tell Emacs to expect
354 flow control to be used, until you can get a properly designed terminal.
356 Information on how to do these things can be found in the file
357 `INSTALL' in the Emacs distribution.
360 File: xemacs.info, Node: Emergency Escape, Next: Total Frustration, Prev: Unasked-for Search, Up: Lossage
365 Because at times there have been bugs causing Emacs to loop without
366 checking `quit-flag', a special feature causes Emacs to be suspended
367 immediately if you type a second `C-g' while the flag is already set,
368 so you can always get out of XEmacs. Normally Emacs recognizes and
369 clears `quit-flag' (and quits!) quickly enough to prevent this from
372 When you resume Emacs after a suspension caused by multiple `C-g', it
373 asks two questions before going back to what it had been doing:
376 Abort (and dump core)? (y or n)
378 Answer each one with `y' or `n' followed by <RET>.
380 Saying `y' to `Auto-save?' causes immediate auto-saving of all
381 modified buffers in which auto-saving is enabled.
383 Saying `y' to `Abort (and dump core)?' causes an illegal instruction
384 to be executed, dumping core. This is to enable a wizard to figure out
385 why Emacs was failing to quit in the first place. Execution does not
386 continue after a core dump. If you answer `n', execution does
387 continue. With luck, Emacs will ultimately check `quit-flag' and quit
388 normally. If not, and you type another `C-g', it is suspended again.
390 If Emacs is not really hung, but is just being slow, you may invoke
391 the double `C-g' feature without really meaning to. In that case,
392 simply resume and answer `n' to both questions, and you will arrive at
393 your former state. Presumably the quit you requested will happen soon.
395 The double-`C-g' feature may be turned off when Emacs is running
396 under a window system, since the window system always enables you to
397 kill Emacs or to create another window and run another program.
400 File: xemacs.info, Node: Total Frustration, Prev: Emergency Escape, Up: Lossage
402 Help for Total Frustration
403 --------------------------
405 If using Emacs (or something else) becomes terribly frustrating and
406 none of the techniques described above solve the problem, Emacs can
409 First, if the Emacs you are using is not responding to commands, type
410 `C-g C-g' to get out of it and then start a new one.
412 Second, type `M-x doctor <RET>'.
414 The doctor will make you feel better. Each time you say something to
415 the doctor, you must end it by typing <RET> <RET>. This lets the
416 doctor know you are finished.
419 File: xemacs.info, Node: Bugs, Prev: Lossage, Up: Top
424 Sometimes you will encounter a bug in Emacs. Although we cannot
425 promise we can or will fix the bug, and we might not even agree that it
426 is a bug, we want to hear about bugs you encounter in case we do want
429 To make it possible for us to fix a bug, you must report it. In
430 order to do so effectively, you must know when and how to do it.
435 If Emacs executes an illegal instruction, or dies with an operating
436 system error message that indicates a problem in the program (as
437 opposed to something like "disk full"), then it is certainly a bug.
439 If Emacs updates the display in a way that does not correspond to
440 what is in the buffer, then it is certainly a bug. If a command seems
441 to do the wrong thing but the problem corrects itself if you type
442 `C-l', it is a case of incorrect display updating.
444 Taking forever to complete a command can be a bug, but you must make
445 certain that it was really Emacs's fault. Some commands simply take a
446 long time. Type `C-g' and then `C-h l' to see whether the input Emacs
447 received was what you intended to type; if the input was such that you
448 KNOW it should have been processed quickly, report a bug. If you don't
449 know whether the command should take a long time, find out by looking
450 in the manual or by asking for assistance.
452 If a command you are familiar with causes an Emacs error message in a
453 case where its usual definition ought to be reasonable, it is probably a
456 If a command does the wrong thing, that is a bug. But be sure you
457 know for certain what it ought to have done. If you aren't familiar
458 with the command, or don't know for certain how the command is supposed
459 to work, then it might actually be working right. Rather than jumping
460 to conclusions, show the problem to someone who knows for certain.
462 Finally, a command's intended definition may not be best for editing
463 with. This is a very important sort of problem, but it is also a
464 matter of judgment. Also, it is easy to come to such a conclusion out
465 of ignorance of some of the existing features. It is probably best not
466 to complain about such a problem until you have checked the
467 documentation in the usual ways, feel confident that you understand it,
468 and know for certain that what you want is not available. If you are
469 not sure what the command is supposed to do after a careful reading of
470 the manual, check the index and glossary for any terms that may be
471 unclear. If you still do not understand, this indicates a bug in the
472 manual. The manual's job is to make everything clear. It is just as
473 important to report documentation bugs as program bugs.
475 If the online documentation string of a function or variable
476 disagrees with the manual, one of them must be wrong, so report the bug.
481 When you decide that there is a bug, it is important to report it
482 and to report it in a way which is useful. What is most useful is an
483 exact description of what commands you type, starting with the shell
484 command to run Emacs, until the problem happens. Always include the
485 version number of Emacs that you are using; type `M-x emacs-version' to
488 The most important principle in reporting a bug is to report FACTS,
489 not hypotheses or categorizations. It is always easier to report the
490 facts, but people seem to prefer to strain to posit explanations and
491 report them instead. If the explanations are based on guesses about
492 how Emacs is implemented, they will be useless; we will have to try to
493 figure out what the facts must have been to lead to such speculations.
494 Sometimes this is impossible. But in any case, it is unnecessary work
497 For example, suppose that you type `C-x C-f /glorp/baz.ugh <RET>',
498 visiting a file which (you know) happens to be rather large, and Emacs
499 prints out `I feel pretty today'. The best way to report the bug is
500 with a sentence like the preceding one, because it gives all the facts
501 and nothing but the facts.
503 Do not assume that the problem is due to the size of the file and
504 say, "When I visit a large file, Emacs prints out `I feel pretty
505 today'." This is what we mean by "guessing explanations". The problem
506 is just as likely to be due to the fact that there is a `z' in the file
507 name. If this is so, then when we got your report, we would try out
508 the problem with some "large file", probably with no `z' in its name,
509 and not find anything wrong. There is no way in the world that we
510 could guess that we should try visiting a file with a `z' in its name.
512 Alternatively, the problem might be due to the fact that the file
513 starts with exactly 25 spaces. For this reason, you should make sure
514 that you inform us of the exact contents of any file that is needed to
515 reproduce the bug. What if the problem only occurs when you have typed
516 the `C-x a l' command previously? This is why we ask you to give the
517 exact sequence of characters you typed since starting to use Emacs.
519 You should not even say "visit a file" instead of `C-x C-f' unless
520 you know that it makes no difference which visiting command is used.
521 Similarly, rather than saying "if I have three characters on the line,"
522 say "after I type `<RET> A B C <RET> C-p'," if that is the way you
525 If you are not in Fundamental mode when the problem occurs, you
526 should say what mode you are in.
528 If the manifestation of the bug is an Emacs error message, it is
529 important to report not just the text of the error message but a
530 backtrace showing how the Lisp program in Emacs arrived at the error.
531 To make the backtrace, you must execute the Lisp expression `(setq
532 debug-on-error t)' before the error happens (that is to say, you must
533 execute that expression and then make the bug happen). This causes the
534 Lisp debugger to run (*note Lisp Debug::). The debugger's backtrace
535 can be copied as text into the bug report. This use of the debugger is
536 possible only if you know how to make the bug happen again. Do note
537 the error message the first time the bug happens, so if you can't make
538 it happen again, you can report at least that.
540 Check whether any programs you have loaded into the Lisp world,
541 including your init file, set any variables that may affect the
542 functioning of Emacs. *Note Init File::. Also, see whether the
543 problem happens in a freshly started Emacs without loading your init
544 file (start Emacs with the `-q' switch to prevent loading the init
545 file). If the problem does NOT occur then, it is essential that we
546 know the contents of any programs that you must load into the Lisp
547 world in order to cause the problem to occur.
549 If the problem does depend on an init file or other Lisp programs
550 that are not part of the standard Emacs system, then you should make
551 sure it is not a bug in those programs by complaining to their
552 maintainers first. After they verify that they are using Emacs in a
553 way that is supposed to work, they should report the bug.
555 If you can tell us a way to cause the problem without visiting any
556 files, please do so. This makes it much easier to debug. If you do
557 need files, make sure you arrange for us to see their exact contents.
558 For example, it can often matter whether there are spaces at the ends
559 of lines, or a newline after the last line in the buffer (nothing ought
560 to care whether the last line is terminated, but tell that to the bugs).
562 The easy way to record the input to Emacs precisely is to write a
563 dribble file; execute the Lisp expression:
565 (open-dribble-file "~/dribble")
567 using `Meta-<ESC>' or from the `*scratch*' buffer just after starting
568 Emacs. From then on, all Emacs input will be written in the specified
569 dribble file until the Emacs process is killed.
571 For possible display bugs, it is important to report the terminal
572 type (the value of environment variable `TERM'), the complete termcap
573 entry for the terminal from `/etc/termcap' (since that file is not
574 identical on all machines), and the output that Emacs actually sent to
575 the terminal. The way to collect this output is to execute the Lisp
578 (open-termscript "~/termscript")
580 using `Meta-<ESC>' or from the `*scratch*' buffer just after starting
581 Emacs. From then on, all output from Emacs to the terminal will be
582 written in the specified termscript file as well, until the Emacs
583 process is killed. If the problem happens when Emacs starts up, put
584 this expression into your init file so that the termscript file will be
585 open when Emacs displays the screen for the first time. *Note Init
586 File::. Be warned: it is often difficult, and sometimes impossible, to
587 fix a terminal-dependent bug without access to a terminal of the type
588 that stimulates the bug.
590 The newsgroup `comp.emacs.xemacs' may be used for bug reports, other
591 discussions and requests for assistance.
593 If you don't have access to this newgroup, you can subscribe to the
594 mailing list version: the newsgroup is bidirectionally gatewayed into
595 the mailing list `xemacs@xemacs.org'.
597 To be added or removed from this mailing list, send mail to
598 `xemacs-request@xemacs.org'. Do not send requests for addition to the
601 The mailing lists and newsgroups are archived on our anonymous FTP
602 server, `ftp.xemacs.org', and at various other archive sites around the
603 net. You should also check the `FAQ' in `/pub/xemacs' on our anonymous
604 FTP server. It provides some introductory information and help for
605 initial configuration problems.