Update Microsoft Windows entry.
[bpt/emacs.git] / 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 with answers.
5
6 The FAQ is posted to reduce the noise level in the `gnu.emacs.help'
7 newsgroup (which is also the `help-gnu-emacs' mailing list) which results
8 from the repetition of frequently asked questions, wrong answers to these
9 questions, corrections to the wrong answers, corrections to the
10 corrections, debate, name calling, etc. Also, it serves as a repository of
11 the canonical "best" answers to these questions. However, if you know a
12 better answer or even a slight change that improves an answer, please tell
13 us!
14
15 If you know the answer to a question in the FAQ list, please reply to the
16 question by e-mail instead of posting. Help reduce noise!
17
18 The FAQ is crossposted to `comp.emacs' because some sites do not receive
19 the `gnu.*' newsgroups. The FAQ is also crossposted to `news.answers'.
20
21 Full instructions for getting the latest FAQ are in question 22.
22
23 It has been so long since the FAQ was last edited and released that the
24 maintainers decided to take a two-step approach. This edition corrects
25 many basic inaccuracies in the old FAQ, most of them having to do with ftp
26 sites and version numbers. In addition, we have deleted a number of
27 questions that are no longer relevant with the release of GNU Emacs 19.
28
29 Many questions specific to recent releases of GNU Emacs 19 remain
30 unanswered in this version of the FAQ; the maintainers will spend time over
31 the next month or two adding new questions (and answers), based in no small
32 part on the questions that have come across help-gnu-emacs in recent
33 months.
34
35 There is no diff file for this version of the FAQ, as many things have
36 changed since it was last updated.
37
38 Please suggest new questions, answers, wording changes, deletions, etc.
39 The most helpful form for suggestions is a context diff (i.e., the output
40 of `diff -c'). Include `FAQ' in the subject of messages sent to us about
41 the FAQ list.
42
43 Please do not send questions to us just because you do not want to disturb
44 a lot of people and you think we would know the answer. We do not have
45 time to answer questions individually. :-(
46
47 --
48 Reuven M. Lerner <reuven@the-tech.mit.edu> and the FAQ team (a full list is
49 at the bottom of the FAQ).
50
51 ----------------------------------------------------------------------
52
53 Notation Used in FAQ
54
55 1: What do these mean: C-h, M-C-a, RET, "ESC a", etc.?
56 2: What does "M-x command" mean?
57 3: How do I read topic XXX in the on-line manual?
58 4: What do these mean: etc/SERVICE, src/config.h, lisp/default.el?
59 5: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL?
60
61 General Questions
62
63 6: What is the LPF?
64 7: What is the real legal meaning of the GNU copyleft?
65 8: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug,
66 comp.emacs, etc.?
67 9: Where can I get old postings to gnu.emacs.help and other GNU groups?
68 10: Where should I report bugs and other problems with GNU Emacs?
69 11: How do I unsubscribe to this mailing list?
70 12: What is the current address of the FSF?
71
72 On-line Help, Printed Manuals, Other Sources of Help
73
74 13: I'm just starting GNU Emacs; how do I do basic editing?
75 14: How do I find out how to do something in GNU Emacs?
76 15: How do I get a printed copy of the GNU Emacs manual?
77 16: Where can I get documentation on GNU Emacs Lisp?
78 17: How do I install a piece of Texinfo documentation?
79 18: How do I print a Texinfo file?
80 19: Can I view Info files without using GNU Emacs?
81 20: What informational files are available for GNU Emacs?
82 21: Where can I get help in installing GNU Emacs?
83 22: Where can I get the latest version of this document (the FAQ list)?
84
85 Status of Emacs
86
87 23: Where does the name "Emacs" come from?
88 24: What is the latest version of GNU Emacs?
89 25: What is different about GNU Emacs 19?
90
91 Common Things People Want To Do
92
93 26: How do I set up a .emacs file properly?
94 27: How do I debug a .emacs file?
95 28: How do I make Emacs display the current line (or column) number?
96 29: How do I turn on abbrevs by default just in mode XXX?
97 30: How do I turn on auto-fill mode by default?
98 31: How do I make Emacs use a certain major mode for certain files?
99 32: How do I search for, delete, or replace unprintable (8-bit or control)
100 characters?
101 33: How can I highlight a region of text in Emacs?
102 34: How do I control Emacs's case-sensitivity when searching/replacing?
103 35: How do I make Emacs wrap words for me?
104 36: Where can I get a better spelling checker for Emacs?
105 37: How can I spell-check TeX or *roff documents?
106 38: How do I change load-path?
107 39: How do I use an already running Emacs from another window?
108 40: How do I make Emacs recognize my compiler's funny error messages?
109 41: How do I indent switch statements like this?
110 42: How can I make Emacs automatically scroll horizontally?
111 43: How do I make Emacs "typeover" or "overwrite" instead of inserting?
112 44: How do I stop Emacs from beeping on a terminal?
113 45: How do I turn down the bell volume in Emacs running under X Windows?
114 46: How do I tell Emacs to automatically indent a new line to the
115 indentation of the previous line?
116 47: How do I show which parenthesis matches the one I'm looking at?
117 48: In C mode, can I show just the lines that will be left after #ifdef
118 commands are handled by the compiler?
119 49: Is there an equivalent to the `.' (dot) command of vi?
120 50: What are the valid X resource settings (i.e., stuff in .Xdefaults)?
121 51: How do I execute a piece of Emacs Lisp code?
122 52: How do I change Emacs's idea of the tab character's length?
123 53: How do I insert `>' at the beginning of every line?
124 54: How do I insert `_^H' before each character in a paragraph to get an
125 underlined paragraph?
126 55: How do I repeat a command as many times as possible?
127 56: How do I make Emacs behave like this: when I go up or down, the cursor
128 should stay in the same column even if the line is too short?
129 57: How do I tell Emacs to iconify itself?
130 58: How do I use regexps (regular expressions) in Emacs?
131 59: How do I perform a replace operation across more than one file?
132 60: Where is the documentation for `etags'?
133
134 Bugs/Problems
135
136 61: Does Emacs have problems with files larger than 8 megabytes?
137 62: How do I get rid of the ^M junk in my shell buffer?
138 63: Why do I get `Process shell exited abnormally with code 1'?
139 64: Where is the termcap/terminfo entry for terminal type `emacs'?
140 65: Why does Emacs spontaneously start displaying `I-search:' and beeping?
141 66: Why can't Emacs talk to certain hosts (or certain hostnames)?
142 67: Why does Emacs say `Error in init file'?
143 68: Why does Emacs ignore my X resources (my .Xdefaults file)?
144 69: Why does Emacs take 20 seconds to visit a file?
145 70: How do I edit a file with a `$' in its name?
146 71: Why does shell mode lose track of the shell's current directory?
147 72: Are there any security risks in GNU Emacs?
148
149 Difficulties Building/Installing/Porting Emacs
150
151 73: What should I do if I have trouble building Emacs?
152 74: How do I stop Emacs from failing when the executable is stripped?
153 75: Why does linking Emacs with -lX11 fail?
154
155 Finding/Getting Emacs and Related Packages
156
157 76: Where can I get GNU Emacs on the net (or by snail mail)?
158 77: How do I find a GNU Emacs Lisp package that does XXX?
159 78: Where can I get GNU Emacs Lisp packages that don't come with Emacs?
160 79: How do I submit code to the Emacs Lisp Archive?
161 80: Where can I get other up-to-date GNU stuff?
162 81: What is the difference between GNU Emacs and Epoch?
163 82: What is the difference between GNU Emacs and XEmacs (formerly "Lucid
164 Emacs")?
165 83: Where can I get Emacs for my PC running MS-DOS?
166 84: Where can I get Emacs for my PC running Microsoft Windows?
167 85: Where can I get Emacs for my PC running OS/2?
168 86: Where can I get Emacs for my Atari ST?
169 87: Where can I get Emacs for my Amiga?
170 88: Where can I get Emacs for my Apple computer?
171 89: Where do I get Emacs that runs on VMS under DECwindows?
172 90: Where can I get modes for Lex, Yacc/Bison, Bourne shell, Csh, C++,
173 Objective C, Pascal, and Awk?
174 91: What is the IP address of XXX.YYY.ZZZ?
175
176 Major Emacs Lisp Packages, Emacs Extensions, and Related Programs
177
178 92: VM (View Mail) -- another mail reader within Emacs
179 93: Supercite -- mail and news citation package within Emacs
180 94: Gnus -- news reader within Emacs
181 95: Calc -- poor man's Mathematica within Emacs
182 96: Ange-FTP -- transparent FTP access for Emacs's file access routines
183 97: VIP -- vi emulation for Emacs
184 98: AUC TeX -- enhanced LaTeX mode with debugging facilities
185 99: Hyperbole -- extensible hypertext management system within Emacs
186 100: BBDB -- personal Info Rolodex integrated with mail/news readers
187 101: Ispell -- spell checker in C with interface for Emacs
188 102: XEmacs -- alternative Emacs 19 with better X interface; formerly
189 known as Lucid Emacs or lemacs.
190 103: Patch -- program to apply "diffs" for updating files
191
192 Changing Key Bindings and Handling Key Binding Problems
193
194 104: How do I bind keys (including function keys) to commands?
195 105: Why does Emacs say `Key sequence XXX uses invalid prefix characters'?
196 106: Why doesn't this [terminal or window-system setup] code work in my
197 .emacs file, but it works just fine after Emacs starts up?
198 107: How do I use function keys under X Windows?
199 108: How do I tell what characters or symbols my function or arrow keys
200 emit?
201 109: How do I set the X key "translations" for Emacs?
202 110: How do I handle C-s and C-q being used for flow control?
203 111: How do I bind `C-s' and `C-q' (or any key) if these keys are filtered
204 out?
205 112: Why does the `Backspace' key invoke help?
206 113: Why doesn't Emacs look at the stty settings for Backspace vs. Delete?
207 114: How do I "swap" two keys?
208 115: How do I produce C-XXX with my keyboard?
209 116: What if I don't have a Meta key?
210 117: What if I don't have an Escape key?
211 118: Can I make my `Compose Character' key behave like a Meta key?
212 119: How do I bind a combination of modifier key and function key?
213 120: Why doesn't my Meta key work in an xterm window?
214 121: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0?
215 122: Where can I get key bindings to make Emacs emulate WordStar?
216 123: Where can I get an XEDIT emulator for Emacs?
217
218 Using Emacs with Alternate Character Sets
219
220 124: How do I make Emacs display 8-bit characters?
221 125: How do I input 8-bit characters?
222 126: Where can I get an Emacs that can handle kanji characters?
223 127: Where can I get an Emacs that can handle Chinese?
224 128: Where is an Emacs that can handle Semitic (right-to-left) alphabets?
225
226 Mail and News
227
228 129: How do I change the included text prefix in mail/news followups?
229 130: How do I save a copy of outgoing mail?
230 131: Why doesn't Emacs expand my aliases when sending mail?
231 132: Why does Rmail think all my saved messages are one big message?
232 133: How can I sort the messages in my Rmail folder?
233 134: Why does Rmail need to write to /usr/spool/mail?
234 135: How do I recover my mail files after Rmail munges their format?
235 136: How do I make Emacs automatically start my mail/news reader?
236 137: How do I read news under Emacs?
237 138: Why doesn't Gnus work via NNTP?
238 139: How do I view text with embedded underlining (e.g., ClariNews)?
239 140: How do I save all the items of a multi-part posting in Gnus?
240 141: Why does Gnus put the subjects in replies beyond the 80th column?
241 142: How do I make Gnus start up faster?
242 143: How do I catch up all newsgroups in Gnus?
243 144: Why can't I kill in Gnus on the Newsgroups/Keywords/Control line?
244 145: How do I get rid of flashing messages in Gnus for slow connections?
245 146: Why is catch up slow in Gnus?
246 147: Why does Gnus hang for a long time when posting?
247 148: Why don't my news postings in Gnus get past the local machine?
248 149: Why doesn't Gnus generate the `Lines:' header?
249 150: How do I kill all articles in Gnus but those matching a pattern?
250
251 ------------------------------------------------------------
252
253 If you are viewing this text in a GNU Emacs Buffer, you can type "M-2 C-x
254 $" to get an overview of just the questions. Then, when you want to look
255 at the text of the answers, just type "C-x $".
256
257 To search for a question numbered XXX, type "M-C-s ^XXX:", followed by a
258 C-r if that doesn't work, then type ESC to end the search.
259
260 Full instructions for getting the latest FAQ are in question 22, or use
261 anonymous FTP to the-tech.mit.edu.
262
263 Notation Used in FAQ
264
265 Skip this section and then come back if you don't understand some of the
266 later answers.
267
268 1: What do these mean: C-h, M-C-a, RET, "ESC a", etc.?
269
270 C-x means press the `x' key while holding down the Control key. M-x
271 means press the `x' key while holding down the Meta key. M-C-x means
272 press the `x' key while holding down both the Control key and the Meta
273 key. C-M-a is a synonym for M-C-a. RET, LFD, DEL, ESC, and TAB
274 respectively refer to pressing the Return, Linefeed (aka Newline),
275 Delete, Escape, and Tab keys and are equivalent to C-m, C-j, C-?, C-[,
276 and C-i. SPC means press the Space bar.
277
278 Key sequences longer than one key (and some single-key sequences) are
279 inside double quotes or on lines by themselves. Any real spaces in such
280 a key sequence should be ignored; only SPC really means press the space
281 key.
282
283 The ASCII code sent by C-x (except for C-?) is the value that would be
284 sent by pressing just `x' minus 96 (or 64 for uppercase `X') and will be
285 from 0 to 31. The ASCII code sent by M-x is the sum of 128 and the ASCII
286 code that would be sent by pressing just the `x' key. Essentially, the
287 Control key turns off bits 5 and 6 and the Meta key turns on bit 7.
288
289 For further information, see `Characters' and `Keys' in the on-line
290 manual.
291
292 NOTE: C-? (aka DEL) is ASCII code 127. It is a misnomer to call C-? a
293 "control" key, since 127 has both bits 5 and 6 turned ON. Also, on very
294 few keyboards does Control-? generate ASCII code 127.
295
296 2: What does "M-x command" mean?
297
298 "M-x command" means type M-x, then type the name of the command, then
299 type RET.
300
301 M-x (by default) invokes the command `execute-extended-command'. This
302 command allows you to run any Emacs command if you can remember the
303 command's name. If you can't remember the command's name, you can type
304 TAB and SPC for completion, "?" for a list of possibilities, and M-p and
305 M-n to see previous commands entered. An Emacs "command" is any
306 "interactive" Emacs function.
307
308 NOTE: Your system administrator may have bound other key sequences to
309 invoke execute-extended-command. A function key labeled `Do' is a good
310 candidate for this.
311
312 To run non-interactive Emacs functions, see question 51.
313
314 3: How do I read topic XXX in the on-line manual?
315
316 When we refer you to topic XXX in the on-line manual, you can read this
317 manual node inside Emacs (assuming nothing is broken) by typing this:
318
319 C-h i m emacs RET m XXX RET
320
321 This invokes Info, the GNU hypertext documentation browser. If you don't
322 already know how to use Info, type "?" from within Info.
323
324 If we refer to topic XXX:YYY, type this:
325
326 C-h i m emacs RET m XXX RET m YYY RET
327
328 WARNING: Your system administrator may not have installed the Info files,
329 or may have installed them improperly. In this case you should complain.
330
331 4: What do these mean: etc/SERVICE, src/config.h, lisp/default.el?
332
333 These are files that come with GNU Emacs. The GNU Emacs distribution is
334 divided into subdirectories; the important ones are `etc', `lisp', and
335 `src'.
336
337 If you use GNU Emacs, but don't know where it is kept on your system,
338 start Emacs, then type "C-h v data-directory RET". The directory name
339 displayed by this will be the full pathname of the installed `etc'
340 directory.
341
342 Some of these files are available individually via FTP or e-mail; see
343 question 20. All are available in the source distribution.
344
345 WARNING: Your system administrator may have removed the src directory and
346 many files from the etc directory.
347
348 5: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL?
349
350 FSF == Free Software Foundation
351 LPF == League for Programming Freedom
352 OSF == Open Software Foundation
353 GNU == GNU's Not Unix
354 RMS == Richard Matthew Stallman
355 FTP == File Transfer Protocol
356 GPL == GNU General Public Licence
357
358 NOTE: Avoid confusing the FSF, the LPF, and the OSF. The LPF opposes
359 look-and-feel copyrights and software patents. The FSF aims to make high
360 quality free software available for everyone. The OSF is a consortium of
361 computer vendors which develops commercial software for Unix systems.
362
363 NOTE: The word "free" in the title of the Free Software Foundation refers
364 to "freedom," not "zero dollars." Anyone can charge any price for
365 GPL-covered software that they want to. However, in practice, the
366 freedom enforced by the GPL leads to low prices, because you can always
367 get the software for less money from someone else, because everyone has
368 the right to resell or give away GPL-covered software.
369
370
371 General Questions
372
373 6: What is the LPF?
374
375 The LPF opposes the expanding danger of software patents and
376 look-and-feel copyrights. To get more information, feel free to contact
377 the LPF via e-mail or otherwise. You may also contact Joe Wells
378 <jbw@cs.bu.edu>; he will be happy to talk with you about the LPF.
379
380 You can find more information about the LPF in the file etc/LPF. More
381 papers describing the LPF's views are available on the Internet and also
382 from the LPF:
383
384 Anonymous FTP:
385 /prep.ai.mit.edu:pub/lpf/
386 /archive.cis.ohio-state.edu:pub/lpf/
387 Anonymous UUCP:
388 osu-cis!~/lpf/*
389
390 7: What is the real legal meaning of the GNU copyleft?
391
392 The real legal meaning of the GNU General Public Licence (copyleft) will
393 only be known if and when a judge rules on its validity and scope. There
394 has never been a copyright infringement case involving the GPL to set any
395 precedents. Please take any discussion regarding this issue to the
396 newsgroup gnu.misc.discuss, which was created to hold the extensive flame
397 wars on the subject.
398
399 RMS writes:
400
401 The legal meaning of the GNU copyleft is less important than the
402 spirit, which is that Emacs is a free software project and that work
403 pertaining to Emacs should also be free software. "Free" means that
404 all users have the freedom to study, share, change and improve Emacs.
405 To make sure everyone has this freedom, pass along source code when you
406 distribute any version of Emacs or a related program, and give the
407 recipients the same freedom that you enjoyed.
408
409 8: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug,
410 comp.emacs, etc.?
411
412 The file etc/MAILINGLISTS discusses the purpose of each GNU mailing-list.
413 (See question 20 on how to get a copy.) For those which are gatewayed
414 with newsgroups, it lists both the newsgroup name and the mailing list
415 address.
416
417 comp.emacs is for discussion of Emacs programs in general. This includes
418 GNU Emacs along with various other implementations like JOVE, MicroEmacs,
419 Freemacs, MG, Unipress, CCA, and Epsilon..
420
421 Many people post GNU Emacs questions to comp.emacs because they don't
422 receive any of the gnu.* newsgroups. Arguments have been made both for
423 and against posting GNU-Emacs-specific material to comp.emacs. You have
424 to decide for yourself.
425
426 Messages advocating "non-free" software are considered unacceptable on
427 any of the gnu.* newsgroups except for gnu.misc.discuss, which was
428 created to hold the extensive flame-wars on the subject. "non-free"
429 software includes any software for which the end user can't freely modify
430 the source code and exchange enhancements. Be careful to remove the
431 gnu.* groups from the `Newsgroups:' line when posting a followup that
432 recommends such software.
433
434 gnu.emacs.bug is a place where bug reports appear, but avoid posting bug
435 reports to this newsgroup (see question 10).
436
437 9: Where can I get old postings to gnu.emacs.help and other GNU groups?
438
439 The FSF has maintained archives of all of the GNU mailing lists for many
440 years, although there may be some unintentional gaps in coverage. The
441 archive is not particularly well organized or easy to retrieve individual
442 postings from, but pretty much everything is there. The archive is
443 available via anonymous ftp at
444
445 /prep.ai.mit.edu:pub/gnu/MailingListArchives/
446
447 10: Where should I report bugs and other problems with GNU Emacs?
448
449 The correct way to report GNU Emacs bugs is by e-mail to
450 bug-gnu-emacs@prep.ai.mit.edu. Anything sent here also appears in the
451 newsgroup gnu.emacs.bug, but please use e-mail instead of news to submit
452 the bug report. This way a reliable return address is available so you
453 can be contacted for further details.
454
455 RMS explains:
456
457 Sending bug reports to help-gnu-emacs (which has the effect of posting
458 on gnu.emacs.help) is undesirable because it takes the time of an
459 unnecessarily large group of people, most of whom are just users and
460 have no idea how to fix these problem. bug-gnu-emacs reaches a much
461 smaller group of people who are more likely to know what to do and have
462 expressed a wish to receive more messages about Emacs than the others.
463
464 However, RMS says there are circumstances when it is okay to post to
465 gnu.emacs.help:
466
467 If you have reported a bug and you don't hear about a possible fix,
468 then after a suitable delay (such as a week) it is okay to post on
469 gnu.emacs.help asking if anyone can help you.
470
471 If you are unsure whether you have a bug, RMS describes how to tell:
472
473 ... if Emacs crashes, that is a bug. If Emacs gets compilation errors
474 while building, that is a bug. If Emacs crashes while building, that
475 is a bug. If Lisp code does not do what the documentation says it
476 does, that is a bug.
477
478 11: How do I unsubscribe to this mailing list?
479
480 If you are receiving a GNU mailing list named `XXX', you might be able to
481 unsubscribe to it by sending a request to the address
482 `XXX-request@prep.ai.mit.edu'. However, this will not work if you are
483 not listed on the main mailing list, but instead receive the mail from a
484 distribution point. In that case, you will have to track down at which
485 distribution point you are listed. Inspecting the `Received:' headers on
486 the mail messages may help, along with liberal use of the `EXPN' or
487 `VRFY' sendmail commands through `telnet <site-address> smtp'. Ask your
488 postmaster for help.
489
490 12: What is the current address of the FSF?
491
492 E-mail address: gnu@prep.ai.mit.edu
493 Phone number: (617) 542-5942
494 Postal address:
495 Free Software Foundation, Inc.
496 59 Temple Place - Suite 330
497 Boston, MA 02111-1307, USA.
498
499 For details on how to order, see the file etc/ORDERS.
500
501
502 On-line Help, Printed Manuals, Other Sources of Help
503
504 13: I'm just starting GNU Emacs; how do I do basic editing?
505
506 Type "C-h t" to invoke the self-paced tutorial. Typing just C-h is how
507 to enter the help system.
508
509 WARNING: Your system administrator may have changed C-h to act like DEL
510 to deal with local keyboards. You can use M-x help-for-help instead to
511 invoke help. To discover what key (if any) invokes help on your system,
512 type "M-x where-is RET help-for-help RET". This will print a
513 comma-separated list of key sequences in the echo area. Ignore the last
514 character in each key sequence listed. Each of the resulting key
515 sequences invokes help.
516
517 NOTE: Emacs help works best if it is invoked by a single key whose value
518 should be stored in the variable help-char. Andrew Arensburger
519 <arensb@kong.gsfc.nasa.gov> wrote a patch that allows the help facility
520 to work properly when invoked by multiple character sequences.
521
522 14: How do I find out how to do something in GNU Emacs?
523
524 There are several methods for finding out how to do things in Emacs.
525
526 * The complete text of the Emacs manual is available on-line via the Info
527 hypertext reader. Type "C-h i" to invoke Info.
528
529 * You can order a hardcopy of the manual from the FSF. See question 15.
530
531 * You can get a printed reference card listing commands and keys to
532 invoke them. You can order one from the FSF for $1 (or 10 for $5), or
533 you can print your own from the etc/refcard.tex or etc/refcard.ps files
534 in the Emacs distribution.
535
536 * You can list all of the commands whose names contain a certain word
537 (actually which match a regular expression) using "C-h a" (M-x
538 command-apropos).
539
540 * You can list all of the functions and variables whose names contain a
541 certain word using M-x apropos.
542
543 * There are many other commands in Emacs for getting help and
544 information. To get a list of these commands, type "C-h C-h C-h".
545
546 15: How do I get a printed copy of the GNU Emacs manual?
547
548 You can order a printed copy of the GNU Emacs manual from the FSF. For
549 details see the file etc/ORDERS.
550
551 The full TeX source for the manual also comes in the `man' directory of
552 the Emacs distribution, if you're daring enough to try to print out this
553 420 page manual yourself (see question 18).
554
555 If you absolutely have to print your own copy, and you don't have TeX,
556 you can get a PostScript version via anonymous FTP:
557
558 /ftp.cs.ubc.ca:pub/archive/gnu/manuals_ps/emacs-19.21.ps.gz
559
560 This site requests that you please CONFINE ANY MAJOR FTPING TO LATE
561 EVENINGS OR EARLY MORNINGS OUR TIME (Pacific time zone, GMT-8). A DVI
562 version is also available via FTP:
563
564 /prep.ai.mit.edu:pub/gnu/emacs-manual-6.0.dvi.gz
565
566 and all prep mirrors (See question 80 for a list).
567
568 A WWW version of the Emacs manual is available on the World-Wide Web at
569 URL
570
571 http://asis01.cern.ch/infohtml/emacs/emacs.html
572
573 See also question 14 for how to view the manual on-line.
574
575 16: Where can I get documentation on GNU Emacs Lisp?
576
577 Within Emacs, you can type "C-h f" to get the documentation for a
578 function, "C-h v" for a variable.
579
580 For more information, obtain the GNU Emacs Lisp Reference Manual.
581 Details on ordering it from FSF are in file etc/ORDERS.
582
583 For on-line use, a set of pregenerated Info files is available with the
584 Texinfo source for the Emacs Lisp manual via anonymous FTP at
585
586 /prep.ai.mit.edu:pub/gnu/elisp-manual-19-2.3.tar.gz
587
588 and all prep mirrors (See question 80 for a list).
589
590 You can also create the Info files from the Texinfo source. See question
591 17 for details on how to install these files on-line.
592
593 A WWW version of the Emacs Lisp Reference Manual is available at
594
595 http://www.cs.indiana.edu/usr/local/www/elisp/lispref/elisp_toc.html
596
597 An introduction to Emacs Lisp is available at
598
599 http://www.cs.indiana.edu/usr/local/www/elisp/elisp-intro.html
600
601 Of course, you can also print this 760-page manual yourself. For
602 instructions on how to do this, see question 18.
603
604 17: How do I install a piece of Texinfo documentation?
605
606 First, you must turn the Texinfo files into Info files. You may do this
607 within Emacs, using "M-x texinfo-format-buffer", or with the standalone
608 `makeinfo' program, available as part of the latest Texinfo package via
609 anonymous ftp from:
610
611 /prep.ai.mit.edu:pub/gnu/texinfo-3.1.tar.gz
612
613 and all prep mirrors (See question 80 for a list).
614
615 For information about the Texinfo format, read the Texinfo manual which
616 comes with Emacs. This manual also comes installed in Info format, so
617 you can read it on-line.
618
619 Neither texinfo-format-buffer nor makeinfo installs the resulting Info
620 files in Emacs's Info tree. To install Info files:
621
622 1. Move the files to the `info' directory in the installed Emacs
623 distribution. See question 4 if you don't know where that is.
624
625 2. Edit the file info/dir in the installed Emacs distribution, and add a
626 line for the top level node in the Info package that you are
627 installing. Follow the examples already in this file. The format is:
628
629 * Topic: (relative-pathname). Short description of topic.
630
631 If you want to install Info files and you don't have the necessary
632 privileges, you have several options:
633
634 * Info files don't actually need to be installed before being used. You
635 can feed a file name to the Info-goto-node command (invoked by pressing
636 "g" in Info mode) by typing the name of the file in parentheses. This
637 goes to the node named `Top' in that file. For example, to view a Info
638 file named `XXX' in your home directory, you can type this:
639
640 C-h i g (~/XXX) RET
641
642 * You can create your own Info directory. You can tell Emacs where the
643 Info directory is by adding its pathname to the value of the variable
644 Info-default-directory-list. For example, to use a private Info
645 directory which is a subdirectory of your home directory named `Info',
646 you could put this in your .emacs file:
647
648 (setq Info-default-directory-list
649 (cons "~/Info" Info-default-directory-list))
650
651 You will need a top-level Info file named `dir' in this directory which
652 has everything the system dir file has in it, except it should list
653 only entries for Info files in that directory. You might not need it
654 if all files in this directory were referenced by other `dir' files.
655 The node lists from all dir files in Info-default-directory-list are
656 merged by the Info system.
657
658 18: How do I print a Texinfo file?
659
660 NOTE: You can't get nice printed output from Info files; you must still
661 have the original Texinfo source file for the manual you want to print.
662
663 1. Make sure the first line of the Texinfo file looks like this:
664
665 \input texinfo
666
667 You may need to alter `texinfo' to the full pathname of the
668 texinfo.tex file, which comes with Emacs as man/texinfo.tex (or copy
669 or link it into the current directory).
670
671 2. tex XXX.texinfo
672
673 3. texindex XXX.??
674
675 The `texindex' program comes with Emacs as man/texindex.c.
676
677 4. tex XXX.texinfo
678
679 5. Print the DVI file XXX.dvi in the normal way for printing DVI files at
680 your site.
681
682 To get more general instructions, retrieve the latest Texinfo package
683 mentioned in question 17.
684
685 19: Can I view Info files without using GNU Emacs?
686
687 Yes, the `info', `xinfo', `tkinfo', and `ivinfo' programs do this. Info
688 uses curses, xinfo uses standard X11 libraries, tkinfo uses Tk/Tcl and
689 ivinfo uses InterViews. You can get Info as part of the latest Texinfo
690 package (see question 17). xinfo is available separately:
691
692 /prep.ai.mit.edu:pub/gnu/xinfo-1.01.01.tar.gz
693
694 and all prep mirrors (See question 80 for a list).
695
696 ivinfo is available in a comp.sources.misc archive or from Tom Horsley
697 <tom@ssd.csd.harris.com>. tkinfo is available by anonymous ftp from:
698
699 /ptolemy.eecs.berkeley.edu:pub/misc/tkinfo-0.6.tar.Z
700 /ftp.aud.alcatel.com:tcl/code/tkinfo-0.6.tar.gz
701
702 For ivinfo, you need Stanford's InterViews C++ X library, available via
703 anonymous ftp from interviews.stanford.edu. (A FAQ on InterViews is
704 available at that site in pub/FAQ.)
705
706 20: What informational files are available for GNU Emacs?
707
708 This isn't a frequently asked question, but it should be! A variety of
709 informational files about GNU Emacs and relevant aspects of the GNU
710 project are available for you to read.
711
712 The following files are available in the `etc' directory of the GNU Emacs
713 distribution, and also the latest versions are available individually via
714 anonymous FTP (prep.ai.mit.edu:pub/gnu/GNUinfo/):
715
716 DISTRIB -- GNU Emacs Availability Information,
717 including the popular "Free Software Foundation Order Form"
718 FTP -- How to get GNU Software by Internet FTP or by UUCP
719 GNU -- The GNU Manifesto
720 INTERVIEW -- Richard Stallman discusses his public-domain
721 UNIX-compatible software system with BYTE editors
722 MACHINES -- Status of GNU Emacs on Various Machines and Systems
723 MAILINGLISTS -- GNU Project Electronic Mailing Lists
724 SERVICE -- GNU Service Directory
725 SUN-SUPPORT -- including "Using Emacstool with GNU Emacs"
726
727 These files are available in the `etc' directory of the GNU Emacs
728 distribution:
729
730 COPYING -- GNU Emacs General Public License
731 NEWS -- GNU Emacs news, a history of user-visible changes
732 LPF -- Why you should join the League for Programming Freedom
733 FAQ -- GNU Emacs Frequently Asked Questions (You're reading it)
734
735 These files are available via anonymous FTP (prep.ai.mit.edu:pub/gnu/):
736
737 tasks -- GNU Task List
738 standards.text -- GNU Coding Standards
739
740 In addition, all of the above files are available directly from the FSF
741 via e-mail. Of course, please try to get them from a local source first
742 (See question 80 for a list).
743
744 These additional files are available from the FSF via e-mail:
745
746 * GNU's Bulletin, January 1994
747 GNU's Who
748 GNU's Bulletin
749 What Is the Free Software Foundation?
750 What Is Copyleft?
751 Donations Translate Into Free Software
752 Cygnus Matches Donations!
753 GNUs Flashes
754 What Is the LPF?
755 News from the LPF
756 Free Software Support
757 Project GNU Wish List
758 Towards a New Strategy of OS Design
759 Part 1: A More Usable Approach to OS Design
760 Part 2: A Look at Some of the Hurd's Beasts
761 Second Annual GNU Seminar in Japan
762 GNU and other Free Software in Japan
763 Freely Available Texts
764 OCEAN Integrated-Circuit Design System
765 Hundred Acre Consulting Expands
766 Project GNU Status Report
767 GNU Documentation
768 GNU Software Available Now
769 Source Code CD-ROM
770 Compiler Tools Binaries CD-ROM
771 Tape & CD-ROM Subscription Service
772 How to Get GNU Software
773 The Deluxe Distribution
774 MS-DOS Distribution
775 Free Software for Microcomputers
776 FSF T-shirt
777 Thank GNUs
778 Free Software Foundation Order Form
779 * Legal issues about contributing code to GNU
780 * GNU Project Status Report
781
782 A collection of past GNU's Bulletins is available via anonymous FTP from:
783
784 /ftp.funet.fi:pub/gnu/Bulletins/
785
786 The latest bulletin is available on the World-Wide Web at URL:
787
788 http://info.desy.de/gnu/www/gnu_bulletin_9401/gnu_bulletin_9401_toc.html
789
790 21: Where can I get help in installing GNU Emacs?
791
792 Look in etc/SERVICE for names of companies and individuals who will sell
793 you this type of service. An up-to-date version of the SERVICE file is
794 available on prep.ai.mit.edu (also see question 20).
795
796 You might also try the help-gnu-emacs mailing list, which is also known
797 as the gnu.emacs.help newsgroup, although many installation questions can
798 easily be answered by looking at the PROBLEMS file (in the top-level
799 directory when you unpack the Emacs source).
800
801 22: Where can I get the latest version of this document (the FAQ list)?
802
803 The GNU Emacs FAQ is available in several ways:
804
805 * Via USENET. If you can read news, the FAQ should be available in your
806 news spool, in both the gnu.emacs.help and comp.emacs newsgroups.
807 Every news reader should allow you to read any news article that is
808 still in the news spool, even if you have read the article before. You
809 may need to read the instructions for your news reader to discover how
810 to do this. In `rn', this command will do this for you at the article
811 selection level:
812
813 ?GNU Emacs FAQ?rc:m
814
815 In Gnus, you should type "C-u c-x c-s" from the *Summary* buffer or
816 "C-u SPC" from the *Newsgroup* buffer to view all articles in a
817 newsgroup.
818
819 If the FAQ articles have expired and been deleted from your news spool,
820 it might (or might not) do some good to complain to your news
821 administrator, because the most recent FAQ should not expire before for
822 a while.
823
824 * Via anonymous FTP. You can fetch the FAQ articles via anonymous FTP
825 from the-tech.mit.edu, in ~ftp/pub/GNU-Emacs/.
826
827 * In the GNU Emacs distribution. Since GNU Emacs 18.56, the latest
828 available version of the FAQ at the time of release has been part of
829 the GNU Emacs distribution as file etc/FAQ.
830
831 * Via the World-Wide Web. Point your favorite Web browser (Mosaic, Lynx,
832 w3-mode) to one of the following URLs:
833
834 http://www.cis.ohio-state.edu/hypertext/faq/usenet/GNU-Emacs-FAQ/top.html
835 http://scwww.ucs.indiana.edu/FAQ/Emacs/
836
837 * If all goes well, this FAQ should also be available via anonymous ftp
838 and e-mail from rtfm.mit.edu, the main repository for FAQs and other
839 items posted to news.answers. However, we are omitting explicit
840 directions on how to retrieve the FAQ from rtfm.mit.edu, since it's
841 possible that it won't end up there right away. (We're new at this
842 FAQ-posting business.) Instructions on how to retrieve the FAQ from
843 rtfm.mit.edu should be in the next version of the FAQ.
844
845 * As the very last resort, you can e-mail a request to
846 gnu-emacs-faq-maintainers@bigbird.bu.edu. Don't do this unless you
847 have made a serious effort to obtain the FAQ list via one of the
848 methods listed above.
849
850 Status of Emacs
851
852 23: Where does the name "Emacs" come from?
853
854 Emacs originally was an acronym for Editor MACroS. RMS says he "picked
855 the name `Emacs' because `E' was not in use as an abbreviation on ITS at
856 the time." The first Emacs was a set of macros written in 1976 at MIT by
857 RMS for the editor TECO (Text Editor and COrrector (originally Tape
858 Editor and COrrector)) under ITS on a PDP-10. RMS had already extended
859 TECO with a "real-time" full screen mode with active keys. Emacs was
860 started by Guy Steele <gls@think.com> as a project to unify the many
861 divergent TECO command sets and key bindings at MIT.
862
863 Many people have said that TECO code looks a lot like line noise. See
864 alt.lang.teco if you are interested. Someone has written a TECO
865 implementation in Emacs Lisp; it would be an interesting project to run
866 the original TECO Emacs inside of GNU Emacs.
867
868 24: What is the latest version of GNU Emacs?
869
870 GNU Emacs 19.27 is the current version as of 6 September, 1994.
871
872 25: What is different about GNU Emacs 19?
873
874 To find out what has changed in recent versions, type C-h n (M-x
875 view-emacs-news). The oldest changes are at the bottom of the file, so
876 you might want to read it starting there, rather than at the top.
877
878 The most obvious changes have to do with the user interface -- GNU Emacs
879 19 is fully X-aware, and provides pull-down menus and scroll bars. Emacs
880 19 also supports fonts and colors, including context-specific
881 highlighting of source code and other types of buffers.
882
883 Other changes include a line number mode, which displays the current line
884 number in the mode line, and default bindings for arrow and paging keys
885 that work.
886
887 Lower-level changes include a smarter memory allocation scheme (Emacs now
888 returns memory to the operating system when you kill buffers), a better
889 byte-compiler, and a source-level Emacs Lisp debugger.
890
891 There are also a number of new Lisp packages, ranging from dunnet (an
892 Adventure-like program) to mldrag (allows you to drag the mode line up
893 and down with the mouse buttons) to gud (Grand Unified Debugger mode, for
894 many flavors of debuggers). A number of popular Lisp packages, such as
895 SuperCite and the calendar/diary, are also included.
896
897 Common Things People Want To Do
898
899 26: How do I set up a .emacs file properly?
900
901 See `Init File' in the on-line manual.
902
903 WARNING: In general, new Emacs users should not have .emacs files,
904 because it causes confusing non-standard behavior. Then they send
905 questions to help-gnu-emacs asking why Emacs isn't behaving as
906 documented. :-)
907
908 27: How do I debug a .emacs file?
909
910 First start Emacs with the `-debug-init' command-line option. This
911 option enables the Emacs Lisp debugger before evaluating your .emacs
912 file, and places you in the debugger if something goes wrong. The top
913 line in the trace-back buffer will be the error message, and the second
914 or third line of that buffer will display the Lisp code from your .emacs
915 that caused the problem.
916
917 You can also evaluate an individual function or argument to a function in
918 your .emacs file by moving the cursor to the end of the function or
919 argument and typing "C-x C-e" (M-x eval-last-sexp).
920
921 Use "C-h v" (M-x describe-variable) to check the value of variables which
922 you are trying to set or use.
923
924 28: How do I make Emacs display the current column number?
925
926 Do M-x column-number-mode.
927
928 29: How do I turn on abbrevs by default just in mode XXX?
929
930 Put this in your .emacs file:
931
932 (condition-case ()
933 (quietly-read-abbrev-file)
934 (file-error nil))
935
936 (add-hook 'XXX-mode-hook
937 (function
938 (lambda ()
939 (setq abbrev-mode t))))
940
941 30: How do I turn on auto-fill mode by default?
942
943 To turn on auto-fill mode just once for one buffer, use "M-x
944 auto-fill-mode". To turn it on for every buffer in, for example, Text
945 mode, do this:
946
947 (add-hook 'text-mode-hook 'turn-on-auto-fill)
948
949 If you want auto-fill mode on in all major modes, do this:
950
951 (setq-default auto-fill-function 'do-auto-fill)
952
953 31: How do I make Emacs use a certain major mode for certain files?
954
955 If you want to use XXX mode for all files which end with the extension
956 `.YYY', this will do it for you:
957
958 (setq auto-mode-alist (cons '("\\.YYY\\'" . XXX-mode) auto-mode-alist))
959
960 Otherwise put this somewhere in the first line of any file you want to
961 edit in XXX mode:
962
963 -*-XXX-*-
964
965 Emacs 19 also includes a new variable, interpreter-mode-alist, that
966 specifies which mode to use when loading a shell script. (Emacs
967 determines which interpreter you're using by examining the first line of
968 the file.) This feature only applies when the file name doesn't indicate
969 which mode to use. Use "C-h v" (or M-x describe-variable) to learn more
970 about this variable.
971
972 32: How do I search for, delete, or replace unprintable (8-bit or control)
973 characters?
974
975 To search for a single character that appears in the buffer as, for
976 example, `\237', you can type "C-s C-q 2 3 7". (This assumes the value
977 of search-quote-char is 17 (i.e., C-q).) Searching for ALL unprintable
978 characters is best done with a "regexp" search. The easiest regexp to
979 use for the unprintable chars is the complement of the regexp for the
980 printable chars.
981
982 Regexp for the printable chars: [\t\n\r\f -~]
983
984 Regexp for the unprintable chars: [^\t\n\r\f -~]
985
986 To type some of these special characters in an interactive argument to
987 isearch-forward-regexp or re-search-forward, you need to use C-q. (`\t',
988 `\n', `\r', and `\f' stand respectively for TAB, LFD, RET, and C-l.) So,
989 to search for unprintable characters using re-search-forward:
990
991 M-x re-search-forward RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET
992
993 Using isearch-forward-regexp:
994
995 M-C-s [^ TAB RET C-q RET C-q C-l SPC -~]
996
997 To delete all unprintable characters, simply use replace-regexp:
998
999 M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET RET
1000
1001 Replacing is similar to the above. To replace all unprintable characters
1002 with a colon, use:
1003
1004 M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET : RET
1005
1006 NOTE: * You don't need to quote TAB with either isearch or typing
1007 something in the minibuffer.
1008
1009 33: How can I highlight a region of text in Emacs?
1010
1011 If you are using a windowing system such as X, you can cause the region
1012 to be highlighted when the mark is active by including
1013
1014 (transient-mark-mode t)
1015
1016 in your .emacs. There are also the following packages for content- based
1017 highlighting:
1018
1019 hilit19.el
1020 font-lock.el
1021
1022 34: How do I control Emacs's case-sensitivity when searching/replacing?
1023
1024 For searching, the value of the variable case-fold-search determines
1025 whether they are case sensitive:
1026
1027 (setq case-fold-search nil) ; make searches case sensitive
1028 (setq case-fold-search t) ; make searches case insensitive
1029
1030 Similarly, for replacing the variable case-replace determines whether
1031 replacements preserve case.
1032
1033 To change the case sensitivity just for one major mode, use the major
1034 mode's hook. For example:
1035
1036 (add-hook 'XXX-mode-hook
1037 (function
1038 (lambda ()
1039 (setq case-fold-search nil))))
1040
1041 35: How do I make Emacs wrap words for me?
1042
1043 Use auto-fill mode, activated by typing "M-x auto-fill-mode". The
1044 default maximum line width is 70, determined by the variable fill-column.
1045 To learn how to turn this on automatically, see question 30.
1046
1047 36: Where can I get a better spelling checker for Emacs?
1048
1049 Use Ispell. See question 101.
1050
1051 37: How can I spell-check TeX or *roff documents?
1052
1053 Use Ispell. See question 101. Ispell can handle TeX and *roff
1054 documents.
1055
1056 38: How do I change load-path?
1057
1058 In general, you should only *add* to the load-path. You can add
1059 directory /XXX/YYY to the load path like this:
1060
1061 (setq load-path (cons "/XXX/YYY/" load-path))
1062
1063 To do this relative to your home directory:
1064
1065 (setq load-path (cons "~/YYY/" load-path)
1066
1067 39: How do I use an already running Emacs from another window?
1068
1069 The `emacsclient' program is for editing a file using an already running
1070 Emacs rather than starting up a new Emacs. It does this by sending a
1071 request to the already running Emacs, which must be expecting the
1072 request.
1073
1074 * Setup
1075
1076 Emacs must have executed the `server-start' function for emacsclient to
1077 work. This can be done either by a command line option:
1078
1079 emacs -f server-start
1080
1081 or by invoking server-start from the .emacs file:
1082
1083 (if (some conditions are met) (server-start))
1084
1085 When this is done, Emacs starts a subprocess running a program called
1086 `server'. `server' creates a Unix domain socket in the user's home
1087 directory named `.emacs_server'.
1088
1089 To get your news reader, mail reader, etc., to invoke emacsclient, try
1090 setting the environment variable EDITOR (or sometimes VISUAL) to the
1091 value `emacsclient'. You may have to specify the full pathname of the
1092 emacsclient program instead. Examples:
1093
1094 # csh commands:
1095 setenv EDITOR emacsclient
1096 setenv EDITOR /usr/local/emacs/etc/emacsclient # using full pathname
1097
1098 # sh command:
1099 EDITOR=emacsclient ; export EDITOR
1100
1101 * Normal use
1102
1103 When emacsclient is run, it connects to the `.emacs_server' socket and
1104 passes its command line options to `server'. When `server' receives
1105 these requests, it sends this information on the the Emacs process,
1106 which at the next opportunity will visit the files specified. (Line
1107 numbers can be specified just like with Emacs.) The user will have to
1108 switch to the Emacs window by hand. When the user is done editing a
1109 file, the user can type "C-x #" (or M-x server-edit) to indicate this.
1110 If there is another buffer requested by emacsclient, Emacs will switch
1111 to it; otherwise emacsclient will exit, signaling the calling program
1112 to continue.
1113
1114 NOTE: `emacsclient' and `server' must be running on machines which
1115 share the same filesystem for this to work. The pathnames that
1116 emacsclient specifies should be correct for the filesystem that the
1117 Emacs process sees. The Emacs process should not be suspended at the
1118 time emacsclient is invoked. emacsclient should either be invoked from
1119 another X window or from a shell window inside Emacs itself.
1120
1121 There is an enhanced version of emacsclient/server called `gnuserv' by
1122 Andy Norman <ange@hplb.hpl.hp.com> which is available in the Emacs Lisp
1123 Archive. gnuserv uses Internet domain sockets, so it can work across
1124 most network connections. It also supports the execution of arbitrary
1125 Emacs Lisp forms and also does not require the client program to wait
1126 for completion. It is available via anonymous FTP (Emacs Lisp Archive:
1127 packages/gnuserv.shar).
1128
1129 40: How do I make Emacs recognize my compiler's funny error messages?
1130
1131 The variable compilation-error-regexp-alist helps control how Emacs
1132 parses your compiler output. It is a list of triples of the form:
1133
1134 (REGEXP FILE-IDX LINE-IDX)
1135
1136 where REGEXP, FILE-IDX and LINE-IDX are strings. To help determine what
1137 the constituent elements should be, load compile.el and then use
1138
1139 C-h v compilation-error-regexp-alist RET
1140
1141 to see the current value. A good idea is to look at compile.el itself as
1142 the comments included for this variable are quite useful -- the regular
1143 expressions required for your compiler's output may be very close to one
1144 already provided. Once you have determined the proper regexps, use the
1145 following to inform Emacs of your changes:
1146
1147 (setq compilation-error-regexp-alist
1148 (cons '(REGEXP FILE-IDX LINE-IDX)
1149 compilation-error-regexp-alist))
1150
1151 41: How do I indent switch statements like this?
1152
1153 Many people want to indent their switch statements like this:
1154
1155 f()
1156 {
1157 switch(x) {
1158 case A:
1159 x1;
1160 break;
1161 case B:
1162 x2;
1163 break;
1164 default:
1165 x3;
1166 }
1167 }
1168
1169 The solution at first appears to be: set c-indent-level to 4 and
1170 c-label-offset to -2. However, this will give you an indentation spacing
1171 of four instead of two.
1172
1173 The solution is to use cc-mode (available from the Emacs Lisp Archive)
1174 and add the following line:
1175
1176 (c-set-offset 'case-label '+)
1177
1178 There appears to be no way to do this with the old c-mode.
1179
1180 42: How can I make Emacs automatically scroll horizontally?
1181
1182 Use hscroll.el by Wayne Mesard <wmesard@esd.sgi.com>.
1183
1184 43: How do I make Emacs "typeover" or "overwrite" instead of inserting?
1185
1186 M-x overwrite-mode (a minor mode).
1187
1188 On some workstations, the "Insert" key toggles insert and overwrite
1189 modes.
1190
1191 44: How do I stop Emacs from beeping on a terminal?
1192
1193 Martin R. Frank <martin@cc.gatech.edu> writes:
1194
1195 Tell Emacs to use the `visible bell' instead of the audible bell, and
1196 set the visible bell to nothing.
1197
1198 Put this in your TERMCAP environment variable:
1199
1200 ... :vb=: ...
1201
1202 And evaluate this:
1203
1204 (setq visible-bell t)
1205
1206 45: How do I turn down the bell volume in Emacs running under X Windows?
1207
1208 You can adjust the bell volume and duration for all programs with the
1209 shell command xset.
1210
1211 Invoking xset without any arguments produces some basic information,
1212 including the following:
1213
1214 usage: xset [-display host:dpy] option ...
1215 To turn bell off:
1216 -b b off b 0
1217 To set bell volume, pitch and duration:
1218 b [vol [pitch [dur]]] b on
1219
1220 46: How do I tell Emacs to automatically indent a new line to the
1221 indentation of the previous line?
1222
1223 One solution is Indented Text Mode (M-x indented-text-mode).
1224
1225 If you have auto-fill mode on (a minor mode, see question 30), you can
1226 tell Emacs to prefix every line with a certain character sequence, the
1227 "fill prefix." Type the prefix at the beginning of a line, position
1228 point after it, and then type "C-x ." (set-fill-prefix) to set the fill
1229 prefix. Thereafter, auto-filling will automatically put the fill prefix
1230 at the beginning of new lines, and M-q (fill-paragraph) will maintain any
1231 fill prefix when refilling the paragraph.
1232
1233 NOTE: If you have paragraphs with different levels of indentation, you
1234 will have to set the fill prefix to the correct value each time you move
1235 to a new paragraph. To avoid this hassle, try one of the many packages
1236 available from the Emacs Lisp Archive. Look up `fill' and `indent' in
1237 the Lisp Code Directory for guidance.
1238
1239 47: How do I show which parenthesis matches the one I'm looking at?
1240
1241 GNU Emacs 19 comes with paren.el, which (when loaded) will automatically
1242 highlight matching parentheses whenever point (i.e., the cursor) is
1243 located over one. To load paren automatically, include the line
1244
1245 (require 'paren)
1246
1247 in your .emacs file.
1248
1249 Alternatives to paren include:
1250
1251 * If you're looking at a right parenthesis (or brace or bracket) you can
1252 delete it and reinsert it. Emacs will blink the cursor on the matching
1253 parenthesis.
1254
1255 * M-C-f (forward-sexp) and M-C-b (backward-sexp) will skip over one set
1256 of balanced parentheses, so you can see which parentheses match. (You
1257 can train it to skip over balanced brackets and braces at the same time
1258 by modifying the syntax table.)
1259
1260 * Here is some Emacs Lisp that will make the % key show the matching
1261 parenthesis, like in vi. In addition, if the cursor isn't over a
1262 parenthesis, it simply inserts a % like normal.
1263
1264 ;; By an unknown contributor
1265
1266 (global-set-key "%" 'match-paren)
1267
1268 (defun match-paren (arg)
1269 "Go to the matching parenthesis if on parenthesis otherwise insert %."
1270 (interactive "p")
1271 (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
1272 ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
1273 (t (self-insert-command (or arg 1)))))
1274
1275 48: In C mode, can I show just the lines that will be left after #ifdef
1276 commands are handled by the compiler?
1277
1278 M-x hide-ifdef-mode. (This is a minor mode.)
1279
1280 49: Is there an equivalent to the `.' (dot) command of vi?
1281
1282 (`.' is the redo command in vi. It redoes the last insertion/deletion.)
1283
1284 No, not really.
1285
1286 You can type "C-x ESC ESC" (repeat-complex-command) to reinvoke commands
1287 that used the minibuffer to get arguments. In repeat-complex-command you
1288 can type M-p and M-n to scan through all the different complex commands
1289 you've typed.
1290
1291 To repeat something on each line, use keyboard macros. (See `Keyboard
1292 Macros' in the on-line manual.)
1293
1294 50: What are the valid X resource settings (i.e., stuff in .Xdefaults)?
1295
1296 See Emacs man page, or "Resources X" in the on-line manual.
1297
1298 You can also use a resource editor, such as editres (for X11R5 and
1299 onwards), to look at the resource names for the menu bar, assuming Emacs
1300 was compiled with the X toolkit.
1301
1302 51: How do I execute a piece of Emacs Lisp code?
1303
1304 There are a number of ways to execute (called "evaluate") an Emacs Lisp
1305 "form":
1306
1307 * If you want it evaluated every time you run Emacs, put it in a file
1308 named `.emacs' in your home directory.
1309
1310 * You can type the form in the *scratch* buffer, and then type LFD (or
1311 C-j) after it. The result of evaluating the form will be inserted in
1312 the buffer.
1313
1314 * In Emacs-Lisp mode, typing M-C-x evaluates a top-level form before or
1315 around point.
1316
1317 * Typing "C-x C-e" in any buffer evaluates the Lisp form immediately
1318 before point and prints its value in the echo area.
1319
1320 * Typing M-: or M-x eval-expression allows you to type a Lisp form in
1321 the minibuffer which will be evaluated.
1322
1323 * You can use M-x load-file to have Emacs evaluate all the Lisp forms in
1324 a file. (To do this from Lisp use the function `load' instead.)
1325
1326 These functions are also used for evaluating Lisp forms:
1327
1328 load-library, eval-region, eval-current-buffer, require, autoload
1329
1330 52: How do I change Emacs's idea of the tab character's length?
1331
1332 Set the variable default-tab-width. For example, to set tab stops every
1333 10 characters, insert the following in your .emacs file:
1334
1335 (setq default-tab-width 10)
1336
1337 53: How do I insert `>' at the beginning of every line?
1338
1339 Type "M-x replace-regexp RET ^ RET > RET".
1340
1341 To do this only in the region, type "C-x n n M-x replace-regexp RET ^ RET
1342 > RET C-x w".
1343
1344 WARNING: The command narrow-to-region (C-x n n) is disabled by default
1345 because it can be very confusing (i.e., "Oh no! Where did my file go?").
1346
1347 54: How do I insert `_^H' before each character in a paragraph to get an
1348 underlined paragraph?
1349
1350 M-x underline-region.
1351
1352 55: How do I repeat a command as many times as possible?
1353
1354 Use "C-x (" and "C-x )" to make a keyboard macro that invokes the command
1355 and then type "M-0 C-x e".
1356
1357 WARNING: any messages your command prints in the echo area will be
1358 suppressed.
1359
1360 56: How do I make Emacs behave like this: when I go up or down, the cursor
1361 should stay in the same column even if the line is too short?
1362
1363 M-x picture-mode. (This is a minor mode, in theory anyway ...)
1364
1365 57: How do I tell Emacs to iconify itself?
1366
1367 "C-z" iconifies Emacs when running in X and suspends Emacs otherwise.
1368 See `Misc X' in the on-line manual.
1369
1370 58: How do I use regexps (regular expressions) in Emacs?
1371
1372 See `Regexps' in the on-line manual.
1373
1374 WARNING: The "or" operator is `\|', not `|', and the grouping operators
1375 are `\(' and `\)'. Also, the string syntax for a backslash is "\\".
1376 Thus, the string syntax for a regular expression like xxx\(foo\|bar\) is
1377 "xxx\\(foo\\|bar\\)". Notice the duplicated backslashes!
1378
1379 WARNING: Unlike in Unix grep, sed, etc., a complement character set
1380 ([^...]) can match a newline character (LFD aka C-j aka \n), unless
1381 newline is mentioned as one of the characters not to match.
1382
1383 WARNING: The character syntax regexps (e.g., `\sw') are not meaningful
1384 inside character set regexps (e.g., `[aeiou]'). (This is actually
1385 typical for regexp syntax.)
1386
1387 59: How do I perform a replace operation across more than one file?
1388
1389 The "tags" feature of Emacs includes the command tags-query-replace which
1390 performs a query-replace across all the files mentioned in the TAGS file.
1391 See `Tags:Tags Search' in the on-line manual.
1392
1393 In addition, Martin Boyer has written a package named global-replace
1394 which will perform a query-replace across all the files mentioned in the
1395 *compilation* buffer (usually done after a `grep'), which is available
1396 via anonymous FTP:
1397
1398 /ireq-robot.hydro.qc.ca:pub/emacs/lisp/compile.el.z
1399 /ireq-robot.hydro.qc.ca:pub/emacs/lisp/global-replace.el.z
1400 /ireq-robot.hydro.qc.ca:pub/emacs/lisp/query.el.z
1401
1402 NOTE: These files are compressed using GNU zip ("gzip"); you can get a
1403 copy from gzip from prep and its mirrors (see question 80).
1404
1405 60: Where is the documentation for `etags'?
1406
1407 The `etags' man page should be in the same place as the `emacs' man page.
1408
1409 Quick command-line switch descriptions are also available. For example,
1410 `etags -H'.
1411
1412
1413 Bugs/Problems
1414
1415 61: Does Emacs have problems with files larger than 8 megabytes?
1416 [This problem has been solved better in Emacs 19.29 because the buffer
1417 size limit is now 16 times as large.]
1418
1419 Most installed versions of GNU Emacs will use 24-bit signed integers (and
1420 24-bit pointers) internally. This limits the file size that Emacs can
1421 handle to 8,388,607 bytes (2^23 - 1).
1422
1423 Leonard N. Zubkoff <lnz@lucid.com> suggests putting the following two
1424 lines in src/config.h before compiling Emacs to allow for 26-bit integers
1425 and pointers (and thus filesizes of up to 33,554,431 bytes):
1426
1427 #define VALBITS 26
1428 #define GCTYPEBITS 5
1429
1430 WARNING: This method may result in `ILLEGAL DATATYPE' and other random
1431 errors on some machines.
1432
1433 David Gillespie <daveg@csvax.cs.caltech.edu> gives an explanation of why
1434 Emacs uses 24 bit integers and pointers:
1435
1436 Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed
1437 language in the sense that you can put any value of any type into any
1438 variable, or return it from a function, and so on. So each value must
1439 carry a "tag" along with it identifying what kind of thing it is, e.g.,
1440 integer, pointer to a list, pointer to an editing buffer, and so on.
1441 Emacs uses standard 32-bit integers for data objects, taking the top 8
1442 bits for the tag and the bottom 24 bits for the value. So integers
1443 (and pointers) are somewhat restricted compared to true C integers and
1444 pointers.
1445
1446 Emacs uses 8-bit tags because that's a little faster on byte-oriented
1447 machines, but there are only really enough tags to require 6 bits.
1448
1449 62: How do I get rid of the ^M junk in my shell buffer?
1450
1451 Try typing "M-x shell-strip-ctrl-m RET" while in shell-mode to make them
1452 go away. If that doesn't work, you have several options:
1453
1454 For tcsh, put this in your `.cshrc' (or `.tcshrc') file:
1455
1456 if ($?EMACS) then
1457 if ("$EMACS" == t) then
1458 if ($?tcsh) unset edit
1459 stty nl
1460 endif
1461 endif
1462
1463 Or put this in your .emacs_tcsh file:
1464
1465 unset edit
1466 stty nl
1467
1468 Alternatively, use csh in your shell buffers instead of tcsh. One way
1469 is:
1470
1471 (setq explicit-shell-file-name "/bin/csh")
1472
1473 and another is to do this in your .cshrc (or .tcshrc) file:
1474
1475 setenv ESHELL /bin/csh
1476
1477 (You must start Emacs over again with the environment variable properly
1478 set for this to take effect.)
1479
1480 63: Why do I get `Process shell exited abnormally with code 1'?
1481
1482 The most likely reason for this message is that the `env' program is not
1483 properly installed. Compile this program for your architecture, and
1484 install it with a+x permission in the architecture-dependent Emacs
1485 program directory. (You can find what this directory is at your site by
1486 inspecting the value of the variable exec-directory by typing "C-h v
1487 exec-directory RET".)
1488
1489 You should also check for other programs named `env' in your path (e.g.,
1490 SunOS has a program named /usr/bin/env). We don't understand why this
1491 can cause a failure and don't know a general solution for working around
1492 the problem in this case.
1493
1494 The `make clean' command will remove `env' and other vital programs, so
1495 be careful when using it.
1496
1497 It has been reported that this sometimes happened when Emacs was started
1498 as an X client from an xterm window (i.e., had a controlling tty) but the
1499 xterm was later terminated.
1500
1501 See also PROBLEMS (in the top-level directory when you unpack the Emacs
1502 source) for other possible causes of this message.
1503
1504 64: Where is the termcap/terminfo entry for terminal type `emacs'?
1505
1506 The termcap entry for terminal type `emacs' is ordinarily put in the
1507 TERMCAP environment variable of subshells. It may help in certain
1508 situations (e.g., using rlogin from shell buffer) to add an entry for
1509 `emacs' to the system-wide termcap file. Here is a correct termcap entry
1510 for `emacs':
1511
1512 emacs:tc=unknown:
1513
1514 To make a terminfo entry for `emacs', use `tic' or `captoinfo'. You need
1515 to generate /usr/lib/terminfo/e/emacs. It may work to simply copy
1516 /usr/lib/terminfo/d/dumb to /usr/lib/terminfo/e/emacs.
1517
1518 Having a termcap/terminfo entry will not enable the use of full screen
1519 programs in shell buffers. Use M-x terminal-emulator for that instead.
1520
1521 A workaround to the problem of missing termcap/terminfo entries is to
1522 change terminal type `emacs' to type `dumb' or `unknown' in your shell
1523 start up file. `csh' users could put this in their .cshrc files:
1524
1525 if ("$term" == emacs) set term=dumb
1526
1527 65: Why does Emacs spontaneously start displaying `I-search:' and beeping?
1528
1529 Your terminal (or something between your terminal and the computer) is
1530 sending C-s and C-q for flow control, and Emacs is receiving these
1531 characters and interpreting them as commands. (The C-s character
1532 normally invokes the isearch-forward command.) For possible solutions,
1533 see question 110.
1534
1535 66: Why can't Emacs talk to certain hosts (or certain hostnames)?
1536
1537 The problem may be that Emacs is linked with a wimpier version of
1538 gethostbyname than the rest of the programs on the machine. This is
1539 often manifested as a message on startup of `X server not responding.
1540 Check your DISPLAY environment variable.' or a message of `Unknown host'
1541 from open-network-stream.
1542
1543 On a Sun, this may be because Emacs had to be linked with the static C
1544 library. The version of gethostbyname in the static C library may only
1545 look in /etc/hosts and the NIS (YP) maps, while the version in the
1546 dynamic C library may be smart enough to check DNS in addition to or
1547 instead of NIS. On a Motorola Delta running System V R3.6, the version
1548 of gethostbyname in the standard library works, but the one that works
1549 with NIS doesn't (the one you get with -linet). Other operating systems
1550 have similar problems.
1551
1552 Try these options:
1553
1554 * Explicitly add the host you want to communicate with to /etc/hosts.
1555
1556 * Relink Emacs with this line in src/config.h:
1557
1558 #define LIBS_SYSTEM -lresolv
1559
1560 * Replace gethostbyname and friends in libc.a with more useful versions
1561 such as the ones in libresolv.a. Then relink Emacs.
1562
1563 * If you are actually running NIS, make sure that `ypbind' is properly
1564 told to do DNS lookups with the correct command line switch.
1565
1566 * Use tcp.el and tcp.c from Gnus. This has the additional advantage that
1567 you can use numeric IP addresses instead of names. open-network-stream
1568 currently can't handle numeric addresses. Brian Thomson
1569 <thomson@hub.toronto.edu> has a enhancement to open-network-stream to
1570 allow it to handle numeric addresses.
1571
1572 67: Why does Emacs say `Error in init file'?
1573
1574 An error occurred while loading either your .emacs file or the
1575 system-wide lisp/default.el file. For information on how to debug your
1576 .emacs file, see question 27.
1577
1578 It may be the case that you may need to load some package first, or use a
1579 hook that will be evaluated after the package is loaded. A common case
1580 of this is explained in question 106.
1581
1582 68: Why does Emacs ignore my X resources (my .Xdefaults file)?
1583
1584 As of version 19, Emacs searches for X resources in the files specified
1585 by the XFILESEARCHPATH, XUSERFILESEARCHPATH, and XAPPLRESDIR environment
1586 variables, emulating the functionality provided by programs written using
1587 Xt.
1588
1589 XFILESEARCHPATH and XUSERFILESEARCHPATH should be a list of file names
1590 separated by colons; XAPPLRESDIR should be a list of directory names
1591 separated by colons.
1592
1593 Emacs searches for X resources
1594
1595 + specified on the command line, with the `-xrm RESOURCESTRING'
1596 option,
1597 + then in the value of the XENVIRONMENT environment variable,
1598 - or if that is unset, in the file named ~/.Xdefaults-HOSTNAME if it
1599 exists
1600 (where HOSTNAME is the hostname of the machine Emacs is running on),
1601 + then in the screen-specific and server-wide resource properties
1602 provided by the server,
1603 - or if those properties are unset, in the file named ~/.Xdefaults
1604 if it exists,
1605 + then in the files listed in XUSERFILESEARCHPATH,
1606 - or in files named LANG/Emacs in directories listed in XAPPLRESDIR
1607 (where LANG is the value of the LANG environment variable), if
1608 the LANG environment variable is set,
1609 - or in files named Emacs in the directories listed in XAPPLRESDIR
1610 - or in ~/LANG/Emacs (if the LANG environment variable is set),
1611 - or in ~/Emacs,
1612 + then in the files listed in XFILESEARCHPATH.
1613
1614 69: Why does Emacs take 20 seconds to visit a file?
1615
1616 The usual cause is that the master lock file, `!!!SuperLock!!!' has been
1617 left in the lock directory somehow. Delete it.
1618
1619 Mark Meuer <meuer@geom.umn.edu> says that NeXT NFS has a bug where an
1620 exclusive create succeeds but returns an error status. This can cause the
1621 same problem. Since Emacs's file locking doesn't work over NFS anyway,
1622 the best solution is to recompile Emacs with CLASH_DETECTION undefined.
1623
1624 70: How do I edit a file with a `$' in its name?
1625
1626 When entering a filename in the minibuffer, Emacs will attempt to expand
1627 a `$' followed by a word as an environment variable. To suppress this
1628 behavior, type "$$" instead.
1629
1630 71: Why does shell mode lose track of the shell's current directory?
1631
1632 Emacs has no way of knowing when the shell actually changes its
1633 directory. This is an intrinsic limitation of Unix. So it tries to
1634 guess by recognizing `cd' commands. If you type `cd' followed by a
1635 directory name with a variable reference (`cd $HOME/bin') or with a shell
1636 metacharacter (`cd ../lib*'), Emacs will fail to correctly guess the
1637 shell's new current directory. A huge variety of fixes and enhancements
1638 to shell mode for this problem have been written to handle this problem.
1639 Check the Lisp Code Directory (see question 77).
1640
1641 You can tell Emacs the shell's current directory with the command "M-x
1642 dirs".
1643
1644 72: Are there any security risks in GNU Emacs?
1645
1646 * the `movemail' incident (No, this is not a risk.)
1647
1648 In his book "The Cuckoo's Egg," Cliff Stoll describes this in chapter
1649 4. The site at LBL had installed the `etc/movemail' program setuid
1650 root. (As of version 19, movemail is in your architecture-specific
1651 directory; type "C-h v directory RET" to see what it is.) Since
1652 `movemail' had not been designed for this situation, a security hole
1653 was created and users could get root privileges.
1654
1655 `movemail' has since been changed so that even if it is installed
1656 setuid root this security hole will not be a result.
1657
1658 We have heard unverified reports that the Internet worm took advantage
1659 of this configuration problem.
1660
1661 * the file-local-variable feature (Yes, a risk, but easy to change.)
1662
1663 There is an Emacs feature that allows the setting of local values for
1664 variables when editing a file by including specially formatted text
1665 near the end of the file. This feature also includes the ability to
1666 have arbitrary Emacs Lisp code evaluated when the file is visited.
1667 Obviously, there is a potential for Trojan horses to exploit this
1668 feature.
1669
1670 If you set the variable inhibit-local-variables to a non-nil value,
1671 Emacs will display the special local variable settings of a file that
1672 you visit and ask you if you really want them. This variable is not
1673 mentioned in the manual.
1674
1675 It is wise to do this in lisp/site-init.el before building Emacs:
1676
1677 (setq inhibit-local-variables t)
1678
1679 If Emacs has already been built, the expression can be put in
1680 lisp/default.el instead, or an individual can put it in their own
1681 .emacs file.
1682
1683 The ability to exploit this feature by sending e-mail to an Rmail user
1684 was fixed sometime after Emacs 18.52. However, any new package that
1685 uses find-file or find-file-noselect has to be careful about this.
1686
1687 For more information, see `File Variables' in the on-line manual
1688 (which, incidentally, does not describe how to disable the feature).
1689
1690 * synthetic X events (Yes, a risk, use MIT-MAGIC-COOKIE-1 or better.)
1691
1692 Emacs accepts synthetic X events generated by the SendEvent request as
1693 though they were regular events. As a result, if you are using the
1694 trivial host-based authentication, other users who can open X
1695 connections to your X workstation can make your Emacs process do
1696 anything, including run other processes with your privileges.
1697
1698 The only fix for this is to prevent other users from being able to open
1699 X connections. The standard way to prevent this is to use a real
1700 authentication mechanism, such as MIT-MAGIC-COOKIE-1. If using the
1701 `xauth' program has any effect, then you are probably using
1702 MIT-MAGIC-COOKIE-1. Your site may be using a superior authentication
1703 method; ask your system administrator.
1704
1705 If real authentication is not a possibility, you may be satisfied by
1706 just allowing hosts access for brief intervals while you start your X
1707 programs, then removing the access. This reduces the risk somewhat by
1708 narrowing the time window when hostile users would have access, but
1709 DOES NOT ELIMINATE THE RISK.
1710
1711
1712 Difficulties Building/Installing/Porting Emacs
1713
1714 73: What should I do if I have trouble building Emacs?
1715
1716 First look in the file PROBLEMS (in the top-level directory when you
1717 unpack the Emacs source) to see if there is already a solution for your
1718 problem. Next check the FAQ (you're reading it). If you don't find a
1719 solution, then report your problem via e-mail to
1720 bug-gnu-emacs@prep.ai.mit.edu. Please do not post it to gnu.emacs.help
1721 or e-mail it to help-gnu-emacs@prep.ai.mit.edu. For further guidelines,
1722 see question 8.
1723
1724 74: How do I stop Emacs from failing when the executable is stripped?
1725
1726 Don't do that.
1727
1728 This problem has been reported on SGI Indigo machines running Irix 4.0.*
1729 and RS/6000 machines. Scott Henry <scotth@hoshi.corp.SGi.COM> posted a
1730 patch that fixes the problem for Irix.
1731
1732 75: Why does linking Emacs with -lX11 fail?
1733
1734 Emacs needs to be linked with the static version of the X11 library,
1735 libX11.a. This may be missing.
1736
1737 Under OpenWindows, you may need to use `add_services' to add the
1738 `OpenWindows Programmers' optional software category from the CD-ROM.
1739
1740 Under HP-UX 8.0, you may need to run `update' again to load the X11-PRG
1741 `fileset'. This may be missing even if you specified `all filesets' the
1742 first time. If libcurses.a is missing, you may need to load the
1743 `Berkeley Development Option' {???}.
1744
1745 If you are building the MIT X11 sources, you may need to modify your
1746 `site.cf' file to get static versions of the libraries. (Info from David
1747 Zuhn <zoo@cygnus.com>.)
1748
1749 Other systems may have similar problems. You can always define
1750 CANNOT_DUMP and link with the shared libraries instead.
1751
1752 To get the Xmenu stuff to work, you need to find a copy of MIT's
1753 liboldX.a.
1754
1755
1756 Finding/Getting Emacs and Related Packages
1757
1758 76: Where can I get GNU Emacs on the net (or by snail mail)?
1759
1760 Look in the files etc/DISTRIB and etc/FTP for information on nearby
1761 archive sites and etc/ORDERS for mail orders. If you don't already have
1762 GNU Emacs, see question 20 for how to get these files.
1763
1764 The latest version is always available via anonymous FTP at MIT:
1765
1766 /prep.ai.mit.edu:pub/gnu/emacs-19.27.tar.gz
1767
1768 See question 80 for information on where to get other GNU software.
1769
1770 77: How do I find a GNU Emacs Lisp package that does XXX?
1771
1772 A listing of Emacs Lisp packages, called the Lisp Code Directory, is
1773 being maintained by Dave Brennan <brennan@hal.com>. You can search
1774 through this list to learn if someone has written something that fits
1775 your needs.
1776
1777 This list is file LCD-datafile.Z in the Emacs Lisp Archive (see the next
1778 question for retrieval instructions). The files lispdir.el.Z and
1779 lispdir.doc in the archive contain Lisp code and information to help you
1780 use the list. Once you have installed lispdir.el and LCD-datafile, then
1781 you can use the `M-x lisp-dir-apropos' command to search the listing.
1782 For example, the command `M-x lisp-dir-apropos RET ange-ftp RET' produces
1783 this output:
1784
1785 GNU Emacs Lisp Code Directory Apropos -- "ange-ftp"
1786 "~/" refers to archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/
1787
1788 ange-ftp (4.18) 15-Jul-1992
1789 Andy Norman, <ange@hplb.hpl.hp.com>
1790 ~/packages/ange-ftp.tar.Z
1791 transparent FTP Support for GNU Emacs
1792 auto-save (1.19) 01-May-1992
1793 Sebastian Kremer, <sk@thp.uni-koeln.de>
1794 ~/misc/auto-save.el.Z
1795 Safer autosaving with support for ange-ftp and /tmp
1796 ftp-quik (1.0) 28-Jul-1993
1797 Terrence Brannon, <tb06@pl122f.eecs.lehigh.edu>
1798 ~/modes/ftp-quik.el.Z
1799 Quik access to dired'ing of ange-ftp and normal paths
1800
1801 78: Where can I get GNU Emacs Lisp packages that don't come with Emacs?
1802
1803 First, check the Lisp Code Directory to find the name of the package you
1804 are looking for (see question 77). Next, check local archives and the
1805 Emacs Lisp Archive to find a copy of the relevant files. If you still
1806 haven't found it, you can send e-mail to the author asking for a copy.
1807
1808 You can access the Emacs Lisp Archive via anonymous FTP:
1809
1810 /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/
1811 /ftp.cs.umn.edu:pub/elisp-archive/
1812 /calypso-2.oit.unc.edu:pub/gnu/elisp-archive/
1813 /ftp.uu.net:packages/gnu/emacs-lisp/
1814 /gatekeeper.dec.com:pub/GNU/elisp-archive/
1815 /nic.switch.ch:mirror/elisp-archive/
1816 /ftp.diku.dk:pub/elisp-archive/
1817 /quepasa.cs.tu-berlin.de:pub/gnu/elisp/
1818 /faui43.informatik.uni-erlangen.de:pub/gnu/elisp-archive/
1819 /ftp.uni-mainz.de:pub/gnu/elisp-archive/
1820 /nic.funet.fi:pub/gnu/emacs/elisp-archive/
1821 /src.doc.ic.ac.uk:gnu/EmacsBits/elisp-archive/
1822
1823 Retrieve and read the file README first.
1824
1825 NOTE: * The archive maintainers do not have time to answer individual
1826 requests for packages or the list of packages in the archive. If
1827 you cannot use FTP or UUCP to access the archive yourself, try to
1828 find a friend who can, but please don't ask the maintainers.
1829
1830 * Any files with names ending in `.Z', `.z', or `.gz' are
1831 compressed, so you should use `binary' mode in FTP to retrieve
1832 them. You should also use binary mode whenever you retrieve any
1833 files with names ending in `.elc'.
1834
1835 79: How do I submit code to the Emacs Lisp Archive?
1836
1837 Guidelines and procedures for submission to the archive can be found in
1838 the file GUIDELINES in the archive directory (see question 78). It
1839 covers documentation, copyrights, packaging, submission, and the Lisp
1840 Code Directory Record. Anonymous FTP uploads are not permitted.
1841 Instead, all submissions are mailed to elisp-archive@cis.ohio-state.edu.
1842 The lispdir.el package has a function named submit-lcd-entry which will
1843 help you with this.
1844
1845 80: Where can I get other up-to-date GNU stuff?
1846
1847 The most up-to-date official GNU stuff is normally kept on
1848 prep.ai.mit.edu and is available for anonymous FTP in the pub/gnu
1849 directory. Read the files etc/DISTRIB and etc/FTP for more information
1850 (see question 20 for retrieval instructions).
1851
1852 The following sites are all mirror images of the GNU distribution area:
1853
1854 /col.hp.com:mirrors/gnu/
1855 /ftp.uu.net:packages/gnu/
1856 /ftp.win.tue.nl:pub/gnu/
1857 /gatekeeper.dec.com:pub/GNU/
1858 /nic.funet.fi:pub/gnu/
1859 /src.doc.ic.ac.uk:gnu/ (available via FTP, NIFTP, FTAM)
1860 /utsun.s.u-tokyo.ac.jp:ftpsync/prep/
1861 /wuarchive.wustl.edu:systems/gnu/
1862
1863 The directory at ftp.uu.net is a mirror of prep.ai.mit.edu:pub/gnu,
1864 except that files larger than one megabyte are split into multiple parts.
1865 If you have trouble transferring large files, you should try here. A
1866 file normally named `XXX' is split into files XXX-split/part[0-9][0-9],
1867 and there will be a file named XXX-split/README which contains the list
1868 of parts (especially helpful when FTP-ing by e-mail), their checksums,
1869 and reassembly instructions.
1870
1871 81: What is the difference between Emacs and Epoch?
1872
1873 Epoch was a modified version of GNU Emacs. It was merged
1874 into XEmacs (formerly "Lucid Emacs"), and the Epoch redisplay, now
1875 being totally rewritten, is slated to be merged into Emacs when the
1876 rewrite is done.
1877
1878 82: What is the difference between Emacs and XEmacs (formerly "Lucid
1879 Emacs")?
1880
1881 XEmacs is a modified version of GNU Emacs.
1882
1883 A comparison between the two versions, written by the XEmacs
1884 maintainers, had been included here. Richard Stallman removed it
1885 from this copy of the FAQ because it was unfair. It was (1)
1886 one-sided, listing only advantages of XEmacs and not advantages of
1887 the principal version of Emacs, (2) biased, stating the opinions
1888 of the XEmacs maintainers, and (3) out of date, listing as advantages of
1889 XEmacs features which in fact both versions have.
1890
1891 83: Where can I get Emacs for my PC running MS-DOS?
1892
1893 Recent releases of GNU Emacs 19 should compile right out of the box on
1894 PCs with a 386 or better, running MS-DOS 3.0 or later. You will need the
1895 following to compile it:
1896
1897 Compiler: djgpp version 1.12 maint 1 or later. Djgpp v2.0 or later is
1898 recommended, since v1.x is being phased out--if you'll have any
1899 djgpp-related problem for which there is no known solution, you
1900 are on your own when you use djgpp v1.x.
1901
1902 You can get the latest release of either v1.x or v2.0 by
1903 grabbing everything in the following directory (using anonymous
1904 ftp):
1905
1906 ftp.simtel.net:/pub/simtelnet/gnu/djgpp
1907
1908 There are a few directories under djgpp whose names begin with
1909 `v1' or `v2'; get the contents of `v2' and `v2gnu' (for djgpp
1910 v2) or `v1' and `v1gnu' (for djgpp v1).
1911
1912 GUnZip and Tar:
1913
1914 The easiest way is to use `djtar' which comes with DJGPP v2.x,
1915 because it can unzip .tar.gz archives on-the-fly (so you won't
1916 need twice the required disk space while untarring the
1917 archive). You get `djtar' with the `v2/djdev201.zip' file from
1918 the above FTP server.
1919
1920 Another (slower) version of Tar which unzips automatically is
1921 available by anonymous ftp on this site:
1922
1923 ftp.kiae.su:msdos/arcers/tar320fp.zip
1924
1925 Or you can unZip the archive with the DJGPP port of GZip (from
1926 the above directory at ftp.simtel.net look for v2/gzp124b.zip),
1927 then unTar it with any of the Tar ports floating around. A
1928 DOS version of GNU tar is available via anonymous ftp from
1929
1930 ftp.unipg.it:/pub/msdos/aspi/gtar-exe.zip
1931
1932 Note that DOS ports of GNU Tar usually cannot unzip compressed
1933 archives.
1934
1935 Another version of Tar for DOS can be found at
1936
1937 ftp.urc.tue.nl:pub/unixtools/dos
1938
1939 However, be warned that not all DOS versions of tar work
1940 equally well, so you might have to try others if this one gives
1941 you trouble.
1942
1943 Utilities: chmod, make, mv, sed, rm.
1944
1945 All of these utilities are available via anonymous ftp from
1946 the site
1947
1948 ftp.simtel.net:/pub/simtelnet/gnu/djgpp/v2gnu
1949
1950 You should grab the file fil313b.zip (contains chmod.exe,
1951 mv.exe, and rm.exe).
1952
1953 A port of GNU Sed is available in the djgpp archives in the
1954 above directory on ftp.coast.net. Look for a file named
1955 v2/sed118b.zip or v1/sed118bn.zip.
1956
1957 The file etc/MSDOS contains some information on the differences between
1958 the Unix and MS-DOS versions of GNU Emacs.
1959
1960 MS-DOS systems are notorious in the problems they present when installing
1961 programs, due to a great variability in both hardware and software. If
1962 you have any unusual problems compiling or using Emacs, please consult
1963 the latest version of the djgpp FAQ list, available as v2/faqNNNb.zip,
1964 where `NNN' is the version number. For v1, get the file v1/faq102.zip.
1965
1966 If you would prefer not to compile Emacs by yourself, you can get
1967 binaries for Emacs via anonymous ftp from many sites; use your Archie
1968 client to search for them.
1969
1970 You might also be interested in Demacs, which runs under MS-DOS (*not*
1971 Microsoft Windows; see question 84) on 386- and 486-based PCs. Demacs is
1972 a port of Nemacs (see question 126), rather than a straight port of GNU
1973 Emacs 18 or 19.
1974
1975 Demacs was developed using an MS-DOS version of gcc called djgpp by
1976 DJ Delorie <dj@delorie.com> which can compile and run large programs
1977 under MS-DOS and under MS Windows. Demacs was derived from Nemacs
1978 rather than straight from GNU Emacs. You can get the most recent version
1979 of Demacs via anonymous ftp from ftp.sigmath.osaka-u.ac.jp in
1980 pub/Msdos/Demacs/*.
1981
1982 For a list of other MS-DOS implementations of Emacs (and Emacs
1983 look-alikes), consult the list of "Emacs implementations and literature,"
1984 available via anonymous ftp from rtfm.mit.edu in pub/usenet/comp.emacs.
1985
1986 84: Where can I get Emacs for my PC running Microsoft Windows?
1987
1988 GNU Emacs has been fully ported to Windows NT and Windows 95/98.
1989 If you have MSVC 4.0 or greater, then you can compile GNU Emacs
1990 directly from the source distribution. First read the file
1991 nt/README, and then the file nt/INSTALL, for step by step
1992 instructions on how to compile and install GNU Emacs on your system.
1993
1994 You can also download precompiled distributions of GNU Emacs from:
1995
1996 ftp://ftp.cs.washington.edu/pub/ntemacs
1997
1998 If you need the gunzip and tar utilities for unpacking distributions,
1999 you can download precompiled versions from:
2000
2001 ftp://ftp.cs.washington.edu/pub/ntemacs/utilities
2002
2003 For more information on configuring your favorite package to run with
2004 GNU Emacs on Windows NT/95/98, see the following FAQ:
2005
2006 http://www.cs.washington.edu/homes/voelker/ntemacs.html
2007 ftp://ftp.cs.washington.edu/pub/ntemacs/docs/ntemacs.html
2008
2009 If you are running Windows 3.11, and if you compile GNU Emacs for MSDOS
2010 with the tools listed in the previous question, it will run under
2011 Microsoft Windows in a DOS box.
2012
2013 85: Where can I get Emacs for my PC running OS/2?
2014
2015 Emacs 19.27 is ported for emx on OS/2 2.0 or 2.1.
2016
2017 Anonymous FTP info:
2018
2019 hobbes.nmsu.edu:os2/2_x/unix/emacs27
2020
2021 86: Where can I get Emacs for my Atari ST?
2022
2023 (does anyone know?)
2024
2025 87: Where can I get Emacs for my Amiga?
2026
2027 Amiga software is available through Aminet, a set of interconnected FTP
2028 sites and other file accessing services for Amiga software. The primary
2029 sites for Aminet are ftp.wustl.edu (128.252.135.4) and ftp.cdrom.com
2030 (192.153.46.2). In the directory pub/aminet/util/gnu, there are
2031
2032 a1.26-emacs-bin.lha -- Amiga GNU Emacs V1.26, binaries
2033 a1.26-emacs-src.lha -- Amiga GNU Emacs V1.26, sources
2034
2035 There are also quite a few Emacs related files/programs. Please search
2036 the index of Aminet.
2037
2038 We have no access to an Amiga, so please send in your experience and
2039 comments on the implementation.
2040
2041 88: Where can I get Emacs for my Apple computer?
2042
2043 There used to be a boycott of Apple because of its "look and feel"
2044 lawsuit. The lawsuit failed, and the boycott is over.
2045 Currently the GNU project treats Apple like other computer companies.
2046
2047 Since the Mac operating system is very different from Unix and GNU,
2048 support for it would be a big job. And this job would be tangential
2049 to the GNU project's goals. Meanwhile, we don't have the resources
2050 to do all we want to do on supporting Emacs for GNU-like systems.
2051 So if we had to do work on support for the Macintosh, that would
2052 directly harm the GNU project.
2053
2054 Of course, the same is true for MSDOS and Windows NT. We decided to
2055 incorporate support for those systems because the code was very modular,
2056 because volunteers not only wrote all the code but also investigate
2057 all the bugs reported on those systems, and because we hoped that we
2058 will be able to raise funds for GNU using these versions, and in this
2059 way these ports will make up for the effort that they took. (We still
2060 hope so, but it has not happened yet.)
2061
2062 89: Where do I get Emacs that runs on VMS under DECwindows?
2063
2064 Version 19.27 has a VMS directory containing installation instructions, a
2065 makefile, and various .com files. But according to Richard Levitte
2066 <levitte@e.kth.se>, it does not run out of the box. Even if it does, the
2067 VMSNOTES indicates that the Emacs on VMS is going to have much more
2068 limited functionality. Richard Levitte has a patched 19.22 that
2069 supposedly has subprocess and networking functionality just as on Unix,
2070 with virtually the same lisp interface. The source is available via
2071 anonymous ftp at
2072
2073 ftp.vms.stacken.kth.se:GNU-VMS/Beta/EMACS-19_22-********.TAR-GZ
2074
2075 where ******** is the release date of the kit. You should also read
2076 http://www.e.kth.se/elev/levitte/gnu/emacs.html for more information.
2077
2078 90: Where can I get modes for Lex, Yacc/Bison, Bourne shell, Csh, C++,
2079 Objective C, Pascal, and Awk?
2080
2081 Most of these modes are now available in standard Emacs distribution. To
2082 get additional modes, look in the Lisp Code Directory (see question 77).
2083 For C++, if you use lisp-dir-apropos, you must specify the pattern like
2084 this:
2085
2086 M-x lisp-dir-apropos RET c\+\+ RET
2087
2088 Note that Barry Warsaw's cc-mode now works for C, C++, and Objective-C
2089 code. You can get the latest version (4.85, as of this writing) from the
2090 Emacs Lisp Archive.
2091
2092 91: What is the IP address of XXX.YYY.ZZZ?
2093
2094 If you are at a site with a deficient nameserver, you may need to know
2095 the IP address of a host to FTP files from it. You can get this
2096 information in two ways:
2097
2098 * By telnet:
2099
2100 telnet nic.ddn.mil hostnames (or `telnet 192.112.36.5 101')
2101 @ whois
2102 Whois: host XXX.YYY.ZZZ
2103
2104 * By e-mail:
2105
2106 To: service@nic.ddn.mil
2107 Subject: host XXX.YYY.ZZZ
2108 or: whois XXX.YYY.ZZZ
2109 or: help
2110
2111 or:
2112
2113 To: resolve@cs.widener.edu
2114 body: site XXX.YYY.ZZZ
2115
2116 Information from Brendan Kehoe <brendan@cs.widener.edu>.
2117
2118
2119 Major Emacs Lisp Packages, Emacs Extensions, and Related Programs
2120
2121 This section lists version numbers, FTP sites, mailing lists, newsgroups,
2122 and other information for many important packages, extensions, and
2123 related programs. There is some overlap with the Lisp Code Directory,
2124 but these entries give more detailed information.
2125
2126 If you know of any other packages that are so substantial that they
2127 deserve to be mentioned here, please let us know. Having its own mailing
2128 list or newsgroup or more than half a megabyte of source code are good
2129 signs.
2130
2131 92: VM (View Mail) -- another mail reader within Emacs
2132
2133 Author: Kyle Jones <kyle@uunet.uu.net>
2134 Latest version: 5.72 (beta)
2135 Anonymous FTP:
2136 /ftp.uu.net:networking/mail/vm-5.72beta.tar.gz
2137 Newsgroups and mailing lists:
2138 Info-VM:
2139 gnu.emacs.vm.info (newsgroup)
2140 info-vm-request@uunet.uu.net (for subscriptions)
2141 info-vm@uunet.uu.net (for submissions)
2142 Bug-VM:
2143 gnu.emacs.vm.bug (newsgroup)
2144 bug-vm-request@uunet.uu.net (for subscriptions)
2145 bug-vm@uunet.uu.net (for submissions)
2146
2147 93: Supercite -- mail and news citation package within Emacs
2148
2149 Author: Barry Warsaw <bwarsaw@cen.com>
2150 Latest version: 3.54 (comes with GNU Emacs 19)
2151 3.1 (available from the Emacs Lisp Archive)
2152 Anonymous FTP:
2153 /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/sc3.1.tar.Z
2154 Mailing list: supercite-request@anthem.nlm.nih.gov (for subscriptions)
2155 supercite@anthem.nlm.nih.gov (for submissions)
2156 NOTE: Superyank is an old version of Supercite.
2157
2158 94: Gnus -- news reader within Emacs
2159
2160 Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp>
2161 Latest version: 4.1 (comes with GNU Emacs 19)
2162 Anonymous FTP:
2163 /src.doc.ic.ac.uk:gnu/EmacsBits/elisp-archive/packages/gnus-4.1.tar.Z
2164 /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/gnus-4.1.tar.Z
2165 Newsgroups and mailing lists:
2166 English-only:
2167 gnu.emacs.gnus (newsgroup)
2168 info-gnus-english-request@cis.ohio-state.edu (for subscriptions)
2169 info-gnus-english@cis.ohio-state.edu (for submissions)
2170 Japanese (and some English):
2171 info-gnus-request@flab.fujitsu.co.jp (for subscriptions)
2172 info-gnus@flab.fujitsu.co.jp (for submissions)
2173
2174 95: Calc -- poor man's Mathematica within Emacs
2175
2176 Author: Dave Gillespie <daveg@csvax.cs.caltech.edu>
2177 Latest version: 2.02c
2178 Anonymous FTP:
2179 /prep.ai.mit.edu:pub/gnu/calc-2.02c.tar.gz
2180 NOTE: Unlike Wolfram Research, Dave has never threatened to sue
2181 anyone for having a program with a similar command language to
2182 Calc. :-)
2183
2184 96: Ange-FTP -- transparent FTP access for Emacs's file access routines
2185
2186 Author: Andy Norman <ange@hplb.hpl.hp.com>
2187 Latest version: 1.56 (comes with GNU Emacs 19)
2188 Anonymous FTP:
2189 /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/ange-ftp.tar.Z
2190 Mailing lists:
2191 Ange-FTP Lovers:
2192 ange-ftp-lovers-request@anorman.hpl.hp.com (for subscriptions)
2193 ange-ftp-lovers@anorman.hpl.hp.com (for submissions)
2194 /ftp.reed.edu:pub/mailing-lists/ange-ftp/ (archives)
2195 Ange-FTP Announcements:
2196 ange-ftp-lovers-announce@anorman.hpl.hp.com
2197 NOTE: now supports VMS, CMS, and MTS ftp servers
2198
2199 97: VIP -- vi emulation for Emacs
2200
2201 Author: Aamod Sane <sane@cs.uiuc.edu>
2202 Latest version: 4.3
2203 Anonymous FTP:
2204 /cs.uiuc.edu:pub/vip4.3.tar.Z
2205 /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/modes/vip-mode.tar.Z
2206 NOTE: This version much more closely emulates vi than the one
2207 distributed with Emacs.
2208
2209 98: AUC TeX -- enhanced LaTeX mode with debugging facilities
2210
2211 Author: Kresten Krab Thorup <krab@iesd.auc.dk>
2212 Latest version: 9.1i
2213 Anonymous FTP:
2214 /iesd.auc.dk:pub/emacs-lisp/auctex-9.1i.tar.gz
2215 Mailing list:
2216 auc-tex-request@iesd.auc.dk (for subscriptions)
2217 auc-tex@iesd.auc.dk (for submissions)
2218 auc-tex_mgr@iesd.auc.dk (auc-tex development team)
2219
2220 99: Hyperbole -- extensible hypertext management system within Emacs
2221
2222 Author: Bob Weiner <rsw@cs.brown.edu>
2223 Latest version: 3.15
2224 Anonymous FTP:
2225 /wilma.cs.brown.edu:pub/hyperbole/h3.15.tar.Z
2226 Mailing lists:
2227 hyperbole-announce -- Hyperbole release announcements only.
2228 Subscriptions:
2229 To: hyperbole-request@cs.brown.edu
2230 Subject: Add <mailbox@domain.name> to hyperbole-announce
2231 hyperbole -- Hyperbole discussion.
2232 Subscriptions:
2233 To: hyperbole-request@cs.brown.edu
2234 Subject: Add <mailbox@domain.name> to hyperbole
2235 Submissions:
2236 hyperbole@cs.brown.edu
2237 NOTE: Any member of the hyperbole mailing list is automatically a
2238 member of the hyperbole-announce mailing list.
2239 NOTE: No .UUCP or ! addresses are allowed on these mailing lists.
2240
2241 100: BBDB -- personal Info Rolodex integrated with mail/news readers
2242
2243 Author: Jamie Zawinski <jwz@lucid.com>
2244 Latest released version: 1.50
2245 Anonymous FTP:
2246 /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/bbdb-1.50.tar.Z
2247 Mailing lists:
2248 info-bbdb-request@cs.uiuc.edu (for subscriptions)
2249 info-bbdb@cs.uiuc.edu (for submissions)
2250 bbdb-announce-request@cs.uiuc.edu (to be informed of new releases)
2251 NOTE: BBDB does not work with VM 4. It does work with VM 5,
2252 Rmail, Gnus, and MH-E.
2253
2254 101: Ispell -- spell checker in C with interface for Emacs
2255
2256 Author: Geoff Kuenning <geoff@itcorp.com>
2257 Latest released version: 3.1.08
2258 Anonymous FTP:
2259 Master Sites:
2260 /ftp.cs.ucla.edu:pub/ispell/ispell-3.1.08.tar.gz
2261 /ftp.math.orst.edu:pub/ispell/ispell-3.1.08.tar.gz
2262 Known Mirror Sites: (only directory names shown)
2263 /ftp.th-darmstadt.de:pub/dicts/ispell/
2264 /ftp.nl.net:pub/textproc/ispell/
2265
2266 NOTE: * Do not ask Geoff to send you the latest version of Ispell.
2267 He does not have free e-mail.
2268
2269 * This Ispell program is distinct from GNU Ispell 4.0. GNU
2270 Ispell 4.0 is no longer a supported product.
2271
2272 102: XEmacs -- alternative Emacs 19 with better X interface; formerly
2273 known as Lucid Emacs or lemacs.
2274
2275 Primary Maintainer: Chuck Thompson <cthomp@cs.uiuc.edu>
2276 Other Developers: Ben Wing <wing@netcom.com>
2277 Richard Mlynarik <mly@adoc.xerox.com>
2278 Jamie Zawinski <jwz@mcom.com>
2279 Latest released version: 19.11
2280 Anonymous FTP:
2281 /ftp.cs.uiuc.edu:pub/xemacs/xemacs-19.11.tar.gz
2282 Newsgroup and mailing lists:
2283 Bugs:
2284 alt.lucid-emacs.bug
2285 bug-lucid-emacs-request@cs.uiuc.edu (for subscriptions)
2286 bug-lucid-emacs@cs.uiuc.edu (for submissions)
2287 Help:
2288 alt.lucid-emacs.help
2289 help-lucid-emacs-request@cs.uiuc.edu (for subscriptions)
2290 help-lucid-emacs@cs.uiuc.edu (for submissions)
2291 NOTE: The XEmacs FAQ is available via the World-Wide Web at URL
2292 http://xemacs.cs.uiuc.edu/.
2293
2294 103: Patch -- program to apply "diffs" for updating files
2295
2296 Author: Larry Wall <lwall@netlabs.com>
2297 Latest version: 2.1
2298 Anonymous FTP:
2299 /prep.ai.mit.edu:pub/gnu/patch-2.1.tar.gz
2300 /ftp.funet.fi:pub/gnu/patch-2.1.tar.gz
2301 /ftp.uni-stuttgart.de:pub/unix/gnu/patch-2.1.tar.gz
2302 NOTE: See question 80 for other GNU distribution sites.
2303
2304
2305 Changing Key Bindings and Handling Key Binding Problems
2306
2307 104: How do I bind keys (including function keys) to commands?
2308
2309 Keys can be bound to commands either interactively or by predefinition
2310 (e.g. in the .emacs file). To interactively bind keys for all modes,
2311 type `M-x global-set-key RET KEY CMD RET'; for the current major mode
2312 only, type `M-x local-set-key RET KEY CMD RET' (see the Emacs on-line
2313 documentation for further details).
2314
2315 To bind keys on starting Emacs or on starting any given mode, you can use
2316 the following "trick." First bind the key interactively, then
2317 immediately afterwards type `C-x ESC ESC C-a C-k C-g'. Now, the command
2318 needed to bind the key is in the kill ring and can be yanked into the
2319 .emacs file. If the key binding is global, no changes to the command are
2320 required. For example,
2321
2322 (global-set-key (quote [f1]) (quote help-for-help))
2323
2324 can be place directly into the .emacs file. If the key binding is local,
2325 the command is used in conjunction with the `add-hook' command. For
2326 example, in tex-mode, a local binding might be
2327
2328 (add-hook 'tex-mode-hook
2329 (function (lambda ()
2330 (local-set-key (quote [f1]) (quote help-for-help))))
2331
2332 NOTE: * Control characters in key sequence position of the form yanked
2333 from the kill ring are given in their graphic form - i.e. CTRL is
2334 shown as `^', TAB as a set of spaces (usually 8), etc. You may
2335 want to convert these into their vector or string forms.
2336
2337 * If some prefix key of the character sequence to be bound is
2338 already bound as a complete key, then you must unbind it before
2339 the new binding. For example, if `ESC {' is previously bound:
2340
2341 (global-unset-key [?\e ?{]) ;; or
2342 (local-unset-key [?\e ?{])
2343
2344 * Aside from commands and "lambda lists," a vector or string also
2345 can be bound to a key and thus treated as a macro. For example:
2346
2347 (global-set-key [f10] [?\C-x?\e?\e?\C-a?\C-k?\C-g]) ;; or
2348 (global-set-key [f10] "\C-x\e\e\C-a\C-k\C-g")
2349
2350 See `Key Bindings' in the Emacs on-line documentation for further
2351 details.
2352
2353 105: Why does Emacs say `Key sequence XXX uses invalid prefix characters'?
2354
2355 Usually one of two things has happened. In one case, the control
2356 character in the key sequence has been misspecified (e.g. `C-f' used
2357 instead of `\C-f' within a Lisp expression). In the other case, a
2358 "prefix key" in the keystroke sequence you were trying to bind was
2359 already bound as a "complete key." Historically, the `ESC [' prefix was
2360 usually the problem, in which case you should evaluate either of these
2361 forms before attempting to bind the key sequence:
2362
2363 (global-unset-key [?\e ?[]) ;; or
2364 (global-unset-key "\e[")
2365
2366 106: Why doesn't this [terminal or window-system setup] code work in my
2367 .emacs file, but it works just fine after Emacs starts up?
2368
2369 During startup, Emacs initializes itself according to a given code/file
2370 order. If some of the code executed in your .emacs file needs to be
2371 postponed until the initial terminal or window-system setup code has been
2372 executed but is not, then you will experience this problem (this
2373 code/file execution order is not enforced after startup).
2374
2375 To postpone the execution of Emacs Lisp code until after terminal or
2376 window-system setup, treat the code as a "lambda list" and set the value
2377 of either the `term-setup-hook' or `window-setup-hook' variable to this
2378 "lambda function." For example,
2379
2380 (setq term-setup-hook
2381 (function
2382 (lambda ()
2383 (cond ((string-match "\\`vt220" (or (getenv "TERM") ""))
2384 ;; Make vt220's "Do" key behave like M-x:
2385 (global-set-key [do] 'execute-extended-command))
2386 ))))
2387
2388 For information on what Emacs does every time it is started, see the
2389 lisp/startup.el file.
2390
2391 107: How do I use function keys under X Windows?
2392
2393 With Emacs 19, functions keys under X are bound like any other key. See
2394 question 104 for details.
2395
2396 108: How do I tell what characters or symbols my function or arrow keys
2397 emit?
2398
2399 Put the following in your .emacs file and type `M-x see-chars' to use:
2400
2401 (defun see-chars ()
2402 "Display events received, terminated by a 3-second timeout."
2403 (interactive)
2404 (let (chars
2405 (inhibit-quit t))
2406 (message "Enter characters or other events, terminated by a 3-second
2407 timeout.")
2408 (while (not (sit-for 3))
2409 (setq chars (nconc chars (list (read-event)))
2410 quit-flag nil) ; quit-flag might be set by C-g.
2411 (if (not (input-pending-p))
2412 (message "Events received until now: %s..."
2413 (key-description chars))))
2414 (message "Events received: %s" (key-description chars))))
2415
2416 Alternatively, type "C-h c" then the function or arrow keys. The command
2417 will return either a function key symbol or character sequence (see the
2418 Emacs on-line documentation for an explanation). This works for other
2419 keys as well.
2420
2421 109: How do I set the X key "translations" for Emacs?
2422
2423 Sorry, you can't; there are no "translations" to be set. Emacs is not
2424 written using the Xt library. The only way to affect the behavior of
2425 keys within Emacs is through `xmodmap' (outside Emacs) or `define-key'
2426 (inside Emacs). The `define-key' command should be used in conjunction
2427 with the `function-key-map' map. For instance,
2428
2429 (define-key function-key-map [M-tab] [?\M-\t])
2430
2431 defines the `META TAB' key sequence.
2432
2433 110: How do I handle C-s and C-q being used for flow control?
2434
2435 C-s and C-q are used in the XON/XOFF flow control protocol. This screws
2436 up Emacs because it binds these characters to commands. Also, by default
2437 Emacs will not honor them as flow control characters and may overwhelm
2438 output buffers. Sometimes, intermediate software using XON/XOFF flow
2439 control will prevent Emacs from ever seeing C-s and C-q.
2440
2441 Possible solutions:
2442
2443 * Disable the use of C-s and C-q for flow control.
2444
2445 You need to determine the cause of the flow control.
2446
2447 * your terminal
2448
2449 Your terminal may use XON/XOFF flow control to have time to display
2450 all the characters it receives. For example, VT series terminals do
2451 this. It may be possible to turn this off from a setup menu. For
2452 example, on a VT220 you may select `No XOFF' in the setup menu. This
2453 is also true for some terminal emulation programs on PCs.
2454
2455 When you turn off flow control at the terminal, you will also need to
2456 turn it off at the other end, which might be at the computer you are
2457 logged in to or at some terminal server in between.
2458
2459 If you turn off flow control, characters may be lost; using a printer
2460 connected to the terminal may fail. You may be able to get around
2461 this problem by modifying the `termcap' entry for your terminal to
2462 include extra NUL padding characters.
2463
2464 * a modem
2465
2466 If you are using a dialup connection, the modems may be using
2467 XON/XOFF flow control. It's not clear how to get around this.
2468
2469 * a router or terminal server
2470
2471 Some network box between the terminal and your computer may be using
2472 XON/XOFF flow control. It may be possible to make it use some other
2473 kind of flow control. You will probably have to ask your local
2474 network experts for help with this.
2475
2476 * tty and/or pty devices
2477
2478 If your connection to Emacs goes through multiple tty and/or pty
2479 devices, they may be using XON/XOFF flow control even when it is not
2480 necessary.
2481
2482 Eirik Fuller <eirik@theory.tn.cornell.edu> writes:
2483
2484 Some versions of `rlogin' (and possibly telnet) do not pass flow
2485 control characters to the remote system to which they connect. On
2486 such systems, Emacs on the remote system cannot disable flow
2487 control on the local system. Sometimes `rlogin -8' will avoid this
2488 problem.
2489
2490 One way to cure this is to disable flow control on the local host
2491 (the one running rlogin, not the one running rlogind) using the
2492 stty command, before starting the rlogin process. On many systems,
2493 `stty start u stop u' will do this.
2494
2495 Some versions of `tcsh' will prevent even this from working. One
2496 way around this is to start another shell before starting rlogin,
2497 and issue the stty command to disable flow control from that shell.
2498
2499 Use `stty -ixon' instead of `stty start u stop u' on some systems.
2500
2501 * Make Emacs speak the XON/XOFF flow control protocol.
2502
2503 You can make Emacs treat C-s and C-q as flow control characters by
2504 evaluating the form
2505
2506 (enable-flow-control)
2507
2508 to unconditionally enable flow control or
2509
2510 (enable-flow-control-on "vt100" "h19")
2511
2512 (using your terminal names instead of "vt100" or "h19") to enable
2513 selectively. These commands will automatically swap `C-s' and `C-q' to
2514 `C-\' and `C-^'. Variables can be used to change the default swap keys
2515 (`flow-control-c-s-replacement' and `flow-control-c-q-replacement').
2516
2517 If you are fixing this for yourself, simply put the form in your .emacs
2518 file. If you are fixing this for your entire site, the best place to
2519 put it is in the lisp/site-start.el file. Putting this form in
2520 lisp/default.el has the problem that if the user's .emacs file has an
2521 error, this will prevent lisp/default.el from being loaded and Emacs
2522 may be unusable for the user, even for correcting their .emacs file
2523 (unless they're smart enough to move it to another name).
2524
2525 For further discussion of this issue, read the file PROBLEMS (in the
2526 top-level directory when you unpack the Emacs source).
2527
2528 111: How do I bind `C-s' and `C-q' (or any key) if these keys are filtered
2529 out?
2530
2531 To bind `C-s' and `C-q', use either `enable-flow-control' or
2532 `enable-flow-control-on'. See question 110 for usage and implementation
2533 details.
2534
2535 To bind other keys, use `keyboard-translate'. See question 114 for usage
2536 details. To do this for an entire site, you should swap the keys in
2537 lisp/site-start.el. See question 110 for an explanation of why
2538 lisp/default.el should not be used.
2539
2540 NOTE: * If you do this for an entire site, the users will be confused by
2541 the disparity between what the documentation says and how Emacs
2542 actually behaves.
2543
2544 112: Why does the `Backspace' key invoke help?
2545
2546 The `Backspace' key (on most keyboards) generates ASCII code 8. `C-h'
2547 sends the same code. In Emacs by default `C-h' invokes help-command.
2548 This is intended to be easy to remember since the first letter of "help"
2549 is "h." The easiest solution to this problem is to use `C-h' (and
2550 Backspace) for help and DEL (the Delete key) for deleting the previous
2551 character.
2552
2553 For many people this solution may be problematic:
2554
2555 * They normally use Backspace outside of Emacs for deleting the previous
2556 character typed. This can be solved by making DEL be the command for
2557 deleting the previous character outside of Emacs. This command will do
2558 this on many Unix systems:
2559
2560 stty erase '^?'
2561
2562 * The person may prefer using the Backspace key for deleting the previous
2563 character because it is more conveniently located on their keyboard or
2564 because they don't even have a separate Delete key. In this case, the
2565 Backspace key should be made to behave like Delete. There are several
2566 methods.
2567
2568 * Some terminals (e.g., VT3## terminals) allow the character generated by
2569 the Backspace key to be changed from a setup menu.
2570
2571 * You may be able to get a keyboard that is completely programmable.
2572
2573 * Under X or on a dumb terminal, it is possible to swap the Backspace and
2574 Delete keys inside Emacs:
2575
2576 (keyboard-translate ?\C-h ?\C-?)
2577
2578 See question 114 for further details of `keyboard-translate'.
2579
2580 * Another approach is to switch key bindings and put help on "C-x h"
2581 instead:
2582
2583 (global-set-key [?\C-h] 'delete-backward-char)
2584 (global-set-key [?\C-x ?h] 'help-command)
2585 ;; overrides mark-whole-buffer
2586
2587 Other popular key bindings for help are M-? and "C-x ?".
2588
2589 NOTE: * Don't try to bind DEL to help-command, because there are many
2590 modes that have local bindings of DEL that will interfere.
2591
2592 113: Why doesn't Emacs look at the stty settings for Backspace vs. Delete?
2593
2594 Good question!
2595
2596 114: How do I "swap" two keys?
2597
2598 In Emacs 19, you can swap two keys (or key sequences) by using the
2599 `keyboard-translate' function. For example, to turn `C-h' into DEL and
2600 DEL to `C-h', use
2601
2602 (keyboard-translate ?\C-h ?\C-?) ; translate `C-h' to DEL
2603 (keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'.
2604
2605 The first key sequence of the pair after the function identifies what is
2606 produced by the keyboard; the second, what is matched for in the keymaps.
2607
2608 Keyboard translations are not the same as key bindings in keymaps. Emacs
2609 contains numerous keymaps that apply in different situations, but there
2610 is only one set of keyboard translations, and it applies to every
2611 character that Emacs reads from the terminal. Keyboard translations take
2612 place at the lowest level of input processing; the keys that are looked
2613 up in keymaps contain the characters that result from keyboard
2614 translation.
2615
2616 Also see `Keyboard Translations' in the on-line manual.
2617
2618 115: How do I produce C-XXX with my keyboard?
2619
2620 On terminals (but not under X), some common "aliases" are:
2621
2622 CTRL-2 or CTRL-SPC for C-@
2623 CTRL-6 for C-^
2624 CTRL-7 or CTRL-SHIFT-- for C-_
2625 CTRL-4 for C-\
2626 CTRL-5 for C-]
2627 CTRL-/ for C-?
2628
2629 Often other aliases exist; use the `C-h c' command and try `CTRL' with
2630 all of the digits on your keyboard to see what gets generated. You can
2631 also try the `C-h w' command if you know the name of the command.
2632
2633 116: What if I don't have a Meta key?
2634
2635 Instead of typing "M-a", you can type "ESC a". In fact, Emacs converts
2636 M-a internally into "ESC a" anyway (depending on the value of
2637 meta-prefix-char). Note that you press "Meta" and "a" together, while
2638 you press "ESC", release it, and then press "a".
2639
2640 117: What if I don't have an Escape key?
2641
2642 Type "C-[" instead. This should send ASCII code 27 just like an Escape
2643 key would. "C-3" may also work on some terminal (but not under X). For
2644 many terminals (notably DEC terminals) "F11" generates the "ESC" key. If
2645 not, the following form can be used bind it:
2646
2647 (define-key function-key-map [f11] [?\e]) ; F11 is the documented ESC
2648 ; replacement on DEC terminals.
2649
2650 118: Can I make my `Compose Character' key behave like a Meta key?
2651
2652 On a dumb terminal such as a VT220, no. It is rumored that certain VT220
2653 clones could have their Compose key configured this way. If you're using
2654 X, you might be able to do this with the `xmodmap' program.
2655
2656 119: How do I bind a combination of modifier key and function key?
2657
2658 With Emacs 19 you can indicate modified function keys in vector format
2659 through multi-prefixing the function key symbol. For example (from the
2660 Emacs on-line documentation):
2661
2662 (global-set-key [?\C-x right] 'forward-page)
2663
2664 where "?\C-x" is the Lisp character constant for the character "C-x".
2665
2666 You can use the modifier keys CTRL, META, HYPER, SUPER, ALT and SHIFT
2667 with function keys. To represent these modifiers, prepend the strings
2668 "C-", "M-", "H-", "s-", "A-" and "S-" to the symbol name. Thus, here is
2669 how to make "Hyper-Meta-RIGHT" move forward a word:
2670
2671 (global-set-key [H-M-right] 'forward-word)
2672
2673 NOTE: * Not all modifiers are permitted in all situations. HYPER, SUPER,
2674 and ALT are available only under X (provided there are such
2675 keys). Non-ASCII keys and mouse events (e.g. "C-=" and
2676 "mouse-1") also fall under this category.
2677
2678 See question 104 for general key binding instructions.
2679
2680 120: Why doesn't my Meta key work in an xterm window?
2681
2682 Try all of these methods before asking for further help:
2683
2684 * You may have big problems using `mwm' as your window manager. {Does
2685 anyone know a good generic solution to allow the use of the Meta key in
2686 Emacs with mwm?}
2687
2688 * For X11: Make sure it really is a Meta key. Use `xev' to find out what
2689 keysym your Meta key generates. It should be either Meta_L or Meta_R.
2690 If it isn't, use xmodmap to fix the situation.
2691
2692 * Make sure the pty the xterm is using is passing 8 bit characters.
2693 `stty -a' (or `stty everything') should show `cs8' somewhere. If it
2694 shows `cs7' instead, use `stty cs8 -istrip' (or `stty pass8') to fix
2695 it.
2696
2697 * If there is an rlogin connection between the xterm and the Emacs, the
2698 `-8' argument may need to be given to rlogin to make it pass all 8 bits
2699 of every character.
2700
2701 * If the Emacs is running under Ultrix, it is reported that evaluating
2702 (set-input-mode t nil) helps.
2703
2704 * If all else fails, you can make xterm generate "ESC W" when you type
2705 M-W, which is the same conversion Emacs would make if it got the M-W
2706 anyway. In X11R4, the following resource specification will do this:
2707
2708 XTerm.VT100.EightBitInput: false
2709
2710 (This changes the behavior of the insert-eight-bit action.)
2711
2712 With older xterms, you can specify this behavior with a translation:
2713
2714 XTerm.VT100.Translations: #override \
2715 Meta<KeyPress>: string(0x1b) insert()
2716
2717 You might have to replace `Meta' with `Alt'.
2718
2719 121: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0?
2720
2721 This is a result of an internationalization extension in X11R4 and the
2722 fact that HP is now using this extension. Emacs assumes that
2723 XLookupString returns the same result regardless of the Meta key state
2724 which is no longer necessarily true. Until Emacs is fixed, the temporary
2725 kludge is to run this command after each time the X server is started but
2726 preferably before any xterm clients are:
2727
2728 xmodmap -e 'remove mod1 = Mode_switch'
2729
2730 NOTE: This will disable the use of the extra keysyms systemwide, which
2731 may be undesirable if you actually intend to use them.
2732
2733 122: Where can I get key bindings to make Emacs emulate WordStar?
2734
2735 There is a package `wordstar' by Jim Frost <jimf@saber.com> located under
2736 the "misc" directory at the Emacs Lisp Archive.
2737
2738 123: Where can I get an XEDIT emulator for Emacs?
2739
2740 This question comes up once every couple of months. Searing for "xedit"
2741 through most recent Lisp Code Directory fails to match any entries.
2742
2743 Using Emacs with Alternate Character Sets
2744
2745 124: How do I make Emacs display 8-bit characters?
2746
2747 GNU Emacs 19 has built-in support for 8-bit characters. Here is an
2748 excerpt from the `European Display' page of the on-line manual:
2749
2750 Some European languages use accented letters and other special symbols.
2751 The ISO 8859 Latin-1 character set defines character codes for many
2752 European languages in the range 160 to 255.
2753
2754 Emacs can display those characters according to Latin-1, provided the
2755 terminal or font in use supports them. The `M-x
2756 standard-display-european' command toggles European character display
2757 mode. With a numeric argument, `M-x standard-display-european' enables
2758 European character display if and only if the argument is positive.
2759
2760 Some operating systems let you specify the language you are using by
2761 setting a locale. Emacs handles one common special case of this: if
2762 your locale name for character types contains the string `8859-1' or
2763 `88591', Emacs automatically enables European character display mode
2764 when it starts up.
2765
2766 125: How do I input 8-bit characters?
2767
2768 Again, from the `European Display' page of the on-line manual:
2769
2770 If you enter non-ASCII ISO Latin-1 characters often, you might find ISO
2771 Accents mode convenient. When this minor mode is enabled, the
2772 characters ``', `'', `"', `^', `/' and `~' modify the following letter
2773 by adding the corresponding diacritical mark to it, if possible. To
2774 enable or disable ISO Accents mode, use the command `M-x
2775 iso-accents-mode'. This command affects only the current buffer.
2776
2777 To enter one of those six special characters, type the character,
2778 followed by a space. Some of those characters have a corresponding
2779 "dead key" accent character in the ISO Latin-1 character set; to enter
2780 that character, type the corresponding ASCII character twice. For
2781 example, `''' enters the Latin-1 character acute-accent (character code
2782 0264).
2783
2784 126: Where can I get an Emacs that can handle kanji characters?
2785
2786 Nemacs 3.3.2 (Nihongo GNU Emacs) is a modified version of GNU Emacs 18.55
2787 that handles kanji characters. It is available via anonymous FTP:
2788
2789 /crl.nmsu.edu:pub/misc/nemacs-3.3.2.tar.Z
2790 /ftp.cs.titech.ac.jp:pub/gnu-rel/nemacs/nemacs-3.3.2.tar.gz
2791
2792 You might also need files for "wnn," a kanji input method
2793 (wnn-4.0.3{-README,.tar.Z} {on which machine?}). You need a terminal (or
2794 terminal emulator) that can display text encoded in JIS, Shift-JIS, or
2795 EUC (Extended Unix Code), or the ability to run Nemacs as a direct X
2796 Windows client.
2797
2798 127: Where can I get an Emacs that can handle Chinese?
2799
2800 Cemacs by Stephen G. Simpson <simpson@math.psu.edu> is a patch to Emacs
2801 18.57 (the ctl-arrow patch) and some Emacs Lisp code that combined with
2802 Cxterm allows using Chinese characters. It is available via anonymous
2803 FTP:
2804
2805 /cs.purdue.edu:pub/ygz/cemacs.tar.Z
2806
2807 Cxterm, a patch to Emacs 18.57 that allows you to enter Chinese
2808 characters, is available from the same place:
2809
2810 /cs.purdue.edu:pub/ygz/cxterm-11.5.1.tar.Z
2811
2812 128: Where is an Emacs that can handle Semitic (right-to-left) alphabets?
2813
2814 Joel M. Hoffman <joel@wam.umd.edu> writes:
2815
2816 A couple of years ago a wrote a hebrew.el file that allows
2817 right-to-left editing of Hebrew. I relied on the hardware to display
2818 the Hebrew letters, given the right codes, but not for any
2819 right-to-left support; the hardware also doesn't have to send any
2820 specific char. codes. Emacs keeps track of when the user is typing
2821 Hebrew vs. English. (The VT-* terminals in Israel contain built-in
2822 support for Hebrew.)
2823
2824 To get it to work I had to modify only a few lines of GNU Emacs's
2825 source code --- just enough to make it 8-bit clean.
2826
2827 [and in a separate message:]
2828
2829 It doesn't produce time-order ["sefer" format] (I wouldn't recommend
2830 trying that with Emacs, because converting time-order to screen-order
2831 with arbitrarily long lines is a bit tricky), but I also concocted a
2832 quick filter to convert screen-order into time-order. I'll be happy to
2833 send you the requisite files if you want them. If you're using it for
2834 anything large, however, you'll want something that works better.
2835
2836 Joel Hoffman has also written a "bi-directional bi-lingual Emacs-like"
2837 editor for MS-DOS named Ibelbe (Itty Bitty Emacs-Like Bidirectional
2838 Editor). Ibelbe is written in Turbo Pascal and comes with source code.
2839 Here is the description:
2840
2841 Ibelbe looks like Emacs (it even has a minibuffer and filename
2842 completion), and fully supports both right-to-left and left-to-right
2843 editing. Other than an EGA monitor or better, no special hardware is
2844 required. You will need an EGA Hebrew font to use Ibelbe with Hebrew.
2845
2846 Anonymous FTP:
2847 /israel.nysernet.org:israel/computers/software/msdos/ibelbe.zip
2848 /israel.nysernet.org:israel/computers/software/msdos/hebfont.zip
2849
2850 Joseph Friedman <yossi@deshaw.com, yossi@Neon.Stanford.EDU> has written
2851 patches for Emacs 18.55 and 18.58 that provide Semitic language support
2852 under X Windows.
2853
2854 Warren Burstein <warren@itex.jct.ac.il> says he has mapped 7-bit keys by
2855 modifying self-insert-command "for Hebrew input on 7-bit keyboards."
2856
2857 A good suggestion is to query archie for files named with `hebrew'.
2858
2859
2860 Mail and News
2861
2862 129: How do I change the included text prefix in mail/news followups?
2863
2864 If you read mail with Rmail or news with Gnus, set the variable
2865 mail-yank-prefix. For VM, set vm-included-text-prefix. For mh-e, set
2866 mh-ins-buf-prefix.
2867
2868 For fancier control of citations, use Supercite. See question 93.
2869
2870 A related problem is how to prevent Emacs from including various headers
2871 of the replied-to message. For this, you should set the value of
2872 mail-yank-ignored-headers, which takes a regexp value.
2873
2874 130: How do I save a copy of outgoing mail?
2875
2876 You can either mail yourself a copy by including a `BCC:' header in the
2877 mail message, or store a copy of the message directly to a file by
2878 including an `FCC:' header.
2879
2880 If you use standard mail, you can automatically create a `BCC:' to
2881 yourself by putting
2882
2883 (setq mail-self-blind t)
2884
2885 in your .emacs. You can automatically include an `FCC:' field by putting
2886 something like the following in your .emacs file:
2887
2888 (setq mail-archive-file-name (expand-file-name "~/outgoing"))
2889
2890 The output file will be in Unix mail format, which can be read directly
2891 by VM, but not always by Rmail. See question 132.
2892
2893 If you use mh-e add an FCC: or BCC: field to your components file.
2894
2895 It does not work to put `set record filename' in the .mailrc file.
2896
2897 131: Why doesn't Emacs expand my aliases when sending mail?
2898
2899 * You must separate multiple addresses in the headers of the mail buffer
2900 with commas. This is because Emacs supports RFC822 standard addresses
2901 like this one:
2902
2903 To: Willy Smith <wks@xpnsv.lwyrs.com>
2904
2905 However, you do not need to separate addresses with commas in your
2906 .mailrc file.
2907
2908 WARNING: Emacs breaks up aliases in the .mailrc file into multiple
2909 addresses both on commas and on whitespace, regardless of any use of
2910 quotes. This is probably a bug. You can get around this by directly
2911 setting the value of mail-aliases.
2912
2913 * Emacs normally only reads the `.mailrc' file once per session, when you
2914 start to compose your first mail message. If you edit .mailrc, you can
2915 type "M-: (build-mail-aliases) RET" to make Emacs reread .mailrc.
2916 (You have to include the parentheses where they are shown!)
2917
2918 * Emacs does not interpret vendor-specific additions to the format of the
2919 .mailrc file such as the `source' command. It also ignores any `set'
2920 commands. The only commands it looks at are `alias' and `group'
2921 commands.
2922
2923 * If you like, you can expand mail aliases as abbrevs, as soon as you
2924 type them in. To enable this feature, execute the following:
2925
2926 (add-hook 'mail-setup-hook 'mail-abbrevs-setup)
2927
2928 132: Why does Rmail think all my saved messages are one big message?
2929
2930 A file created through the FCC: field in a message is in Unix Mail
2931 format, not the format that Rmail uses (BABYL format). Rmail will try to
2932 convert a Unix mail file into BABYL format on input, but sometimes it
2933 makes errors. For guaranteed safety, you can make the saved- messages
2934 file be an inbox for your Rmail file by using the function
2935 set-rmail-inbox-list.
2936
2937 133: How can I sort the messages in my Rmail folder?
2938
2939 In Rmail, type C-c C-s C-h to get a list of sorting functions and their
2940 key bindings.
2941
2942 134: Why does Rmail need to write to /usr/spool/mail?
2943
2944 This is the behavior of the `movemail' program which Rmail uses. This
2945 indicates that movemail is configured to use lock files.
2946
2947 RMS writes:
2948
2949 Certain systems require lock files to interlock access to mail files.
2950 On these systems, movemail must write lock files, or you risk losing
2951 mail. You simply must arrange to let movemail write them.
2952
2953 Other systems use the flock system call to interlock access. On these
2954 systems, you should configure movemail to use flock.
2955
2956 135: How do I recover my mail files after Rmail munges their format?
2957
2958 If you have just done rmail-input on a file and you don't want to save it
2959 in Rmail's format (called BABYL), just kill the buffer (with C-x k).
2960
2961 If you typed M-x rmail and it read some messages out of your inbox and
2962 you want to put them in a Unix mail file, use C-o on each message.
2963
2964 If you want to convert an existing file from BABYL format to Unix mail
2965 format, use the command M-x unrmail: it will prompt you for the input and
2966 output file names.
2967
2968 136: How do I make Emacs automatically start my mail/news reader?
2969
2970 To start Emacs in Gnus:
2971
2972 emacs -f gnus
2973
2974 in Rmail:
2975
2976 emacs -f rmail
2977
2978 A more convenient way to start with Gnus:
2979
2980 alias gnus 'emacs -f gnus'
2981 gnus
2982
2983 It is probably unwise to automatically start your mail or news reader
2984 from your .emacs file. This would cause problems if you needed to run
2985 two copies of Emacs at one time. Also, this would make it difficult for
2986 you to start Emacs quickly when you needed to.
2987
2988 137: How do I read news under Emacs?
2989
2990 Use M-x gnus. It is documented in Info (see question 14).
2991
2992 138: Why doesn't Gnus work via NNTP?
2993
2994 There is a bug in NNTP version 1.5.10, such that when multiple requests
2995 are sent to the NNTP server, the server only handles the first one before
2996 blocking waiting for more input which never comes. NNTP version 1.5.11
2997 claims to fix this.
2998
2999 You can work around the bug inside Emacs like this:
3000
3001 (setq nntp-maximum-request 1)
3002
3003 You can find out what version of NNTP your news server is running by
3004 telnetting to the NNTP port (usually 119) on the news server machine
3005 (i.e., `telnet server-machine 119'). The server should give its version
3006 number in the welcome message. Type `quit' to get out.
3007
3008 139: How do I view text with embedded underlining (e.g., ClariNews)?
3009
3010 Underlining appears like this:
3011
3012 _^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^Hi_^Hn_^Hg
3013
3014 You can destructively remove underlining with M-x ununderline-region.
3015
3016 For ClariNews articles, clari-clean.el by David N. Blank-Edelman
3017 <dnb@meshugge.media.mit.edu> will remove both underlining and
3018 overstriking automatically. It is available on the Lisp Code Directory
3019 (see question 77).
3020
3021 140: How do I save all the items of a multi-part posting in Gnus?
3022
3023 Use gnus-uu. Type C-c C-v C-h in the Gnus summary buffer to see a list
3024 of available commands.
3025
3026 141: Why does Gnus put the subjects in replies beyond the 80th column?
3027
3028 This is a feature. If you set gnus-thread-hide-subject to non-nil, Gnus
3029 will only display the subject of the first posting in a thread, even if
3030 some of the replies use different subjects. It hides the subjects by
3031 putting them past the edge of the window and setting truncate lines to t.
3032
3033 If your screen looks messed up, then for some reason truncate-lines in
3034 your `*Subject*' buffer has been set to nil. It should be set to t.
3035
3036 142: How do I make Gnus start up faster?
3037
3038 Remove all the newsgroups in which you have no interest from your .newsrc
3039 file by using Gnus's C-k or C-w commands in the `*Newsgroup*' buffer,
3040 perhaps after displaying all newsgroups with the L command.
3041 Unsubscribing will not speed up Gnus.
3042
3043 143: How do I catch up all newsgroups in Gnus?
3044
3045 In the `*Newsgroup*' buffer, type the following magical incantation:
3046
3047 M-< C-x ( c y M-0 C-x )
3048
3049 Leave off the "M-<" if you only want to catch up from point to the end of
3050 the `*Newsgroup' buffer.
3051
3052 144: Why can't I kill in Gnus on the Newsgroups/Keywords/Control line?
3053
3054 Gnus will complain that the `Newsgroups:', `Keywords:', and `Control:'
3055 headers are `Unknown header field's.
3056
3057 For the `Newsgroups:' header, there is an easy workaround: kill on the
3058 `Xref' header instead, which will be present on any cross-posted article
3059 (as long as your site carries the cross-post group).
3060
3061 If you really want to kill on one of these headers, you can do it like
3062 this:
3063
3064 (gnus-kill nil "^Newsgroups: .*\\(bad\\.group\\|worse\\.group\\)")
3065
3066 145: How do I get rid of flashing messages in Gnus for slow connections?
3067
3068 Set nntp-debug-read to nil.
3069
3070 146: Why is catch up slow in Gnus?
3071
3072 Because Gnus is marking crosspostings read. You can control this with
3073 the variable gnus-use-cross-reference.
3074
3075 147: Why does Gnus hang for a long time when posting?
3076
3077 David Lawrence <tale@uunet.uu.net> explains:
3078
3079 The problem is almost always interaction between NNTP and C News. NNTP
3080 POST asks C News's inews to not background itself but rather hang
3081 around and give its exit status so it knows whether the post was
3082 successful. (That wait will on some systems not return the exit status
3083 of the waited for job is a different sort of problem.) It ends up
3084 taking a long time because inews is calling relaynews, which often
3085 waits for another relaynews to free the lock on the news system so it
3086 can file the article.
3087
3088 My preferred solution is to change inews to not call relaynews, but
3089 rather use newsspool. This loses some error-catching functionality,
3090 but is for the most part safe as inews will detect a lot of the errors
3091 on its own. The C News folks have sped up inews, too, so speed should
3092 look better to most folks as that update propagates around.
3093
3094 148: Why don't my news postings in Gnus get past the local machine?
3095
3096 It could be that your Distribution: field is "local" or a synonym, or
3097 your Path: field may be wrong. This piece of code may fix the latter
3098 problem:
3099
3100 (setq gnus-use-generic-path t)
3101
3102 149: Why doesn't Gnus generate the `Lines:' header?
3103
3104 The posting software down the line from Gnus often generates a "Lines:"
3105 header so Gnus doesn't have to. If you want it to, just add Lines to the
3106 list in gnus-required-headers:
3107
3108 (add-hook 'gnus-startup-hook
3109 '(lambda ()
3110 (setq gnus-required-headers (cons 'Lines gnus-required-headers))))
3111
3112 150: How do I kill all articles in Gnus but those matching a pattern?
3113
3114 Example kill file code:
3115
3116 ;; kill everything
3117 (gnus-kill "subject" "" nil nil)
3118 ;; then restore stuff by our favorite poster
3119 (gnus-kill "from" "good-guy"
3120 (function
3121 (lambda ()
3122 (if (eq ?X (char-after (save-excursion
3123 (beginning-of-line 1)
3124 (point))))
3125 (gnus-summary-clear-mark-forward 1))))
3126 t)
3127
3128
3129 ------------------------------------------------------------
3130 Slightly modified by Richard Stallman
3131 Copyright 1994 Reuven M. Lerner
3132 Copyright 1992, 1993 Steven Byrnes
3133 Copyright 1990, 1991, 1992 Joseph Brian Wells
3134
3135 This list of frequently asked questions about GNU Emacs with answers
3136 ("FAQ") may be translated into other languages, transformed into other
3137 formats (e.g. Texinfo, Info, WWW, WAIS), and updated with new information.
3138
3139 The same conditions apply to any derivative of the FAQ as apply to the FAQ
3140 itself. Every copy of the FAQ must include this notice or an approved
3141 translation, information on who is currently maintaining the FAQ and how to
3142 contact them (including their e-mail address), and information on where the
3143 latest version of the FAQ is archived (including FTP information).
3144
3145 The FAQ may be copied and redistributed under these conditions, except that
3146 the FAQ may not be embedded in a larger literary work unless that work
3147 itself allows free copying and redistribution.
3148
3149 ------------------------------------------------------------
3150
3151 Special thanks to members of the FAQ team, who worked hard to ensure that
3152 answers were up-to-date:
3153
3154 Ethan Bradford <ethanb@u.washington.edu>, Luis Fernandes
3155 <elf@eccles.ee.ryerson.ca>, Denby Wong <3dw16@qlink.QueensU.CA>, Yair
3156 Friedman <yair@cs.huji.ac.il>, Thi <ttn@netcom.com>, Richard Levitte
3157 <levitte@e.kth.se>, "William G. Dubuque" <wgd@martigny.ai.mit.edu>,
3158 and Guan-Hsong Hsu <ghsu@relay.nswc.navy.mil>.
3159
3160
3161
3162