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