Sync with r21-2-33 and r21-2-33-utf-2000.
[chise/xemacs-chise.git-] / info / xemacs.info-18
1 This is ../info/xemacs.info, produced by makeinfo version 4.0 from
2 xemacs/xemacs.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * XEmacs: (xemacs).             XEmacs Editor.
7 END-INFO-DIR-ENTRY
8
9    This file documents the XEmacs editor.
10
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.
14
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.
18
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.
25
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.
31
32 \1f
33 File: xemacs.info,  Node: Face Resources,  Next: Widgets,  Prev: Resource List,  Up: X Resources
34
35 Face Resources
36 --------------
37
38    The attributes of faces are also per-frame. They can be specified as:
39
40      Emacs.FACE_NAME.parameter: value
41
42 or
43
44      Emacs*FRAME_NAME.FACE_NAME.parameter: value
45
46 Faces accept the following resources:
47
48 `attributeFont' (class `AttributeFont'): font-name
49      The font of this face.
50
51 `attributeForeground' (class `AttributeForeground'): color-name
52 `attributeBackground' (class `AttributeBackground'): color-name
53      The foreground and background colors of this face.
54
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.
58
59 `attributeUnderline' (class `AttributeUnderline'): boolean
60      Whether text in this face should be underlined.
61
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'.
66
67    These are the names of the predefined faces:
68
69 `default'
70      Everything inherits from this.
71
72 `bold'
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.
75
76 `italic'
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.
79
80 `bold-italic'
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.
83
84 `modeline'
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.
88
89 `highlight'
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.
93
94 `left-margin'
95 `right-margin'
96      These are the faces that the left and right annotation margins are
97      displayed in.
98
99 `zmacs-region'
100      This is the face that mouse selections are displayed in.
101
102 `isearch'
103      This is the face that the matched text being searched for is
104      displayed in.
105
106 `info-node'
107      This is the face of info menu items.  If unspecified, it is copied
108      from `bold-italic'.
109
110 `info-xref'
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.)
115
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
119 face.
120
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
126
127      *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
128
129 If you use any of the other, less strict font name formats, some of
130 which look like
131
132      lucidasanstypewriter-12
133      fixed
134      9x13
135
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)',
139 and `xfontsel(1)'.
140
141 \1f
142 File: xemacs.info,  Node: Widgets,  Next: Menubar Resources,  Prev: Face Resources,  Up: X Resources
143
144 Widgets
145 -------
146
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
154 follows:
155
156      INVOCATION-NAME            "shell"       "container"     FRAME-NAME
157      x-emacs-application-class  "EmacsShell"  "EmacsManager"  "EmacsFrame"
158
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'.
162
163 \1f
164 File: xemacs.info,  Node: Menubar Resources,  Prev: Widgets,  Up: X Resources
165
166 Menubar Resources
167 -----------------
168
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.
173
174    If Emacs was compiled to use only the Motif-lookalike menu widgets,
175 then one way to specify the font of the menubar would be
176
177      Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
178
179    If the Motif library is being used, then one would have to use
180
181      Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
182
183    because the Motif library uses the `fontList' resource name instead
184 of `font', which has subtly different semantics.
185
186    The same is true of the scrollbars: They accept whichever resources
187 are appropriate for the toolkit in use.
188
189 \1f
190 File: xemacs.info,  Node: Quitting,  Next: Lossage,  Prev: Customization,  Up: Top
191
192 Quitting and Aborting
193 =====================
194
195 `C-g'
196      Quit.  Cancel running or partially typed command.
197
198 `C-]'
199      Abort innermost recursive editing level and cancel the command
200      which invoked it (`abort-recursive-edit').
201
202 `M-x top-level'
203      Abort all recursive editing levels that are currently executing.
204
205 `C-x u'
206      Cancel an already-executed command, usually (`undo').
207
208    There are two ways of cancelling commands which are not finished
209 executing: "quitting" with `C-g', and "aborting" with `C-]' or `M-x
210 top-level'.  Quitting is cancelling a partially typed command or one
211 which is already running.  Aborting is getting out of a recursive
212 editing level and cancelling the command that invoked the recursive
213 edit.
214
215    Quitting with `C-g' is used for getting rid of a partially typed
216 command or a numeric argument that you don't want.  It also stops a
217 running command in the middle in a relatively safe way, so you can use
218 it if you accidentally start executing a command that takes a long
219 time.  In particular, it is safe to quit out of killing; either your
220 text will ALL still be there, or it will ALL be in the kill ring (or
221 maybe both).  Quitting an incremental search does special things
222 documented under searching; in general, it may take two successive
223 `C-g' characters to get out of a search.  `C-g' works by setting the
224 variable `quit-flag' to `t' the instant `C-g' is typed; Emacs Lisp
225 checks this variable frequently and quits if it is non-`nil'.  `C-g' is
226 only actually executed as a command if it is typed while Emacs is
227 waiting for input.
228
229    If you quit twice in a row before the first `C-g' is recognized, you
230 activate the "emergency escape" feature and return to the shell.  *Note
231 Emergency Escape::.
232
233    You can use `C-]' (`abort-recursive-edit') to get out of a recursive
234 editing level and cancel the command which invoked it.  Quitting with
235 `C-g' does not do this, and could not do this because it is used to
236 cancel a partially typed command within the recursive editing level.
237 Both operations are useful.  For example, if you are in the Emacs
238 debugger (*note Lisp Debug::) and have typed `C-u 8' to enter a numeric
239 argument, you can cancel that argument with `C-g' and remain in the
240 debugger.
241
242    The command `M-x top-level' is equivalent to "enough" `C-]' commands
243 to get you out of all the levels of recursive edits that you are in.
244 `C-]' only gets you out one level at a time, but `M-x top-level' goes
245 out all levels at once.  Both `C-]' and `M-x top-level' are like all
246 other commands and unlike `C-g' in that they are effective only when
247 Emacs is ready for a command.  `C-]' is an ordinary key and has its
248 meaning only because of its binding in the keymap.  *Note Recursive
249 Edit::.
250
251    `C-x u' (`undo') is not strictly speaking a way of cancelling a
252 command, but you can think of it as cancelling a command already
253 finished executing.  *Note Undo::.
254
255 \1f
256 File: xemacs.info,  Node: Lossage,  Next: Bugs,  Prev: Quitting,  Up: Top
257
258 Dealing With Emacs Trouble
259 ==========================
260
261    This section describes various conditions in which Emacs fails to
262 work, and how to recognize them and correct them.
263
264 * Menu:
265
266 * Stuck Recursive::    `[...]' in mode line around the parentheses.
267 * Screen Garbled::     Garbage on the screen.
268 * Text Garbled::       Garbage in the text.
269 * Unasked-for Search:: Spontaneous entry to incremental search.
270 * Emergency Escape::   Emergency escape---
271                         What to do if Emacs stops responding.
272 * Total Frustration::  When you are at your wits' end.
273
274 \1f
275 File: xemacs.info,  Node: Stuck Recursive,  Next: Screen Garbled,  Prev: Lossage,  Up: Lossage
276
277 Recursive Editing Levels
278 ------------------------
279
280    Recursive editing levels are important and useful features of Emacs,
281 but they can seem like malfunctions to the user who does not understand
282 them.
283
284    If the mode line has square brackets `[...]' around the parentheses
285 that contain the names of the major and minor modes, you have entered a
286 recursive editing level.  If you did not do this on purpose, or if you
287 don't understand what that means, you should just get out of the
288 recursive editing level.  To do so, type `M-x top-level'.  This is
289 called getting back to top level.  *Note Recursive Edit::.
290
291 \1f
292 File: xemacs.info,  Node: Screen Garbled,  Next: Text Garbled,  Prev: Stuck Recursive,  Up: Lossage
293
294 Garbage on the Screen
295 ---------------------
296
297    If the data on the screen looks wrong, the first thing to do is see
298 whether the text is actually wrong.  Type `C-l', to redisplay the
299 entire screen.  If the text appears correct after this, the problem was
300 entirely in the previous screen update.
301
302    Display updating problems often result from an incorrect termcap
303 entry for the terminal you are using.  The file `etc/TERMS' in the Emacs
304 distribution gives the fixes for known problems of this sort.
305 `INSTALL' contains general advice for these problems in one of its
306 sections.  Very likely there is simply insufficient padding for certain
307 display operations.  To investigate the possibility that you have this
308 sort of problem, try Emacs on another terminal made by a different
309 manufacturer.  If problems happen frequently on one kind of terminal but
310 not another kind, the real problem is likely to be a bad termcap entry,
311 though it could also be due to a bug in Emacs that appears for terminals
312 that have or lack specific features.
313
314 \1f
315 File: xemacs.info,  Node: Text Garbled,  Next: Unasked-for Search,  Prev: Screen Garbled,  Up: Lossage
316
317 Garbage in the Text
318 -------------------
319
320    If `C-l' shows that the text is wrong, try undoing the changes to it
321 using `C-x u' until it gets back to a state you consider correct.  Also
322 try `C-h l' to find out what command you typed to produce the observed
323 results.
324
325    If a large portion of text appears to be missing at the beginning or
326 end of the buffer, check for the word `Narrow' in the mode line.  If it
327 appears, the text is still present, but marked off-limits.  To make it
328 visible again, type `C-x n w'.  *Note Narrowing::.
329
330 \1f
331 File: xemacs.info,  Node: Unasked-for Search,  Next: Emergency Escape,  Prev: Text Garbled,  Up: Lossage
332
333 Spontaneous Entry to Incremental Search
334 ---------------------------------------
335
336    If Emacs spontaneously displays `I-search:' at the bottom of the
337 screen, it means that the terminal is sending `C-s' and `C-q' according
338 to the poorly designed xon/xoff "flow control" protocol.  You should
339 try to prevent this by putting the terminal in a mode where it will not
340 use flow control, or by giving it enough padding that it will never
341 send a `C-s'.  If that cannot be done, you must tell Emacs to expect
342 flow control to be used, until you can get a properly designed terminal.
343
344    Information on how to do these things can be found in the file
345 `INSTALL' in the Emacs distribution.
346
347 \1f
348 File: xemacs.info,  Node: Emergency Escape,  Next: Total Frustration,  Prev: Unasked-for Search,  Up: Lossage
349
350 Emergency Escape
351 ----------------
352
353    Because at times there have been bugs causing Emacs to loop without
354 checking `quit-flag', a special feature causes Emacs to be suspended
355 immediately if you type a second `C-g' while the flag is already set,
356 so you can always get out of XEmacs.  Normally Emacs recognizes and
357 clears `quit-flag' (and quits!) quickly enough to prevent this from
358 happening.
359
360    When you resume Emacs after a suspension caused by multiple `C-g', it
361 asks two questions before going back to what it had been doing:
362
363      Auto-save? (y or n)
364      Abort (and dump core)? (y or n)
365
366 Answer each one with `y' or `n' followed by <RET>.
367
368    Saying `y' to `Auto-save?' causes immediate auto-saving of all
369 modified buffers in which auto-saving is enabled.
370
371    Saying `y' to `Abort (and dump core)?' causes an illegal instruction
372 to be executed, dumping core.  This is to enable a wizard to figure out
373 why Emacs was failing to quit in the first place.  Execution does not
374 continue after a core dump.  If you answer `n', execution does
375 continue.  With luck, Emacs will ultimately check `quit-flag' and quit
376 normally.  If not, and you type another `C-g', it is suspended again.
377
378    If Emacs is not really hung, but is just being slow, you may invoke
379 the double `C-g' feature without really meaning to.  In that case,
380 simply resume and answer `n' to both questions, and you will arrive at
381 your former state.  Presumably the quit you requested will happen soon.
382
383    The double-`C-g' feature may be turned off when Emacs is running
384 under a window system, since the window system always enables you to
385 kill Emacs or to create another window and run another program.
386
387 \1f
388 File: xemacs.info,  Node: Total Frustration,  Prev: Emergency Escape,  Up: Lossage
389
390 Help for Total Frustration
391 --------------------------
392
393    If using Emacs (or something else) becomes terribly frustrating and
394 none of the techniques described above solve the problem, Emacs can
395 still help you.
396
397    First, if the Emacs you are using is not responding to commands, type
398 `C-g C-g' to get out of it and then start a new one.
399
400    Second, type `M-x doctor <RET>'.
401
402    The doctor will make you feel better.  Each time you say something to
403 the doctor, you must end it by typing <RET> <RET>.  This lets the
404 doctor know you are finished.
405
406 \1f
407 File: xemacs.info,  Node: Bugs,  Prev: Lossage,  Up: Top
408
409 Reporting Bugs
410 ==============
411
412    Sometimes you will encounter a bug in Emacs.  Although we cannot
413 promise we can or will fix the bug, and we might not even agree that it
414 is a bug, we want to hear about bugs you encounter in case we do want
415 to fix them.
416
417    To make it possible for us to fix a bug, you must report it.  In
418 order to do so effectively, you must know when and how to do it.
419
420 When Is There a Bug
421 -------------------
422
423    If Emacs executes an illegal instruction, or dies with an operating
424 system error message that indicates a problem in the program (as
425 opposed to something like "disk full"), then it is certainly a bug.
426
427    If Emacs updates the display in a way that does not correspond to
428 what is in the buffer, then it is certainly a bug.  If a command seems
429 to do the wrong thing but the problem corrects itself if you type
430 `C-l', it is a case of incorrect display updating.
431
432    Taking forever to complete a command can be a bug, but you must make
433 certain that it was really Emacs's fault.  Some commands simply take a
434 long time.  Type `C-g' and then `C-h l' to see whether the input Emacs
435 received was what you intended to type; if the input was such that you
436 KNOW it should have been processed quickly, report a bug.  If you don't
437 know whether the command should take a long time, find out by looking
438 in the manual or by asking for assistance.
439
440    If a command you are familiar with causes an Emacs error message in a
441 case where its usual definition ought to be reasonable, it is probably a
442 bug.
443
444    If a command does the wrong thing, that is a bug.  But be sure you
445 know for certain what it ought to have done.  If you aren't familiar
446 with the command, or don't know for certain how the command is supposed
447 to work, then it might actually be working right.  Rather than jumping
448 to conclusions, show the problem to someone who knows for certain.
449
450    Finally, a command's intended definition may not be best for editing
451 with.  This is a very important sort of problem, but it is also a
452 matter of judgment.  Also, it is easy to come to such a conclusion out
453 of ignorance of some of the existing features.  It is probably best not
454 to complain about such a problem until you have checked the
455 documentation in the usual ways, feel confident that you understand it,
456 and know for certain that what you want is not available.  If you are
457 not sure what the command is supposed to do after a careful reading of
458 the manual, check the index and glossary for any terms that may be
459 unclear.  If you still do not understand, this indicates a bug in the
460 manual.  The manual's job is to make everything clear.  It is just as
461 important to report documentation bugs as program bugs.
462
463    If the online documentation string of a function or variable
464 disagrees with the manual, one of them must be wrong, so report the bug.
465
466 How to Report a Bug
467 -------------------
468
469    When you decide that there is a bug, it is important to report it
470 and to report it in a way which is useful.  What is most useful is an
471 exact description of what commands you type, starting with the shell
472 command to run Emacs, until the problem happens.  Always include the
473 version number of Emacs that you are using; type `M-x emacs-version' to
474 print this.
475
476    The most important principle in reporting a bug is to report FACTS,
477 not hypotheses or categorizations.  It is always easier to report the
478 facts, but people seem to prefer to strain to posit explanations and
479 report them instead.  If the explanations are based on guesses about
480 how Emacs is implemented, they will be useless; we will have to try to
481 figure out what the facts must have been to lead to such speculations.
482 Sometimes this is impossible.  But in any case, it is unnecessary work
483 for us.
484
485    For example, suppose that you type `C-x C-f /glorp/baz.ugh <RET>',
486 visiting a file which (you know) happens to be rather large, and Emacs
487 prints out `I feel pretty today'.  The best way to report the bug is
488 with a sentence like the preceding one, because it gives all the facts
489 and nothing but the facts.
490
491    Do not assume that the problem is due to the size of the file and
492 say, "When I visit a large file, Emacs prints out `I feel pretty
493 today'."  This is what we mean by "guessing explanations".  The problem
494 is just as likely to be due to the fact that there is a `z' in the file
495 name.  If this is so, then when we got your report, we would try out
496 the problem with some "large file", probably with no `z' in its name,
497 and not find anything wrong.  There is no way in the world that we
498 could guess that we should try visiting a file with a `z' in its name.
499
500    Alternatively, the problem might be due to the fact that the file
501 starts with exactly 25 spaces.  For this reason, you should make sure
502 that you inform us of the exact contents of any file that is needed to
503 reproduce the bug.  What if the problem only occurs when you have typed
504 the `C-x a l' command previously?  This is why we ask you to give the
505 exact sequence of characters you typed since starting to use Emacs.
506
507    You should not even say "visit a file" instead of `C-x C-f' unless
508 you know that it makes no difference which visiting command is used.
509 Similarly, rather than saying "if I have three characters on the line,"
510 say "after I type `<RET> A B C <RET> C-p'," if that is the way you
511 entered the text.
512
513    If you are not in Fundamental mode when the problem occurs, you
514 should say what mode you are in.
515
516    If the manifestation of the bug is an Emacs error message, it is
517 important to report not just the text of the error message but a
518 backtrace showing how the Lisp program in Emacs arrived at the error.
519 To make the backtrace, you must execute the Lisp expression `(setq
520 debug-on-error t)' before the error happens (that is to say, you must
521 execute that expression and then make the bug happen).  This causes the
522 Lisp debugger to run (*note Lisp Debug::).  The debugger's backtrace
523 can be copied as text into the bug report.  This use of the debugger is
524 possible only if you know how to make the bug happen again.  Do note
525 the error message the first time the bug happens, so if you can't make
526 it happen again, you can report at least that.
527
528    Check whether any programs you have loaded into the Lisp world,
529 including your `.emacs' file, set any variables that may affect the
530 functioning of Emacs.  Also, see whether the problem happens in a
531 freshly started Emacs without loading your `.emacs' file (start Emacs
532 with the `-q' switch to prevent loading the init file).  If the problem
533 does NOT occur then, it is essential that we know the contents of any
534 programs that you must load into the Lisp world in order to cause the
535 problem to occur.
536
537    If the problem does depend on an init file or other Lisp programs
538 that are not part of the standard Emacs system, then you should make
539 sure it is not a bug in those programs by complaining to their
540 maintainers first.  After they verify that they are using Emacs in a
541 way that is supposed to work, they should report the bug.
542
543    If you can tell us a way to cause the problem without visiting any
544 files, please do so.  This makes it much easier to debug.  If you do
545 need files, make sure you arrange for us to see their exact contents.
546 For example, it can often matter whether there are spaces at the ends
547 of lines, or a newline after the last line in the buffer (nothing ought
548 to care whether the last line is terminated, but tell that to the bugs).
549
550    The easy way to record the input to Emacs precisely is to write a
551 dribble file; execute the Lisp expression:
552
553      (open-dribble-file "~/dribble")
554
555 using `Meta-<ESC>' or from the `*scratch*' buffer just after starting
556 Emacs.  From then on, all Emacs input will be written in the specified
557 dribble file until the Emacs process is killed.
558
559    For possible display bugs, it is important to report the terminal
560 type (the value of environment variable `TERM'), the complete termcap
561 entry for the terminal from `/etc/termcap' (since that file is not
562 identical on all machines), and the output that Emacs actually sent to
563 the terminal.  The way to collect this output is to execute the Lisp
564 expression:
565
566      (open-termscript "~/termscript")
567
568 using `Meta-<ESC>' or from the `*scratch*' buffer just after starting
569 Emacs.  From then on, all output from Emacs to the terminal will be
570 written in the specified termscript file as well, until the Emacs
571 process is killed.  If the problem happens when Emacs starts up, put
572 this expression into your `.emacs' file so that the termscript file will
573 be open when Emacs displays the screen for the first time.  Be warned:
574 it is often difficult, and sometimes impossible, to fix a
575 terminal-dependent bug without access to a terminal of the type that
576 stimulates the bug.
577
578    The newsgroup `comp.emacs.xemacs' may be used for bug reports, other
579 discussions and requests for assistance.
580
581    If you don't have access to this newgroup, you can subscribe to the
582 mailing list version: the newsgroup is bidirectionally gatewayed into
583 the mailing list `xemacs@xemacs.org'.
584
585    To be added or removed from this mailing list, send mail to
586 `xemacs-request@xemacs.org'.  Do not send requests for addition to the
587 mailing list itself.
588
589    The mailing lists and newsgroups are archived on our anonymous FTP
590 server, `ftp.xemacs.org', and at various other archive sites around the
591 net. You should also check the `FAQ' in `/pub/xemacs' on our anonymous
592 FTP server. It provides some introductory information and help for
593 initial configuration problems.
594