]> code.delx.au - gnu-emacs/blob - etc/FAQ
74116b3acfe9f4a595f6f5309e40cfddf815c71f
[gnu-emacs] / etc / FAQ
1 GNU Emacs FAQ: Introduction
2
3 This is the introduction to a list of frequently asked questions (FAQ)
4 about GNU Emacs 20 with answers. Some of the answers are not valid for GNU
5 Emacs 18 or 19.
6
7 The FAQ is posted (in five parts) to reduce the noise level in the
8 gnu.emacs.help newsgroup (which is also the help-gnu-emacs mailing list)
9 which results from the repetition of frequently asked questions, wrong
10 answers to these questions, corrections to the wrong answers, corrections
11 to the corrections, debate, name calling, and generally unproductive use of
12 the mailing list. Also, it serves as a repository of the canonical "best"
13 answers to these questions. However, if you know a better answer or even a
14 slight change that improves an answer, please tell us!
15
16 If you know the answer to a question in the FAQ list, please reply to the
17 question by e-mail instead of posting. Help reduce noise!
18
19 The FAQ is crossposted to comp.emacs because some sites do not receive the
20 gnu.* newsgroups. The FAQ is also crossposted to news.answers.
21
22 Full instructions for getting the latest FAQ are in question 22.
23
24 A diff file between the last version of the FAQ and this one should have
25 been posted along with the FAQ. If you did not receive the diff file, you
26 can get it at
27
28 ftp://the-tech.mit.edu/pub/GNU-Emacs/faq-diffs
29
30 Please suggest new questions, answers, wording changes, and deletions by
31 sending mail to emacs-faq@lerner.co.il. The most helpful form for
32 suggestions is a context diff (i.e., the output of `diff -c'). Include
33 "FAQ" in the subject of messages about the FAQ list.
34
35 Please do not send questions to us just because you do not want to disturb
36 a lot of people and you think we would know the answer. We do not have
37 time to answer questions individually. :-(
38
39 --
40 Reuven M. Lerner <reuven@lerner.co.il> and the FAQ team (a full list is
41 at the bottom of the FAQ).
42
43 ----------------------------------------------------------------------
44
45 Notation Used in FAQ
46
47 1: What do these mean: C-h, M-C-a, RET, "ESC a", etc.?
48 2: What does "M-x command" mean?
49 3: How do I read topic XXX in the on-line manual?
50 4: What do these mean: etc/SERVICE, src/config.h, lisp/default.el?
51 5: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL?
52
53 General Questions
54
55 6: What is the LPF?
56 7: What is the real legal meaning of the GNU copyleft?
57 8: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug,
58 comp.emacs, etc.?
59 9: Where can I get old postings to gnu.emacs.help and other GNU groups?
60 10: Where should I report bugs and other problems with Emacs?
61 11: How do I unsubscribe from this mailing list?
62 12: What is the current address of the FSF?
63
64 On-line Help, Printed Manuals, Other Sources of Help
65
66 13: I'm just starting Emacs; how do I do basic editing?
67 14: How do I find out how to do something in Emacs?
68 15: How do I get a printed copy of the Emacs manual?
69 16: Where can I get documentation on Emacs Lisp?
70 17: How do I install a piece of Texinfo documentation?
71 18: How do I print a Texinfo file?
72 19: Can I view Info files without using Emacs?
73 20: What informational files are available for Emacs?
74 21: Where can I get help in installing Emacs?
75 22: Where can I get the latest version of this document (the FAQ list)?
76
77 Status of Emacs
78
79 23: Where does the name "Emacs" come from?
80 24: What is the latest version of Emacs?
81 25: What is different about Emacs 20?
82
83 Common Things People Want To Do
84
85 26: How do I set up a .emacs file properly?
86 27: How do I debug a .emacs file?
87 28: How do I make Emacs display the current line (or column) number?
88 29: How can I modify the titlebar to contain the current filename?
89 30: How do I turn on abbrevs by default just in mode XXX?
90 31: How do I turn on auto-fill mode by default?
91 32: How do I make Emacs use a certain major mode for certain files?
92 33: How do I search for, delete, or replace unprintable (8-bit or control)
93 characters?
94 34: How can I highlight a region of text in Emacs?
95 35: How do I control Emacs's case-sensitivity when searching/replacing?
96 36: How do I make Emacs wrap words for me?
97 37: Where can I get a better spelling checker for Emacs?
98 38: How can I spell-check TeX or *roff documents?
99 39: How do I change load-path?
100 40: How do I use an already running Emacs from another window?
101 41: How do I make Emacs recognize my compiler's funny error messages?
102 42: How do I indent switch statements like this?
103 43: How can I make Emacs automatically scroll horizontally?
104 44: How do I make Emacs "typeover" or "overwrite" instead of inserting?
105 45: How do I stop Emacs from beeping on a terminal?
106 46: How do I turn down the bell volume in Emacs running under X Windows?
107 47: How do I tell Emacs to automatically indent a new line to the
108 indentation of the previous line?
109 48: How do I show which parenthesis matches the one I'm looking at?
110 49: In C mode, can I show just the lines that will be left after #ifdef
111 commands are handled by the compiler?
112 50: Is there an equivalent to the `.' (dot) command of vi?
113 51: What are the valid X resource settings (i.e., stuff in .Xdefaults)?
114 52: How do I execute ("evaluate") a piece of Emacs Lisp code?
115 53: How do I change Emacs's idea of the tab character's length?
116 54: How do I insert `>' at the beginning of every line?
117 55: How do I insert "_^H" before each character in a region to get an
118 underlined paragraph?
119 56: How do I repeat a command as many times as possible?
120 57: How do I make Emacs behave like this: when I go up or down, the cursor
121 should stay in the same column even if the line is too short?
122 58: How do I tell Emacs to iconify itself?
123 59: How do I use regexps (regular expressions) in Emacs?
124 60: How do I perform a replace operation across more than one file?
125 61: Where is the documentation for "etags"?
126 62: How do I disable backup files?
127 63: How do I disable auto-save-mode?
128 64: How can I create or modify new pull-down menu options?
129 65: How do I delete menus and menu options?
130 66: How do I turn on syntax highlighting?
131 67: How can I force Emacs to scroll only one line when I move past the
132 bottom of the screen?
133 68: How can I replace highlighted text with what I type?
134 69: How can I edit MS-DOS files using Emacs?
135 70: How can I tell Emacs to fill paragraphs with a single space after
136 each period?
137
138 Bugs/Problems
139
140 71: Does Emacs have problems with files larger than 8 megabytes?
141 72: How do I get rid of ^M or echoed commands in my shell buffer?
142 73: Why do I get "Process shell exited abnormally with code 1"?
143 74: Where is the termcap/terminfo entry for terminal type "emacs"?
144 75: Why does Emacs spontaneously start displaying "I-search:" and beeping?
145 76: Why can't Emacs talk to certain hosts (or certain hostnames)?
146 77: Why does Emacs say "Error in init file"?
147 78: Why does Emacs ignore my X resources (my .Xdefaults file)?
148 79: Why does Emacs take 20 seconds to visit a file?
149 80: How do I edit a file with a `$' in its name?
150 81: Why does shell mode lose track of the shell's current directory?
151 82: Are there any security risks in Emacs?
152 83: Dired says, "no file on this line" when I try to do something.
153
154 Difficulties Building/Installing/Porting Emacs
155
156 84: How do I install Emacs?
157 85: How do I update Emacs to the latest version?
158 86: What should I do if I have trouble building Emacs?
159 87: Why does linking Emacs with -lX11 fail?
160
161 Finding/Getting Emacs and Related Packages
162
163 88: Where can I get Emacs on the net (or by snail mail)?
164 89: How do I find a Emacs Lisp package that does XXX?
165 90: Where can I get Emacs Lisp packages that don't come with Emacs?
166 91: How do I submit code to the Emacs Lisp Archive?
167 92: Where can I get other up-to-date GNU stuff?
168 93: What is the difference between Emacs and XEmacs (formerly "Lucid
169 Emacs")?
170 94: Where can I get Emacs for my PC running MS-DOS?
171 95: Where can I get Emacs for Microsoft Windows, Windows '95, or Windows
172 NT?
173 96: Where can I get Emacs for my PC running OS/2?
174 97: Where can I get Emacs for my Atari ST?
175 98: Where can I get Emacs for my Amiga?
176 99: Where can I get Emacs for NeXTSTEP?
177 100: Where can I get Emacs for my Apple computer?
178 101: Where do I get Emacs that runs on VMS under DECwindows?
179 102: Where can I get modes for Lex, Yacc/Bison, Bourne shell, Csh, C++,
180 Objective-C, Pascal, Java, and Awk?
181 103: What is the IP address of XXX.YYY.ZZZ?
182
183 Major Emacs Lisp Packages, Emacs Extensions, and Related Programs
184
185 104: VM (View Mail) -- another mail reader within Emacs, with MIME support
186 105: Supercite -- mail and news citation package within Emacs
187 106: Calc -- poor man's Mathematica within Emacs
188 107: VIPER -- vi emulation for Emacs
189 108: AUC TeX -- enhanced LaTeX mode with debugging facilities
190 109: BBDB -- personal Info Rolodex integrated with mail/news readers
191 110: Ispell -- spell checker in C with interface for Emacs
192 111: W3-mode -- A World Wide Web browser inside of Emacs
193 112: EDB -- Database program for Emacs; replaces forms editing modes
194 113: Mailcrypt -- PGP interface within Emacs mail and news
195 114: JDE -- Development environment for Java programming
196 115: Patch -- program to apply "diffs" for updating files
197
198 Changing Key Bindings and Handling Key Binding Problems
199
200 116: How do I bind keys (including function keys) to commands?
201 117: Why does Emacs say "Key sequence XXX uses invalid prefix characters"?
202 118: Why doesn't this [terminal or window-system setup] code work in my
203 .emacs file, but it works just fine after Emacs starts up?
204 119: How do I use function keys under X Windows?
205 120: How do I tell what characters or symbols my function or arrow keys
206 emit?
207 121: How do I set the X key "translations" for Emacs?
208 122: How do I handle C-s and C-q being used for flow control?
209 123: How do I bind `C-s' and `C-q' (or any key) if these keys are filtered
210 out?
211 124: Why does the "Backspace" key invoke help?
212 125: Why doesn't Emacs look at the stty settings for Backspace vs. Delete?
213 126: How do I "swap" two keys?
214 127: How do I produce C-XXX with my keyboard?
215 128: What if I don't have a Meta key?
216 129: What if I don't have an Escape key?
217 130: Can I make my "Compose Character" key behave like a Meta key?
218 131: How do I bind a combination of modifier key and function key?
219 132: Why doesn't my Meta key work in an xterm window?
220 133: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0
221 and 9.x?
222
223 Using Emacs with Alternate Character Sets
224
225 134: How do I make Emacs display 8-bit characters?
226 135: How do I input 8-bit characters?
227 136: Where can I get an Emacs that handles kanji, Chinese, or other
228 character sets?
229 137: Where is an Emacs that can handle Semitic (right-to-left) alphabets?
230
231 Mail and News
232
233 138: How do I change the included text prefix in mail/news followups?
234 139: How do I save a copy of outgoing mail?
235 140: Why doesn't Emacs expand my aliases when sending mail?
236 141: Why does Rmail think all my saved messages are one big message?
237 142: How can I sort the messages in my Rmail folder?
238 143: Why does Rmail need to write to /usr/spool/mail?
239 144: How do I recover my mail files after Rmail munges their format?
240 145: How can I force Rmail to reply to the sender of a message, but not the
241 other recipients?
242 146: How can I get my favorite Emacs mail package to support MIME?
243 147: How do I make Emacs automatically start my mail/news reader?
244 148: How do I read news under Emacs?
245 149: Why doesn't Gnus work via NNTP?
246 150: How do I view news articles with embedded underlining (e.g.,
247 ClariNews)?
248 151: How do I save all the items of a multi-part posting in Gnus?
249 152: How do I make Gnus start up faster?
250 153: How do I catch up all newsgroups in Gnus?
251 154: Why can't I kill in Gnus based on the Newsgroups/Keywords/Control
252 headers?
253 155: How do I get rid of flashing messages in Gnus for slow connections?
254 156: Why is catch up slow in Gnus?
255 157: Why does Gnus hang for a long time when posting?
256 158: Where can I find out more about Gnus?
257
258 ------------------------------------------------------------
259
260 If you are viewing this text in a GNU Emacs Buffer, you can type "M-2 C-x
261 $" to get an overview of just the questions. Then, when you want to look
262 at the text of the answers, just type "C-x $".
263
264 To search for a question numbered XXX, type "M-C-s ^XXX:", followed by a
265 C-r if that doesn't work. Type RET to end the search.
266
267 If you have w3-mode installed (see question 111), you can visit ftp and
268 HTTP uniform resource locators (URLs) by placing the cursor on the URL and
269 typing M-x w3-follow-url-at-point.
270
271 The FAQ is posted in five parts; if you are missing a section or would
272 prefer to read the FAQ in a single file, see question 22.
273
274 ------------------------------------------------------------
275 Time-stamp: <1998-11-15 12:37:16 reuven>
276
277
278 Notation Used in FAQ
279
280 Skip this section and then come back if you don't understand some of the
281 later answers.
282
283 1: What do these mean: C-h, M-C-a, RET, "ESC a", etc.?
284
285 C-x: press the `x' key while holding down the Control key
286
287 M-x: press the `x' key while holding down the Meta key (if your computer
288 doesn't have a Meta key, see question 128)
289
290 M-C-x: press the `x' key while holding down both Control and Meta
291 C-M-x: a synonym for the above
292
293 LFD: Linefeed or Newline; same as C-j
294 RET: Return, sometimes marked Enter; same as C-m
295 DEL: Delete, usually not the same as Backspace; same as C-? (See
296 question 124 if deleting invokes Emacs help)
297 ESC: Escape; same as C-[
298 TAB: Tab; same as C-i
299 SPC: Space bar
300
301 Key sequences longer than one key (and some single-key sequences) are
302 inside double quotes or on lines by themselves. Any real spaces in such
303 a key sequence should be ignored; only SPC really means press the space
304 key.
305
306 The ASCII code sent by C-x (except for C-?) is the value that would be
307 sent by pressing just `x' minus 96 (or 64 for uppercase `X') and will be
308 from 0 to 31. The ASCII code sent by M-x is the sum of 128 and the ASCII
309 code that would be sent by pressing just the `x' key. Essentially, the
310 Control key turns off bits 5 and 6 and the Meta key turns on bit 7.
311
312 NOTE: C-? (aka DEL) is ASCII code 127. It is a misnomer to call C-? a
313 "control" key, since 127 has both bits 5 and 6 turned ON. Also, on very
314 few keyboards does C-? generate ASCII code 127.
315
316 For further information, see "Characters" and "Keys" in the on-line
317 manual. (See question 3 if you don't know how.)
318
319 2: What does "M-x command" mean?
320
321 "M-x command" means type M-x, then type the name of the command, then
322 type RET. (See question 1 if you're not sure what "M-x" and "RET" mean.)
323
324 M-x (by default) invokes the command "execute-extended-command". This
325 command allows you to run any Emacs command if you can remember the
326 command's name. If you can't remember the command's name, you can type
327 TAB and SPC for completion, `?' for a list of possibilities, and M-p and
328 M-n to see previous commands entered. An Emacs "command" is any
329 "interactive" Emacs function.
330
331 NOTE: Your system administrator may have bound other key sequences to
332 invoke execute-extended-command. A function key labeled `Do' is a good
333 candidate for this.
334
335 To run non-interactive Emacs functions, see question 52.
336
337 3: How do I read topic XXX in the on-line manual?
338
339 When we refer you to topic XXX in the on-line manual, you can read this
340 manual node inside Emacs (assuming nothing is broken) by typing this:
341
342 C-h i m emacs RET m XXX RET
343
344 This invokes Info, the GNU hypertext documentation browser. If you don't
345 already know how to use Info, type `?' from within Info.
346
347 If we refer to topic XXX:YYY, type this:
348
349 C-h i m emacs RET m XXX RET m YYY RET
350
351 WARNING: Your system administrator may not have installed the Info files,
352 or may have installed them improperly. In this case you should complain.
353
354 See question 15 if you would like a paper copy of the Emacs manual.
355
356 4: What do these mean: etc/SERVICE, src/config.h, lisp/default.el?
357
358 These are files that come with Emacs. The Emacs distribution is divided
359 into subdirectories; the important ones are "etc", "lisp", and "src".
360
361 If you use Emacs, but don't know where it is kept on your system, start
362 Emacs, then type "C-h v data-directory RET". The directory name
363 displayed by this will be the full pathname of the installed "etc"
364 directory.
365
366 The location of your Info directory (i.e., where on-line documentation is
367 stored) is kept in the variable Info-default-directory-list. Use "C-h v
368 Info-default-directory-list RET" to see the contents of this variable,
369 which will be a list of directory names. The last directory in that list
370 is probably where most Info files are stored. By default, Info
371 documentation is placed in /usr/local/info.
372
373 Some of these files are available individually via FTP or e-mail; see
374 question 20. All are available in the source distribution. Many of the
375 files in the "etc" directory are also available via the Emacs "help"
376 menu, or by typing "C-h ?" (M-x help-for-help).
377
378 WARNING: Your system administrator may have removed the src directory and
379 many files from the etc directory.
380
381 5: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL?
382
383 FSF == Free Software Foundation
384 LPF == League for Programming Freedom
385 OSF == Open Software Foundation
386 GNU == GNU's Not Unix
387 RMS == Richard Matthew Stallman
388 FTP == File Transfer Protocol
389 GPL == GNU General Public License
390
391 NOTE: Avoid confusing the FSF, the LPF, and the OSF. The LPF opposes
392 look-and-feel copyrights and software patents. The FSF aims to make high
393 quality free software available for everyone. The OSF is a consortium of
394 computer vendors which develops commercial software for Unix systems.
395
396 NOTE: The word "free" in the title of the Free Software Foundation refers
397 to "freedom," not "zero dollars." Anyone can charge any price for
398 GPL-covered software that they want to. However, in practice, the
399 freedom enforced by the GPL leads to low prices, because you can always
400 get the software for less money from someone else, because everyone has
401 the right to resell or give away GPL-covered software.
402
403
404 General Questions
405
406 6: What is the LPF?
407
408 The LPF opposes the expanding danger of software patents and
409 look-and-feel copyrights. To get more information, feel free to contact
410 the LPF via e-mail or otherwise. You may also contact Joe Wells
411 <jbw@cs.bu.edu>; he will be happy to talk with you about the LPF.
412
413 You can find more information about the LPF in the file etc/LPF. More
414 papers describing the LPF's views are available on the Internet and also
415 from the LPF:
416
417 http://lpf.ai.mit.edu/
418
419 7: What is the real legal meaning of the GNU copyleft?
420
421 The real legal meaning of the GNU General Public License (copyleft) will
422 only be known if and when a judge rules on its validity and scope. There
423 has never been a copyright infringement case involving the GPL to set any
424 precedents. Please take any discussion regarding this issue to the
425 newsgroup gnu.misc.discuss, which was created to hold the extensive flame
426 wars on the subject.
427
428 RMS writes:
429
430 The legal meaning of the GNU copyleft is less important than the
431 spirit, which is that Emacs is a free software project and that work
432 pertaining to Emacs should also be free software. "Free" means that
433 all users have the freedom to study, share, change and improve Emacs.
434 To make sure everyone has this freedom, pass along source code when you
435 distribute any version of Emacs or a related program, and give the
436 recipients the same freedom that you enjoyed.
437
438 8: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug,
439 comp.emacs, etc.?
440
441 The file etc/MAILINGLISTS discusses the purpose of each GNU mailing-list.
442 (See question 20 if you want a copy of the file.) For those lists which
443 are gatewayed with newsgroups, it lists both the newsgroup name and the
444 mailing list address.
445
446 comp.emacs is for discussion of Emacs programs in general. This includes
447 Emacs along with various other implementations, such as JOVE, MicroEmacs,
448 Freemacs, MG, Unipress, CCA, and Epsilon.
449
450 Many people post Emacs questions to comp.emacs because they don't receive
451 any of the gnu.* newsgroups. Arguments have been made both for and
452 against posting GNU-Emacs-specific material to comp.emacs. You have to
453 decide for yourself.
454
455 Messages advocating "non-free" software are considered unacceptable on
456 any of the gnu.* newsgroups except for gnu.misc.discuss, which was
457 created to hold the extensive flame-wars on the subject. "Non-free"
458 software includes any software for which the end user can't freely modify
459 the source code and exchange enhancements. Be careful to remove the
460 gnu.* groups from the "Newsgroups:" line when posting a followup that
461 recommends such software.
462
463 gnu.emacs.bug is a place where bug reports appear, but avoid posting bug
464 reports to this newsgroup (see question 10).
465
466 9: Where can I get old postings to gnu.emacs.help and other GNU groups?
467
468 The FSF has maintained archives of all of the GNU mailing lists for many
469 years, although there may be some unintentional gaps in coverage. The
470 archive is not particularly well organized or easy to retrieve individual
471 postings from, but pretty much everything is there. The latest archives
472 are available at
473
474 ftp://ftp.gnu.org/pub/gnu/MailingListArchives/current
475
476 Web-based Usenet search services, such as DejaNews, also archive the
477 gnu.* groups. You can reach DejaNews at
478
479 http://www.dejanews.com
480
481 10: Where should I report bugs and other problems with Emacs?
482
483 The correct way to report Emacs bugs is by e-mail to
484 bug-gnu-emacs@gnu.org. Anything sent here also appears in the
485 newsgroup gnu.emacs.bug, but please use e-mail instead of news to submit
486 the bug report. This ensures a reliable return address so you can be
487 contacted for further details.
488
489 Be sure to read the "Bugs" section of the Emacs manual before reporting a
490 bug to bug-gnu-emacs! The manual describes in detail how to submit a
491 useful bug report. (See question 3 if you don't know how to read the
492 manual.)
493
494 RMS says:
495
496 Sending bug reports to help-gnu-emacs (which has the effect of posting
497 on gnu.emacs.help) is undesirable because it takes the time of an
498 unnecessarily large group of people, most of whom are just users and
499 have no idea how to fix these problem. bug-gnu-emacs reaches a much
500 smaller group of people who are more likely to know what to do and have
501 expressed a wish to receive more messages about Emacs than the others.
502
503 However, RMS says there are circumstances when it is okay to post to
504 gnu.emacs.help:
505
506 If you have reported a bug and you don't hear about a possible fix,
507 then after a suitable delay (such as a week) it is okay to post on
508 gnu.emacs.help asking if anyone can help you.
509
510 If you are unsure whether you have found a bug, consider the following
511 non-exhaustive list, courtesy of RMS:
512
513 If Emacs crashes, that is a bug. If Emacs gets compilation errors
514 while building, that is a bug. If Emacs crashes while building, that
515 is a bug. If Lisp code does not do what the documentation says it
516 does, that is a bug.
517
518 11: How do I unsubscribe from this mailing list?
519
520 If you are receiving a GNU mailing list named "XXX", you might be able to
521 unsubscribe from it by sending a request to the address
522 <XXX-request@gnu.org>. However, this will not work if you are
523 not listed on the main mailing list, but instead receive the mail from a
524 distribution point. In that case, you will have to track down at which
525 distribution point you are listed. Inspecting the "Received:" headers on
526 the mail messages may help, along with liberal use of the "EXPN" or
527 "VRFY" sendmail commands through "telnet <site-address> smtp". Ask your
528 postmaster for help.
529
530 12: What is the current address of the FSF?
531
532 E-mail: gnu@gnu.org
533 Telephone: +1-617-542-5942
534 Fax: +1-617-542-2652
535 World Wide Web: http://www.gnu.org/
536
537 Postal address:
538 Free Software Foundation
539 59 Temple Place - Suite 330
540 Boston, MA 02111-1307
541 USA
542
543 For details on how to order items directly from the FSF, see the file
544 etc/ORDERS.
545
546
547 On-line Help, Printed Manuals, Other Sources of Help
548
549 13: I'm just starting Emacs; how do I do basic editing?
550
551 Type "C-h t" to invoke the self-paced tutorial. Just typing `C-h' enters
552 the help system.
553
554 WARNING: Your system administrator may have changed `C-h' to act like DEL
555 to deal with local keyboards. You can use M-x help-for-help instead to
556 invoke help. To discover what key (if any) invokes help on your system,
557 type "M-x where-is RET help-for-help RET". This will print a
558 comma-separated list of key sequences in the echo area. Ignore the last
559 character in each key sequence listed. Each of the resulting key
560 sequences invokes help.
561
562 NOTE: Emacs help works best if it is invoked by a single key whose value
563 should be stored in the variable help-char.
564
565 There is also a WWW-based tutorial for Emacs 18, much of which is also
566 relevant for Emacs 20, available at
567
568 http://kufacts.cc.ukans.edu/cwis/writeups/misc/emacsguide.html
569
570 14: How do I find out how to do something in Emacs?
571
572 There are several methods for finding out how to do things in Emacs.
573
574 * The complete text of the Emacs manual is available on-line via the Info
575 hypertext reader. Type "C-h i" to invoke Info. Typing `h' immediately
576 after entering Info will provide a short tutorial on how to use it.
577
578 * You can order a hardcopy of the manual from the FSF. See question 15.
579
580 * You can get a printed reference card listing commands and keys to
581 invoke them. You can order one from the FSF for $1 (or 10 for $5), or
582 you can print your own from the etc/refcard.tex or etc/refcard.ps files
583 in the Emacs distribution.
584
585 * You can list all of the commands whose names contain a certain word
586 (actually which match a regular expression) using "C-h a" (M-x
587 command-apropos).
588
589 * You can list all of the functions and variables whose names contain a
590 certain word using M-x apropos.
591
592 * There are many other commands in Emacs for getting help and
593 information. To get a list of these commands, type `?' after `C-h'.
594
595 15: How do I get a printed copy of the Emacs manual?
596
597 You can order a printed copy of the Emacs manual from the FSF. For
598 details see the file etc/ORDERS.
599
600 The full TeX source for the manual also comes in the "man" directory of
601 the Emacs distribution, if you're daring enough to try to print out this
602 440-page manual yourself (see question 18).
603
604 If you absolutely have to print your own copy, and you don't have TeX,
605 you can get a PostScript version from
606
607 ftp://ftp.cs.ubc.ca/pub/archive/gnu/manuals_ps/emacs-19.21.ps.gz
608
609 Note that the above document is somewhat out of date, although most major
610 concepts are still relevant. This site requests that you please *confine
611 any major ftping to late evenings or early mornings, local time* (Pacific
612 time zone, GMT-8).
613
614 A WWW version of the (somewhat outdated) Emacs 19.34 manual is at
615
616 http://www.cl.cam.ac.uk/texinfodoc/emacs_toc.html
617
618 See also question 14 for how to view the manual on-line.
619
620 16: Where can I get documentation on Emacs Lisp?
621
622 Within Emacs, you can type "C-h f" to get the documentation for a
623 function, "C-h v" for a variable.
624
625 For more information, obtain the Emacs Lisp Reference Manual. Details on
626 ordering it from FSF are in file etc/ORDERS.
627
628 The Emacs Lisp Reference Manual is also available on-line, in Info
629 format. Texinfo source for the manual (along with pregenerated Info
630 files) is available at
631
632 ftp://ftp.gnu.org/pub/gnu/elisp-manual-20-2.5.tar.gz
633
634 and all mirrors of ftp.gnu.org (See question 92 for a list). See
635 question 17 if you want to install the Info files, or question 18 if you
636 want to use the Texinfo source to print the manual yourself.
637
638 WWW versions of the Emacs Lisp Reference Manual are available at
639
640 http://www.cl.cam.ac.uk/texinfodoc/elisp_1.html
641 http://www.cs.indiana.edu/usr/local/www/elisp/lispref/elisp_toc.html
642
643 17: How do I install a piece of Texinfo documentation?
644
645 First, you must turn the Texinfo files into Info files. You may do this
646 using the stand-alone "makeinfo" program, available as part of the latest
647 Texinfo package at
648
649 ftp://ftp.gnu.org/pub/gnu/texinfo-3.12.tar.gz
650
651 and all mirrors of ftp.gnu.org (see question 92 for a list).
652
653 For information about the Texinfo format, read the Texinfo manual which
654 comes with Emacs. This manual also comes installed in Info format, so
655 you can read it on-line.
656
657 Neither texinfo-format-buffer nor makeinfo installs the resulting Info
658 files in Emacs's Info tree. To install Info files:
659
660 1. Move the files to the "info" directory in the installed Emacs
661 distribution. See question 4 if you don't know where that is.
662
663 2. Edit the file info/dir in the installed Emacs distribution, and add a
664 line for the top level node in the Info package that you are
665 installing. Follow the examples already in this file. The format is:
666
667 * Topic: (relative-pathname). Short description of topic.
668
669 If you want to install Info files and you don't have the necessary
670 privileges, you have several options:
671
672 * Info files don't actually need to be installed before being used. You
673 can feed a file name to the Info-goto-node command (invoked by pressing
674 `g' in Info mode) by typing the name of the file in parentheses. This
675 goes to the node named "Top" in that file. For example, to view a Info
676 file named "XXX" in your home directory, you can type this:
677
678 C-h i g (~/XXX) RET
679
680 * You can create your own Info directory. You can tell Emacs where the
681 Info directory is by adding its pathname to the value of the variable
682 Info-default-directory-list. For example, to use a private Info
683 directory which is a subdirectory of your home directory named "Info",
684 you could put this in your .emacs file:
685
686 (setq Info-default-directory-list
687 (cons "~/Info" Info-default-directory-list))
688
689 You will need a top-level Info file named "dir" in this directory which
690 has everything the system dir file has in it, except it should list
691 only entries for Info files in that directory. You might not need it
692 if all files in this directory were referenced by other "dir" files.
693 The node lists from all dir files in Info-default-directory-list are
694 merged by the Info system.
695
696 18: How do I print a Texinfo file?
697
698 NOTE: You can't get nicely printed output from Info files; you must still
699 have the original Texinfo source file for the manual you want to print.
700
701 Assuming you have TeX installed on your system, follow these steps:
702
703 1. Make sure the first line of the Texinfo file looks like this:
704
705 \input texinfo
706
707 You may need to change "texinfo" to the full pathname of the
708 texinfo.tex file, which comes with Emacs as man/texinfo.tex (or copy
709 or link it into the current directory).
710
711 2. tex XXX.texinfo
712
713 3. texindex XXX.??
714
715 The texindex program comes with Emacs as man/texindex.c.
716
717 4. tex XXX.texinfo
718
719 5. Print the DVI file XXX.dvi in the normal way for printing DVI files at
720 your site.
721
722 To get more general instructions, retrieve the latest Texinfo package
723 mentioned in question 17.
724
725 19: Can I view Info files without using Emacs?
726
727 Yes. Here are some alternative programs:
728
729 * Info, a stand-alone version of the Info program, comes as part of the
730 Texinfo package. See question 17 for details.
731
732 * Xinfo, a stand-alone version of the Info program that runs under X
733 Windows. You can get it at
734
735 ftp://ftp.gnu.org/pub/gnu/xinfo-1.01.01.tar.gz
736
737 and all mirrors of ftp.gnu.org (See question 92 for a list).
738
739 * Tkinfo, an Info viewer that runs under X Windows and uses Tcl/Tk. You
740 can get Tkinfo at
741
742 http://math-www.uni-paderborn.de/~axel/tkinfo/
743
744 20: What informational files are available for Emacs?
745
746 This isn't a frequently asked question, but it should be! A variety of
747 informational files about Emacs and relevant aspects of the GNU project
748 are available for you to read.
749
750 The following files are available in the "etc" directory of the Emacs
751 distribution (see question 4 if you're not sure where that is).
752
753 COPYING -- Emacs General Public License
754 DISTRIB -- Emacs Availability Information, including the popular
755 "Free Software Foundation Order Form"
756 FAQ -- Emacs Frequently Asked Questions (You're reading it)
757 FTP -- How to get GNU Software by Internet FTP or by UUCP
758 GNU -- The GNU Manifesto
759 INTERVIEW -- Richard Stallman discusses his public-domain
760 UNIX-compatible software system with BYTE editors
761 LPF -- Why you should join the League for Programming Freedom
762 MACHINES -- Status of Emacs on Various Machines and Systems
763 MAILINGLISTS -- GNU Project Electronic Mailing Lists
764 NEWS -- Emacs news, a history of user-visible changes
765 SERVICE -- GNU Service Directory
766 SUN-SUPPORT -- including "Using Emacstool with GNU Emacs"
767
768 Latest versions of the above files also available at
769
770 ftp://ftp.gnu.org/pub/gnu/GNUinfo/
771
772 More GNU information, including back issues of the "GNU's Bulletin", are at
773
774 http://www.gnu.org/bulletins/bulletins.html
775 http://www.cs.pdx.edu/~trent/gnu/gnu.html
776
777 21: Where can I get help in installing Emacs?
778
779 See question 84 for some basic installation hints, and question 83 if you
780 have problems with the installation.
781
782 The file etc/SERVICE (see question 4 if you're not sure where that is)
783 lists companies and individuals willing to sell you help in installing or
784 using Emacs. An up-to-date version this file is available on ftp.gnu.org
785 (see question 20).
786
787 22: Where can I get the latest version of this document (the FAQ list)?
788
789 The Emacs FAQ is available in several ways:
790
791 * Inside of Emacs itself. You can get it from selecting the "Emacs FAQ"
792 option from the "Help" menu at the top of any Emacs frame, or by typing
793 C-h F (M-x view-emacs-FAQ).
794
795 * Via USENET. If you can read news, the FAQ should be available in your
796 news spool, in both the gnu.emacs.help and comp.emacs newsgroups.
797 Every news reader should allow you to read any news article that is
798 still in the news spool, even if you have read the article before. You
799 may need to read the instructions for your news reader to discover how
800 to do this. In rn, this command will do this for you at the article
801 selection level:
802
803 ?GNU Emacs Frequently Asked Questions?rc:m
804
805 In Gnus, you should type "C-u c-x c-s" from the *Summary* buffer or
806 "C-u SPC" from the *Newsgroup* buffer to view all articles in a
807 newsgroup.
808
809 If the FAQ articles have expired and been deleted from your news spool,
810 it might (or might not) do some good to complain to your news
811 administrator, because the most recent FAQ should not expire for a
812 while.
813
814 * Via HTTP or FTP. You can always fetch the latest FAQ at
815
816 http://www.lerner.co.il/emacs/
817
818 and
819
820 ftp://ftp.lerner.co.il/pub/emacs/
821
822 * In the Emacs distribution. Since Emacs 18.56, the FAQ at the time of
823 release has been part of the Emacs distribution as etc/FAQ (see
824 question 4).
825
826 * Via the World Wide Web. Point your favorite Web browser at:
827
828 http://www.geek-girl.com/emacs/faq/index.html
829
830 This is an old version, but it works.
831
832 * Via anonymous ftp and e-mail from rtfm.mit.edu (and its mirror in
833 Europe), the main repository for FAQs and other items posted to
834 news.answers. The Emacs FAQs are available at
835
836 ftp://rtfm.mit.edu/pub/usenet/comp.emacs/
837 ftp://ftp.uni-paderborn.de/pub/doc/FAQ/comp/emacs/
838
839 If you do not have access to anonymous FTP, you can access the archives
840 using the rtfm.mit.edu mail server. The Emacs FAQ can be retrieved by
841 sending mail to mail-server@rtfm.mit.edu with a blank subject and
842 containing
843
844 send usenet/news.answers/GNU-Emacs-FAQ/diffs
845 send usenet/news.answers/GNU-Emacs-FAQ/part1
846 send usenet/news.answers/GNU-Emacs-FAQ/part2
847 send usenet/news.answers/GNU-Emacs-FAQ/part3
848 send usenet/news.answers/GNU-Emacs-FAQ/part4
849 send usenet/news.answers/GNU-Emacs-FAQ/part5
850
851 For more information, send email to mail-server@rtfm.mit.edu with
852 "help" and "index" in the body on separate lines.
853
854 * As the very last resort, you can e-mail a request to
855 emacs-faq@lerner.co.il. Don't do this unless you have made a serious
856 effort to obtain the FAQ list via one of the methods listed above.
857
858
859 Status of Emacs
860
861 23: Where does the name "Emacs" come from?
862
863 Emacs originally was an acronym for Editor MACroS. RMS says he "picked
864 the name Emacs because `E' was not in use as an abbreviation on ITS at
865 the time." The first Emacs was a set of macros written in 1976 at MIT by
866 RMS for the editor TECO (Text Editor and COrrector, originally Tape
867 Editor and COrrector) under ITS on a PDP-10. RMS had already extended
868 TECO with a "real-time" full screen mode with reprogrammable keys. Emacs
869 was started by Guy Steele <gls@east.sun.com> as a project to unify the
870 many divergent TECO command sets and key bindings at MIT, and completed
871 by RMS.
872
873 Many people have said that TECO code looks a lot like line noise. See
874 alt.lang.teco if you are interested. Someone has written a TECO
875 implementation in Emacs Lisp (to find it, see question 90); it would be
876 an interesting project to run the original TECO Emacs inside of Emacs.
877
878 For some not-so-serious alternative reasons for Emacs to have that name,
879 check out etc/JOKES (see question 4).
880
881 24: What is the latest version of Emacs?
882
883 Emacs 20.3 is the current version as of this writing.
884
885 25: What is different about Emacs 20?
886
887 To find out what has changed in recent versions, type C-h n (M-x
888 view-emacs-news). The oldest changes are at the bottom of the file, so
889 you might want to read it starting there, rather than at the top.
890
891 The differences between Emacs versions 18 and 19 was rather dramatic; the
892 introduction of frames, faces, and colors on windowing systems was
893 obvious to even the most casual user.
894
895 There are differences between Emacs versions 19 and 20 as well, but many
896 are more subtle or harder to find. Among the changes are the inclusion
897 of MULE code for languages that use non-Latin characters, the "customize"
898 facility for modifying variables without having to use Lisp, and
899 automatic conversion of files from Macintosh, Microsoft, and Unix
900 platforms.
901
902 A number of older Lisp packages, such as Gnus, Supercite and the
903 calendar/diary, have been updated and enhanced to work with Emacs 20, and
904 are now included with the standard distribution.
905
906
907 Common Things People Want To Do
908
909 26: How do I set up a .emacs file properly?
910
911 See "Init File" in the on-line manual.
912
913 WARNING: In general, new Emacs users should not have .emacs files,
914 because it causes confusing non-standard behavior. Then they send
915 questions to help-gnu-emacs asking why Emacs isn't behaving as
916 documented. :-)
917
918 Emacs 20 includes the new "customize" facility, which can be invoked
919 using M-x customize RET. This allows users who are unfamiliar with Emacs
920 Lisp to modify their .emacs files in a relatively straightforward way,
921 using menus rather than Lisp code. Not all packages support Customize as
922 of this writing, but the number is growing fairly steadily.
923
924 While Customize might indeed make it easier to configure Emacs, consider
925 taking a bit of time to learn Emacs Lisp and modifying your .emacs
926 directly. Simple configuration options are described rather completely in
927 the "Init File" section of the on-line manual, for users interested in
928 performing frequently requested, basic tasks.
929
930 27: How do I debug a .emacs file?
931
932 Start Emacs with the "-debug-init" command-line option. This enables the
933 Emacs Lisp debugger before evaluating your .emacs file, and places you in
934 the debugger if something goes wrong. The top line in the trace-back
935 buffer will be the error message, and the second or third line of that
936 buffer will display the Lisp code from your .emacs file that caused the
937 problem.
938
939 You can also evaluate an individual function or argument to a function in
940 your .emacs file by moving the cursor to the end of the function or
941 argument and typing "C-x C-e" (M-x eval-last-sexp).
942
943 Use "C-h v" (M-x describe-variable) to check the value of variables which
944 you are trying to set or use.
945
946 28: How do I make Emacs display the current line (or column) number?
947
948 To have Emacs automatically display the current line number of the point
949 in the mode line, do "M-x line-number-mode". You can also put the form
950
951 (setq line-number-mode t)
952
953 in your .emacs file to achieve this whenever you start Emacs. Note that
954 Emacs will not display the line number if the buffer is larger than the
955 value of the variable line-number-display-limit.
956
957 As of Emacs 20, you can similarly display the current column with "M-x
958 column-number-mode", or by putting the form
959
960 (setq column-number-mode t)
961
962 in your .emacs file.
963
964 The "%c" format specifier in the variable mode-line-format will insert
965 the current column's value into the mode line. See the documentation for
966 mode-line-format (using "C-h v mode-line-format RET") for more
967 information on how to set and use this variable.
968
969 Users of all Emacs versions can display the current column using Per
970 Abrahamsen's <abraham@iesd.auc.dk> "column" package. See question 90 for
971 instructions on how to get it.
972
973 None of the vi emulation modes provide the "set number" capability of vi
974 (as far as we know).
975
976 29: How can I modify the titlebar to contain the current filename?
977
978 The contains of an Emacs frame's titlebar is controlled by the variable
979 frame-title-format, which has the same structure as the variable
980 mode-line-format. (Use "C-h v" or "M-x describe-variable" to get
981 information about one or both of these variables.)
982
983 By default, the titlebar for a frame does contain the name of the buffer
984 currently being visited, except if there is a single frame. In such a
985 case, the titlebar contains the name of the user and the machine at which
986 Emacs was invoked. This is done by setting frame-title-format to the
987 default value of
988
989 (multiple-frames "%b" ("" invocation-name "@" system-name))
990
991 To modify the behavior such that frame titlebars contain the buffer's
992 name regardless of the number of existing frames, include the following
993 in your .emacs:
994
995 (setq frame-title-format "%b")
996
997 30: How do I turn on abbrevs by default just in mode XXX?
998
999 Put this in your .emacs file:
1000
1001 (condition-case ()
1002 (quietly-read-abbrev-file)
1003 (file-error nil))
1004
1005 (add-hook 'XXX-mode-hook
1006 (function
1007 (lambda ()
1008 (setq abbrev-mode t))))
1009
1010 31: How do I turn on auto-fill mode by default?
1011
1012 To turn on auto-fill mode just once for one buffer, use "M-x
1013 auto-fill-mode".
1014
1015 To turn it on for every buffer in a certain mode, you must use the hook
1016 for that mode. For example, to turn on auto-fill mode for all text
1017 buffers, including the following in your .emacs file:
1018
1019 (add-hook 'text-mode-hook 'turn-on-auto-fill)
1020
1021 If you want auto-fill mode on in all major modes, do this:
1022
1023 (setq-default auto-fill-function 'do-auto-fill)
1024
1025 32: How do I make Emacs use a certain major mode for certain files?
1026
1027 If you want to use XXX mode for all files which end with the extension
1028 ".YYY", this will do it for you:
1029
1030 (setq auto-mode-alist (cons '("\\.YYY\\'" . XXX-mode) auto-mode-alist))
1031
1032 Otherwise put this somewhere in the first line of any file you want to
1033 edit in XXX mode (in the second line, if the first line begins with
1034 "#!"):
1035
1036 -*-XXX-*-
1037
1038 Beginning with Emacs 19, the variable interpreter-mode-alist specifies
1039 which mode to use when loading a shell script. (Emacs determines which
1040 interpreter you're using by examining the first line of the file.) This
1041 feature only applies when the file name doesn't indicate which mode to
1042 use. Use "C-h v" (or M-x describe-variable) on interpreter-mode-alist to
1043 learn more.
1044
1045 33: How do I search for, delete, or replace unprintable (8-bit or control)
1046 characters?
1047
1048 To search for a single character that appears in the buffer as, for
1049 example, "\237", you can type "C-s C-q 2 3 7". (This assumes the value
1050 of search-quote-char is 17 (i.e., `C-q').) Searching for ALL unprintable
1051 characters is best done with a regular expression ("regexp") search. The
1052 easiest regexp to use for the unprintable chars is the complement of the
1053 regexp for the printable chars.
1054
1055 Regexp for the printable chars: [\t\n\r\f -~]
1056 Regexp for the unprintable chars: [^\t\n\r\f -~]
1057
1058 To type these special characters in an interactive argument to
1059 isearch-forward-regexp or re-search-forward, you need to use C-q. (`\t',
1060 `\n', `\r', and `\f' stand respectively for TAB, LFD, RET, and C-l.) So,
1061 to search for unprintable characters using re-search-forward:
1062
1063 M-x re-search-forward RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET
1064
1065 Using isearch-forward-regexp:
1066
1067 M-C-s [^ TAB RET C-q RET C-q C-l SPC -~]
1068
1069 To delete all unprintable characters, simply use replace-regexp:
1070
1071 M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET RET
1072
1073 Replacing is similar to the above. To replace all unprintable characters
1074 with a colon, use:
1075
1076 M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET : RET
1077
1078 NOTE: * You don't need to quote TAB with either isearch or typing
1079 something in the minibuffer.
1080
1081 34: How can I highlight a region of text in Emacs?
1082
1083 If you are using a windowing system such as X, you can cause the region
1084 to be highlighted when the mark is active by including
1085
1086 (transient-mark-mode t)
1087
1088 in your .emacs file. (Also see question 66.)
1089
1090 35: How do I control Emacs's case-sensitivity when searching/replacing?
1091
1092 For searching, the value of the variable case-fold-search determines
1093 whether they are case sensitive:
1094
1095 (setq case-fold-search nil) ; make searches case sensitive
1096 (setq case-fold-search t) ; make searches case insensitive
1097
1098 Similarly, for replacing the variable case-replace determines whether
1099 replacements preserve case.
1100
1101 To change the case sensitivity just for one major mode, use the major
1102 mode's hook. For example:
1103
1104 (add-hook 'XXX-mode-hook
1105 (function
1106 (lambda ()
1107 (setq case-fold-search nil))))
1108
1109 36: How do I make Emacs wrap words for me?
1110
1111 Use auto-fill mode, activated by typing "M-x auto-fill-mode". The
1112 default maximum line width is 70, determined by the variable fill-column.
1113 To learn how to turn this on automatically, see question 31.
1114
1115 37: Where can I get a better spelling checker for Emacs?
1116
1117 Use Ispell. See question 110.
1118
1119 38: How can I spell-check TeX or *roff documents?
1120
1121 Use Ispell. See question 110. Ispell can handle TeX and *roff
1122 documents.
1123
1124 39: How do I change load-path?
1125
1126 In general, you should only *add* to the load-path. You can add
1127 directory /XXX/YYY to the load path like this:
1128
1129 (setq load-path (cons "/XXX/YYY/" load-path))
1130
1131 To do this relative to your home directory:
1132
1133 (setq load-path (cons "~/YYY/" load-path)
1134
1135 40: How do I use an already running Emacs from another window?
1136
1137 Emacsclient, which comes with Emacs, is for editing a file using an
1138 already running Emacs rather than starting up a new Emacs. It does this
1139 by sending a request to the already running Emacs, which must be
1140 expecting the request.
1141
1142 * Setup
1143
1144 Emacs must have executed the "server-start" function for emacsclient to
1145 work. This can be done either by a command line option:
1146
1147 emacs -f server-start
1148
1149 or by invoking server-start from the .emacs file:
1150
1151 (if (some conditions are met) (server-start))
1152
1153 When this is done, Emacs starts a subprocess running a program called
1154 "server". "server" creates a Unix domain socket in the user's home
1155 directory named .emacs_server.
1156
1157 To get your news reader, mail reader, etc., to invoke emacsclient, try
1158 setting the environment variable EDITOR (or sometimes VISUAL) to the
1159 value "emacsclient". You may have to specify the full pathname of the
1160 emacsclient program instead. Examples:
1161
1162 # csh commands:
1163 setenv EDITOR emacsclient
1164 setenv EDITOR /usr/local/emacs/etc/emacsclient # using full pathname
1165
1166 # sh command:
1167 EDITOR=emacsclient ; export EDITOR
1168
1169 * Normal use
1170
1171 When emacsclient is run, it connects to the ".emacs_server" socket and
1172 passes its command line options to "server". When "server" receives
1173 these requests, it sends this information on the the Emacs process,
1174 which at the next opportunity will visit the files specified. (Line
1175 numbers can be specified just like with Emacs.) The user will have to
1176 switch to the Emacs window by hand. When the user is done editing a
1177 file, the user can type "C-x #" (or M-x server-edit) to indicate this.
1178 If there is another buffer requested by emacsclient, Emacs will switch
1179 to it; otherwise emacsclient will exit, signaling the calling program
1180 to continue.
1181
1182 NOTE: "emacsclient" and "server" must be running on machines which
1183 share the same filesystem for this to work. The pathnames that
1184 emacsclient specifies should be correct for the filesystem that the
1185 Emacs process sees. The Emacs process should not be suspended at the
1186 time emacsclient is invoked. emacsclient should either be invoked from
1187 another X window or from a shell window inside Emacs itself.
1188
1189 There is an enhanced version of emacsclient/server called "gnuserv" by
1190 Andy Norman <ange@hplb.hpl.hp.com> which is available in the Emacs Lisp
1191 Archive (see question 90). Gnuserv uses Internet domain sockets, so it
1192 can work across most network connections. It also supports the
1193 execution of arbitrary Emacs Lisp forms and does not require the client
1194 program to wait for completion.
1195
1196 The alpha version of an enhanced version of gnuserv is available at
1197
1198 ftp://ftp.wellfleet.com/netman/psmith/emacs/gnuserv-2.1alpha.tar.gz
1199
1200 41: How do I make Emacs recognize my compiler's funny error messages?
1201
1202 The variable compilation-error-regexp-alist helps control how Emacs
1203 parses your compiler output. It is a list of triples of the form:
1204
1205 (REGEXP FILE-IDX LINE-IDX)
1206
1207 where REGEXP, FILE-IDX and LINE-IDX are strings. To help determine what
1208 the constituent elements should be, load compile.el and then use
1209
1210 C-h v compilation-error-regexp-alist RET
1211
1212 to see the current value. A good idea is to look at compile.el itself as
1213 the comments included for this variable are quite useful -- the regular
1214 expressions required for your compiler's output may be very close to one
1215 already provided. Once you have determined the proper regexps, use the
1216 following to inform Emacs of your changes:
1217
1218 (setq compilation-error-regexp-alist
1219 (cons '(REGEXP FILE-IDX LINE-IDX)
1220 compilation-error-regexp-alist))
1221
1222 42: How do I indent switch statements like this?
1223
1224 Many people want to indent their switch statements like this:
1225
1226 f()
1227 {
1228 switch(x) {
1229 case A:
1230 x1;
1231 break;
1232 case B:
1233 x2;
1234 break;
1235 default:
1236 x3;
1237 }
1238 }
1239
1240 The solution at first appears to be: set c-indent-level to 4 and
1241 c-label-offset to -2. However, this will give you an indentation spacing
1242 of four instead of two.
1243
1244 The solution is to use cc-mode (the default mode for C programming in
1245 Emacs 20) and add the following line:
1246
1247 (c-set-offset 'case-label '+)
1248
1249 There appears to be no way to do this with the old c-mode.
1250
1251 43: How can I make Emacs automatically scroll horizontally?
1252
1253 Use hscroll-mode, included in Emacs 20. Here is some information from
1254 the documentation, available by typing C-h f hscroll-mode RET:
1255
1256 Automatically scroll horizontally when the point moves off the
1257 left or right edge of the window.
1258
1259 - Type "M-x hscroll-mode" to enable it in the current buffer.
1260 - Type "M-x hscroll-global-mode" to enable it in every buffer.
1261 - "turn-on-hscroll" is useful in mode hooks as in:
1262 (add-hook 'text-mode-hook 'turn-on-hscroll)
1263
1264 - hscroll-margin controls how close the cursor can get to the edge
1265 of the window.
1266 - hscroll-step-percent controls how far to jump once we decide to do so.
1267
1268 44: How do I make Emacs "typeover" or "overwrite" instead of inserting?
1269
1270 M-x overwrite-mode (a minor mode). This toggles overwrite-mode on and
1271 off, so exiting from overwrite-mode is as easy as another M-x
1272 overwrite-mode.
1273
1274 On some workstations, the "Insert" key toggles overwrite-mode on and off.
1275
1276 45: How do I stop Emacs from beeping on a terminal?
1277
1278 Martin R. Frank <martin@cc.gatech.edu> writes:
1279
1280 Tell Emacs to use the "visible bell" instead of the audible bell, and
1281 set the visible bell to nothing.
1282
1283 That is, put the following in your TERMCAP environment variable
1284 (assuming you have one):
1285
1286 ... :vb=: ...
1287
1288 And evaluate the following Lisp form:
1289
1290 (setq visible-bell t)
1291
1292 46: How do I turn down the bell volume in Emacs running under X Windows?
1293
1294 You can adjust the bell volume and duration for all programs with the
1295 shell command xset.
1296
1297 Invoking xset without any arguments produces some basic information,
1298 including the following:
1299
1300 usage: xset [-display host:dpy] option ...
1301 To turn bell off:
1302 -b b off b 0
1303 To set bell volume, pitch and duration:
1304 b [vol [pitch [dur]]] b on
1305
1306 47: How do I tell Emacs to automatically indent a new line to the
1307 indentation of the previous line?
1308
1309 Such behavior is automatic in Emacs 20. From the NEWS file for Emacs
1310 20.2:
1311
1312 ** In Text mode, now only blank lines separate paragraphs. This makes
1313 it possible to get the full benefit of Adaptive Fill mode in Text mode,
1314 and other modes derived from it (such as Mail mode). TAB in Text mode
1315 now runs the command indent-relative; this makes a practical difference
1316 only when you use indented paragraphs.
1317
1318 As a result, the old Indented Text mode is now identical to Text mode,
1319 and is an alias for it.
1320
1321 If you want spaces at the beginning of a line to start a paragraph, use
1322 the new mode, Paragraph Indent Text mode.
1323
1324 If you have auto-fill mode on (see question 31), you can tell Emacs to
1325 prefix every line with a certain character sequence, the "fill prefix."
1326 Type the prefix at the beginning of a line, position point after it, and
1327 then type "C-x ." (set-fill-prefix) to set the fill prefix. Thereafter,
1328 auto-filling will automatically put the fill prefix at the beginning of
1329 new lines, and M-q (fill-paragraph) will maintain any fill prefix when
1330 refilling the paragraph.
1331
1332 NOTE: If you have paragraphs with different levels of indentation, you
1333 will have to set the fill prefix to the correct value each time you move
1334 to a new paragraph. To avoid this hassle, try one of the many packages
1335 available from the Emacs Lisp Archive (see question 90.) Look up "fill"
1336 and "indent" in the Lisp Code Directory for guidance.
1337
1338 48: How do I show which parenthesis matches the one I'm looking at?
1339
1340 As of version 19, Emacs comes with paren.el, which (when loaded) will
1341 automatically highlight matching parentheses whenever point (i.e., the
1342 cursor) is located over one. To load paren automatically, include the
1343 line
1344
1345 (require 'paren)
1346
1347 in your .emacs file. Alan Shutko <shutkoa@ugsolutions.com> reports that
1348 as of version 20.1, you must also call show-paren-mode in your .emacs
1349 file:
1350
1351 (show-paren-mode 1)
1352
1353 The "customize" facility will let you turn on show-paren-mode. Use M-x
1354 customize-group RET paren-showing RET. From within customize, you can
1355 also go directly to the "paren-showing" group.
1356
1357 Alternatives to paren include:
1358
1359 * If you're looking at a right parenthesis (or brace or bracket) you can
1360 delete it and reinsert it. Emacs will blink the cursor on the matching
1361 parenthesis.
1362
1363 * M-C-f (forward-sexp) and M-C-b (backward-sexp) will skip over one set
1364 of balanced parentheses, so you can see which parentheses match. (You
1365 can train it to skip over balanced brackets and braces at the same time
1366 by modifying the syntax table.)
1367
1368 * Here is some Emacs Lisp that will make the % key show the matching
1369 parenthesis, like in vi. In addition, if the cursor isn't over a
1370 parenthesis, it simply inserts a % like normal.
1371
1372 ;; By an unknown contributor
1373
1374 (global-set-key "%" 'match-paren)
1375
1376 (defun match-paren (arg)
1377 "Go to the matching parenthesis if on parenthesis otherwise insert %."
1378 (interactive "p")
1379 (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
1380 ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
1381 (t (self-insert-command (or arg 1)))))
1382
1383 49: In C mode, can I show just the lines that will be left after #ifdef
1384 commands are handled by the compiler?
1385
1386 M-x hide-ifdef-mode. (This is a minor mode.) You might also want to try
1387 cpp.el, available at the Emacs Lisp Archive (see question 90).
1388
1389 50: Is there an equivalent to the `.' (dot) command of vi?
1390
1391 (`.' is the redo command in vi. It redoes the last insertion/deletion.)
1392
1393 The next version of
1394
1395 No, not really, because Emacs doesn't have a special insertion mode.
1396
1397 You can type "C-x ESC ESC" (repeat-complex-command) to reinvoke commands
1398 that used the minibuffer to get arguments. In repeat-complex-command you
1399 can type M-p and M-n to scan through all the different complex commands
1400 you've typed.
1401
1402 To repeat a set of commands, use keyboard macros. (See "Keyboard Macros"
1403 in the on-line manual.)
1404
1405 If you're really desperate for the `.' command, use VIPER, which comes
1406 with Emacs, and which appears to support it. (See question 107.)
1407
1408 51: What are the valid X resource settings (i.e., stuff in .Xdefaults)?
1409
1410 See Emacs man page, or "Resources X" in the on-line manual.
1411
1412 You can also use a resource editor, such as editres (for X11R5 and
1413 onwards), to look at the resource names for the menu bar, assuming Emacs
1414 was compiled with the X toolkit.
1415
1416 52: How do I execute ("evaluate") a piece of Emacs Lisp code?
1417
1418 There are a number of ways to execute ("evaluate," in Lisp lingo) an
1419 Emacs Lisp "form":
1420
1421 * If you want it evaluated every time you run Emacs, put it in a file
1422 named ".emacs" in your home directory. This is known as your ".emacs
1423 file," and contains all of your personal customizations.
1424
1425 * You can type the form in the *scratch* buffer, and then type LFD (or
1426 C-j) after it. The result of evaluating the form will be inserted in
1427 the buffer.
1428
1429 * In Emacs-Lisp mode, typing M-C-x evaluates a top-level form before or
1430 around point.
1431
1432 * Typing "C-x C-e" in any buffer evaluates the Lisp form immediately
1433 before point and prints its value in the echo area.
1434
1435 * Typing M-: or M-x eval-expression allows you to type a Lisp form
1436 in the minibuffer which will be evaluated.
1437
1438 * You can use M-x load-file to have Emacs evaluate all the Lisp forms in
1439 a file. (To do this from Lisp use the function "load" instead.)
1440
1441 These functions are also useful (see question 16 if you want to learn
1442 more about them):
1443
1444 load-library, eval-region, eval-current-buffer, require, autoload
1445
1446 53: How do I change Emacs's idea of the tab character's length?
1447
1448 Set the variable default-tab-width. For example, to set tab stops every
1449 10 characters, insert the following in your .emacs file:
1450
1451 (setq default-tab-width 10)
1452
1453 Do not confuse variable tab-width with variable tab-stop-list. The
1454 former is used for the display of literal tab characters. The latter
1455 controls what characters are inserted when you press the TAB character in
1456 certain modes.
1457
1458 54: How do I insert `>' at the beginning of every line?
1459
1460 To do this to an entire buffer, type "M-< M-x replace-regexp RET ^ RET >
1461 RET".
1462
1463 To do this to a region, use "string-rectangle" ("C-x r t"). Set the mark
1464 (`C-SPC') at the beginning of the first line you want to prefix, move the
1465 cursor to last line to be prefixed, and type "C-x r t > RET". To do this
1466 for the whole buffer, type "C-x h C-x r t > RET".
1467
1468 If you are trying to prefix a yanked mail message with '>', you might
1469 want to set the variable mail-yank-prefix. Better yet, get the Supercite
1470 package (see question 105), which provides flexible citation for yanked
1471 mail and news messages.
1472
1473 55: How do I insert "_^H" before each character in a region to get an
1474 underlined paragraph?
1475
1476 M-x underline-region.
1477
1478 56: How do I repeat a command as many times as possible?
1479
1480 Use "C-x (" and "C-x )" to make a keyboard macro that invokes the command
1481 and then type "M-0 C-x e".
1482
1483 WARNING: any messages your command prints in the echo area will be
1484 suppressed.
1485
1486 57: How do I make Emacs behave like this: when I go up or down, the cursor
1487 should stay in the same column even if the line is too short?
1488
1489 M-x picture-mode.
1490
1491 58: How do I tell Emacs to iconify itself?
1492
1493 "C-z" iconifies Emacs when running under X Windows and suspends Emacs
1494 otherwise. See "Misc X" in the on-line manual.
1495
1496 59: How do I use regexps (regular expressions) in Emacs?
1497
1498 See "Regexps" in the on-line manual.
1499
1500 WARNING: The "or" operator is `\|', not `|', and the grouping operators
1501 are `\(' and `\)'. Also, the string syntax for a backslash is `\\'. To
1502 specify a regular expression like xxx\(foo\|bar\) in a Lisp string, use
1503
1504 "xxx\\(foo\\|bar\\)"
1505
1506 Notice the doubled backslashes!
1507
1508 WARNING: Unlike in Unix grep, sed, etc., a complement character set
1509 ([^...]) can match a newline character (LFD aka C-j aka \n), unless
1510 newline is mentioned as one of the characters not to match.
1511
1512 WARNING: The character syntax regexps (e.g., "\sw") are not meaningful
1513 inside character set regexps (e.g., "[aeiou]"). (This is actually
1514 typical for regexp syntax.)
1515
1516 60: How do I perform a replace operation across more than one file?
1517
1518 The "tags" feature of Emacs includes the command tags-query-replace which
1519 performs a query-replace across all the files mentioned in the TAGS file.
1520 See "Tags Search" in the on-line manual.
1521
1522 As of Emacs 19.29, Dired mode ("M-x dired RET", or C-x d) supports the
1523 command dired-do-query-replace, which allows users to replace regular
1524 expressions in multiple files.
1525
1526 61: Where is the documentation for "etags"?
1527
1528 The "etags" man page should be in the same place as the "emacs" man page.
1529
1530 Quick command-line switch descriptions are also available. For example,
1531 "etags -H".
1532
1533 62: How do I disable backup files?
1534
1535 You probably don't want to do this, since backups are useful.
1536
1537 To avoid seeing backup files (and other "uninteresting" files) in Dired,
1538 load dired-x by adding the following to your .emacs file:
1539
1540 (add-hook 'dired-load-hook
1541 (function (lambda ()
1542 (load "dired-x"))))
1543
1544 With dired-x loaded, `M-o' toggles omitting in each dired buffer. You
1545 can make omitting the default for new dired buffers by putting the
1546 following in your .emacs:
1547
1548 (setq initial-dired-omit-files-p t)
1549
1550 If you're tired of seeing backup files whenever you do an "ls" at the
1551 Unix shell, try GNU ls with the "-B" option. GNU ls is part of the GNU
1552 fileutils package, available at mirrors of ftp.gnu.org (see question 92).
1553
1554 To disable or change how backups are made, see "Backup Names" in the
1555 on-line manual.
1556
1557 63: How do I disable auto-save-mode?
1558
1559 You probably don't want to do this, since auto-saving is useful,
1560 especially when Emacs or your computer crashes while you are editing a
1561 document.
1562
1563 Instead, you might want to change the variable auto-save-interval, which
1564 specifies how many keystrokes Emacs waits before auto-saving. Increasing
1565 this value forces Emacs to wait longer between auto-saves, which might
1566 annoy you less.
1567
1568 You might also want to look into Sebastian Kremer's auto-save package,
1569 available from the Lisp Code Archive (see question 90). This package
1570 also allows you to place all auto-save files in one directory, such as
1571 /tmp.
1572
1573 To disable or change how auto-save-mode works, see "Auto Save" in the
1574 on-line manual.
1575
1576 64: How can I create or modify new pull-down menu options?
1577
1578 Each menu title (e.g., Buffers, File, Edit) represents a local or global
1579 keymap. Selecting a menu title with the mouse displays that keymap's
1580 non-nil contents in the form of a menu.
1581
1582 So to add a menu option to an existing menu, all you have to do is add a
1583 new definition to the appropriate keymap. Adding a "forward word"
1584 command to the "Edit" menu thus requires the following Lisp code:
1585
1586 (define-key global-map
1587 [menu-bar edit forward]
1588 '("Forward word" . forward-word))
1589
1590 The first line adds the entry to the global keymap, which includes global
1591 menu bar entries. Replacing the reference to "global-map" with a local
1592 keymap would add this menu option only within a particular mode.
1593
1594 The second line describes the path from the menu-bar to the new entry.
1595 Placing this menu entry underneath the "File" menu would mean changing
1596 the word "edit" in the second line to "file."
1597
1598 The third line is a cons cell whose first element is the title that will
1599 be displayed, and whose second element is the function that will be
1600 called when that menu option is invoked.
1601
1602 To add a new menu, rather than a new option to an existing menu, we must
1603 define an entirely new keymap:
1604
1605 (define-key global-map [menu-bar words]
1606 (cons "Words" (make-sparse-keymap "Words")))
1607
1608 The above code creates a new sparse keymap, gives it the name "Words",
1609 and attaches it to the global menu bar. Adding the "forward word"
1610 command to this new menu would thus require the following code:
1611
1612 (define-key global-map
1613 [menu-bar words forward]
1614 '("Forward word" . forward-word))
1615
1616 Note that because of the way keymaps work, menu options are displayed
1617 with the more recently defined items at the top. Thus if you were to
1618 define menu options "foo", "bar", and "baz" (in that order), menu option
1619 "baz" would appear at the top, and "foo" would be at the bottom.
1620
1621 One way to avoid this problem is to use the function define-key-after,
1622 which works the same as define-key, but lets you modify where items
1623 appear. The following Lisp code would insert the "forward word" function
1624 in the "edit" menu immediately following the "undo" option:
1625
1626 (define-key-after
1627 (lookup-key global-map [menu-bar edit])
1628 [forward]
1629 '("Forward word" . forward-word)
1630 'undo)
1631
1632 Note how the second and third arguments to define-key-after are different
1633 from those of define-key, and that we have added a new (final) argument,
1634 the function after which our new key should be defined.
1635
1636 To move a menu option from one position to another, simply evaluate
1637 define-key-after with the appropriate final argument.
1638
1639 More detailed information -- and more examples of how to create and
1640 modify menu options -- are in the Emacs Lisp Reference Manual, under
1641 "Keymaps." (See question 16 for information on this manual.)
1642
1643 65: How do I delete menus and menu options?
1644
1645 The simplest way to remove a menu is to set its keymap to nil. For
1646 example, to delete the "Words" menu (from question 64), use:
1647
1648 (define-key global-map [menu-bar words] nil)
1649
1650 Similarly, removing a menu option requires redefining a keymap entry to
1651 nil. For example, to delete the "Forward word" menu option from the
1652 "Edit" menu (we added it in question 64), use:
1653
1654 (define-key global-map [menu-bar edit forward] nil)
1655
1656 66: How do I turn on syntax highlighting?
1657
1658 Font-lock mode is the standard way to have Emacs perform syntax
1659 highlighting. With font-lock mode invoked, different types of text will
1660 appear in different colors. For instance, if you turn on font-lock in a
1661 programming mode, variables will appear in one face, keywords in a
1662 second, and comments in a third.
1663
1664 Earlier versions of Emacs supported hilit19, a similar package. Use of
1665 hilit19 is now considered non-standard, although hilit19.el comes with
1666 the stock Emacs distribution. It is no longer maintained.
1667
1668 To turn font-lock mode on within an existing buffer, use "M-x
1669 font-lock-mode RET".
1670
1671 To automatically invoke font-lock mode when a particular major mode is
1672 invoked, set the major mode's hook. For example, to fontify all c-mode
1673 buffers, add the following to your .emacs file:
1674
1675 (add-hook 'c-mode-hook 'turn-on-font-lock)
1676
1677 To automatically invoke font-lock mode for all major modes, you can turn
1678 on global-font-lock mode by including the following line in your .emacs
1679 file:
1680
1681 (global-font-lock-mode 1)
1682
1683 This instructs Emacs to turn on font-lock mode in those buffers for which
1684 a font-lock mode definition has been provided (in the variable
1685 font-lock-global-modes). If you edit a file in pie-ala-mode, and no
1686 font-lock definitions have been provided for pie-ala files, then the
1687 above setting will have no effect on that particular buffer.
1688
1689 Highlighting with font-lock mode can take quite a while, and thus
1690 different levels of decoration are available, from slight to gaudy. To
1691 control how decorated your buffers should become, set the value of
1692 font-lock-maximum-decoration in your .emacs file, with a nil value
1693 indicating default (usually minimum) decoration, and a t value indicating
1694 the maximum decoration. For the gaudiest possible look, then, include
1695 the line
1696
1697 (setq font-lock-maximum-decoration t)
1698
1699 in your .emacs file. You can also set this variable such that different
1700 modes are highlighted in a different ways; for more information, see the
1701 documentation for font-lock-maximum-decoration with "C-h v" (or "M-x
1702 describe-variable RET").
1703
1704 You might also want to investigate fast-lock-mode and lazy-lock-mode,
1705 versions of font-lock-mode that speed up highlighting. The advantage of
1706 lazy-lock-mode is that it only fontifies buffers when certain conditions
1707 are met, such as after a certain amount of idle time, or after you have
1708 finished scrolling through text. See the documentation for
1709 lazy-lock-mode by typing C-h f lazy-lock-mode ("M-x describe-function RET
1710 lazy-lock-mode RET").
1711
1712 Also see the documentation for the function font-lock-mode, available by
1713 typing C-h f font-lock-mode ("M-x describe-function RET font-lock-mode
1714 RET").
1715
1716 For more information on font-lock mode, take a look at the font-lock mode
1717 FAQ, maintained by Jari Aalto <jari.aalto@ntc.nokia.com> at
1718
1719 ftp://cs.uta.fi/pub/ssjaaa/ema-font.gui
1720
1721 To print buffers with the faces (i.e., colors and fonts) intact, use
1722 "M-x ps-print-buffer-with-faces" or "M-x ps-print-region-with-faces".
1723
1724 67: How can I force Emacs to scroll only one line when I move past the
1725 bottom of the screen?
1726
1727 Place the following Lisp form in your .emacs file:
1728
1729 (setq scroll-step 1)
1730
1731 Also see "Scrolling" in the on-line manual.
1732
1733 68: How can I replace highlighted text with what I type?
1734
1735 Use delete-selection mode, which you can start automatically by placing
1736 the following Lisp form in your .emacs file:
1737
1738 (delete-selection-mode t)
1739
1740 According to the documentation string for delete-selection mode (which
1741 you can read using M-x describe-function RET delete-selection-mode RET):
1742
1743 When ON, typed text replaces the selection if the selection is active.
1744 When OFF, typed text is just inserted at point.
1745
1746 This mode also allows you to delete (not kill) the highlighted region by
1747 pressing DEL.
1748
1749 69: How can I edit MS-DOS files using Emacs?
1750
1751 As of Emacs 20, detection and handling of MS-DOS (and Windows) files is
1752 performed transparently. You can open MS-DOS files on a Unix system, edit
1753 it, and save it without having to worry about the file format.
1754
1755 When editing an MS-DOS style file, a backslash (\) will appear in the
1756 mode line.
1757
1758 If you are running an earlier version of Emacs, get crypt++ from the
1759 Emacs Lisp Archive (see question 90). Among other things, crypt++
1760 transparently modifies MS-DOS files as they are loaded and saved,
1761 allowing you to ignore the different conventions that Unix and MS-DOS
1762 have for delineating the end of a line.
1763
1764 70: How can I tell Emacs to fill paragraphs with a single space after
1765 each period?
1766
1767 Ulrich Mueller <ulm@vsnhd1.cern.ch> suggests adding the following two
1768 lines to your .emacs file:
1769
1770 (setq sentence-end "[.?!][]\"')}]*\\($\\|[ \t]\\)[ \t\n]*")
1771 (setq sentence-end-double-space nil)
1772
1773
1774 Bugs/Problems
1775
1776 71: Does Emacs have problems with files larger than 8 megabytes?
1777
1778 Old versions (i.e., anything before 19.29) of Emacs had problems editing
1779 files larger than 8 megabytes. As of version 19.29, the maximum buffer
1780 size is at least 2^27-1, or 134,217,727 bytes.
1781
1782 If you are using an older version of Emacs and cannot upgrade, you will
1783 have to recompile. Leonard N. Zubkoff <lnz@lucid.com> suggests putting
1784 the following two lines in src/config.h before compiling Emacs to allow
1785 for 26-bit integers and pointers (and thus file sizes of up to 33,554,431
1786 bytes):
1787
1788 #define VALBITS 26
1789 #define GCTYPEBITS 5
1790
1791 WARNING: This method may result in "ILLEGAL DATATYPE" and other random
1792 errors on some machines.
1793
1794 David Gillespie <daveg@csvax.cs.caltech.edu> explains how this problems
1795 crops up; while his numbers are true only for pre-19.29 versions of
1796 Emacs, the theory remains the same with current versions.
1797
1798 Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed
1799 language in the sense that you can put any value of any type into any
1800 variable, or return it from a function, and so on. So each value must
1801 carry a "tag" along with it identifying what kind of thing it is, e.g.,
1802 integer, pointer to a list, pointer to an editing buffer, and so on.
1803 Emacs uses standard 32-bit integers for data objects, taking the top 8
1804 bits for the tag and the bottom 24 bits for the value. So integers
1805 (and pointers) are somewhat restricted compared to true C integers and
1806 pointers.
1807
1808 72: How do I get rid of ^M or echoed commands in my shell buffer?
1809
1810 Try typing "M-x shell-strip-ctrl-m RET" while in shell-mode to make them
1811 go away. If that doesn't work, you have several options:
1812
1813 For tcsh, put this in your .cshrc (or .tcshrc) file:
1814
1815 if ($?EMACS) then
1816 if ("$EMACS" == t) then
1817 if ($?tcsh) unset edit
1818 stty nl
1819 endif
1820 endif
1821
1822 Or put this in your .emacs_tcsh file:
1823
1824 unset edit
1825 stty nl
1826
1827 Alternatively, use csh in your shell buffers instead of tcsh. One way
1828 is:
1829
1830 (setq explicit-shell-file-name "/bin/csh")
1831
1832 and another is to do this in your .cshrc (or .tcshrc) file:
1833
1834 setenv ESHELL /bin/csh
1835
1836 (You must start Emacs over again with the environment variable properly
1837 set for this to take effect.)
1838
1839 You can also set the ESHELL environment variable in Emacs Lisp with
1840 the following Lisp form,
1841
1842 (setenv "ESHELL" "/bin/csh")
1843
1844 On a related note: If your shell is echoing your input line in the shell
1845 buffer, you might want to try the following command in your shell
1846 start-up file:
1847
1848 stty -icrnl -onlcr -echo susp ^Z
1849
1850 73: Why do I get "Process shell exited abnormally with code 1"?
1851
1852 The most likely reason for this message is that the "env" program is not
1853 properly installed. Compile this program for your architecture, and
1854 install it with a+x permission in the architecture-dependent Emacs
1855 program directory. (You can find what this directory is at your site by
1856 inspecting the value of the variable exec-directory by typing "C-h v
1857 exec-directory RET".)
1858
1859 You should also check for other programs named "env" in your path (e.g.,
1860 SunOS has a program named /usr/bin/env). We don't understand why this
1861 can cause a failure and don't know a general solution for working around
1862 the problem in this case.
1863
1864 The "make clean" command will remove "env" and other vital programs, so
1865 be careful when using it.
1866
1867 It has been reported that this sometimes happened when Emacs was started
1868 as an X client from an xterm window (i.e., had a controlling tty) but the
1869 xterm was later terminated.
1870
1871 See also PROBLEMS (in the top-level directory when you unpack the Emacs
1872 source) for other possible causes of this message.
1873
1874 74: Where is the termcap/terminfo entry for terminal type "emacs"?
1875
1876 The termcap entry for terminal type "emacs" is ordinarily put in the
1877 TERMCAP environment variable of subshells. It may help in certain
1878 situations (e.g., using rlogin from shell buffer) to add an entry for
1879 "emacs" to the system-wide termcap file. Here is a correct termcap entry
1880 for "emacs":
1881
1882 emacs:tc=unknown:
1883
1884 To make a terminfo entry for "emacs", use "tic" or "captoinfo." You need
1885 to generate /usr/lib/terminfo/e/emacs. It may work to simply copy
1886 /usr/lib/terminfo/d/dumb to /usr/lib/terminfo/e/emacs.
1887
1888 Having a termcap/terminfo entry will not enable the use of full screen
1889 programs in shell buffers. Use M-x terminal-emulator for that instead.
1890
1891 A workaround to the problem of missing termcap/terminfo entries is to
1892 change terminal type "emacs" to type "dumb" or "unknown" in your shell
1893 start up file. "csh" users could put this in their .cshrc files:
1894
1895 if ("$term" == emacs) set term=dumb
1896
1897 75: Why does Emacs spontaneously start displaying "I-search:" and beeping?
1898
1899 Your terminal (or something between your terminal and the computer) is
1900 sending C-s and C-q for flow control, and Emacs is receiving these
1901 characters and interpreting them as commands. (The C-s character
1902 normally invokes the isearch-forward command.) For possible solutions,
1903 see question 122.
1904
1905 76: Why can't Emacs talk to certain hosts (or certain hostnames)?
1906
1907 The problem may be that Emacs is linked with a wimpier version of
1908 gethostbyname than the rest of the programs on the machine. This is
1909 often manifested as a message on startup of "X server not responding.
1910 Check your DISPLAY environment variable." or a message of "Unknown host"
1911 from open-network-stream.
1912
1913 On a Sun, this may be because Emacs had to be linked with the static C
1914 library. The version of gethostbyname in the static C library may only
1915 look in /etc/hosts and the NIS (YP) maps, while the version in the
1916 dynamic C library may be smart enough to check DNS in addition to or
1917 instead of NIS. On a Motorola Delta running System V R3.6, the version
1918 of gethostbyname in the standard library works, but the one that works
1919 with NIS doesn't (the one you get with -linet). Other operating systems
1920 have similar problems.
1921
1922 Try these options:
1923
1924 * Explicitly add the host you want to communicate with to /etc/hosts.
1925
1926 * Relink Emacs with this line in src/config.h:
1927
1928 #define LIBS_SYSTEM -lresolv
1929
1930 * Replace gethostbyname and friends in libc.a with more useful versions
1931 such as the ones in libresolv.a. Then relink Emacs.
1932
1933 * If you are actually running NIS, make sure that "ypbind" is properly
1934 told to do DNS lookups with the correct command line switch.
1935
1936 77: Why does Emacs say "Error in init file"?
1937
1938 An error occurred while loading either your .emacs file or the
1939 system-wide lisp/default.el file. For information on how to debug your
1940 .emacs file, see question 27.
1941
1942 It may be the case that you need to load some package first, or use a
1943 hook that will be evaluated after the package is loaded. A common case
1944 of this is explained in question 118.
1945
1946 78: Why does Emacs ignore my X resources (my .Xdefaults file)?
1947
1948 As of version 19, Emacs searches for X resources in the files specified
1949 by the XFILESEARCHPATH, XUSERFILESEARCHPATH, and XAPPLRESDIR environment
1950 variables, emulating the functionality provided by programs written using
1951 Xt.
1952
1953 XFILESEARCHPATH and XUSERFILESEARCHPATH should be a list of file names
1954 separated by colons; XAPPLRESDIR should be a list of directory names
1955 separated by colons.
1956
1957 Emacs searches for X resources
1958
1959 + specified on the command line, with the "-xrm RESOURCESTRING"
1960 option,
1961 + then in the value of the XENVIRONMENT environment variable,
1962 - or if that is unset, in the file named ~/.Xdefaults-HOSTNAME if it
1963 exists
1964 (where HOSTNAME is the hostname of the machine Emacs is running on),
1965 + then in the screen-specific and server-wide resource properties
1966 provided by the server,
1967 - or if those properties are unset, in the file named ~/.Xdefaults
1968 if it exists,
1969 + then in the files listed in XUSERFILESEARCHPATH,
1970 - or in files named LANG/Emacs in directories listed in XAPPLRESDIR
1971 (where LANG is the value of the LANG environment variable), if
1972 the LANG environment variable is set,
1973 - or in files named Emacs in the directories listed in XAPPLRESDIR
1974 - or in ~/LANG/Emacs (if the LANG environment variable is set),
1975 - or in ~/Emacs,
1976 + then in the files listed in XFILESEARCHPATH.
1977
1978 79: Why does Emacs take 20 seconds to visit a file?
1979
1980 Old versions of Emacs (i.e., versions before Emacs 20.x) often
1981 encountered this when the master lock file, "!!!SuperLock!!!" has been
1982 left in the lock directory somehow. Delete it.
1983
1984 Mark Meuer <meuer@geom.umn.edu> says that NeXT NFS has a bug where an
1985 exclusive create succeeds but returns an error status. This can cause
1986 the same problem. Since Emacs's file locking doesn't work over NFS
1987 anyway, the best solution is to recompile Emacs with CLASH_DETECTION
1988 undefined.
1989
1990 80: How do I edit a file with a `$' in its name?
1991
1992 When entering a filename in the minibuffer, Emacs will attempt to expand
1993 a `$' followed by a word as an environment variable. To suppress this
1994 behavior, type "$$" instead.
1995
1996 81: Why does shell mode lose track of the shell's current directory?
1997
1998 Emacs has no way of knowing when the shell actually changes its
1999 directory. This is an intrinsic limitation of Unix. So it tries to
2000 guess by recognizing "cd" commands. If you type "cd" followed by a
2001 directory name with a variable reference ("cd $HOME/bin") or with a shell
2002 metacharacter ("cd ../lib*"), Emacs will fail to correctly guess the
2003 shell's new current directory. A huge variety of fixes and enhancements
2004 to shell mode for this problem have been written to handle this problem.
2005 Check the Lisp Code Directory (see question 89).
2006
2007 You can tell Emacs the shell's current directory with the command "M-x
2008 dirs".
2009
2010 82: Are there any security risks in Emacs?
2011
2012 * the "movemail" incident (No, this is not a risk.)
2013
2014 In his book "The Cuckoo's Egg," Cliff Stoll describes this in chapter
2015 4. The site at LBL had installed the "etc/movemail" program setuid
2016 root. (As of version 19, movemail is in your architecture-specific
2017 directory; type "C-h v exec-directory RET" to see what it is.) Since
2018 "movemail" had not been designed for this situation, a security hole
2019 was created and users could get root privileges.
2020
2021 "movemail" has since been changed so that this security hole will not
2022 exist, even if it is installed setuid root. However, movemail no
2023 longer needs to be installed setuid root, which should eliminate this
2024 particular risk.
2025
2026 We have heard unverified reports that the 1988 Internet worm took
2027 advantage of this configuration problem.
2028
2029 * the file-local-variable feature (Yes, a risk, but easy to change.)
2030
2031 There is an Emacs feature that allows the setting of local values for
2032 variables when editing a file by including specially formatted text
2033 near the end of the file. This feature also includes the ability to
2034 have arbitrary Emacs Lisp code evaluated when the file is visited.
2035 Obviously, there is a potential for Trojan horses to exploit this
2036 feature.
2037
2038 Emacs 18 allowed this feature by default; users could disable it by
2039 setting the variable inhibit-local-variables to a non-nil value.
2040
2041 As of Emacs 19, Emacs has a list of local variables that create a
2042 security risk. If a file tries to set one of them, it asks the user to
2043 confirm whether the variables should be set. You can also tell Emacs
2044 whether to allow the evaluation of Emacs Lisp code found at the bottom
2045 of files by setting the variable enable-local-eval.
2046
2047 For more information, see "File Variables" in the on-line manual.
2048
2049 * synthetic X events (Yes, a risk; use MIT-MAGIC-COOKIE-1 or better.)
2050
2051 Emacs accepts synthetic X events generated by the SendEvent request as
2052 though they were regular events. As a result, if you are using the
2053 trivial host-based authentication, other users who can open X
2054 connections to your X workstation can make your Emacs process do
2055 anything, including run other processes with your privileges.
2056
2057 The only fix for this is to prevent other users from being able to open
2058 X connections. The standard way to prevent this is to use a real
2059 authentication mechanism, such as MIT-MAGIC-COOKIE-1. If using the
2060 "xauth" program has any effect, then you are probably using
2061 MIT-MAGIC-COOKIE-1. Your site may be using a superior authentication
2062 method; ask your system administrator.
2063
2064 If real authentication is not a possibility, you may be satisfied by
2065 just allowing hosts access for brief intervals while you start your X
2066 programs, then removing the access. This reduces the risk somewhat by
2067 narrowing the time window when hostile users would have access, but
2068 DOES NOT ELIMINATE THE RISK.
2069
2070 On most computers running Unix and X Windows, you enable and disable
2071 access using the "xhost" command. To allow all hosts access to your X
2072 server, use
2073
2074 xhost +
2075
2076 at the shell prompt, which (on an HP machine, at least) produces the
2077 following message:
2078
2079 access control disabled, clients can connect from any host
2080
2081 To deny all hosts access to your X server (except those explicitly
2082 allowed by name), use
2083
2084 xhost -
2085
2086 On the test HP computer, this command generated the following message:
2087
2088 access control enabled, only authorized clients can connect
2089
2090 83: Dired says, "no file on this line" when I try to do something.
2091
2092 Chances are you're using a localized version of Unix that doesn't
2093 use US date format in dired listings. You can check this by looking
2094 at dired listings or by typing `ls -l' to a shell and looking at the
2095 dates that come out.
2096
2097 Dired uses a regular expression to find the beginning of a file
2098 name. In a long Unix-style directory listing ("ls -l"), the file
2099 name starts after the date. The regexp has thus been written to
2100 look for the date, the format of which can vary on non-US systems.
2101
2102 There are two approaches to solving this. The first one involves
2103 setting things up so that "ls -l" outputs US date format. This can
2104 be done by setting the locale. See your OS manual for more
2105 information.
2106
2107 The second approach involves changing the regular expression used by
2108 dired, dired-move-to-filename-regexp.
2109
2110
2111 Difficulties Building/Installing/Porting Emacs
2112
2113 84: How do I install Emacs?
2114
2115 This answer is meant for users of Unix and Unix-like systems. Users of
2116 other operating systems should see the series of questions beginning with
2117 question 94, which describe where to get non-Unix source and binaries.
2118 These packages should come with installation instructions.
2119
2120 For Unix and Unix-like systems, the easiest way is often to compile it
2121 from scratch. You will need:
2122
2123 * Emacs sources. See question 92 for a list of ftp sites that make them
2124 available. On ftp.gnu.org, the main GNU distribution site, sources are
2125 available at
2126
2127 ftp://ftp.gnu.org/pub/gnu/emacs-20.3.tar.gz
2128
2129 The above will obviously change as new versions of Emacs come out. For
2130 instance, when Emacs 20.4 is released, it will most probably be
2131 available at
2132
2133 ftp://ftp.gnu.org/pub/gnu/emacs-20.4.tar.gz
2134
2135 Again, you should use one of the mirror sites in question 92 (and
2136 adjust the URL accordingly) so as to reduce load on ftp.gnu.org.
2137
2138 * Gzip, the GNU compression utility. You can get gzip via anonymous ftp
2139 at mirrors of ftp.gnu.org sites; it should compile and install without
2140 much trouble on most systems. Once you have retrieved the Emacs
2141 sources, you will probably be able to uncompress them with the command
2142
2143 gunzip --verbose emacs-20.3.tar.gz
2144
2145 changing the Emacs version (20.3), as necessary. Once gunzip has
2146 finished doing its job, a file by the name of "emacs-20.3.tar" should
2147 be in your build directory.
2148
2149 * Tar, the "tape archiving" program, which moves multiple files into and
2150 out of archive files, or "tarfiles." All of the files comprising the
2151 Emacs source come in a single tarfile, and must be extracted using tar
2152 before you can build Emacs. Typically, the extraction command would
2153 look like
2154
2155 tar -xvvf emacs-20.3.tar
2156
2157 The `x' indicates that we want to extract files from this tarfile, the
2158 two `v's force verbose output, and the `f' tells tar to use a disk
2159 file, rather than one on tape.
2160
2161 If you're using GNU tar (available at mirrors of ftp.gnu.org), you can
2162 combine this step and the previous one by using the command
2163
2164 tar -zxvvf emacs-20.3.tar.gz
2165
2166 The additional `z' at the beginning of the options list tells GNU tar
2167 to uncompress the file with gunzip before extracting the tarfile's
2168 components.
2169
2170 At this point, the Emacs sources (all 25+ megabytes of them) should be
2171 sitting in a directory called "emacs-20.3". On most common Unix and
2172 Unix-like systems, you should be able to compile Emacs (with X Windows
2173 support) with the following commands:
2174
2175 cd emacs-20.3 [ change directory to emacs-20.3 ]
2176 ./configure [ configure Emacs for your particular system ]
2177 make [ use Makefile to build components, then Emacs ]
2178
2179 If the "make" completes successfully, the odds are fairly good that the
2180 build has gone well. (See question 86 if you weren't successful.)
2181
2182 To install Emacs in its default directories of /usr/local/bin (binaries),
2183 /usr/local/share/emacs/20.xx (Lisp code and support files), and
2184 /usr/local/info (Info documentation), become the super-user and type
2185
2186 make install
2187
2188 Note that "make install" will overwrite /usr/local/bin/emacs and any
2189 Emacs Info files that might be in /usr/local/info.
2190
2191 Much more verbose instructions (with many more hints and suggestions)
2192 come with the Emacs sources, in the file "INSTALL".
2193
2194 85: How do I update Emacs to the latest version?
2195
2196 Follow the instructions in question 84.
2197
2198 Emacs places nearly everything in version-specific directories (e.g.,
2199 /usr/local/share/emacs/20.3), so the only files that can be overwritten
2200 when installing a new release are /usr/local/bin/emacs and the Emacs Info
2201 documentation in /usr/local/info. Back up these files before you install
2202 a new release, and you shouldn't have too much trouble.
2203
2204 86: What should I do if I have trouble building Emacs?
2205
2206 First look in the file PROBLEMS (in the top-level directory when you
2207 unpack the Emacs source) to see if there is already a solution for your
2208 problem. Next, look for other questions in this FAQ that have to do with
2209 Emacs installation and compilation problems.
2210
2211 If you'd like to have someone look at your problem and help solve it, see
2212 question 21.
2213
2214 If you don't find a solution, then report your problem via e-mail to
2215 bug-gnu-emacs@gnu.org. Please do not post it to gnu.emacs.help
2216 or e-mail it to help-gnu-emacs@gnu.org. For further guidelines,
2217 see question 8 and question 10.
2218
2219 87: Why does linking Emacs with -lX11 fail?
2220
2221 Emacs needs to be linked with the static version of the X11 library,
2222 libX11.a. This may be missing.
2223
2224 Under OpenWindows, you may need to use "add_services" to add the
2225 "OpenWindows Programmers" optional software category from the CD-ROM.
2226
2227 Under HP-UX 8.0, you may need to run "update" again to load the X11-PRG
2228 "fileset". This may be missing even if you specified "all filesets" the
2229 first time. If libcurses.a is missing, you may need to load the
2230 "Berkeley Development Option."
2231
2232 David Zuhn <zoo@armadillo.com> says that MIT X builds shared libraries by
2233 default, and only shared libraries, on those platforms that support them.
2234 These shared libraries can't be used when undumping temacs (the last
2235 stage of the Emacs build process). To get regular libraries in addition
2236 to shared libraries, add this to site.cf:
2237
2238 #define ForceNormalLib YES
2239
2240 Other systems may have similar problems. You can always define
2241 CANNOT_DUMP and link with the shared libraries instead.
2242
2243 To get the Xmenu stuff to work, you need to find a copy of MIT's
2244 liboldX.a.
2245
2246
2247 Finding/Getting Emacs and Related Packages
2248
2249 88: Where can I get Emacs on the net (or by snail mail)?
2250
2251 Look in the files etc/DISTRIB and etc/FTP for information on nearby
2252 archive sites and etc/ORDERS for mail orders. If you don't already have
2253 Emacs, see question 20 for how to get these files.
2254
2255 See question 84 for information on how to obtain and build the latest
2256 version of Emacs, and question 92 for a list of archive sites that make
2257 GNU software available.
2258
2259 89: How do I find a Emacs Lisp package that does XXX?
2260
2261 First of all, you should check to make sure that the package isn't
2262 already available. For example, typing "M-x apropos RET wordstar RET"
2263 lists all functions and variables containing the string "wordstar".
2264
2265 It is also possible that the package is on your system, but has not been
2266 loaded. To see which packages are available for loading, look through
2267 your computer's lisp directory (see question 4). The Lisp source to most
2268 most packages contains a short description of how they should be loaded,
2269 invoked, and configured -- so before you use or modify a Lisp package,
2270 see if the author has provided any hints in the source code.
2271
2272 If a package does not come with Emacs, check the Lisp Code Directory,
2273 maintained by Dave Brennan <brennan@hal.com>. The directory is contained
2274 in the file LCD-datafile.Z, available from the Emacs Lisp Archive (see
2275 question 90), and is accessed using the "lispdir" package, available from
2276 the same site. Note that lispdir.el requires crypt++, which you can grab
2277 from the Emacs Lisp Archive's "misc" subdirectory when you get
2278 lispdir.el.
2279
2280 Once you have installed lispdir.el and LCD-datafile, you can use "M-x
2281 lisp-dir-apropos" to search the listing. For example, "M-x
2282 lisp-dir-apropos RET ange-ftp RET" produces this output:
2283
2284 GNU Emacs Lisp Code Directory Apropos -- "ange-ftp"
2285 "~/" refers to archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/
2286
2287 ange-ftp (4.18) 15-Jul-1992
2288 Andy Norman, <ange@hplb.hpl.hp.com>
2289 ~/packages/ange-ftp.tar.Z
2290 transparent FTP Support for GNU Emacs
2291 auto-save (1.19) 01-May-1992
2292 Sebastian Kremer, <sk@thp.uni-koeln.de>
2293 ~/misc/auto-save.el.Z
2294 Safer autosaving with support for ange-ftp and /tmp
2295 ftp-quik (1.0) 28-Jul-1993
2296 Terrence Brannon, <tb06@pl122f.eecs.lehigh.edu>
2297 ~/modes/ftp-quik.el.Z
2298 Quik access to dired'ing of ange-ftp and normal paths
2299
2300 You actually don't need the directory file LCD-datafile if your computer
2301 is on the Internet, since the latest version is retrieved automatically
2302 the first time you type "M-x lisp-dir-apropos" in a particular Emacs
2303 session. If you would prefer to use a local copy of LCD-datafile, be
2304 sure to set the variable lisp-code-directory at the top of the lispdir.el
2305 source code.
2306
2307 A searchable version of the LCD is also available at
2308
2309 http://www.cs.indiana.edu/LCD/cover.html
2310
2311 90: Where can I get Emacs Lisp packages that don't come with Emacs?
2312
2313 First, check the Lisp Code Directory to find the name of the package you
2314 are looking for (see question 89). Next, check local archives and the
2315 Emacs Lisp Archive to find a copy of the relevant files. If you still
2316 haven't found it, you can send e-mail to the author asking for a copy.
2317 If you find Emacs Lisp code that doesn't appear in the LCD, please submit
2318 a copy to the LCD (see question 91).
2319
2320 You can access the Emacs Lisp Archive at the following sites:
2321
2322 ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/
2323 ftp://calypso-2.oit.unc.edu/pub/gnu/elisp-archive/
2324 ftp://faui43.informatik.uni-erlangen.de/pub/gnu/elisp-archive/
2325 ftp://ftp.cs.umn.edu/pub/elisp-archive/
2326 ftp://ftp.diku.dk/pub/elisp-archive/
2327 ftp://ftp.uni-mainz.de/pub/gnu/elisp-archive/
2328 ftp://ftp.uu.net/packages/gnu/emacs-lisp/
2329 ftp://gatekeeper.dec.com/pub/GNU/elisp-archive/
2330 ftp://nic.funet.fi/pub/gnu/emacs/elisp-archive/
2331 ftp://nic.switch.ch/mirror/elisp-archive/
2332 ftp://quepasa.cs.tu-berlin.de/pub/gnu/elisp/
2333 ftp://src.doc.ic.ac.uk/gnu/EmacsBits/elisp-archive/
2334
2335 Retrieve and read the file README first.
2336
2337 NOTE: * The archive maintainers do not have time to answer individual
2338 requests for packages or the list of packages in the archive. If
2339 you cannot use FTP or UUCP to access the archive yourself, try to
2340 find a friend who can, but please don't ask the maintainers.
2341
2342 * Any files with names ending in ".Z", ".z", or ".gz" are
2343 compressed, so you should use "binary" mode in FTP to retrieve
2344 them. You should also use binary mode whenever you retrieve any
2345 files with names ending in ".elc".
2346
2347 91: How do I submit code to the Emacs Lisp Archive?
2348
2349 Guidelines and procedures for submission to the archive can be found in
2350 the file GUIDELINES in the archive directory (see question 90). It
2351 covers documentation, copyrights, packaging, submission, and the Lisp
2352 Code Directory Record. Anonymous FTP uploads are not permitted.
2353 Instead, all submissions are mailed to elisp-archive@cis.ohio-state.edu.
2354 The lispdir.el package has a function named submit-lcd-entry which will
2355 help you with this.
2356
2357 92: Where can I get other up-to-date GNU stuff?
2358
2359 The most up-to-date official GNU software is normally kept on
2360 ftp.gnu.org and is available at
2361
2362 ftp://ftp.gnu.org/pub/gnu
2363
2364 Read the files etc/DISTRIB and etc/FTP for more information.
2365
2366 The following sites are all mirror images of the GNU distribution area:
2367
2368 ASIA: ftp://cair.kaist.ac.kr/pub/gnu,
2369 ftp://ftp.nectec.or.th/pub/mirrors/gnu,
2370 ftp://utsun.s.u-tokyo.ac.jp/ftpsync/prep,
2371 ftp://ftp.cs.titech.ac.jp/pub/gnu
2372
2373 AUSTRALIA: ftp://archie.au/gnu (archie.oz or archie.oz.au for ACSnet)
2374
2375 AFRICA: ftp://ftp.sun.ac.za/pub/gnu
2376
2377 EUROPE: ftp://ftp.denet.dk/pub/gnu,
2378 ftp://ftp.funet.fi/pub/gnu,
2379 ftp://ftp.informatik.rwth-aachen.de/pub/gnu,
2380 ftp://ftp.informatik.tu-muenchen.de/pub/comp/gnu,
2381 ftp://ftp.luth.se/pub/unix/gnu,
2382 ftp://ftp.stacken.kth.se/pub/gnu,
2383 ftp://ftp.win.tue.nl/pub/gnu,
2384 ftp://isy.liu.se/pub/gnu,
2385 ftp://nic.switch.ch/mirror/gnu,
2386 ftp://archive.eu.net/pub/gnu,
2387 ftp://ftp.eunet.ch/software/gnu,
2388 ftp://ftp.ieunet.ie/pub/gnu,
2389 ftp://ftp.mcc.ac.uk/pub/gnu,
2390 ftp://ftp.sunet.se:/pub/gnu,
2391 ftp://ftp.univ-lyon1.fr/pub/gnu,
2392 ftp://irisa.irisa.fr/pub/gnu,
2393 ftp://src.doc.ic.ac.uk/gnu,
2394 ftp://unix.hensa.ac.uk/pub/uunet/systems/gnu
2395
2396 SOUTH AMERICA: ftp.unicamp.br:/pub/gnu
2397
2398 WESTERN CANADA: ftp.cs.ubc.ca:/mirror2/gnu
2399
2400 USA: ftp://col.hp.com/mirrors/gnu,
2401 ftp://f.ms.uky.edu/pub3/gnu,
2402 ftp://ftp.cs.columbia.edu/archives/gnu/prep,
2403 ftp://ftp.digex.net/pub/gnu,
2404 ftp://ftp.hawaii.edu/mirrors/gnu,
2405 ftp://ftp.kpc.com/pub/mirror/gnu,
2406 ftp://ftp.uu.net/systems/gnu,
2407 ftp://gatekeeper.dec.com/pub/GNU,
2408 ftp://jaguar.utah.edu/gnustuff,
2409 ftp://labrea.stanford.edu/pub/gnu,
2410 ftp://mrcnext.cso.uiuc.edu/pub/gnu,
2411 ftp://vixen.cso.uiuc.edu/gnu,
2412 ftp://wuarchive.wustl.edu/systems/gnu
2413
2414 The directory at ftp.uu.net is a mirror of ftp.gnu.org except that files
2415 larger than one megabyte are split into multiple parts. If you have
2416 trouble transferring large files, you should try that site. A file
2417 normally named "XXX" is split into files XXX-split/part[0-9][0-9], and
2418 there will be a file named XXX-split/README which contains the list of
2419 parts (especially helpful when FTP-ing by e-mail), their checksums, and
2420 reassembly instructions.
2421
2422 93: What is the difference between Emacs and XEmacs (formerly "Lucid
2423 Emacs")?
2424
2425 First of all, they're both GNU Emacs. XEmacs is just as much a later
2426 version of GNU Emacs as the FSF-distributed version. This FAQ refers to
2427 the latest version to be distributed by the FSF as "Emacs," partly
2428 because the XEmacs maintainers now refer to their product using the
2429 "XEmacs" name, and partly because there isn't any accurate way to
2430 differentiate between the two without getting mired in paragraphs of
2431 legalese and history.
2432
2433 XEmacs, which began life as Lucid Emacs, is based on an early version of
2434 Emacs 19 and Epoch, an X-aware version of Emacs 18.
2435
2436 Emacs (i.e., the version distributed by the FSF) has a larger installed
2437 base, while XEmacs can do some clever tricks with X Windows, such as
2438 putting arbitrary graphics in a buffer. Emacs and XEmacs each come with
2439 Lisp packages that are lacking in the other; RMS says that the FSF would
2440 include more packages that come with XEmacs, but that the XEmacs
2441 maintainers don't always keep track of the authors of contributed code,
2442 which makes it impossible for the FSF to have certain legal papers
2443 signed. (Without these legal papers, the FSF will not distribute Lisp
2444 packages with Emacs.)
2445
2446 Many XEmacs features have found their way into recent versions of Emacs,
2447 and more features can be expected in the future, but there are still many
2448 differences between the two.
2449
2450 The latest version of XEmacs as of this writing is 20.4; you can get it
2451 at
2452
2453 ftp://ftp.xemacs.org/pub/xemacs/xemacs-20.4.tar.gz
2454
2455 More information about XEmacs, including a list of frequently asked
2456 questions (FAQ), is available at
2457
2458 http://www.xemacs.org/
2459
2460 94: Where can I get Emacs for my PC running MS-DOS?
2461
2462 A pre-built binary distribution of Emacs is available from the Simtel
2463 archives. This version apparently works under MS-DOS and Windows (3.x,
2464 95, and NT) and supports long file names. More information is availble
2465 from:
2466
2467 ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/emacs.README
2468
2469 And the binary itself is available in the files
2470
2471 ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/em1934*.zip
2472
2473 where * indicates that you should retrieve all of the files beginning
2474 with "em1934" and ending with "zip".
2475
2476 If you prefer to compile Emacs for yourself, you will need a 386 (or
2477 better) processor, and are running MS-DOS 3.0 or later. According to Eli
2478 Zaretskii <eliz@is.elta.co.il> and Darrel Hankerson
2479 <hankedr@dms.auburn.edu>, you will need the following:
2480
2481 Compiler: djgpp version 1.12 maint 1 or later. Djgpp 2.0 or later is
2482 recommended, since 1.x is being phased out. Djgpp 2 supports
2483 long filenames under Windows 95.
2484
2485 You can get the latest release of djgpp by retrieving
2486 all of the files in
2487
2488 ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp
2489
2490 Gunzip and tar:
2491
2492 The easiest way is to use "djtar" which comes with djgpp v2.x,
2493 because it can open gzip'ed tarfiles (i.e., those ending with
2494 ".tar.gz") in one step. Djtar comes in "djdev201.zip", from
2495 the URL mentioned above.
2496
2497 Utilities: make, mv, sed, rm.
2498
2499 All of these utilities are available at
2500
2501 ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu
2502
2503 16-bit utilities can be found in GNUish:
2504
2505 ftp://ftp.simtel.net/pub/simtelnet/gnu/gnuish
2506
2507 The files INSTALL and PROBLEMS in the top-level directory of the Emacs
2508 source contains some additional information regarding Emacs under MS-DOS.
2509
2510 For a list of other MS-DOS implementations of Emacs (and Emacs
2511 look-alikes), consult the list of "Emacs implementations and literature,"
2512 available at
2513
2514 ftp://rtfm.mit.edu/pub/usenet/comp.emacs/
2515
2516 Note that while many of these programs look similar to Emacs, they often
2517 lack certain features, such as the Emacs Lisp extension language.
2518
2519 95: Where can I get Emacs for Microsoft Windows, Windows '95, or Windows
2520 NT?
2521
2522 For information on Emacs for Windows 95 and NT, read the FAQ produced by
2523 Geoff Voelker <voelker@cs.washington.edu>, available at
2524
2525 http://www.cs.washington.edu/homes/voelker/ntemacs.html
2526
2527 For Windows 3.1, see question 94.
2528
2529 96: Where can I get Emacs for my PC running OS/2?
2530
2531 Emacs 19.33 is ported for emx on OS/2 2.0 or 2.1, and is available at:
2532
2533 ftp://hobbes.nmsu.edu/os2/unix/apps/emacs/v.19.33/
2534
2535 97: Where can I get Emacs for my Atari ST?
2536
2537 Roland Schäuble reports that Emacs 18.58 running on plain TOS and MiNT
2538 is available at
2539
2540 ftp://atari.archive.umich.edu/Editors/Emacs-18-58/1858b-d3.zoo
2541
2542 98: Where can I get Emacs for my Amiga?
2543
2544 The files you need are available at
2545
2546 ftp://ftp.wustl.edu/pub/aminet/util/gnu/
2547
2548 David Gilbert <dgilbert@gamiga.guelphnet.dweomer.org> has released a beta
2549 version of Emacs 19.25 for the Amiga. You can get the binary at
2550
2551 ftp://ftp.wustl.edu/pub/aminet/util/gnu/a2.0bEmacs-bin.lha
2552
2553 99: Where can I get Emacs for NeXTSTEP?
2554
2555 Emacs.app is a NeXTSTEP version of Emacs 19.34 which supports colors,
2556 menus, and multiple frames. You can get it from
2557
2558 ftp://next-ftp.peak.org/pub/next/apps/emacs/Emacs_for_NeXTstep.4.20a1.NIHS.b.tar.gz
2559
2560 100: Where can I get Emacs for my Apple computer?
2561
2562 An unofficial port of GNU Emacs 18.59 to the Macintosh is available at a
2563 number of ftp sites, the home being
2564
2565 ftp://ftp.cs.cornell.edu/pub/parmet/Emacs-1.17.sit.bin
2566
2567 To the best of our knowledge, Emacs 19 has not been ported to the
2568 Macintosh.
2569
2570 Apple's forthcoming "OS X" is based largely on NeXTSTEP and OpenStep.
2571 See question 99 for more details about that version.
2572
2573 101: Where do I get Emacs that runs on VMS under DECwindows?
2574
2575 Up-to-date information about GNU software (including Emacs) for VMS is
2576 available at
2577
2578 http://vms.gnu.org/
2579
2580 102: Where can I get modes for Lex, Yacc/Bison, Bourne shell, Csh, C++,
2581 Objective-C, Pascal, Java, and Awk?
2582
2583 Most of these modes are now available in standard Emacs distribution. To
2584 get additional modes, look in the Lisp Code Directory (see question 89).
2585 For C++, if you use lisp-dir-apropos, you must specify the pattern like
2586 this:
2587
2588 M-x lisp-dir-apropos RET c\+\+ RET
2589
2590 Note that Barry Warsaw's cc-mode now works for C, C++, Objective-C, and
2591 Java code. You can get the latest version from the Emacs Lisp Archive;
2592 see question 90 for details. A FAQ for cc-mode is available at
2593
2594 http://www.python.org/ftp/emacs/cc-mode.html/Top.html
2595
2596 103: What is the IP address of XXX.YYY.ZZZ?
2597
2598 If you are on a Unix machine, try using the "nslookup" command, included
2599 in the Berkeley BIND package. For example, to find the IP address of
2600 "ftp.gnu.org", you would type
2601
2602 nslookup ftp.gnu.org
2603
2604 Your computer should then provide the IP address of that computer.
2605
2606 If your site's nameserver is deficient, you can use IP addresses to FTP
2607 files. You can get this information by
2608
2609 * E-mail:
2610
2611 To: dns@[134.214.84.25] (to grasp.insa-lyon.fr)
2612 Body: ip XXX.YYY.ZZZ (or "help" for more information
2613 and options - no quotes)
2614 or:
2615
2616 To: resolve@[147.31.254.130] (to laverne.cs.widener.edu)
2617 Body: site XXX.YYY.ZZZ
2618
2619
2620 Major Emacs Lisp Packages, Emacs Extensions, and Related Programs
2621
2622 104: VM (View Mail) -- another mail reader within Emacs, with MIME support
2623
2624 Author: Kyle Jones <kyle@uunet.uu.net>
2625 Latest version: 6.62
2626 Anonymous FTP:
2627 ftp://ftp.uu.net/networking/mail/vm/vm.tar.gz
2628 Newsgroups and mailing lists:
2629 Informational newsgroup/mailing list:
2630 gnu.emacs.vm.info (newsgroup)
2631 info-vm-request@uunet.uu.net (for subscriptions)
2632 info-vm@uunet.uu.net (for submissions)
2633 Bug reports newsgroup/mailing list:
2634 gnu.emacs.vm.bug (newsgroup)
2635 bug-vm-request@uunet.uu.net (for subscriptions)
2636 bug-vm@uunet.uu.net (for submissions)
2637 NOTE: VM 6 is not guaranteed to work under Emacs 20 (although many people
2638 seem to use it without too much trouble). Users of Emacs 20 might prefer
2639 to use VM 5.97, available from the same FTP site.
2640
2641 105: Supercite -- mail and news citation package within Emacs
2642
2643 Author: Barry Warsaw <bwarsaw@cen.com>
2644 Latest version: 3.1 (comes with Emacs 20)
2645
2646 World Wide Web:
2647 http://www.python.org/emacs/supercite.tar.gz
2648 Mailing list:
2649 supercite-request@python.org (for subscriptions)
2650 supercite@python.org (for submissions)
2651 NOTE: Superyank is an old version of Supercite.
2652
2653 106: Calc -- poor man's Mathematica within Emacs
2654
2655 Author: Dave Gillespie <daveg@csvax.cs.caltech.edu>
2656 Latest version: 2.02f
2657 Anonymous FTP:
2658 ftp://ftp.gnu.org/pub/gnu/calc-2.02f.tar.gz
2659 NOTE: Unlike Wolfram Research, Dave has never threatened to sue
2660 anyone for having a program with a similar command language to
2661 Calc. :-)
2662
2663 107: VIPER -- vi emulation for Emacs
2664
2665 Since Emacs 19.29, the preferred vi emulation in Emacs is VIPER (M-x
2666 viper-mode RET), which comes with Emacs. It extends and supersedes VIP
2667 (including VIP 4.3) and provides vi emulation at several levels, from one
2668 that closely follows vi to one that departs from vi in several
2669 significant ways.
2670
2671 For Emacs 19.28 and earlier, the following version of VIP is generally
2672 better than the one distributed with Emacs:
2673
2674 Author: Aamod Sane <sane@cs.uiuc.edu>
2675 Latest version: 4.3
2676 Anonymous FTP:
2677 ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/modes/vip-mode.tar.Z
2678
2679 108: AUC TeX -- enhanced LaTeX mode with debugging facilities
2680
2681 Authors: Kresten Krab Thorup <krab@iesd.auc.dk>
2682 and Per Abrahamsen <abraham@iesd.auc.dk>
2683 Latest version: 9.8l
2684 Anonymous FTP:
2685 ftp://sunsite.auc.dk/packages/auctex/auctex.tar.gz
2686 Mailing list:
2687 auc-tex-request@iesd.auc.dk (for subscriptions)
2688 auc-tex@iesd.auc.dk (for submissions)
2689 auc-tex_mgr@iesd.auc.dk (auc-tex development team)
2690 World Wide Web:
2691 http://www.iesd.auc.dk/~amanda/auctex/
2692
2693 109: BBDB -- personal Info Rolodex integrated with mail/news readers
2694
2695 Maintainer: Matt Simmons <simmonmt@acm.org>
2696 Latest released version: 2.00
2697 Available from:
2698 http://www.netcom.com/~simmonmt/bbdb/index.html
2699 Mailing lists:
2700 info-bbdb-request@xemacs.org (for subscriptions)
2701 info-bbdb@xemacs.org (for submissions)
2702 bbdb-announce-request@xemacs.org (to be informed of new releases)
2703
2704 110: Ispell -- spell checker in C with interface for Emacs
2705
2706 Author: Geoff Kuenning <geoff@itcorp.com>
2707 Latest released version: 3.1.20
2708 Anonymous FTP:
2709 Master Sites:
2710 ftp://ftp.cs.ucla.edu/pub/ispell/ispell-3.1.20.tar.gz
2711 Known Mirror Sites:
2712 ftp://ftp.th-darmstadt.de/pub/dicts/ispell/
2713 ftp://ftp.nl.net/pub/textproc/ispell/
2714 World Wide Web:
2715 http://fmg-www.cs.ucla.edu/geoff/ispell.html
2716
2717 NOTE: * Do not ask Geoff to send you the latest version of Ispell.
2718 He does not have free e-mail.
2719
2720 * This Ispell program is distinct from GNU Ispell 4.0. GNU
2721 Ispell 4.0 is no longer a supported product.
2722
2723 111: W3-mode -- A World Wide Web browser inside of Emacs
2724
2725 Author: Bill Perry <wmperry@spry.com>
2726 Latest version: 4.0pre.23
2727 Anonymous FTP:
2728 ftp://ftp.cs.indiana.edu/pub/elisp/w3/.betas/w3.tar.gz
2729 Mailing lists:
2730 w3-announce-request@indiana.edu (to get announcements of new versions)
2731 w3-beta-request@indiana.edu (for beta-testers of new versions)
2732 w3-dev@indiana.edu (for developers of W3)
2733
2734 112: EDB -- Database program for Emacs; replaces forms editing modes
2735
2736 Author: Michael Ernst <mernst@theory.lcs.mit.edu>
2737 Latest version: 1.21
2738 Anonymous FTP:
2739 ftp://theory.lcs.mit.edu/pub/emacs/edb
2740
2741 113: Mailcrypt -- PGP interface within Emacs mail and news
2742
2743 Authors: Patrick J. LoPresti <patl@lcs.mit.edu> and
2744 Jin S. Choi <jin@atype.com>
2745 Maintainer: Len Budney <lbudney@pobox.com>
2746 Latest version: 3.4
2747 Anonymous FTP:
2748 http://www.nb.net/~lbudney/linux/software/mailcrypt/mailcrypt-3.5b6.tar.gz
2749 World Wide Web:
2750 http://www.nb.net/~lbudney/linux/software/mailcrypt.html
2751
2752 114: JDE -- Development environment for Java programming
2753
2754 Author: Paul Kinnucan <paulk@mathworks.com>
2755 Mailing list: jde-subscribe@sunsite.auc.dk
2756 Latest version: 2.1.1
2757 World Wide Web: http://sunsite.auc.dk/jde/
2758
2759 115: Patch -- program to apply "diffs" for updating files
2760
2761 Author: Larry Wall <lwall@wall.org> (with GNU modifications)
2762 Latest version: 2.5
2763 Anonymous FTP: See question 92
2764
2765
2766 Changing Key Bindings and Handling Key Binding Problems
2767
2768 116: How do I bind keys (including function keys) to commands?
2769
2770 Keys can be bound to commands either interactively or in your .emacs
2771 file. To interactively bind keys for all modes, type
2772
2773 M-x global-set-key RET KEY CMD RET
2774
2775 To bind a key just in the current major mode, type
2776
2777 M-x local-set-key RET KEY CMD RET
2778
2779 See "Key Bindings" in the on-line manual for further details.
2780
2781 To bind keys on starting Emacs or on starting any given mode, use the
2782 following "trick": First bind the key interactively, then immediately
2783 type "C-x ESC ESC C-a C-k C-g". Now, the command needed to bind the key
2784 is in the kill ring, and can be yanked into your .emacs file. If the key
2785 binding is global, no changes to the command are required. For example,
2786
2787 (global-set-key (quote [f1]) (quote help-for-help))
2788
2789 can be placed directly into the .emacs file. If the key binding is
2790 local, the command is used in conjunction with the "add-hook" command.
2791 For example, in tex-mode, a local binding might be
2792
2793 (add-hook 'tex-mode-hook
2794 (function (lambda ()
2795 (local-set-key (quote [f1]) (quote help-for-help))))
2796
2797 NOTE: * Control characters in key sequences, in the form yanked from the
2798 kill ring are given in their graphic form -- i.e., CTRL is shown
2799 as `^', TAB as a set of spaces (usually 8), etc. You may want to
2800 convert these into their vector or string forms.
2801
2802 * If a prefix key of the character sequence to be bound is already
2803 bound as a complete key, then you must unbind it before the new
2804 binding. For example, if "ESC {" is previously bound:
2805
2806 (global-unset-key [?\e ?{]) ;; or
2807 (local-unset-key [?\e ?{])
2808
2809 * Aside from commands and "lambda lists," a vector or string also
2810 can be bound to a key and thus treated as a macro. For example:
2811
2812 (global-set-key [f10] [?\C-x?\e?\e?\C-a?\C-k?\C-g]) ;; or
2813 (global-set-key [f10] "\C-x\e\e\C-a\C-k\C-g")
2814
2815 117: Why does Emacs say "Key sequence XXX uses invalid prefix characters"?
2816
2817 Usually, one of two things has happened. In one case, the control
2818 character in the key sequence has been misspecified (e.g. "C-f" used
2819 instead of "\C-f" within a Lisp expression). In the other case, a
2820 "prefix key" in the keystroke sequence you were trying to bind was
2821 already bound as a "complete key." Historically, the "ESC [" prefix was
2822 usually the problem, in which case you should evaluate either of these
2823 forms before attempting to bind the key sequence:
2824
2825 (global-unset-key [?\e ?[]) ;; or
2826 (global-unset-key "\e[")
2827
2828 118: Why doesn't this [terminal or window-system setup] code work in my
2829 .emacs file, but it works just fine after Emacs starts up?
2830
2831 During startup, Emacs initializes itself according to a given code/file
2832 order. If some of the code executed in your .emacs file needs to be
2833 postponed until the initial terminal or window-system setup code has been
2834 executed but is not, then you will experience this problem (this
2835 code/file execution order is not enforced after startup).
2836
2837 To postpone the execution of Emacs Lisp code until after terminal or
2838 window-system setup, treat the code as a "lambda list" and set the value
2839 of either the "term-setup-hook" or "window-setup-hook" variable to this
2840 "lambda function." For example,
2841
2842 (setq term-setup-hook
2843 (function
2844 (lambda ()
2845 (cond ((string-match "\\`vt220" (or (getenv "TERM") ""))
2846 ;; Make vt220's "Do" key behave like M-x:
2847 (global-set-key [do] 'execute-extended-command))
2848 ))))
2849
2850 For information on what Emacs does every time it is started, see the
2851 lisp/startup.el file.
2852
2853 119: How do I use function keys under X Windows?
2854
2855 With Emacs 19, functions keys under X are bound like any other key. See
2856 question 116 for details.
2857
2858 120: How do I tell what characters or symbols my function or arrow keys
2859 emit?
2860
2861 Type "C-h c" then the function or arrow keys. The command will return
2862 either a function key symbol or character sequence (see the Emacs on-line
2863 documentation for an explanation). This works for other keys as well.
2864
2865 121: How do I set the X key "translations" for Emacs?
2866
2867 Emacs is not written using the Xt library by default, so there are no
2868 "translations" to be set. (We aren't sure how to set such translations
2869 if you do build Emacs with Xt; please let us know if you've done this!)
2870
2871 The only way to affect the behavior of keys within Emacs is through
2872 "xmodmap" (outside Emacs) or "define-key" (inside Emacs). The
2873 "define-key" command should be used in conjunction with the
2874 "function-key-map" map. For instance,
2875
2876 (define-key function-key-map [M-tab] [?\M-\t])
2877
2878 defines the "M-TAB" key sequence.
2879
2880 122: How do I handle C-s and C-q being used for flow control?
2881
2882 C-s and C-q are used in the XON/XOFF flow control protocol. This messes
2883 things up when you're using Emacs, because Emacs binds these keys to
2884 commands by default. Because Emacs won't honor them as flow control
2885 characters, too many of these characters are not passed on and overwhelm
2886 output buffers. Sometimes, intermediate software using XON/XOFF flow
2887 control will prevent Emacs from ever seeing C-s and C-q.
2888
2889 Possible solutions:
2890
2891 * Disable the use of C-s and C-q for flow control.
2892
2893 You need to determine the cause of the flow control.
2894
2895 * your terminal
2896
2897 Your terminal may use XON/XOFF flow control to have time to display
2898 all the characters it receives. For example, VT series terminals do
2899 this. It may be possible to turn this off from a setup menu. For
2900 example, on a VT220 you may select "No XOFF" in the setup menu. This
2901 is also true for some terminal emulation programs on PCs.
2902
2903 When you turn off flow control at the terminal, you will also need to
2904 turn it off at the other end, which might be at the computer you are
2905 logged in to or at some terminal server in between.
2906
2907 If you turn off flow control, characters may be lost; using a printer
2908 connected to the terminal may fail. You may be able to get around
2909 this problem by modifying the "termcap" entry for your terminal to
2910 include extra NUL padding characters.
2911
2912 * a modem
2913
2914 If you are using a dialup connection, the modems may be using
2915 XON/XOFF flow control. It's not clear how to get around this.
2916
2917 * a router or terminal server
2918
2919 Some network box between the terminal and your computer may be using
2920 XON/XOFF flow control. It may be possible to make it use some other
2921 kind of flow control. You will probably have to ask your local
2922 network experts for help with this.
2923
2924 * tty and/or pty devices
2925
2926 If your connection to Emacs goes through multiple tty and/or pty
2927 devices, they may be using XON/XOFF flow control even when it is not
2928 necessary.
2929
2930 Eirik Fuller <eirik@theory.tn.cornell.edu> writes:
2931
2932 Some versions of "rlogin" (and possibly telnet) do not pass flow
2933 control characters to the remote system to which they connect. On
2934 such systems, Emacs on the remote system cannot disable flow
2935 control on the local system. Sometimes "rlogin -8" will avoid this
2936 problem.
2937
2938 One way to cure this is to disable flow control on the local host
2939 (the one running rlogin, not the one running rlogind) using the
2940 stty command, before starting the rlogin process. On many systems,
2941 "stty start u stop u" will do this.
2942
2943 Some versions of "tcsh" will prevent even this from working. One
2944 way around this is to start another shell before starting rlogin,
2945 and issue the stty command to disable flow control from that shell.
2946
2947 Use "stty -ixon" instead of "stty start u stop u" on some systems.
2948
2949 * Make Emacs speak the XON/XOFF flow control protocol.
2950
2951 You can make Emacs treat C-s and C-q as flow control characters by
2952 evaluating the form
2953
2954 (enable-flow-control)
2955
2956 to unconditionally enable flow control or
2957
2958 (enable-flow-control-on "vt100" "h19")
2959
2960 (using your terminal names instead of "vt100" or "h19") to enable
2961 selectively. These commands will automatically swap `C-s' and `C-q' to
2962 `C-\' and `C-^'. Variables can be used to change the default swap keys
2963 ("flow-control-c-s-replacement" and "flow-control-c-q-replacement").
2964
2965 If you are fixing this for yourself, simply put the form in your .emacs
2966 file. If you are fixing this for your entire site, the best place to
2967 put it is in the lisp/site-start.el file. Putting this form in
2968 lisp/default.el has the problem that if the user's .emacs file has an
2969 error, this will prevent lisp/default.el from being loaded and Emacs
2970 may be unusable for the user, even for correcting their .emacs file
2971 (unless they're smart enough to move it to another name).
2972
2973 For further discussion of this issue, read the file PROBLEMS (in the
2974 top-level directory when you unpack the Emacs source).
2975
2976 123: How do I bind `C-s' and `C-q' (or any key) if these keys are filtered
2977 out?
2978
2979 To bind `C-s' and `C-q', use either "enable-flow-control" or
2980 "enable-flow-control-on". See question 122 for usage and implementation
2981 details.
2982
2983 To bind other keys, use "keyboard-translate". See question 126 for usage
2984 details. To do this for an entire site, you should swap the keys in
2985 lisp/site-start.el. See question 122 for an explanation of why
2986 lisp/default.el should not be used.
2987
2988 NOTE: * If you do this for an entire site, the users will be confused by
2989 the disparity between what the documentation says and how Emacs
2990 actually behaves.
2991
2992 124: Why does the "Backspace" key invoke help?
2993
2994 The "Backspace" key (on most keyboards) generates ASCII code 8. `C-h'
2995 sends the same code. In Emacs by default `C-h' invokes help-command.
2996 This is intended to be easy to remember since the first letter of "help"
2997 is `h'. The easiest solution to this problem is to use `C-h' (and
2998 Backspace) for help and DEL (the Delete key) for deleting the previous
2999 character.
3000
3001 For many people this solution may be problematic:
3002
3003 * They normally use Backspace outside of Emacs for deleting the previous
3004 character. This can be solved by making DEL the command for deleting
3005 the previous character outside of Emacs. On many Unix systems, this
3006 command will remap DEL:
3007
3008 stty erase `^?'
3009
3010 * The person may prefer using the Backspace key for deleting the previous
3011 character because it is more conveniently located on their keyboard or
3012 because they don't even have a separate Delete key. In this case, the
3013 Backspace key should be made to behave like Delete. There are several
3014 methods.
3015
3016 * Some terminals (e.g., VT3## terminals) allow the character generated by
3017 the Backspace key to be changed from a setup menu.
3018
3019 * You may be able to get a keyboard that is completely programmable.
3020
3021 * Under X or on a dumb terminal, it is possible to swap the Backspace and
3022 Delete keys inside Emacs:
3023
3024 (keyboard-translate ?\C-h ?\C-?)
3025
3026 See question 126 for further details of "keyboard-translate".
3027
3028 * Another approach is to switch key bindings and put help on "C-x h"
3029 instead:
3030
3031 (global-set-key "\C-h" 'delete-backward-char)
3032 (global-set-key "\C-xh" 'help-command) ;; overrides mark-whole-buffer
3033
3034 Other popular key bindings for help are M-? and "C-x ?".
3035
3036 NOTE: * Don't try to bind DEL to help-command, because there are many
3037 modes that have local bindings of DEL that will interfere.
3038
3039 125: Why doesn't Emacs look at the stty settings for Backspace vs. Delete?
3040
3041 Good question!
3042
3043 126: How do I "swap" two keys?
3044
3045 In Emacs 19, you can swap two keys (or key sequences) by using the
3046 "keyboard-translate" function. For example, to turn `C-h' into DEL and
3047 DEL to `C-h', use
3048
3049 (keyboard-translate ?\C-h ?\C-?) ; translate `C-h' to DEL
3050 (keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'.
3051
3052 The first key sequence of the pair after the function identifies what is
3053 produced by the keyboard; the second, what is matched for in the keymaps.
3054
3055 Keyboard translations are not the same as key bindings in keymaps. Emacs
3056 contains numerous keymaps that apply in different situations, but there
3057 is only one set of keyboard translations, and it applies to every
3058 character that Emacs reads from the terminal. Keyboard translations take
3059 place at the lowest level of input processing; the keys that are looked
3060 up in keymaps contain the characters that result from keyboard
3061 translation.
3062
3063 Also see "Keyboard Translations" in the on-line manual.
3064
3065 127: How do I produce C-XXX with my keyboard?
3066
3067 On terminals (but not under X), some common "aliases" are:
3068
3069 C-2 or C-SPC for C-@
3070 C-6 for C-^
3071 C-7 or C-S-- for C-_
3072 C-4 for C-\
3073 C-5 for C-]
3074 C-/ for C-?
3075
3076 Often other aliases exist; use the "C-h c" command and try `CTRL' with
3077 all of the digits on your keyboard to see what gets generated. You can
3078 also try the "C-h w" command if you know the name of the command.
3079
3080 128: What if I don't have a Meta key?
3081
3082 Instead of typing "M-a", you can type "ESC a". In fact, Emacs converts
3083 M-a internally into "ESC a" anyway (depending on the value of
3084 meta-prefix-char). Note that you press "Meta" and `a' together, while
3085 you press `ESC', release it, and then press `a'.
3086
3087 129: What if I don't have an Escape key?
3088
3089 Type `C-[' instead. This should send ASCII code 27 just like an Escape
3090 key would. `C-3' may also work on some terminal (but not under X). For
3091 many terminals (notably DEC terminals) `F11' generates ESC. If not, the
3092 following form can be used to bind it:
3093
3094 (define-key function-key-map [f11] [?\e]) ; F11 is the documented ESC
3095 ; replacement on DEC terminals.
3096
3097 130: Can I make my "Compose Character" key behave like a Meta key?
3098
3099 On a dumb terminal such as a VT220, no. It is rumored that certain VT220
3100 clones could have their Compose key configured this way. If you're using
3101 X, you might be able to do this with the "xmodmap" program.
3102
3103 131: How do I bind a combination of modifier key and function key?
3104
3105 With Emacs 19 you can represent modified function keys in vector format
3106 by adding prefixes to the function key symbol. For example (from the
3107 on-line documentation):
3108
3109 (global-set-key [?\C-x right] 'forward-page)
3110
3111 where "?\C-x" is the Lisp character constant for the character "C-x".
3112
3113 You can use the modifier keys Control, Meta, Hyper, Super, Alt, and Shift
3114 with function keys. To represent these modifiers, prepend the strings
3115 "C-", "M-", "H-", "s-", "A-", and "S-" to the symbol name. Here is how
3116 to make "Hyper-Meta-RIGHT" move forward a word:
3117
3118 (global-set-key [H-M-right] 'forward-word)
3119
3120 NOTE: * Not all modifiers are permitted in all situations. Hyper, Super,
3121 and Alt are available only under X (provided there are such
3122 keys). Non-ASCII keys and mouse events (e.g. "C-=" and
3123 "mouse-1") also fall under this category.
3124
3125 See question 116 for general key binding instructions.
3126
3127 132: Why doesn't my Meta key work in an xterm window?
3128
3129 Try all of these methods before asking for further help:
3130
3131 * You may have big problems using "mwm" as your window manager. {Does
3132 anyone know a good generic solution to allow the use of the Meta key in
3133 Emacs with mwm?}
3134
3135 * For X11: Make sure it really is a Meta key. Use "xev" to find out what
3136 keysym your Meta key generates. It should be either Meta_L or Meta_R.
3137 If it isn't, use xmodmap to fix the situation.
3138
3139 * Make sure the pty the xterm is using is passing 8 bit characters.
3140 "stty -a" (or "stty everything") should show "cs8" somewhere. If it
3141 shows "cs7" instead, use "stty cs8 -istrip" (or "stty pass8") to fix
3142 it.
3143
3144 * If there is an rlogin connection between the xterm and the Emacs, the
3145 "-8" argument may need to be given to rlogin to make it pass all 8 bits
3146 of every character.
3147
3148 * If the Emacs is running under Ultrix, it is reported that evaluating
3149 (set-input-mode t nil) helps.
3150
3151 * If all else fails, you can make xterm generate "ESC W" when you type
3152 M-W, which is the same conversion Emacs would make if it got the M-W
3153 anyway. In X11R4, the following resource specification will do this:
3154
3155 XTerm.VT100.EightBitInput: false
3156
3157 (This changes the behavior of the insert-eight-bit action.)
3158
3159 With older xterms, you can specify this behavior with a translation:
3160
3161 XTerm.VT100.Translations: #override \
3162 Meta<KeyPress>: string(0x1b) insert()
3163
3164 You might have to replace "Meta" with "Alt".
3165
3166 133: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0
3167 and 9.x?
3168
3169 This is a result of an internationalization extension in X11R4 and the
3170 fact that HP is now using this extension. Emacs assumes that
3171 XLookupString returns the same result regardless of the Meta key state
3172 which is no longer necessarily true. Until Emacs is fixed, the temporary
3173 kludge is to run this command after each time the X server is started but
3174 preferably before any xterm clients are:
3175
3176 xmodmap -e 'remove mod1 = Mode_switch'
3177
3178 NOTE: This will disable the use of the extra keysyms systemwide, which
3179 may be undesirable if you actually intend to use them.
3180
3181
3182 Using Emacs with Alternate Character Sets
3183
3184 134: How do I make Emacs display 8-bit characters?
3185
3186 Emacs 19 has built-in support for 8-bit characters. Here is an excerpt
3187 from the "European Display" page of the on-line manual:
3188
3189 Some European languages use accented letters and other special symbols.
3190 The ISO 8859 Latin-1 character set defines character codes for many
3191 European languages in the range 160 to 255.
3192
3193 Emacs can display those characters according to Latin-1, provided the
3194 terminal or font in use supports them. The "M-x
3195 standard-display-european" command toggles European character display
3196 mode. With a numeric argument, "M-x standard-display-european" enables
3197 European character display if and only if the argument is positive.
3198
3199 Some operating systems let you specify the language you are using by
3200 setting a locale. Emacs handles one common special case of this: if
3201 your locale name for character types contains the string "8859-1" or
3202 "88591", Emacs automatically enables European character display mode
3203 when it starts up.
3204
3205 135: How do I input 8-bit characters?
3206
3207 Again, from the "European Display" page of the on-line manual:
3208
3209 If you enter non-ASCII ISO Latin-1 characters often, you might find ISO
3210 Accents mode convenient. When this minor mode is enabled, the
3211 characters ``', `'', `"', `^', `/' and `~' modify the following letter
3212 by adding the corresponding diacritical mark to it, if possible. To
3213 enable or disable ISO Accents mode, use the command "M-x
3214 iso-accents-mode". This command affects only the current buffer.
3215
3216 To enter one of those six special characters, type the character,
3217 followed by a space. Some of those characters have a corresponding
3218 "dead key" accent character in the ISO Latin-1 character set; to enter
3219 that character, type the corresponding ASCII character twice. For
3220 example, `''' enters the Latin-1 character acute-accent (character code
3221 0264).
3222
3223 136: Where can I get an Emacs that handles kanji, Chinese, or other
3224 character sets?
3225
3226 Emacs 20 now includes many of the features of MULE, the Multilingual
3227 Enhancement of Emacs. See question 84 for information on where to find
3228 and download Emacs.
3229
3230 The original MULE is available at
3231
3232 ftp://sh.wide.ad.jp/JAPAN/mule/mule-19.33-delta.tar.gz
3233
3234 137: Where is an Emacs that can handle Semitic (right-to-left) alphabets?
3235
3236 Emacs 20 supports Hebrew characters (ISO 8859-8), but does not yet
3237 support right-to-left character entry.
3238
3239 Joel M. Hoffman <joel@exc.com> has written a Lisp package called
3240 hebrew.el that allows right-to-left editing of Hebrew. It reportedly
3241 works out of the box with Emacs 19, but requires patches for Emacs 18.
3242 Write to Joel if you want the patches or package.
3243
3244 Hebrew.el requires a Hebrew screen font, but no other Hardware support.
3245 Joel has a screen font for PCs running MS-DOS and Linux.
3246
3247 You might also try to query archie for files named with "hebrew"; several
3248 ftp sites in Israel may also have the necessary files.
3249
3250
3251 Mail and News
3252
3253 138: How do I change the included text prefix in mail/news followups?
3254
3255 If you read mail with Rmail or news with Gnus, set the variable
3256 mail-yank-prefix. For VM, set vm-included-text-prefix. For mh-e, set
3257 mh-ins-buf-prefix.
3258
3259 For fancier control of citations, use Supercite. See question 105.
3260
3261 To prevent Emacs from including various headers of the replied-to
3262 message, set the value of mail-yank-ignored-headers to an appropriate
3263 regexp.
3264
3265 139: How do I save a copy of outgoing mail?
3266
3267 You can either mail yourself a copy by including a "BCC:" header in the
3268 mail message, or store a copy of the message directly to a file by
3269 including an "FCC:" header.
3270
3271 If you use standard mail, you can automatically create a "BCC:" to
3272 yourself by putting
3273
3274 (setq mail-self-blind t)
3275
3276 in your .emacs file. You can automatically include an "FCC:" field by
3277 putting something like the following in your .emacs file:
3278
3279 (setq mail-archive-file-name (expand-file-name "~/outgoing"))
3280
3281 The output file will be in Unix mail format, which can be read directly
3282 by VM, but not always by Rmail. See question 141.
3283
3284 If you use mh-e, add an "FCC:" or "BCC:" field to your components file.
3285
3286 It does not work to put "set record filename" in the .mailrc file.
3287
3288 140: Why doesn't Emacs expand my aliases when sending mail?
3289
3290 * You must separate multiple addresses in the headers of the mail buffer
3291 with commas. This is because Emacs supports RFC822 standard addresses
3292 like this one:
3293
3294 To: Willy Smith <wks@xpnsv.lwyrs.com>
3295
3296 However, you do not need to -- and probably should not, unless your
3297 system's version of /usr/ucb/mail (aka mailx) supports RFC822 --
3298 separate addresses with commas in your ~/.mailrc file.
3299
3300 * Emacs normally only reads the ".mailrc" file once per session, when you
3301 start to compose your first mail message. If you edit .mailrc, you can
3302 type "M-x rebuild-mail-abbrevs RET" to make Emacs reread your ~/.mailrc
3303 file.
3304
3305 * If you like, you can expand mail aliases as abbrevs, as soon as you
3306 type them in. To enable this feature, execute the following:
3307
3308 (add-hook 'mail-setup-hook 'mail-abbrevs-setup)
3309
3310 Note that the aliases are expanded automatically only after you type
3311 RET or a punctuation character (e.g. `,'). You can force their
3312 expansion by moving point to the end of the alias and typing "C-x a e"
3313 (M-x expand-abbrev).
3314
3315 141: Why does Rmail think all my saved messages are one big message?
3316
3317 A file created through the FCC: field in a message is in Unix mail
3318 format, not the format that Rmail uses (BABYL format). Rmail will try to
3319 convert a Unix mail file into BABYL format on input, but sometimes it
3320 makes errors. For guaranteed safety, you can make the saved-messages
3321 file be an inbox for your Rmail file by using the function
3322 set-rmail-inbox-list.
3323
3324 142: How can I sort the messages in my Rmail folder?
3325
3326 In Rmail, type "C-c C-s C-h" to get a list of sorting functions and their
3327 key bindings.
3328
3329 143: Why does Rmail need to write to /usr/spool/mail?
3330
3331 This is the behavior of the "movemail" program which Rmail uses. This
3332 indicates that movemail is configured to use lock files.
3333
3334 RMS writes:
3335
3336 Certain systems require lock files to interlock access to mail files.
3337 On these systems, movemail must write lock files, or you risk losing
3338 mail. You simply must arrange to let movemail write them.
3339
3340 Other systems use the flock system call to interlock access. On these
3341 systems, you should configure movemail to use flock.
3342
3343 144: How do I recover my mail files after Rmail munges their format?
3344
3345 If you have just done rmail-input on a file and you don't want to save it
3346 in Rmail's format (called BABYL), just kill the buffer (with C-x k).
3347
3348 If you typed M-x rmail and it read some messages out of your inbox and
3349 you want to put them in a Unix mail file, use C-o on each message.
3350
3351 If you want to convert an existing file from BABYL format to Unix mail
3352 format, use the command M-x unrmail: it will prompt you for the input and
3353 output file names.
3354
3355 145: How can I force Rmail to reply to the sender of a message, but not the
3356 other recipients?
3357
3358 Ron Isaacson <isaacson@seas.upenn.edu> says: When you hit "r" to reply in
3359 Rmail, by default it CCs all of the original recipients (everyone on the
3360 original "To" and "CC" lists). With a prefix argument (i.e., typing "C-u"
3361 before "r"), it replies only to the sender. However, going through the
3362 whole C-u business every time you want to reply is a pain. This is the
3363 best fix I've been able to come up with:
3364
3365 (defun rmail-reply-t ()
3366 "Reply only to the sender of the current message. (See rmail-reply.)"
3367 (interactive)
3368 (rmail-reply t))
3369
3370 (add-hook 'rmail-mode-hook
3371 '(lambda ()
3372 (define-key rmail-mode-map "r" 'rmail-reply-t)
3373 (define-key rmail-mode-map "R" 'rmail-reply)))
3374
3375 146: How can I get my favorite Emacs mail package to support MIME?
3376
3377 Look at the Emacs MIME FAQ, maintained by MacDonald Hall Jackson
3378 <trey@cs.berkeley.edu> at
3379
3380 http://bmrc.berkeley.edu/~trey/emacs/mime.html
3381
3382 Version 6.x of VM supports MIME. See question 104.
3383
3384 147: How do I make Emacs automatically start my mail/news reader?
3385
3386 To start Emacs in Gnus:
3387
3388 emacs -f gnus
3389
3390 in Rmail:
3391
3392 emacs -f rmail
3393
3394 A more convenient way to start with Gnus:
3395
3396 alias gnus 'emacs -f gnus'
3397 gnus
3398
3399 It is probably unwise to automatically start your mail or news reader
3400 from your .emacs file. This would cause problems if you needed to run
3401 two copies of Emacs at one time. Also, this would make it difficult for
3402 you to start Emacs quickly when you needed to.
3403
3404 148: How do I read news under Emacs?
3405
3406 Use M-x gnus. It is documented in Info (see question 14).
3407
3408 149: Why doesn't Gnus work via NNTP?
3409
3410 There is a bug in NNTP version 1.5.10, such that when multiple requests
3411 are sent to the NNTP server, the server only handles the first one before
3412 blocking waiting for more input which never comes. NNTP version 1.5.11
3413 claims to fix this.
3414
3415 You can work around the bug inside Emacs like this:
3416
3417 (setq nntp-maximum-request 1)
3418
3419 You can find out what version of NNTP your news server is running by
3420 telnetting to the NNTP port (usually 119) on the news server machine
3421 (i.e., "telnet server-machine 119"). The server should give its version
3422 number in the welcome message. Type "quit" to get out.
3423
3424 Also see question 75 in this FAQ for some additional ideas.
3425
3426 150: How do I view news articles with embedded underlining (e.g.,
3427 ClariNews)?
3428
3429 Underlining appears like this:
3430
3431 _^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^Hi_^Hn_^Hg
3432
3433 Per Abrahamsen <amanda@iesd.auc.dk> suggests using the following code,
3434 which uses the underline face to turn such text into true underlining:
3435
3436 (defun gnus-article-prepare-overstrike ()
3437 ;; Prepare article for overstrike commands.
3438 (save-excursion
3439 (set-buffer gnus-article-buffer)
3440 (let ((buffer-read-only nil))
3441 (goto-char (point-min))
3442 (while (search-forward "\b" nil t)
3443 (let ((next (following-char))
3444 (previous (char-after (- (point) 2))))
3445 (cond ((eq next previous)
3446 (delete-region (- (point) 2) (point))
3447 (put-text-property (point) (1+ (point))
3448 'face 'bold))
3449 ((eq next ?_)
3450 (delete-region (1- (point)) (1+ (point)))
3451 (put-text-property (1- (point)) (point)
3452 'face 'underline))
3453 ((eq previous ?_)
3454 (delete-region (- (point) 2) (point))
3455 (put-text-property (point) (1+ (point))
3456 'face 'underline))))))))
3457
3458 (add-hook 'gnus-article-prepare-hook 'gnus-article-prepare-overstrike)
3459
3460 If you prefer to do away with underlining altogether, you can
3461 destructively remove it with M-x ununderline-region; do this
3462 automatically via
3463
3464 (add-hook 'gnus-article-prepare-hook
3465 '(lambda () (ununderline-region (point-min) (point-max))))
3466
3467 151: How do I save all the items of a multi-part posting in Gnus?
3468
3469 Use gnus-uu. Type C-c C-v C-h in the Gnus summary buffer to see a list
3470 of available commands.
3471
3472 152: How do I make Gnus start up faster?
3473
3474 From the Gnus FAQ (see question 158):
3475
3476 Pranav Kumar Tiwari <pktiwari@eos.ncsu.edu> writes: I posted the same
3477 query recently and I got an answer to it. I am going to repeat the
3478 answer. What you need is a newer version of gnus, version 5.0.4+. I am
3479 using 5.0.12 and it works fine with me with the following settings:
3480
3481 (setq gnus-check-new-newsgroups nil
3482 gnus-read-active-file 'some
3483 gnus-nov-is-evil nil
3484 gnus-select-method '(nntp gnus-nntp-server))
3485
3486 153: How do I catch up all newsgroups in Gnus?
3487
3488 In the "*Newsgroup*" buffer, type the following magical incantation:
3489
3490 M-< C-x ( c y C-x ) M-0 C-x e
3491
3492 Leave off the "M-<" if you only want to catch up from point to the end of
3493 the "*Newsgroup" buffer.
3494
3495 154: Why can't I kill in Gnus based on the Newsgroups/Keywords/Control
3496 headers?
3497
3498 Gnus will complain that the "Newsgroups:", "Keywords:", and "Control:"
3499 headers are "Unknown header" fields.
3500
3501 For the "Newsgroups:" header, there is an easy workaround: kill on the
3502 "Xref" header instead, which will be present on any cross-posted article
3503 (as long as your site carries the cross-post group).
3504
3505 If you really want to kill on one of these headers, you can do it like
3506 this:
3507
3508 (gnus-kill nil "^Newsgroups: .*\\(bad\\.group\\|worse\\.group\\)")
3509
3510 155: How do I get rid of flashing messages in Gnus for slow connections?
3511
3512 Set nntp-debug-read to nil.
3513
3514 156: Why is catch up slow in Gnus?
3515
3516 Because Gnus is marking crosspostings read. You can control this with
3517 the variable gnus-use-cross-reference.
3518
3519 157: Why does Gnus hang for a long time when posting?
3520
3521 David Lawrence <tale@uunet.uu.net> explains:
3522
3523 The problem is almost always interaction between NNTP and C News. NNTP
3524 POST asks C News's inews to not background itself but rather hang
3525 around and give its exit status so it knows whether the post was
3526 successful. (That wait will on some systems not return the exit status
3527 of the waited for job is a different sort of problem.) It ends up
3528 taking a long time because inews is calling relaynews, which often
3529 waits for another relaynews to free the lock on the news system so it
3530 can file the article.
3531
3532 My preferred solution is to change inews to not call relaynews, but
3533 rather use newsspool. This loses some error-catching functionality,
3534 but is for the most part safe as inews will detect a lot of the errors
3535 on its own. The C News folks have sped up inews, too, so speed should
3536 look better to most folks as that update propagates around.
3537
3538 158: Where can I find out more about Gnus?
3539
3540 Look for the Gnus FAQ, available at
3541
3542 http://www.miranova.com/~steve/gnus-faq.html
3543
3544 ------------------------------------------------------------
3545 Copyright 1994-1998 Reuven M. Lerner
3546 Copyright 1992-1993 Steven Byrnes
3547 Copyright 1990-1992 Joseph Brian Wells
3548
3549 This list of frequently asked questions about GNU Emacs with answers
3550 ("FAQ") may be translated into other languages, transformed into other
3551 formats (e.g. Texinfo, Info, WWW, WAIS), and updated with new information.
3552
3553 The same conditions apply to any derivative of the FAQ as apply to the FAQ
3554 itself. Every copy of the FAQ must include this notice or an approved
3555 translation, information on who is currently maintaining the FAQ and how to
3556 contact them (including their e-mail address), and information on where the
3557 latest version of the FAQ is archived (including FTP information).
3558
3559 The FAQ may be copied and redistributed under these conditions, except that
3560 the FAQ may not be embedded in a larger literary work unless that work
3561 itself allows free copying and redistribution.
3562
3563 ------------------------------------------------------------
3564
3565 People who helped with this version of the FAQ:
3566
3567 Ethan Bradford <ethanb@u.washington.edu>, William G. Dubuque
3568 <wgd@martigny.ai.mit.edu>, Michael Ernst <mernst@theory.lcs.mit.edu>,
3569 and Denby Wong <3dw16@qlink.QueensU.CA>.