home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1996 December / PCO1296.ISO / filesbbs / content / emacsfaq.txt < prev    next >
Encoding:
Text File  |  1996-10-17  |  156.9 KB  |  3,834 lines

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