Mercurial > emacs
view etc/FAQ @ 14767:95dca7f7b4b3
(pixel_to_char_size): Cast args to int.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 06 Mar 1996 06:22:06 +0000 |
parents | 03b002b0fe23 |
children | b584b8da62cd |
line wrap: on
line source
GNU Emacs FAQ: Introduction This is the introduction to a list of frequently asked questions (FAQ) about GNU Emacs with answers. The FAQ is posted to reduce the noise level in the `gnu.emacs.help' newsgroup (which is also the `help-gnu-emacs' mailing list) which results from the repetition of frequently asked questions, wrong answers to these questions, corrections to the wrong answers, corrections to the corrections, debate, name calling, etc. Also, it serves as a repository of the canonical "best" answers to these questions. However, if you know a better answer or even a slight change that improves an answer, please tell us! If you know the answer to a question in the FAQ list, please reply to the question by e-mail instead of posting. Help reduce noise! The FAQ is crossposted to `comp.emacs' because some sites do not receive the `gnu.*' newsgroups. The FAQ is also crossposted to `news.answers'. Full instructions for getting the latest FAQ are in question 22. It has been so long since the FAQ was last edited and released that the maintainers decided to take a two-step approach. This edition corrects many basic inaccuracies in the old FAQ, most of them having to do with ftp sites and version numbers. In addition, we have deleted a number of questions that are no longer relevant with the release of GNU Emacs 19. Many questions specific to recent releases of GNU Emacs 19 remain unanswered in this version of the FAQ; the maintainers will spend time over the next month or two adding new questions (and answers), based in no small part on the questions that have come across help-gnu-emacs in recent months. There is no diff file for this version of the FAQ, as many things have changed since it was last updated. Please suggest new questions, answers, wording changes, deletions, etc. The most helpful form for suggestions is a context diff (i.e., the output of `diff -c'). Include `FAQ' in the subject of messages sent to us about the FAQ list. Please do not send questions to us just because you do not want to disturb a lot of people and you think we would know the answer. We do not have time to answer questions individually. :-( -- Reuven M. Lerner <reuven@the-tech.mit.edu> and the FAQ team (a full list is at the bottom of the FAQ). ---------------------------------------------------------------------- Notation Used in FAQ 1: What do these mean: C-h, M-C-a, RET, "ESC a", etc.? 2: What does "M-x command" mean? 3: How do I read topic XXX in the on-line manual? 4: What do these mean: etc/SERVICE, src/config.h, lisp/default.el? 5: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL? General Questions 6: What is the LPF? 7: What is the real legal meaning of the GNU copyleft? 8: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug, comp.emacs, etc.? 9: Where can I get old postings to gnu.emacs.help and other GNU groups? 10: Where should I report bugs and other problems with GNU Emacs? 11: How do I unsubscribe to this mailing list? 12: What is the current address of the FSF? On-line Help, Printed Manuals, Other Sources of Help 13: I'm just starting GNU Emacs; how do I do basic editing? 14: How do I find out how to do something in GNU Emacs? 15: How do I get a printed copy of the GNU Emacs manual? 16: Where can I get documentation on GNU Emacs Lisp? 17: How do I install a piece of Texinfo documentation? 18: How do I print a Texinfo file? 19: Can I view Info files without using GNU Emacs? 20: What informational files are available for GNU Emacs? 21: Where can I get help in installing GNU Emacs? 22: Where can I get the latest version of this document (the FAQ list)? Status of Emacs 23: Where does the name "Emacs" come from? 24: What is the latest version of GNU Emacs? 25: What is different about GNU Emacs 19? Common Things People Want To Do 26: How do I set up a .emacs file properly? 27: How do I debug a .emacs file? 28: How do I make Emacs display the current line (or column) number? 29: How do I turn on abbrevs by default just in mode XXX? 30: How do I turn on auto-fill mode by default? 31: How do I make Emacs use a certain major mode for certain files? 32: How do I search for, delete, or replace unprintable (8-bit or control) characters? 33: How can I highlight a region of text in Emacs? 34: How do I control Emacs's case-sensitivity when searching/replacing? 35: How do I make Emacs wrap words for me? 36: Where can I get a better spelling checker for Emacs? 37: How can I spell-check TeX or *roff documents? 38: How do I change load-path? 39: How do I use an already running Emacs from another window? 40: How do I make Emacs recognize my compiler's funny error messages? 41: How do I indent switch statements like this? 42: How can I make Emacs automatically scroll horizontally? 43: How do I make Emacs "typeover" or "overwrite" instead of inserting? 44: How do I stop Emacs from beeping on a terminal? 45: How do I turn down the bell volume in Emacs running under X Windows? 46: How do I tell Emacs to automatically indent a new line to the indentation of the previous line? 47: How do I show which parenthesis matches the one I'm looking at? 48: In C mode, can I show just the lines that will be left after #ifdef commands are handled by the compiler? 49: Is there an equivalent to the `.' (dot) command of vi? 50: What are the valid X resource settings (i.e., stuff in .Xdefaults)? 51: How do I execute a piece of Emacs Lisp code? 52: How do I change Emacs's idea of the tab character's length? 53: How do I insert `>' at the beginning of every line? 54: How do I insert `_^H' before each character in a paragraph to get an underlined paragraph? 55: How do I repeat a command as many times as possible? 56: How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short? 57: How do I tell Emacs to iconify itself? 58: How do I use regexps (regular expressions) in Emacs? 59: How do I perform a replace operation across more than one file? 60: Where is the documentation for `etags'? Bugs/Problems 61: Does Emacs have problems with files larger than 8 megabytes? 62: How do I get rid of the ^M junk in my shell buffer? 63: Why do I get `Process shell exited abnormally with code 1'? 64: Where is the termcap/terminfo entry for terminal type `emacs'? 65: Why does Emacs spontaneously start displaying `I-search:' and beeping? 66: Why can't Emacs talk to certain hosts (or certain hostnames)? 67: Why does Emacs say `Error in init file'? 68: Why does Emacs ignore my X resources (my .Xdefaults file)? 69: Why does Emacs take 20 seconds to visit a file? 70: How do I edit a file with a `$' in its name? 71: Why does shell mode lose track of the shell's current directory? 72: Are there any security risks in GNU Emacs? Difficulties Building/Installing/Porting Emacs 73: What should I do if I have trouble building Emacs? 74: How do I stop Emacs from failing when the executable is stripped? 75: Why does linking Emacs with -lX11 fail? Finding/Getting Emacs and Related Packages 76: Where can I get GNU Emacs on the net (or by snail mail)? 77: How do I find a GNU Emacs Lisp package that does XXX? 78: Where can I get GNU Emacs Lisp packages that don't come with Emacs? 79: How do I submit code to the Emacs Lisp Archive? 80: Where can I get other up-to-date GNU stuff? 81: What is the difference between GNU Emacs and Epoch? 82: What is the difference between GNU Emacs and XEmacs (formerly "Lucid Emacs")? 83: Where can I get Emacs for my PC running MS-DOS? 84: Where can I get Emacs for my PC running Microsoft Windows? 85: Where can I get Emacs for my PC running OS/2? 86: Where can I get Emacs for my Atari ST? 87: Where can I get Emacs for my Amiga? 88: Where can I get Emacs for my Apple computer? 89: Where do I get Emacs that runs on VMS under DECwindows? 90: Where can I get modes for Lex, Yacc/Bison, Bourne shell, Csh, C++, Objective C, Pascal, and Awk? 91: What is the IP address of XXX.YYY.ZZZ? Major Emacs Lisp Packages, Emacs Extensions, and Related Programs 92: VM (View Mail) -- another mail reader within Emacs 93: Supercite -- mail and news citation package within Emacs 94: Gnus -- news reader within Emacs 95: Calc -- poor man's Mathematica within Emacs 96: Ange-FTP -- transparent FTP access for Emacs's file access routines 97: VIP -- vi emulation for Emacs 98: AUC TeX -- enhanced LaTeX mode with debugging facilities 99: Hyperbole -- extensible hypertext management system within Emacs 100: BBDB -- personal Info Rolodex integrated with mail/news readers 101: Ispell -- spell checker in C with interface for Emacs 102: XEmacs -- alternative Emacs 19 with better X interface; formerly known as Lucid Emacs or lemacs. 103: Patch -- program to apply "diffs" for updating files Changing Key Bindings and Handling Key Binding Problems 104: How do I bind keys (including function keys) to commands? 105: Why does Emacs say `Key sequence XXX uses invalid prefix characters'? 106: Why doesn't this [terminal or window-system setup] code work in my .emacs file, but it works just fine after Emacs starts up? 107: How do I use function keys under X Windows? 108: How do I tell what characters or symbols my function or arrow keys emit? 109: How do I set the X key "translations" for Emacs? 110: How do I handle C-s and C-q being used for flow control? 111: How do I bind `C-s' and `C-q' (or any key) if these keys are filtered out? 112: Why does the `Backspace' key invoke help? 113: Why doesn't Emacs look at the stty settings for Backspace vs. Delete? 114: How do I "swap" two keys? 115: How do I produce C-XXX with my keyboard? 116: What if I don't have a Meta key? 117: What if I don't have an Escape key? 118: Can I make my `Compose Character' key behave like a Meta key? 119: How do I bind a combination of modifier key and function key? 120: Why doesn't my Meta key work in an xterm window? 121: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0? 122: Where can I get key bindings to make Emacs emulate WordStar? 123: Where can I get an XEDIT emulator for Emacs? Using Emacs with Alternate Character Sets 124: How do I make Emacs display 8-bit characters? 125: How do I input 8-bit characters? 126: Where can I get an Emacs that can handle kanji characters? 127: Where can I get an Emacs that can handle Chinese? 128: Where is an Emacs that can handle Semitic (right-to-left) alphabets? Mail and News 129: How do I change the included text prefix in mail/news followups? 130: How do I save a copy of outgoing mail? 131: Why doesn't Emacs expand my aliases when sending mail? 132: Why does Rmail think all my saved messages are one big message? 133: How can I sort the messages in my Rmail folder? 134: Why does Rmail need to write to /usr/spool/mail? 135: How do I recover my mail files after Rmail munges their format? 136: How do I make Emacs automatically start my mail/news reader? 137: How do I read news under Emacs? 138: Why doesn't Gnus work via NNTP? 139: How do I view text with embedded underlining (e.g., ClariNews)? 140: How do I save all the items of a multi-part posting in Gnus? 141: Why does Gnus put the subjects in replies beyond the 80th column? 142: How do I make Gnus start up faster? 143: How do I catch up all newsgroups in Gnus? 144: Why can't I kill in Gnus on the Newsgroups/Keywords/Control line? 145: How do I get rid of flashing messages in Gnus for slow connections? 146: Why is catch up slow in Gnus? 147: Why does Gnus hang for a long time when posting? 148: Why don't my news postings in Gnus get past the local machine? 149: Why doesn't Gnus generate the `Lines:' header? 150: How do I kill all articles in Gnus but those matching a pattern? ------------------------------------------------------------ If you are viewing this text in a GNU Emacs Buffer, you can type "M-2 C-x $" to get an overview of just the questions. Then, when you want to look at the text of the answers, just type "C-x $". To search for a question numbered XXX, type "M-C-s ^XXX:", followed by a C-r if that doesn't work, then type ESC to end the search. Full instructions for getting the latest FAQ are in question 22, or use anonymous FTP to the-tech.mit.edu. Notation Used in FAQ Skip this section and then come back if you don't understand some of the later answers. 1: What do these mean: C-h, M-C-a, RET, "ESC a", etc.? C-x means press the `x' key while holding down the Control key. M-x means press the `x' key while holding down the Meta key. M-C-x means press the `x' key while holding down both the Control key and the Meta key. C-M-a is a synonym for M-C-a. RET, LFD, DEL, ESC, and TAB respectively refer to pressing the Return, Linefeed (aka Newline), Delete, Escape, and Tab keys and are equivalent to C-m, C-j, C-?, C-[, and C-i. SPC means press the Space bar. Key sequences longer than one key (and some single-key sequences) are inside double quotes or on lines by themselves. Any real spaces in such a key sequence should be ignored; only SPC really means press the space key. The ASCII code sent by C-x (except for C-?) is the value that would be sent by pressing just `x' minus 96 (or 64 for uppercase `X') and will be from 0 to 31. The ASCII code sent by M-x is the sum of 128 and the ASCII code that would be sent by pressing just the `x' key. Essentially, the Control key turns off bits 5 and 6 and the Meta key turns on bit 7. For further information, see `Characters' and `Keys' in the on-line manual. NOTE: C-? (aka DEL) is ASCII code 127. It is a misnomer to call C-? a "control" key, since 127 has both bits 5 and 6 turned ON. Also, on very few keyboards does Control-? generate ASCII code 127. 2: What does "M-x command" mean? "M-x command" means type M-x, then type the name of the command, then type RET. M-x (by default) invokes the command `execute-extended-command'. This command allows you to run any Emacs command if you can remember the command's name. If you can't remember the command's name, you can type TAB and SPC for completion, "?" for a list of possibilities, and M-p and M-n to see previous commands entered. An Emacs "command" is any "interactive" Emacs function. NOTE: Your system administrator may have bound other key sequences to invoke execute-extended-command. A function key labeled `Do' is a good candidate for this. To run non-interactive Emacs functions, see question 51. 3: How do I read topic XXX in the on-line manual? When we refer you to topic XXX in the on-line manual, you can read this manual node inside Emacs (assuming nothing is broken) by typing this: C-h i m emacs RET m XXX RET This invokes Info, the GNU hypertext documentation browser. If you don't already know how to use Info, type "?" from within Info. If we refer to topic XXX:YYY, type this: C-h i m emacs RET m XXX RET m YYY RET WARNING: Your system administrator may not have installed the Info files, or may have installed them improperly. In this case you should complain. 4: What do these mean: etc/SERVICE, src/config.h, lisp/default.el? These are files that come with GNU Emacs. The GNU Emacs distribution is divided into subdirectories; the important ones are `etc', `lisp', and `src'. If you use GNU Emacs, but don't know where it is kept on your system, start Emacs, then type "C-h v data-directory RET". The directory name displayed by this will be the full pathname of the installed `etc' directory. Some of these files are available individually via FTP or e-mail; see question 20. All are available in the source distribution. WARNING: Your system administrator may have removed the src directory and many files from the etc directory. 5: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL? FSF == Free Software Foundation LPF == League for Programming Freedom OSF == Open Software Foundation GNU == GNU's Not Unix RMS == Richard Matthew Stallman FTP == File Transfer Protocol GPL == GNU General Public Licence NOTE: Avoid confusing the FSF, the LPF, and the OSF. The LPF opposes look-and-feel copyrights and software patents. The FSF aims to make high quality free software available for everyone. The OSF is a consortium of computer vendors which develops commercial software for Unix systems. NOTE: The word "free" in the title of the Free Software Foundation refers to "freedom," not "zero dollars." Anyone can charge any price for GPL-covered software that they want to. However, in practice, the freedom enforced by the GPL leads to low prices, because you can always get the software for less money from someone else, because everyone has the right to resell or give away GPL-covered software. General Questions 6: What is the LPF? The LPF opposes the expanding danger of software patents and look-and-feel copyrights. To get more information, feel free to contact the LPF via e-mail or otherwise. You may also contact Joe Wells <jbw@cs.bu.edu>; he will be happy to talk with you about the LPF. You can find more information about the LPF in the file etc/LPF. More papers describing the LPF's views are available on the Internet and also from the LPF: Anonymous FTP: /prep.ai.mit.edu:pub/lpf/ /archive.cis.ohio-state.edu:pub/lpf/ Anonymous UUCP: osu-cis!~/lpf/* 7: What is the real legal meaning of the GNU copyleft? The real legal meaning of the GNU General Public Licence (copyleft) will only be known if and when a judge rules on its validity and scope. There has never been a copyright infringement case involving the GPL to set any precedents. Please take any discussion regarding this issue to the newsgroup gnu.misc.discuss, which was created to hold the extensive flame wars on the subject. RMS writes: The legal meaning of the GNU copyleft is less important than the spirit, which is that Emacs is a free software project and that work pertaining to Emacs should also be free software. "Free" means that all users have the freedom to study, share, change and improve Emacs. To make sure everyone has this freedom, pass along source code when you distribute any version of Emacs or a related program, and give the recipients the same freedom that you enjoyed. 8: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug, comp.emacs, etc.? The file etc/MAILINGLISTS discusses the purpose of each GNU mailing-list. (See question 20 on how to get a copy.) For those which are gatewayed with newsgroups, it lists both the newsgroup name and the mailing list address. comp.emacs is for discussion of Emacs programs in general. This includes GNU Emacs along with various other implementations like JOVE, MicroEmacs, Freemacs, MG, Unipress, CCA, and Epsilon.. Many people post GNU Emacs questions to comp.emacs because they don't receive any of the gnu.* newsgroups. Arguments have been made both for and against posting GNU-Emacs-specific material to comp.emacs. You have to decide for yourself. Messages advocating "non-free" software are considered unacceptable on any of the gnu.* newsgroups except for gnu.misc.discuss, which was created to hold the extensive flame-wars on the subject. "non-free" software includes any software for which the end user can't freely modify the source code and exchange enhancements. Be careful to remove the gnu.* groups from the `Newsgroups:' line when posting a followup that recommends such software. gnu.emacs.bug is a place where bug reports appear, but avoid posting bug reports to this newsgroup (see question 10). 9: Where can I get old postings to gnu.emacs.help and other GNU groups? The FSF has maintained archives of all of the GNU mailing lists for many years, although there may be some unintentional gaps in coverage. The archive is not particularly well organized or easy to retrieve individual postings from, but pretty much everything is there. The archive is available via anonymous ftp at /prep.ai.mit.edu:pub/gnu/MailingListArchives/ 10: Where should I report bugs and other problems with GNU Emacs? The correct way to report GNU Emacs bugs is by e-mail to bug-gnu-emacs@prep.ai.mit.edu. Anything sent here also appears in the newsgroup gnu.emacs.bug, but please use e-mail instead of news to submit the bug report. This way a reliable return address is available so you can be contacted for further details. RMS explains: Sending bug reports to help-gnu-emacs (which has the effect of posting on gnu.emacs.help) is undesirable because it takes the time of an unnecessarily large group of people, most of whom are just users and have no idea how to fix these problem. bug-gnu-emacs reaches a much smaller group of people who are more likely to know what to do and have expressed a wish to receive more messages about Emacs than the others. However, RMS says there are circumstances when it is okay to post to gnu.emacs.help: If you have reported a bug and you don't hear about a possible fix, then after a suitable delay (such as a week) it is okay to post on gnu.emacs.help asking if anyone can help you. If you are unsure whether you have a bug, RMS describes how to tell: ... if Emacs crashes, that is a bug. If Emacs gets compilation errors while building, that is a bug. If Emacs crashes while building, that is a bug. If Lisp code does not do what the documentation says it does, that is a bug. 11: How do I unsubscribe to this mailing list? If you are receiving a GNU mailing list named `XXX', you might be able to unsubscribe to it by sending a request to the address `XXX-request@prep.ai.mit.edu'. However, this will not work if you are not listed on the main mailing list, but instead receive the mail from a distribution point. In that case, you will have to track down at which distribution point you are listed. Inspecting the `Received:' headers on the mail messages may help, along with liberal use of the `EXPN' or `VRFY' sendmail commands through `telnet <site-address> smtp'. Ask your postmaster for help. 12: What is the current address of the FSF? E-mail address: gnu@prep.ai.mit.edu Phone number: (617) 876-3296 Postal address: Free Software Foundation, Inc. 675 Massachusetts Avenue Cambridge, MA 02139, USA For details on how to order, see the file etc/ORDERS. On-line Help, Printed Manuals, Other Sources of Help 13: I'm just starting GNU Emacs; how do I do basic editing? Type "C-h t" to invoke the self-paced tutorial. Typing just C-h is how to enter the help system. WARNING: Your system administrator may have changed C-h to act like DEL to deal with local keyboards. You can use M-x help-for-help instead to invoke help. To discover what key (if any) invokes help on your system, type "M-x where-is RET help-for-help RET". This will print a comma-separated list of key sequences in the echo area. Ignore the last character in each key sequence listed. Each of the resulting key sequences invokes help. NOTE: Emacs help works best if it is invoked by a single key whose value should be stored in the variable help-char. Andrew Arensburger <arensb@kong.gsfc.nasa.gov> wrote a patch that allows the help facility to work properly when invoked by multiple character sequences. 14: How do I find out how to do something in GNU Emacs? There are several methods for finding out how to do things in Emacs. * The complete text of the Emacs manual is available on-line via the Info hypertext reader. Type "C-h i" to invoke Info. * You can order a hardcopy of the manual from the FSF. See question 15. * You can get a printed reference card listing commands and keys to invoke them. You can order one from the FSF for $1 (or 10 for $5), or you can print your own from the etc/refcard.tex or etc/refcard.ps files in the Emacs distribution. * You can list all of the commands whose names contain a certain word (actually which match a regular expression) using "C-h a" (M-x command-apropos). * You can list all of the functions and variables whose names contain a certain word using M-x apropos. * There are many other commands in Emacs for getting help and information. To get a list of these commands, type "C-h C-h C-h". 15: How do I get a printed copy of the GNU Emacs manual? You can order a printed copy of the GNU Emacs manual from the FSF. For details see the file etc/ORDERS. The full TeX source for the manual also comes in the `man' directory of the Emacs distribution, if you're daring enough to try to print out this 420 page manual yourself (see question 18). If you absolutely have to print your own copy, and you don't have TeX, you can get a PostScript version via anonymous FTP: /ftp.cs.ubc.ca:pub/archive/gnu/manuals_ps/emacs-19.21.ps.gz This site requests that you please CONFINE ANY MAJOR FTPING TO LATE EVENINGS OR EARLY MORNINGS OUR TIME (Pacific time zone, GMT-8). A DVI version is also available via FTP: /prep.ai.mit.edu:pub/gnu/emacs-manual-6.0.dvi.gz and all prep mirrors (See question 80 for a list). A WWW version of the Emacs manual is available on the World-Wide Web at URL http://asis01.cern.ch/infohtml/emacs/emacs.html See also question 14 for how to view the manual on-line. 16: Where can I get documentation on GNU Emacs Lisp? Within Emacs, you can type "C-h f" to get the documentation for a function, "C-h v" for a variable. For more information, obtain the GNU Emacs Lisp Reference Manual. Details on ordering it from FSF are in file etc/ORDERS. For on-line use, a set of pregenerated Info files is available with the Texinfo source for the Emacs Lisp manual via anonymous FTP at /prep.ai.mit.edu:pub/gnu/elisp-manual-19-2.3.tar.gz and all prep mirrors (See question 80 for a list). You can also create the Info files from the Texinfo source. See question 17 for details on how to install these files on-line. A WWW version of the Emacs Lisp Reference Manual is available at http://www.cs.indiana.edu/usr/local/www/elisp/lispref/elisp_toc.html An introduction to Emacs Lisp is available at http://www.cs.indiana.edu/usr/local/www/elisp/elisp-intro.html Of course, you can also print this 760-page manual yourself. For instructions on how to do this, see question 18. 17: How do I install a piece of Texinfo documentation? First, you must turn the Texinfo files into Info files. You may do this within Emacs, using "M-x texinfo-format-buffer", or with the standalone `makeinfo' program, available as part of the latest Texinfo package via anonymous ftp from: /prep.ai.mit.edu:pub/gnu/texinfo-3.1.tar.gz and all prep mirrors (See question 80 for a list). For information about the Texinfo format, read the Texinfo manual which comes with Emacs. This manual also comes installed in Info format, so you can read it on-line. Neither texinfo-format-buffer nor makeinfo installs the resulting Info files in Emacs's Info tree. To install Info files: 1. Move the files to the `info' directory in the installed Emacs distribution. See question 4 if you don't know where that is. 2. Edit the file info/dir in the installed Emacs distribution, and add a line for the top level node in the Info package that you are installing. Follow the examples already in this file. The format is: * Topic: (relative-pathname). Short description of topic. If you want to install Info files and you don't have the necessary privileges, you have several options: * Info files don't actually need to be installed before being used. You can feed a file name to the Info-goto-node command (invoked by pressing "g" in Info mode) by typing the name of the file in parentheses. This goes to the node named `Top' in that file. For example, to view a Info file named `XXX' in your home directory, you can type this: C-h i g (~/XXX) RET * You can create your own Info directory. You can tell Emacs where the Info directory is by adding its pathname to the value of the variable Info-default-directory-list. For example, to use a private Info directory which is a subdirectory of your home directory named `Info', you could put this in your .emacs file: (setq Info-default-directory-list (cons "~/Info" Info-default-directory-list)) You will need a top-level Info file named `dir' in this directory which has everything the system dir file has in it, except it should list only entries for Info files in that directory. You might not need it if all files in this directory were referenced by other `dir' files. The node lists from all dir files in Info-default-directory-list are merged by the Info system. 18: How do I print a Texinfo file? NOTE: You can't get nice printed output from Info files; you must still have the original Texinfo source file for the manual you want to print. 1. Make sure the first line of the Texinfo file looks like this: \input texinfo You may need to alter `texinfo' to the full pathname of the texinfo.tex file, which comes with Emacs as man/texinfo.tex (or copy or link it into the current directory). 2. tex XXX.texinfo 3. texindex XXX.?? The `texindex' program comes with Emacs as man/texindex.c. 4. tex XXX.texinfo 5. Print the DVI file XXX.dvi in the normal way for printing DVI files at your site. To get more general instructions, retrieve the latest Texinfo package mentioned in question 17. 19: Can I view Info files without using GNU Emacs? Yes, the `info', `xinfo', `tkinfo', and `ivinfo' programs do this. Info uses curses, xinfo uses standard X11 libraries, tkinfo uses Tk/Tcl and ivinfo uses InterViews. You can get Info as part of the latest Texinfo package (see question 17). xinfo is available separately: /prep.ai.mit.edu:pub/gnu/xinfo-1.01.01.tar.gz and all prep mirrors (See question 80 for a list). ivinfo is available in a comp.sources.misc archive or from Tom Horsley <tom@ssd.csd.harris.com>. tkinfo is available by anonymous ftp from: /ptolemy.eecs.berkeley.edu:pub/misc/tkinfo-0.6.tar.Z /ftp.aud.alcatel.com:tcl/code/tkinfo-0.6.tar.gz For ivinfo, you need Stanford's InterViews C++ X library, available via anonymous ftp from interviews.stanford.edu. (A FAQ on InterViews is available at that site in pub/FAQ.) 20: What informational files are available for GNU Emacs? This isn't a frequently asked question, but it should be! A variety of informational files about GNU Emacs and relevant aspects of the GNU project are available for you to read. The following files are available in the `etc' directory of the GNU Emacs distribution, and also the latest versions are available individually via anonymous FTP (prep.ai.mit.edu:pub/gnu/GNUinfo/): APPLE -- Why the FSF doesn't support GNU Emacs on Apple computers DISTRIB -- GNU Emacs Availability Information, including the popular "Free Software Foundation Order Form" FTP -- How to get GNU Software by Internet FTP or by UUCP GNU -- The GNU Manifesto INTERVIEW -- Richard Stallman discusses his public-domain UNIX-compatible software system with BYTE editors MACHINES -- Status of GNU Emacs on Various Machines and Systems MAILINGLISTS -- GNU Project Electronic Mailing Lists SERVICE -- GNU Service Directory SUN-SUPPORT -- including "Using Emacstool with GNU Emacs" These files are available in the `etc' directory of the GNU Emacs distribution: COPYING -- GNU Emacs General Public License NEWS -- GNU Emacs news, a history of user-visible changes LPF -- Why you should join the League for Programming Freedom FAQ -- GNU Emacs Frequently Asked Questions (You're reading it) These files are available via anonymous FTP (prep.ai.mit.edu:pub/gnu/): tasks -- GNU Task List standards.text -- GNU Coding Standards In addition, all of the above files are available directly from the FSF via e-mail. Of course, please try to get them from a local source first (See question 80 for a list). These additional files are available from the FSF via e-mail: * GNU's Bulletin, January 1994 GNU's Who GNU's Bulletin What Is the Free Software Foundation? What Is Copyleft? Donations Translate Into Free Software Cygnus Matches Donations! GNUs Flashes What Is the LPF? News from the LPF Free Software Support Project GNU Wish List Towards a New Strategy of OS Design Part 1: A More Usable Approach to OS Design Part 2: A Look at Some of the Hurd's Beasts Second Annual GNU Seminar in Japan GNU and other Free Software in Japan Freely Available Texts OCEAN Integrated-Circuit Design System Hundred Acre Consulting Expands Project GNU Status Report GNU Documentation GNU Software Available Now Source Code CD-ROM Compiler Tools Binaries CD-ROM Tape & CD-ROM Subscription Service How to Get GNU Software The Deluxe Distribution MS-DOS Distribution Free Software for Microcomputers FSF T-shirt Thank GNUs Free Software Foundation Order Form * Legal issues about contributing code to GNU * GNU Project Status Report A collection of past GNU's Bulletins is available via anonymous FTP from: /ftp.funet.fi:pub/gnu/Bulletins/ The latest bulletin is available on the World-Wide Web at URL: http://info.desy.de/gnu/www/gnu_bulletin_9401/gnu_bulletin_9401_toc.html 21: Where can I get help in installing GNU Emacs? Look in etc/SERVICE for names of companies and individuals who will sell you this type of service. An up-to-date version of the SERVICE file is available on prep.ai.mit.edu (also see question 20). You might also try the help-gnu-emacs mailing list, which is also known as the gnu.emacs.help newsgroup, although many installation questions can easily be answered by looking at the PROBLEMS file (in the top-level directory when you unpack the Emacs source). 22: Where can I get the latest version of this document (the FAQ list)? The GNU Emacs FAQ is available in several ways: * Via USENET. If you can read news, the FAQ should be available in your news spool, in both the gnu.emacs.help and comp.emacs newsgroups. Every news reader should allow you to read any news article that is still in the news spool, even if you have read the article before. You may need to read the instructions for your news reader to discover how to do this. In `rn', this command will do this for you at the article selection level: ?GNU Emacs FAQ?rc:m In Gnus, you should type "C-u c-x c-s" from the *Summary* buffer or "C-u SPC" from the *Newsgroup* buffer to view all articles in a newsgroup. If the FAQ articles have expired and been deleted from your news spool, it might (or might not) do some good to complain to your news administrator, because the most recent FAQ should not expire before for a while. * Via anonymous FTP. You can fetch the FAQ articles via anonymous FTP from the-tech.mit.edu, in ~ftp/pub/GNU-Emacs/. * In the GNU Emacs distribution. Since GNU Emacs 18.56, the latest available version of the FAQ at the time of release has been part of the GNU Emacs distribution as file etc/FAQ. * Via the World-Wide Web. Point your favorite Web browser (Mosaic, Lynx, w3-mode) to one of the following URLs: http://www.cis.ohio-state.edu/hypertext/faq/usenet/GNU-Emacs-FAQ/top.html http://scwww.ucs.indiana.edu/FAQ/Emacs/ * If all goes well, this FAQ should also be available via anonymous ftp and e-mail from rtfm.mit.edu, the main repository for FAQs and other items posted to news.answers. However, we are omitting explicit directions on how to retrieve the FAQ from rtfm.mit.edu, since it's possible that it won't end up there right away. (We're new at this FAQ-posting business.) Instructions on how to retrieve the FAQ from rtfm.mit.edu should be in the next version of the FAQ. * As the very last resort, you can e-mail a request to gnu-emacs-faq-maintainers@bigbird.bu.edu. Don't do this unless you have made a serious effort to obtain the FAQ list via one of the methods listed above. Status of Emacs 23: Where does the name "Emacs" come from? Emacs originally was an acronym for Editor MACroS. RMS says he "picked the name `Emacs' because `E' was not in use as an abbreviation on ITS at the time." The first Emacs was a set of macros written in 1976 at MIT by RMS for the editor TECO (Text Editor and COrrector (originally Tape Editor and COrrector)) under ITS on a PDP-10. RMS had already extended TECO with a "real-time" full screen mode with active keys. Emacs was started by Guy Steele <gls@think.com> as a project to unify the many divergent TECO command sets and key bindings at MIT. Many people have said that TECO code looks a lot like line noise. See alt.lang.teco if you are interested. Someone has written a TECO implementation in Emacs Lisp; it would be an interesting project to run the original TECO Emacs inside of GNU Emacs. 24: What is the latest version of GNU Emacs? GNU Emacs 19.27 is the current version as of 6 September, 1994. 25: What is different about GNU Emacs 19? To find out what has changed in recent versions, type C-h n (M-x view-emacs-news). The oldest changes are at the bottom of the file, so you might want to read it starting there, rather than at the top. The most obvious changes have to do with the user interface -- GNU Emacs 19 is fully X-aware, and provides pull-down menus and scroll bars. Emacs 19 also supports fonts and colors, including context-specific highlighting of source code and other types of buffers. Other changes include a line number mode, which displays the current line number in the mode line, and default bindings for arrow and paging keys that work. Lower-level changes include a smarter memory allocation scheme (Emacs now returns memory to the operating system when you kill buffers), a better byte-compiler, and a source-level Emacs Lisp debugger. There are also a number of new Lisp packages, ranging from dunnet (an Adventure-like program) to mldrag (allows you to drag the mode line up and down with the mouse buttons) to gud (Grand Unified Debugger mode, for many flavors of debuggers). A number of popular Lisp packages, such as SuperCite and the calendar/diary, are also included. Common Things People Want To Do 26: How do I set up a .emacs file properly? See `Init File' in the on-line manual. WARNING: In general, new Emacs users should not have .emacs files, because it causes confusing non-standard behavior. Then they send questions to help-gnu-emacs asking why Emacs isn't behaving as documented. :-) 27: How do I debug a .emacs file? First start Emacs with the `-debug-init' command-line option. This option enables the Emacs Lisp debugger before evaluating your .emacs file, and places you in the debugger if something goes wrong. The top line in the trace-back buffer will be the error message, and the second or third line of that buffer will display the Lisp code from your .emacs that caused the problem. You can also evaluate an individual function or argument to a function in your .emacs file by moving the cursor to the end of the function or argument and typing "C-x C-e" (M-x eval-last-sexp). Use "C-h v" (M-x describe-variable) to check the value of variables which you are trying to set or use. 28: How do I make Emacs display the current line (or column) number? To find out what line of the buffer you are on right now, do "M-x what-line". Use "M-x goto-line" to go to a specific line. To find the current column number, type "M-ESC (current-column)". If you use these commands often, you might want to bind them to a key. See question 104 for instructions on how to do that. Typing "C-x l" (or M-x count-lines-page) will also tell you what line you are on, provided the buffer isn't separated into "pages" with C-l characters. In that case, it will only tell you what line of the current "page" you are on. To have Emacs automatically display the current line number of the point in the mode line, do "M-x line-number-mode". You can also put the form (setq line-number-mode t) in your .emacs file to achieve this whenever you start Emacs. Note that Emacs will not display the line number if the buffer is larger than the value of the variable line-number-display-limit. None of the vi emulation modes provide the `set number' capability of vi (as far as we know). 29: How do I turn on abbrevs by default just in mode XXX? Put this in your .emacs file: (condition-case () (quietly-read-abbrev-file) (file-error nil)) (add-hook 'XXX-mode-hook (function (lambda () (setq abbrev-mode t)))) 30: How do I turn on auto-fill mode by default? To turn on auto-fill mode just once for one buffer, use "M-x auto-fill-mode". To turn it on for every buffer in, for example, Text mode, do this: (add-hook 'text-mode-hook 'turn-on-auto-fill) If you want auto-fill mode on in all major modes, do this: (setq-default auto-fill-hook 'do-auto-fill) 31: How do I make Emacs use a certain major mode for certain files? If you want to use XXX mode for all files which end with the extension `.YYY', this will do it for you: (setq auto-mode-alist (cons '("\\.YYY\\'" . XXX-mode) auto-mode-alist)) Otherwise put this somewhere in the first line of any file you want to edit in XXX mode: -*-XXX-*- Emacs 19 also includes a new variable, interpreter-mode-alist, that specifies which mode to use when loading a shell script. (Emacs determines which interpreter you're using by examining the first line of the file.) This feature only applies when the file name doesn't indicate which mode to use. Use "C-h v" (or M-x describe-variable) to learn more about this variable. 32: How do I search for, delete, or replace unprintable (8-bit or control) characters? To search for a single character that appears in the buffer as, for example, `\237', you can type "C-s C-q 2 3 7". (This assumes the value of search-quote-char is 17 (i.e., C-q).) Searching for ALL unprintable characters is best done with a "regexp" search. The easiest regexp to use for the unprintable chars is the complement of the regexp for the printable chars. Regexp for the printable chars: [\t\n\r\f -~] Regexp for the unprintable chars: [^\t\n\r\f -~] To type some of these special characters in an interactive argument to isearch-forward-regexp or re-search-forward, you need to use C-q. (`\t', `\n', `\r', and `\f' stand respectively for TAB, LFD, RET, and C-l.) So, to search for unprintable characters using re-search-forward: M-x re-search-forward RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET Using isearch-forward-regexp: M-C-s [^ TAB RET C-q RET C-q C-l SPC -~] To delete all unprintable characters, simply use replace-regexp: M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET RET Replacing is similar to the above. To replace all unprintable characters with a colon, use: M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET : RET NOTE: * You don't need to quote TAB with either isearch or typing something in the minibuffer. 33: How can I highlight a region of text in Emacs? If you are using a windowing system such as X, you can cause the region to be highlighted when the mark is active by including (transient-mark-mode t) in your .emacs. There are also the following packages for content- based highlighting: hilit19.el font-lock.el 34: How do I control Emacs's case-sensitivity when searching/replacing? For searching, the value of the variable case-fold-search determines whether they are case sensitive: (setq case-fold-search nil) ; make searches case sensitive (setq case-fold-search t) ; make searches case insensitive Similarly, for replacing the variable case-replace determines whether replacements preserve case. To change the case sensitivity just for one major mode, use the major mode's hook. For example: (add-hook 'XXX-mode-hook (function (lambda () (setq case-fold-search nil)))) 35: How do I make Emacs wrap words for me? Use auto-fill mode, activated by typing "M-x auto-fill-mode". The default maximum line width is 70, determined by the variable fill-column. To learn how to turn this on automatically, see question 30. 36: Where can I get a better spelling checker for Emacs? Use Ispell. See question 101. 37: How can I spell-check TeX or *roff documents? Use Ispell. See question 101. Ispell can handle TeX and *roff documents. 38: How do I change load-path? In general, you should only *add* to the load-path. You can add directory /XXX/YYY to the load path like this: (setq load-path (cons "/XXX/YYY/" load-path)) To do this relative to your home directory: (setq load-path (cons "~/YYY/" load-path) 39: How do I use an already running Emacs from another window? The `emacsclient' program is for editing a file using an already running Emacs rather than starting up a new Emacs. It does this by sending a request to the already running Emacs, which must be expecting the request. * Setup Emacs must have executed the `server-start' function for emacsclient to work. This can be done either by a command line option: emacs -f server-start or by invoking server-start from the .emacs file: (if (some conditions are met) (server-start)) When this is done, Emacs starts a subprocess running a program called `server'. `server' creates a Unix domain socket in the user's home directory named `.emacs_server'. To get your news reader, mail reader, etc., to invoke emacsclient, try setting the environment variable EDITOR (or sometimes VISUAL) to the value `emacsclient'. You may have to specify the full pathname of the emacsclient program instead. Examples: # csh commands: setenv EDITOR emacsclient setenv EDITOR /usr/local/emacs/etc/emacsclient # using full pathname # sh command: EDITOR=emacsclient ; export EDITOR * Normal use When emacsclient is run, it connects to the `.emacs_server' socket and passes its command line options to `server'. When `server' receives these requests, it sends this information on the the Emacs process, which at the next opportunity will visit the files specified. (Line numbers can be specified just like with Emacs.) The user will have to switch to the Emacs window by hand. When the user is done editing a file, the user can type "C-x #" (or M-x server-edit) to indicate this. If there is another buffer requested by emacsclient, Emacs will switch to it; otherwise emacsclient will exit, signaling the calling program to continue. NOTE: `emacsclient' and `server' must be running on machines which share the same filesystem for this to work. The pathnames that emacsclient specifies should be correct for the filesystem that the Emacs process sees. The Emacs process should not be suspended at the time emacsclient is invoked. emacsclient should either be invoked from another X window or from a shell window inside Emacs itself. There is an enhanced version of emacsclient/server called `gnuserv' by Andy Norman <ange@hplb.hpl.hp.com> which is available in the Emacs Lisp Archive. gnuserv uses Internet domain sockets, so it can work across most network connections. It also supports the execution of arbitrary Emacs Lisp forms and also does not require the client program to wait for completion. It is available via anonymous FTP (Emacs Lisp Archive: packages/gnuserv.shar). 40: How do I make Emacs recognize my compiler's funny error messages? The variable compilation-error-regexp-alist helps control how Emacs parses your compiler output. It is a list of triples of the form: (REGEXP FILE-IDX LINE-IDX) where REGEXP, FILE-IDX and LINE-IDX are strings. To help determine what the constituent elements should be, load compile.el and then use C-h v compilation-error-regexp-alist RET to see the current value. A good idea is to look at compile.el itself as the comments included for this variable are quite useful -- the regular expressions required for your compiler's output may be very close to one already provided. Once you have determined the proper regexps, use the following to inform Emacs of your changes: (setq compilation-error-regexp-alist (cons '(REGEXP FILE-IDX LINE-IDX) compilation-error-regexp-alist)) 41: How do I indent switch statements like this? Many people want to indent their switch statements like this: f() { switch(x) { case A: x1; break; case B: x2; break; default: x3; } } The solution at first appears to be: set c-indent-level to 4 and c-label-offset to -2. However, this will give you an indentation spacing of four instead of two. The solution is to use cc-mode (available from the Emacs Lisp Archive) and add the following line: (c-set-offset 'case-label '+) There appears to be no way to do this with the old c-mode. 42: How can I make Emacs automatically scroll horizontally? Use hscroll.el by Wayne Mesard <wmesard@esd.sgi.com>. 43: How do I make Emacs "typeover" or "overwrite" instead of inserting? M-x overwrite-mode (a minor mode). On some workstations, the "Insert" key toggles insert and overwrite modes. 44: How do I stop Emacs from beeping on a terminal? Martin R. Frank <martin@cc.gatech.edu> writes: Tell Emacs to use the `visible bell' instead of the audible bell, and set the visible bell to nothing. Put this in your TERMCAP environment variable: ... :vb=: ... And evaluate this: (setq visible-bell t) 45: How do I turn down the bell volume in Emacs running under X Windows? You can adjust the bell volume and duration for all programs with the shell command xset. Invoking xset without any arguments produces some basic information, including the following: usage: xset [-display host:dpy] option ... To turn bell off: -b b off b 0 To set bell volume, pitch and duration: b [vol [pitch [dur]]] b on 46: How do I tell Emacs to automatically indent a new line to the indentation of the previous line? One solution is Indented Text Mode (M-x indented-text-mode). If you have auto-fill mode on (a minor mode, see question 30), you can tell Emacs to prefix every line with a certain character sequence, the "fill prefix." Type the prefix at the beginning of a line, position point after it, and then type "C-x ." (set-fill-prefix) to set the fill prefix. Thereafter, auto-filling will automatically put the fill prefix at the beginning of new lines, and M-q (fill-paragraph) will maintain any fill prefix when refilling the paragraph. NOTE: If you have paragraphs with different levels of indentation, you will have to set the fill prefix to the correct value each time you move to a new paragraph. To avoid this hassle, try one of the many packages available from the Emacs Lisp Archive. Look up `fill' and `indent' in the Lisp Code Directory for guidance. 47: How do I show which parenthesis matches the one I'm looking at? GNU Emacs 19 comes with paren.el, which (when loaded) will automatically highlight matching parentheses whenever point (i.e., the cursor) is located over one. To load paren automatically, include the line (require 'paren) in your .emacs file. Alternatives to paren include: * If you're looking at a right parenthesis (or brace or bracket) you can delete it and reinsert it. Emacs will blink the cursor on the matching parenthesis. * M-C-f (forward-sexp) and M-C-b (backward-sexp) will skip over one set of balanced parentheses, so you can see which parentheses match. (You can train it to skip over balanced brackets and braces at the same time by modifying the syntax table.) * Here is some Emacs Lisp that will make the % key show the matching parenthesis, like in vi. In addition, if the cursor isn't over a parenthesis, it simply inserts a % like normal. ;; By an unknown contributor (global-set-key "%" 'match-paren) (defun match-paren (arg) "Go to the matching parenthesis if on parenthesis otherwise insert %." (interactive "p") (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1)) ((looking-at "\\s\)") (forward-char 1) (backward-list 1)) (t (self-insert-command (or arg 1))))) 48: In C mode, can I show just the lines that will be left after #ifdef commands are handled by the compiler? M-x hide-ifdef-mode. (This is a minor mode.) 49: Is there an equivalent to the `.' (dot) command of vi? (`.' is the redo command in vi. It redoes the last insertion/deletion.) No, not really. You can type "C-x ESC ESC" (repeat-complex-command) to reinvoke commands that used the minibuffer to get arguments. In repeat-complex-command you can type M-p and M-n to scan through all the different complex commands you've typed. To repeat something on each line, use keyboard macros. (See `Keyboard Macros' in the on-line manual.) 50: What are the valid X resource settings (i.e., stuff in .Xdefaults)? See Emacs man page, or "Resources X" in the on-line manual. You can also use a resource editor, such as editres (for X11R5 and onwards), to look at the resource names for the menu bar, assuming Emacs was compiled with the X toolkit. 51: How do I execute a piece of Emacs Lisp code? There are a number of ways to execute (called "evaluate") an Emacs Lisp "form": * If you want it evaluated every time you run Emacs, put it in a file named `.emacs' in your home directory. * You can type the form in the *scratch* buffer, and then type LFD (or C-j) after it. The result of evaluating the form will be inserted in the buffer. * In Emacs-Lisp mode, typing M-C-x evaluates a top-level form before or around point. * Typing "C-x C-e" in any buffer evaluates the Lisp form immediately before point and prints its value in the echo area. * Typing M-ESC or M-x eval-expression allows you to type a Lisp form in the minibuffer which will be evaluated. * You can use M-x load-file to have Emacs evaluate all the Lisp forms in a file. (To do this from Lisp use the function `load' instead.) These functions are also used for evaluating Lisp forms: load-library, eval-region, eval-current-buffer, require, autoload 52: How do I change Emacs's idea of the tab character's length? Set the variable default-tab-width. For example, to set tab stops every 10 characters, insert the following in your .emacs file: (setq default-tab-width 10) 53: How do I insert `>' at the beginning of every line? Type "M-x replace-regexp RET ^ RET > RET". To do this only in the region, type "C-x n n M-x replace-regexp RET ^ RET > RET C-x w". WARNING: The command narrow-to-region (C-x n n) is disabled by default because it can be very confusing (i.e., "Oh no! Where did my file go?"). 54: How do I insert `_^H' before each character in a paragraph to get an underlined paragraph? M-x underline-region. 55: How do I repeat a command as many times as possible? Use "C-x (" and "C-x )" to make a keyboard macro that invokes the command and then type "M-0 C-x e". WARNING: any messages your command prints in the echo area will be suppressed. 56: How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short? M-x picture-mode. (This is a minor mode, in theory anyway ...) 57: How do I tell Emacs to iconify itself? "C-z" iconifies Emacs when running in X and suspends Emacs otherwise. See `Misc X' in the on-line manual. 58: How do I use regexps (regular expressions) in Emacs? See `Regexps' in the on-line manual. WARNING: The "or" operator is `\|', not `|', and the grouping operators are `\(' and `\)'. Also, the string syntax for a backslash is "\\". Thus, the string syntax for a regular expression like xxx\(foo\|bar\) is "xxx\\(foo\\|bar\\)". Notice the duplicated backslashes! WARNING: Unlike in Unix grep, sed, etc., a complement character set ([^...]) can match a newline character (LFD aka C-j aka \n), unless newline is mentioned as one of the characters not to match. WARNING: The character syntax regexps (e.g., `\sw') are not meaningful inside character set regexps (e.g., `[aeiou]'). (This is actually typical for regexp syntax.) 59: How do I perform a replace operation across more than one file? The "tags" feature of Emacs includes the command tags-query-replace which performs a query-replace across all the files mentioned in the TAGS file. See `Tags:Tags Search' in the on-line manual. In addition, Martin Boyer has written a package named global-replace which will perform a query-replace across all the files mentioned in the *compilation* buffer (usually done after a `grep'), which is available via anonymous FTP: /ireq-robot.hydro.qc.ca:pub/emacs/lisp/compile.el.z /ireq-robot.hydro.qc.ca:pub/emacs/lisp/global-replace.el.z /ireq-robot.hydro.qc.ca:pub/emacs/lisp/query.el.z NOTE: These files are compressed using GNU zip ("gzip"); you can get a copy from gzip from prep and its mirrors (see question 80). 60: Where is the documentation for `etags'? The `etags' man page should be in the same place as the `emacs' man page. Quick command-line switch descriptions are also available. For example, `etags -H'. Bugs/Problems 61: Does Emacs have problems with files larger than 8 megabytes? [This problem has been solved better in Emacs 19.29 because the buffer size limit is now 16 times as large.] Most installed versions of GNU Emacs will use 24-bit signed integers (and 24-bit pointers) internally. This limits the file size that Emacs can handle to 8,388,607 bytes (2^23 - 1). Leonard N. Zubkoff <lnz@lucid.com> suggests putting the following two lines in src/config.h before compiling Emacs to allow for 26-bit integers and pointers (and thus filesizes of up to 33,554,431 bytes): #define VALBITS 26 #define GCTYPEBITS 5 WARNING: This method may result in `ILLEGAL DATATYPE' and other random errors on some machines. David Gillespie <daveg@csvax.cs.caltech.edu> gives an explanation of why Emacs uses 24 bit integers and pointers: Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed language in the sense that you can put any value of any type into any variable, or return it from a function, and so on. So each value must carry a "tag" along with it identifying what kind of thing it is, e.g., integer, pointer to a list, pointer to an editing buffer, and so on. Emacs uses standard 32-bit integers for data objects, taking the top 8 bits for the tag and the bottom 24 bits for the value. So integers (and pointers) are somewhat restricted compared to true C integers and pointers. Emacs uses 8-bit tags because that's a little faster on byte-oriented machines, but there are only really enough tags to require 6 bits. 62: How do I get rid of the ^M junk in my shell buffer? Try typing "M-x shell-strip-ctrl-m RET" while in shell-mode to make them go away. If that doesn't work, you have several options: For tcsh, put this in your `.cshrc' (or `.tcshrc') file: if ($?EMACS) then if ("$EMACS" == t) then if ($?tcsh) unset edit stty nl endif endif Or put this in your .emacs_tcsh file: unset edit stty nl Alternatively, use csh in your shell buffers instead of tcsh. One way is: (setq explicit-shell-file-name "/bin/csh") and another is to do this in your .cshrc (or .tcshrc) file: setenv ESHELL /bin/csh (You must start Emacs over again with the environment variable properly set for this to take effect.) 63: Why do I get `Process shell exited abnormally with code 1'? The most likely reason for this message is that the `env' program is not properly installed. Compile this program for your architecture, and install it with a+x permission in the architecture-dependent Emacs program directory. (You can find what this directory is at your site by inspecting the value of the variable exec-directory by typing "C-h v exec-directory RET".) You should also check for other programs named `env' in your path (e.g., SunOS has a program named /usr/bin/env). We don't understand why this can cause a failure and don't know a general solution for working around the problem in this case. The `make clean' command will remove `env' and other vital programs, so be careful when using it. It has been reported that this sometimes happened when Emacs was started as an X client from an xterm window (i.e., had a controlling tty) but the xterm was later terminated. See also PROBLEMS (in the top-level directory when you unpack the Emacs source) for other possible causes of this message. 64: Where is the termcap/terminfo entry for terminal type `emacs'? The termcap entry for terminal type `emacs' is ordinarily put in the TERMCAP environment variable of subshells. It may help in certain situations (e.g., using rlogin from shell buffer) to add an entry for `emacs' to the system-wide termcap file. Here is a correct termcap entry for `emacs': emacs:tc=unknown: To make a terminfo entry for `emacs', use `tic' or `captoinfo'. You need to generate /usr/lib/terminfo/e/emacs. It may work to simply copy /usr/lib/terminfo/d/dumb to /usr/lib/terminfo/e/emacs. Having a termcap/terminfo entry will not enable the use of full screen programs in shell buffers. Use M-x terminal-emulator for that instead. A workaround to the problem of missing termcap/terminfo entries is to change terminal type `emacs' to type `dumb' or `unknown' in your shell start up file. `csh' users could put this in their .cshrc files: if ("$term" == emacs) set term=dumb 65: Why does Emacs spontaneously start displaying `I-search:' and beeping? Your terminal (or something between your terminal and the computer) is sending C-s and C-q for flow control, and Emacs is receiving these characters and interpreting them as commands. (The C-s character normally invokes the isearch-forward command.) For possible solutions, see question 110. 66: Why can't Emacs talk to certain hosts (or certain hostnames)? The problem may be that Emacs is linked with a wimpier version of gethostbyname than the rest of the programs on the machine. This is often manifested as a message on startup of `X server not responding. Check your DISPLAY environment variable.' or a message of `Unknown host' from open-network-stream. On a Sun, this may be because Emacs had to be linked with the static C library. The version of gethostbyname in the static C library may only look in /etc/hosts and the NIS (YP) maps, while the version in the dynamic C library may be smart enough to check DNS in addition to or instead of NIS. On a Motorola Delta running System V R3.6, the version of gethostbyname in the standard library works, but the one that works with NIS doesn't (the one you get with -linet). Other operating systems have similar problems. Try these options: * Explicitly add the host you want to communicate with to /etc/hosts. * Relink Emacs with this line in src/config.h: #define LIBS_SYSTEM -lresolv * Replace gethostbyname and friends in libc.a with more useful versions such as the ones in libresolv.a. Then relink Emacs. * If you are actually running NIS, make sure that `ypbind' is properly told to do DNS lookups with the correct command line switch. * Use tcp.el and tcp.c from Gnus. This has the additional advantage that you can use numeric IP addresses instead of names. open-network-stream currently can't handle numeric addresses. Brian Thomson <thomson@hub.toronto.edu> has a enhancement to open-network-stream to allow it to handle numeric addresses. 67: Why does Emacs say `Error in init file'? An error occurred while loading either your .emacs file or the system-wide lisp/default.el file. For information on how to debug your .emacs file, see question 27. It may be the case that you may need to load some package first, or use a hook that will be evaluated after the package is loaded. A common case of this is explained in question 106. 68: Why does Emacs ignore my X resources (my .Xdefaults file)? As of version 19, Emacs searches for X resources in the files specified by the XFILESEARCHPATH, XUSERFILESEARCHPATH, and XAPPLRESDIR environment variables, emulating the functionality provided by programs written using Xt. XFILESEARCHPATH and XUSERFILESEARCHPATH should be a list of file names separated by colons; XAPPLRESDIR should be a list of directory names separated by colons. Emacs searches for X resources + specified on the command line, with the `-xrm RESOURCESTRING' option, + then in the value of the XENVIRONMENT environment variable, - or if that is unset, in the file named ~/.Xdefaults-HOSTNAME if it exists (where HOSTNAME is the hostname of the machine Emacs is running on), + then in the screen-specific and server-wide resource properties provided by the server, - or if those properties are unset, in the file named ~/.Xdefaults if it exists, + then in the files listed in XUSERFILESEARCHPATH, - or in files named LANG/Emacs in directories listed in XAPPLRESDIR (where LANG is the value of the LANG environment variable), if the LANG environment variable is set, - or in files named Emacs in the directories listed in XAPPLRESDIR - or in ~/LANG/Emacs (if the LANG environment variable is set), - or in ~/Emacs, + then in the files listed in XFILESEARCHPATH. 69: Why does Emacs take 20 seconds to visit a file? The usual cause is that the master lock file, `!!!SuperLock!!!' has been left in the lock directory somehow. Delete it. Mark Meuer <meuer@geom.umn.edu> says that NeXT NFS has a bug where an exclusive create succeeds but returns an error status. This can cause the same problem. Since Emacs's file locking doesn't work over NFS anyway, the best solution is to recompile Emacs with CLASH_DETECTION undefined. 70: How do I edit a file with a `$' in its name? When entering a filename in the minibuffer, Emacs will attempt to expand a `$' followed by a word as an environment variable. To suppress this behavior, type "$$" instead. 71: Why does shell mode lose track of the shell's current directory? Emacs has no way of knowing when the shell actually changes its directory. This is an intrinsic limitation of Unix. So it tries to guess by recognizing `cd' commands. If you type `cd' followed by a directory name with a variable reference (`cd $HOME/bin') or with a shell metacharacter (`cd ../lib*'), Emacs will fail to correctly guess the shell's new current directory. A huge variety of fixes and enhancements to shell mode for this problem have been written to handle this problem. Check the Lisp Code Directory (see question 77). You can tell Emacs the shell's current directory with the command "M-x dirs". 72: Are there any security risks in GNU Emacs? * the `movemail' incident (No, this is not a risk.) In his book "The Cuckoo's Egg," Cliff Stoll describes this in chapter 4. The site at LBL had installed the `etc/movemail' program setuid root. (As of version 19, movemail is in your architecture-specific directory; type "C-h v directory RET" to see what it is.) Since `movemail' had not been designed for this situation, a security hole was created and users could get root privileges. `movemail' has since been changed so that even if it is installed setuid root this security hole will not be a result. We have heard unverified reports that the Internet worm took advantage of this configuration problem. * the file-local-variable feature (Yes, a risk, but easy to change.) There is an Emacs feature that allows the setting of local values for variables when editing a file by including specially formatted text near the end of the file. This feature also includes the ability to have arbitrary Emacs Lisp code evaluated when the file is visited. Obviously, there is a potential for Trojan horses to exploit this feature. If you set the variable inhibit-local-variables to a non-nil value, Emacs will display the special local variable settings of a file that you visit and ask you if you really want them. This variable is not mentioned in the manual. It is wise to do this in lisp/site-init.el before building Emacs: (setq inhibit-local-variables t) If Emacs has already been built, the expression can be put in lisp/default.el instead, or an individual can put it in their own .emacs file. The ability to exploit this feature by sending e-mail to an Rmail user was fixed sometime after Emacs 18.52. However, any new package that uses find-file or find-file-noselect has to be careful about this. For more information, see `File Variables' in the on-line manual (which, incidentally, does not describe how to disable the feature). * synthetic X events (Yes, a risk, use MIT-MAGIC-COOKIE-1 or better.) Emacs accepts synthetic X events generated by the SendEvent request as though they were regular events. As a result, if you are using the trivial host-based authentication, other users who can open X connections to your X workstation can make your Emacs process do anything, including run other processes with your privileges. The only fix for this is to prevent other users from being able to open X connections. The standard way to prevent this is to use a real authentication mechanism, such as MIT-MAGIC-COOKIE-1. If using the `xauth' program has any effect, then you are probably using MIT-MAGIC-COOKIE-1. Your site may be using a superior authentication method; ask your system administrator. If real authentication is not a possibility, you may be satisfied by just allowing hosts access for brief intervals while you start your X programs, then removing the access. This reduces the risk somewhat by narrowing the time window when hostile users would have access, but DOES NOT ELIMINATE THE RISK. Difficulties Building/Installing/Porting Emacs 73: What should I do if I have trouble building Emacs? First look in the file PROBLEMS (in the top-level directory when you unpack the Emacs source) to see if there is already a solution for your problem. Next check the FAQ (you're reading it). If you don't find a solution, then report your problem via e-mail to bug-gnu-emacs@prep.ai.mit.edu. Please do not post it to gnu.emacs.help or e-mail it to help-gnu-emacs@prep.ai.mit.edu. For further guidelines, see question 8. 74: How do I stop Emacs from failing when the executable is stripped? Don't do that. This problem has been reported on SGI Indigo machines running Irix 4.0.* and RS/6000 machines. Scott Henry <scotth@hoshi.corp.SGi.COM> posted a patch that fixes the problem for Irix. 75: Why does linking Emacs with -lX11 fail? Emacs needs to be linked with the static version of the X11 library, libX11.a. This may be missing. Under OpenWindows, you may need to use `add_services' to add the `OpenWindows Programmers' optional software category from the CD-ROM. Under HP-UX 8.0, you may need to run `update' again to load the X11-PRG `fileset'. This may be missing even if you specified `all filesets' the first time. If libcurses.a is missing, you may need to load the `Berkeley Development Option' {???}. If you are building the MIT X11 sources, you may need to modify your `site.cf' file to get static versions of the libraries. (Info from David Zuhn <zoo@cygnus.com>.) Other systems may have similar problems. You can always define CANNOT_DUMP and link with the shared libraries instead. To get the Xmenu stuff to work, you need to find a copy of MIT's liboldX.a. Finding/Getting Emacs and Related Packages 76: Where can I get GNU Emacs on the net (or by snail mail)? Look in the files etc/DISTRIB and etc/FTP for information on nearby archive sites and etc/ORDERS for mail orders. If you don't already have GNU Emacs, see question 20 for how to get these files. The latest version is always available via anonymous FTP at MIT: /prep.ai.mit.edu:pub/gnu/emacs-19.27.tar.gz See question 80 for information on where to get other GNU software. 77: How do I find a GNU Emacs Lisp package that does XXX? A listing of Emacs Lisp packages, called the Lisp Code Directory, is being maintained by Dave Brennan <brennan@hal.com>. You can search through this list to learn if someone has written something that fits your needs. This list is file LCD-datafile.Z in the Emacs Lisp Archive (see the next question for retrieval instructions). The files lispdir.el.Z and lispdir.doc in the archive contain Lisp code and information to help you use the list. Once you have installed lispdir.el and LCD-datafile, then you can use the `M-x lisp-dir-apropos' command to search the listing. For example, the command `M-x lisp-dir-apropos RET ange-ftp RET' produces this output: GNU Emacs Lisp Code Directory Apropos -- "ange-ftp" "~/" refers to archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/ ange-ftp (4.18) 15-Jul-1992 Andy Norman, <ange@hplb.hpl.hp.com> ~/packages/ange-ftp.tar.Z transparent FTP Support for GNU Emacs auto-save (1.19) 01-May-1992 Sebastian Kremer, <sk@thp.uni-koeln.de> ~/misc/auto-save.el.Z Safer autosaving with support for ange-ftp and /tmp ftp-quik (1.0) 28-Jul-1993 Terrence Brannon, <tb06@pl122f.eecs.lehigh.edu> ~/modes/ftp-quik.el.Z Quik access to dired'ing of ange-ftp and normal paths 78: Where can I get GNU Emacs Lisp packages that don't come with Emacs? First, check the Lisp Code Directory to find the name of the package you are looking for (see question 77). Next, check local archives and the Emacs Lisp Archive to find a copy of the relevant files. If you still haven't found it, you can send e-mail to the author asking for a copy. You can access the Emacs Lisp Archive via anonymous FTP: /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/ /ftp.cs.umn.edu:pub/elisp-archive/ /calypso-2.oit.unc.edu:pub/gnu/elisp-archive/ /ftp.uu.net:packages/gnu/emacs-lisp/ /gatekeeper.dec.com:pub/GNU/elisp-archive/ /nic.switch.ch:mirror/elisp-archive/ /ftp.diku.dk:pub/elisp-archive/ /quepasa.cs.tu-berlin.de:pub/gnu/elisp/ /faui43.informatik.uni-erlangen.de:pub/gnu/elisp-archive/ /ftp.uni-mainz.de:pub/gnu/elisp-archive/ /nic.funet.fi:pub/gnu/emacs/elisp-archive/ /src.doc.ic.ac.uk:gnu/EmacsBits/elisp-archive/ Retrieve and read the file README first. NOTE: * The archive maintainers do not have time to answer individual requests for packages or the list of packages in the archive. If you cannot use FTP or UUCP to access the archive yourself, try to find a friend who can, but please don't ask the maintainers. * Any files with names ending in `.Z', `.z', or `.gz' are compressed, so you should use `binary' mode in FTP to retrieve them. You should also use binary mode whenever you retrieve any files with names ending in `.elc'. 79: How do I submit code to the Emacs Lisp Archive? Guidelines and procedures for submission to the archive can be found in the file GUIDELINES in the archive directory (see question 78). It covers documentation, copyrights, packaging, submission, and the Lisp Code Directory Record. Anonymous FTP uploads are not permitted. Instead, all submissions are mailed to elisp-archive@cis.ohio-state.edu. The lispdir.el package has a function named submit-lcd-entry which will help you with this. 80: Where can I get other up-to-date GNU stuff? The most up-to-date official GNU stuff is normally kept on prep.ai.mit.edu and is available for anonymous FTP in the pub/gnu directory. Read the files etc/DISTRIB and etc/FTP for more information (see question 20 for retrieval instructions). The following sites are all mirror images of the GNU distribution area: /col.hp.com:mirrors/gnu/ /ftp.uu.net:packages/gnu/ /ftp.win.tue.nl:pub/gnu/ /gatekeeper.dec.com:pub/GNU/ /nic.funet.fi:pub/gnu/ /src.doc.ic.ac.uk:gnu/ (available via FTP, NIFTP, FTAM) /utsun.s.u-tokyo.ac.jp:ftpsync/prep/ /wuarchive.wustl.edu:systems/gnu/ The directory at ftp.uu.net is a mirror of prep.ai.mit.edu:pub/gnu, except that files larger than one megabyte are split into multiple parts. If you have trouble transferring large files, you should try here. A file normally named `XXX' is split into files XXX-split/part[0-9][0-9], and there will be a file named XXX-split/README which contains the list of parts (especially helpful when FTP-ing by e-mail), their checksums, and reassembly instructions. 81: What is the difference between Emacs and Epoch? Epoch was a modified version of GNU Emacs. It was merged into XEmacs (formerly "Lucid Emacs"), and the Epoch redisplay, now being totally rewritten, is slated to be merged into Emacs when the rewrite is done. 82: What is the difference between Emacs and XEmacs (formerly "Lucid Emacs")? XEmacs is a modified version of GNU Emacs. A comparison between the two versions, written by the XEmacs maintainers, had been included here. Richard Stallman removed it from this copy of the FAQ because it was unfair. It was (1) one-sided, listing only advantages of XEmacs and not advantages of the principal version of Emacs, (2) biased, stating the opinions of the XEmacs maintainers, and (3) out of date, listing as advantages of XEmacs features which in fact both versions have. 83: Where can I get Emacs for my PC running MS-DOS? Recent releases of GNU Emacs 19 should compile right out of the box on PCs with a 386 or better, running MS-DOS 3.0 or later. You will need the following: Compiler: djgpp version 1,11 maint 4 or later. You can get the latest version by grabbing everything in the following directory (using anonymous ftp): oak.oakland.edu:pub/msdos/djdpp Tar: One DOS version of tar is available via anonymous ftp from ftp.urc.tue.nl:pub/unixtools/dos However, not all DOS versions of tar work equally well, so you might have to try others if this one gives you trouble. Utilities: chmod, make, mv, sed, rm. All of these utilities are available via anonymous ftp from the site ftp.iro.umontreal.ca:pub/Internet/gnuish You should grab the files futil4ax.zoo (contains chmod.exe, mv.exe, and rm.exe), sed106ax.zoo (contains sed.exe), and gzip07ax.zoo (contains gzip.exe). The file etc/MSDOS contains some information on the differences between the Unix and MS-DOS versions of GNU Emacs. If you would prefer not to compile Emacs by yourself, you can get binaries for Emacs 19.24 via anonymous ftp from the following two sites: ftp.demon.co.uk:pub/ibmpc/editors/emacs19.24 ftp.imada.ou.dk:pub/mirrors/msdos/emacs-19.24 You might also be interested in Demacs, which runs under MS-DOS (*not* Microsoft Windows; see question 84) on 386- and 486-based PCs. Demacs is a port of Nemacs (see question 126), rather than a straight port of GNU Emacs 18 or 19. Demacs was developed using an MS-DOS version of gcc called djgpp by D. J. Delorie <dj@ctron.com> which can compile and run large programs under MS-DOS, but not under MS Windows. Demacs was derived from Nemacs rather than straight from GNU Emacs. You can get the most recent version of Demacs via anonymous ftp from ftp.sigmath.osaka-u.ac.jp in pub/Msdos/Demacs/*. For a list of other MS-DOS implementations of Emacs (and Emacs look-alikes), consult the list of "Emacs implementations and literature," available via anonymous ftp from rtfm.mit.edu in pub/usenet/comp.emacs. 84: Where can I get Emacs for my PC running Microsoft Windows? There are currently two ports of Emacs that runs under Microsoft Windows: * Oemacs Current version of Oemacs4.1 is based on Emacs-19.19 and runs in either MS-DOS or Microsoft Windows. There is rumor that the author Darryl Okahata <darrylo@sr.hp.com> would not update unless there is demonstrated interest. It is nearly a full porting of GNU Emacs except that shell-mode does not work due to the limitation of MS-DOS. Anonymous ftp information: /oak.oakland.edu:pub/msdos/oemacs/ * The other uses a proprietary X Windows emulator and therefore the FSF does not think it deserves publicity. 85: Where can I get Emacs for my PC running OS/2? Emacs 19.27 is ported for emx on OS/2 2.0 or 2.1. Anonymous FTP info: hobbes.nmsu.edu:os2/2_x/unix/emacs27 86: Where can I get Emacs for my Atari ST? (does anyone know?) 87: Where can I get Emacs for my Amiga? Amiga software is available through Aminet, a set of interconnected FTP sites and other file accessing services for Amiga software. The primary sites for Aminet are ftp.wustl.edu (128.252.135.4) and ftp.cdrom.com (192.153.46.2). In the directory pub/aminet/util/gnu, there are a1.26-emacs-bin.lha -- Amiga GNU Emacs V1.26, binaries a1.26-emacs-src.lha -- Amiga GNU Emacs V1.26, sources There are also quite a few Emacs related files/programs. Please search the index of Aminet. We have no access to an Amiga, so please send in your experience and comments on the implementation. 88: Where can I get Emacs for my Apple computer? The FSF is a participant in a boycott of Apple because of Apple's "look and feel" copyright suits. See the file etc/APPLE for more details. Because of this boycott, the FSF doesn't include support in GNU software for Apple computers such as the Macintosh. Please don't help people port or develop software for Apple computers. 89: Where do I get Emacs that runs on VMS under DECwindows? Version 19.27 has a VMS directory containing installation instructions, a makefile, and various .com files. But according to Richard Levitte <levitte@e.kth.se>, it does not run out of the box. Even if it does, the VMSNOTES indicates that the Emacs on VMS is going to have much more limited functionality. Richard Levitte has a patched 19.22 that supposedly has subprocess and networking functionality just as on Unix, with virtually the same lisp interface. The source is available via anonymous ftp at ftp.vms.stacken.kth.se:GNU-VMS/Beta/EMACS-19_22-********.TAR-GZ where ******** is the release date of the kit. You should also read http://www.e.kth.se/elev/levitte/gnu/emacs.html for more information. 90: Where can I get modes for Lex, Yacc/Bison, Bourne shell, Csh, C++, Objective C, Pascal, and Awk? Most of these modes are now available in standard Emacs distribution. To get additional modes, look in the Lisp Code Directory (see question 77). For C++, if you use lisp-dir-apropos, you must specify the pattern like this: M-x lisp-dir-apropos RET c\+\+ RET Note that Barry Warsaw's cc-mode now works for C, C++, and Objective-C code. You can get the latest version (4.85, as of this writing) from the Emacs Lisp Archive. 91: What is the IP address of XXX.YYY.ZZZ? If you are at a site with a deficient nameserver, you may need to know the IP address of a host to FTP files from it. You can get this information in two ways: * By telnet: telnet nic.ddn.mil hostnames (or `telnet 192.112.36.5 101') @ whois Whois: host XXX.YYY.ZZZ * By e-mail: To: service@nic.ddn.mil Subject: host XXX.YYY.ZZZ or: whois XXX.YYY.ZZZ or: help or: To: resolve@cs.widener.edu body: site XXX.YYY.ZZZ Information from Brendan Kehoe <brendan@cs.widener.edu>. Major Emacs Lisp Packages, Emacs Extensions, and Related Programs This section lists version numbers, FTP sites, mailing lists, newsgroups, and other information for many important packages, extensions, and related programs. There is some overlap with the Lisp Code Directory, but these entries give more detailed information. If you know of any other packages that are so substantial that they deserve to be mentioned here, please let us know. Having its own mailing list or newsgroup or more than half a megabyte of source code are good signs. 92: VM (View Mail) -- another mail reader within Emacs Author: Kyle Jones <kyle@uunet.uu.net> Latest version: 5.72 (beta) Anonymous FTP: /ftp.uu.net:networking/mail/vm-5.72beta.tar.gz Newsgroups and mailing lists: Info-VM: gnu.emacs.vm.info (newsgroup) info-vm-request@uunet.uu.net (for subscriptions) info-vm@uunet.uu.net (for submissions) Bug-VM: gnu.emacs.vm.bug (newsgroup) bug-vm-request@uunet.uu.net (for subscriptions) bug-vm@uunet.uu.net (for submissions) 93: Supercite -- mail and news citation package within Emacs Author: Barry Warsaw <bwarsaw@cen.com> Latest version: 3.54 (comes with GNU Emacs 19) 3.1 (available from the Emacs Lisp Archive) Anonymous FTP: /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/sc3.1.tar.Z Mailing list: supercite-request@anthem.nlm.nih.gov (for subscriptions) supercite@anthem.nlm.nih.gov (for submissions) NOTE: Superyank is an old version of Supercite. 94: Gnus -- news reader within Emacs Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp> Latest version: 4.1 (comes with GNU Emacs 19) Anonymous FTP: /src.doc.ic.ac.uk:gnu/EmacsBits/elisp-archive/packages/gnus-4.1.tar.Z /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/gnus-4.1.tar.Z Newsgroups and mailing lists: English-only: gnu.emacs.gnus (newsgroup) info-gnus-english-request@cis.ohio-state.edu (for subscriptions) info-gnus-english@cis.ohio-state.edu (for submissions) Japanese (and some English): info-gnus-request@flab.fujitsu.co.jp (for subscriptions) info-gnus@flab.fujitsu.co.jp (for submissions) 95: Calc -- poor man's Mathematica within Emacs Author: Dave Gillespie <daveg@csvax.cs.caltech.edu> Latest version: 2.02c Anonymous FTP: /prep.ai.mit.edu:pub/gnu/calc-2.02c.tar.gz NOTE: Unlike Wolfram Research, Dave has never threatened to sue anyone for having a program with a similar command language to Calc. :-) 96: Ange-FTP -- transparent FTP access for Emacs's file access routines Author: Andy Norman <ange@hplb.hpl.hp.com> Latest version: 1.56 (comes with GNU Emacs 19) Anonymous FTP: /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/ange-ftp.tar.Z Mailing lists: Ange-FTP Lovers: ange-ftp-lovers-request@anorman.hpl.hp.com (for subscriptions) ange-ftp-lovers@anorman.hpl.hp.com (for submissions) /ftp.reed.edu:pub/mailing-lists/ange-ftp/ (archives) Ange-FTP Announcements: ange-ftp-lovers-announce@anorman.hpl.hp.com NOTE: now supports VMS, CMS, and MTS ftp servers 97: VIP -- vi emulation for Emacs Author: Aamod Sane <sane@cs.uiuc.edu> Latest version: 4.3 Anonymous FTP: /cs.uiuc.edu:pub/vip4.3.tar.Z /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/modes/vip-mode.tar.Z NOTE: This version much more closely emulates vi than the one distributed with Emacs. 98: AUC TeX -- enhanced LaTeX mode with debugging facilities Author: Kresten Krab Thorup <krab@iesd.auc.dk> Latest version: 9.1i Anonymous FTP: /iesd.auc.dk:pub/emacs-lisp/auctex-9.1i.tar.gz Mailing list: auc-tex-request@iesd.auc.dk (for subscriptions) auc-tex@iesd.auc.dk (for submissions) auc-tex_mgr@iesd.auc.dk (auc-tex development team) 99: Hyperbole -- extensible hypertext management system within Emacs Author: Bob Weiner <rsw@cs.brown.edu> Latest version: 3.15 Anonymous FTP: /wilma.cs.brown.edu:pub/hyperbole/h3.15.tar.Z Mailing lists: hyperbole-announce -- Hyperbole release announcements only. Subscriptions: To: hyperbole-request@cs.brown.edu Subject: Add <mailbox@domain.name> to hyperbole-announce hyperbole -- Hyperbole discussion. Subscriptions: To: hyperbole-request@cs.brown.edu Subject: Add <mailbox@domain.name> to hyperbole Submissions: hyperbole@cs.brown.edu NOTE: Any member of the hyperbole mailing list is automatically a member of the hyperbole-announce mailing list. NOTE: No .UUCP or ! addresses are allowed on these mailing lists. 100: BBDB -- personal Info Rolodex integrated with mail/news readers Author: Jamie Zawinski <jwz@lucid.com> Latest released version: 1.50 Anonymous FTP: /archive.cis.ohio-state.edu:pub/gnu/emacs/elisp-archive/packages/bbdb-1.50.tar.Z Mailing lists: info-bbdb-request@cs.uiuc.edu (for subscriptions) info-bbdb@cs.uiuc.edu (for submissions) bbdb-announce-request@cs.uiuc.edu (to be informed of new releases) NOTE: BBDB does not work with VM 4. It does work with VM 5, Rmail, Gnus, and MH-E. 101: Ispell -- spell checker in C with interface for Emacs Author: Geoff Kuenning <geoff@itcorp.com> Latest released version: 3.1.08 Anonymous FTP: Master Sites: /ftp.cs.ucla.edu:pub/ispell/ispell-3.1.08.tar.gz /ftp.math.orst.edu:pub/ispell/ispell-3.1.08.tar.gz Known Mirror Sites: (only directory names shown) /ftp.th-darmstadt.de:pub/dicts/ispell/ /ftp.nl.net:pub/textproc/ispell/ NOTE: * Do not ask Geoff to send you the latest version of Ispell. He does not have free e-mail. * This Ispell program is distinct from GNU Ispell 4.0. GNU Ispell 4.0 is no longer a supported product. 102: XEmacs -- alternative Emacs 19 with better X interface; formerly known as Lucid Emacs or lemacs. Primary Maintainer: Chuck Thompson <cthomp@cs.uiuc.edu> Other Developers: Ben Wing <wing@netcom.com> Richard Mlynarik <mly@adoc.xerox.com> Jamie Zawinski <jwz@mcom.com> Latest released version: 19.11 Anonymous FTP: /ftp.cs.uiuc.edu:pub/xemacs/xemacs-19.11.tar.gz Newsgroup and mailing lists: Bugs: alt.lucid-emacs.bug bug-lucid-emacs-request@cs.uiuc.edu (for subscriptions) bug-lucid-emacs@cs.uiuc.edu (for submissions) Help: alt.lucid-emacs.help help-lucid-emacs-request@cs.uiuc.edu (for subscriptions) help-lucid-emacs@cs.uiuc.edu (for submissions) NOTE: The XEmacs FAQ is available via the World-Wide Web at URL http://xemacs.cs.uiuc.edu/. 103: Patch -- program to apply "diffs" for updating files Author: Larry Wall <lwall@netlabs.com> Latest version: 2.1 Anonymous FTP: /prep.ai.mit.edu:pub/gnu/patch-2.1.tar.gz /ftp.funet.fi:pub/gnu/patch-2.1.tar.gz /ftp.uni-stuttgart.de:pub/unix/gnu/patch-2.1.tar.gz NOTE: See question 80 for other GNU distribution sites. Changing Key Bindings and Handling Key Binding Problems 104: How do I bind keys (including function keys) to commands? Keys can be bound to commands either interactively or by predefinition (e.g. in the .emacs file). To interactively bind keys for all modes, type `M-x global-set-key RET KEY CMD RET'; for the current major mode only, type `M-x local-set-key RET KEY CMD RET' (see the Emacs on-line documentation for further details). To bind keys on starting Emacs or on starting any given mode, you can use the following "trick." First bind the key interactively, then immediately afterwards type `C-x ESC ESC C-a C-k C-g'. Now, the command needed to bind the key is in the kill ring and can be yanked into the .emacs file. If the key binding is global, no changes to the command are required. For example, (global-set-key (quote [f1]) (quote help-for-help)) can be place directly into the .emacs file. If the key binding is local, the command is used in conjunction with the `add-hook' command. For example, in tex-mode, a local binding might be (add-hook 'tex-mode-hook (function (lambda () (local-set-key (quote [f1]) (quote help-for-help)))) NOTE: * Control characters in key sequence position of the form yanked from the kill ring are given in their graphic form - i.e. CTRL is shown as `^', TAB as a set of spaces (usually 8), etc. You may want to convert these into their vector or string forms. * If some prefix key of the character sequence to be bound is already bound as a complete key, then you must unbind it before the new binding. For example, if `ESC {' is previously bound: (global-unset-key [?\e ?{]) ;; or (local-unset-key [?\e ?{]) * Aside from commands and "lambda lists," a vector or string also can be bound to a key and thus treated as a macro. For example: (global-set-key [f10] [?\C-x?\e?\e?\C-a?\C-k?\C-g]) ;; or (global-set-key [f10] "\C-x\e\e\C-a\C-k\C-g") See `Key Bindings' in the Emacs on-line documentation for further details. 105: Why does Emacs say `Key sequence XXX uses invalid prefix characters'? Usually one of two things has happened. In one case, the control character in the key sequence has been misspecified (e.g. `C-f' used instead of `\C-f' within a Lisp expression). In the other case, a "prefix key" in the keystroke sequence you were trying to bind was already bound as a "complete key." Historically, the `ESC [' prefix was usually the problem, in which case you should evaluate either of these forms before attempting to bind the key sequence: (global-unset-key [?\e ?[]) ;; or (global-unset-key "\e[") 106: Why doesn't this [terminal or window-system setup] code work in my .emacs file, but it works just fine after Emacs starts up? During startup, Emacs initializes itself according to a given code/file order. If some of the code executed in your .emacs file needs to be postponed until the initial terminal or window-system setup code has been executed but is not, then you will experience this problem (this code/file execution order is not enforced after startup). To postpone the execution of Emacs Lisp code until after terminal or window-system setup, treat the code as a "lambda list" and set the value of either the `term-setup-hook' or `window-setup-hook' variable to this "lambda function." For example, (setq term-setup-hook (function (lambda () (cond ((string-match "\\`vt220" (or (getenv "TERM") "")) ;; Make vt220's "Do" key behave like M-x: (global-set-key [do] 'execute-extended-command)) )))) For information on what Emacs does every time it is started, see the lisp/startup.el file. 107: How do I use function keys under X Windows? With Emacs 19, functions keys under X are bound like any other key. See question 104 for details. 108: How do I tell what characters or symbols my function or arrow keys emit? Put the following in your .emacs file and type `M-x see-chars' to use: (defun see-chars () "Display events received, terminated by a 3-second timeout." (interactive) (let (chars (inhibit-quit t)) (message "Enter characters or other events, terminated by a 3-second timeout.") (while (not (sit-for 3)) (setq chars (nconc chars (list (read-event))) quit-flag nil) ; quit-flag might be set by C-g. (if (not (input-pending-p)) (message "Events received until now: %s..." (key-description chars)))) (message "Events received: %s" (key-description chars)))) Alternatively, type "C-h c" then the function or arrow keys. The command will return either a function key symbol or character sequence (see the Emacs on-line documentation for an explanation). This works for other keys as well. 109: How do I set the X key "translations" for Emacs? Sorry, you can't; there are no "translations" to be set. Emacs is not written using the Xt library. The only way to affect the behavior of keys within Emacs is through `xmodmap' (outside Emacs) or `define-key' (inside Emacs). The `define-key' command should be used in conjunction with the `function-key-map' map. For instance, (define-key function-key-map [M-tab] [?\M-\t]) defines the `META TAB' key sequence. 110: How do I handle C-s and C-q being used for flow control? C-s and C-q are used in the XON/XOFF flow control protocol. This screws up Emacs because it binds these characters to commands. Also, by default Emacs will not honor them as flow control characters and may overwhelm output buffers. Sometimes, intermediate software using XON/XOFF flow control will prevent Emacs from ever seeing C-s and C-q. Possible solutions: * Disable the use of C-s and C-q for flow control. You need to determine the cause of the flow control. * your terminal Your terminal may use XON/XOFF flow control to have time to display all the characters it receives. For example, VT series terminals do this. It may be possible to turn this off from a setup menu. For example, on a VT220 you may select `No XOFF' in the setup menu. This is also true for some terminal emulation programs on PCs. When you turn off flow control at the terminal, you will also need to turn it off at the other end, which might be at the computer you are logged in to or at some terminal server in between. If you turn off flow control, characters may be lost; using a printer connected to the terminal may fail. You may be able to get around this problem by modifying the `termcap' entry for your terminal to include extra NUL padding characters. * a modem If you are using a dialup connection, the modems may be using XON/XOFF flow control. It's not clear how to get around this. * a router or terminal server Some network box between the terminal and your computer may be using XON/XOFF flow control. It may be possible to make it use some other kind of flow control. You will probably have to ask your local network experts for help with this. * tty and/or pty devices If your connection to Emacs goes through multiple tty and/or pty devices, they may be using XON/XOFF flow control even when it is not necessary. Eirik Fuller <eirik@theory.tn.cornell.edu> writes: Some versions of `rlogin' (and possibly telnet) do not pass flow control characters to the remote system to which they connect. On such systems, Emacs on the remote system cannot disable flow control on the local system. Sometimes `rlogin -8' will avoid this problem. One way to cure this is to disable flow control on the local host (the one running rlogin, not the one running rlogind) using the stty command, before starting the rlogin process. On many systems, `stty start u stop u' will do this. Some versions of `tcsh' will prevent even this from working. One way around this is to start another shell before starting rlogin, and issue the stty command to disable flow control from that shell. Use `stty -ixon' instead of `stty start u stop u' on some systems. * Make Emacs speak the XON/XOFF flow control protocol. You can make Emacs treat C-s and C-q as flow control characters by evaluating the form (enable-flow-control) to unconditionally enable flow control or (enable-flow-control-on "vt100" "h19") (using your terminal names instead of "vt100" or "h19") to enable selectively. These commands will automatically swap `C-s' and `C-q' to `C-\' and `C-^'. Variables can be used to change the default swap keys (`flow-control-c-s-replacement' and `flow-control-c-q-replacement'). If you are fixing this for yourself, simply put the form in your .emacs file. If you are fixing this for your entire site, the best place to put it is in the lisp/site-start.el file. Putting this form in lisp/default.el has the problem that if the user's .emacs file has an error, this will prevent lisp/default.el from being loaded and Emacs may be unusable for the user, even for correcting their .emacs file (unless they're smart enough to move it to another name). For further discussion of this issue, read the file PROBLEMS (in the top-level directory when you unpack the Emacs source). 111: How do I bind `C-s' and `C-q' (or any key) if these keys are filtered out? To bind `C-s' and `C-q', use either `enable-flow-control' or `enable-flow-control-on'. See question 110 for usage and implementation details. To bind other keys, use `keyboard-translate'. See question 114 for usage details. To do this for an entire site, you should swap the keys in lisp/site-start.el. See question 110 for an explanation of why lisp/default.el should not be used. NOTE: * If you do this for an entire site, the users will be confused by the disparity between what the documentation says and how Emacs actually behaves. 112: Why does the `Backspace' key invoke help? The `Backspace' key (on most keyboards) generates ASCII code 8. `C-h' sends the same code. In Emacs by default `C-h' invokes help-command. This is intended to be easy to remember since the first letter of "help" is "h." The easiest solution to this problem is to use `C-h' (and Backspace) for help and DEL (the Delete key) for deleting the previous character. For many people this solution may be problematic: * They normally use Backspace outside of Emacs for deleting the previous character typed. This can be solved by making DEL be the command for deleting the previous character outside of Emacs. This command will do this on many Unix systems: stty erase '^?' * The person may prefer using the Backspace key for deleting the previous character because it is more conveniently located on their keyboard or because they don't even have a separate Delete key. In this case, the Backspace key should be made to behave like Delete. There are several methods. * Some terminals (e.g., VT3## terminals) allow the character generated by the Backspace key to be changed from a setup menu. * You may be able to get a keyboard that is completely programmable. * Under X or on a dumb terminal, it is possible to swap the Backspace and Delete keys inside Emacs: (keyboard-translate ?\C-h ?\C-?) See question 114 for further details of `keyboard-translate'. * Another approach is to switch key bindings and put help on "C-x h" instead: (global-set-key [?\C-h] 'delete-backward-char) (global-set-key [?\C-x ?h] 'help-command) ;; overrides mark-whole-buffer Other popular key bindings for help are M-? and "C-x ?". NOTE: * Don't try to bind DEL to help-command, because there are many modes that have local bindings of DEL that will interfere. 113: Why doesn't Emacs look at the stty settings for Backspace vs. Delete? Good question! 114: How do I "swap" two keys? In Emacs 19, you can swap two keys (or key sequences) by using the `keyboard-translate' function. For example, to turn `C-h' into DEL and DEL to `C-h', use (keyboard-translate ?\C-h ?\C-?) ; translate `C-h' to DEL (keyboard-translate ?\C-? ?\C-h) ; translate DEL to `C-h'. The first key sequence of the pair after the function identifies what is produced by the keyboard; the second, what is matched for in the keymaps. Keyboard translations are not the same as key bindings in keymaps. Emacs contains numerous keymaps that apply in different situations, but there is only one set of keyboard translations, and it applies to every character that Emacs reads from the terminal. Keyboard translations take place at the lowest level of input processing; the keys that are looked up in keymaps contain the characters that result from keyboard translation. Also see `Keyboard Translations' in the on-line manual. 115: How do I produce C-XXX with my keyboard? On terminals (but not under X), some common "aliases" are: CTRL-2 or CTRL-SPC for C-@ CTRL-6 for C-^ CTRL-7 or CTRL-SHIFT-- for C-_ CTRL-4 for C-\ CTRL-5 for C-] CTRL-/ for C-? Often other aliases exist; use the `C-h c' command and try `CTRL' with all of the digits on your keyboard to see what gets generated. You can also try the `C-h w' command if you know the name of the command. 116: What if I don't have a Meta key? Instead of typing "M-a", you can type "ESC a". In fact, Emacs converts M-a internally into "ESC a" anyway (depending on the value of meta-prefix-char). Note that you press "Meta" and "a" together, while you press "ESC", release it, and then press "a". 117: What if I don't have an Escape key? Type "C-[" instead. This should send ASCII code 27 just like an Escape key would. "C-3" may also work on some terminal (but not under X). For many terminals (notably DEC terminals) "F11" generates the "ESC" key. If not, the following form can be used bind it: (define-key function-key-map [f11] [?\e]) ; F11 is the documented ESC ; replacement on DEC terminals. 118: Can I make my `Compose Character' key behave like a Meta key? On a dumb terminal such as a VT220, no. It is rumored that certain VT220 clones could have their Compose key configured this way. If you're using X, you might be able to do this with the `xmodmap' program. 119: How do I bind a combination of modifier key and function key? With Emacs 19 you can indicate modified function keys in vector format through multi-prefixing the function key symbol. For example (from the Emacs on-line documentation): (global-set-key [?\C-x right] 'forward-page) where "?\C-x" is the Lisp character constant for the character "C-x". You can use the modifier keys CTRL, META, HYPER, SUPER, ALT and SHIFT with function keys. To represent these modifiers, prepend the strings "C-", "M-", "H-", "s-", "A-" and "S-" to the symbol name. Thus, here is how to make "Hyper-Meta-RIGHT" move forward a word: (global-set-key [H-M-right] 'forward-word) NOTE: * Not all modifiers are permitted in all situations. HYPER, SUPER, and ALT are available only under X (provided there are such keys). Non-ASCII keys and mouse events (e.g. "C-=" and "mouse-1") also fall under this category. See question 104 for general key binding instructions. 120: Why doesn't my Meta key work in an xterm window? Try all of these methods before asking for further help: * You may have big problems using `mwm' as your window manager. {Does anyone know a good generic solution to allow the use of the Meta key in Emacs with mwm?} * For X11: Make sure it really is a Meta key. Use `xev' to find out what keysym your Meta key generates. It should be either Meta_L or Meta_R. If it isn't, use xmodmap to fix the situation. * Make sure the pty the xterm is using is passing 8 bit characters. `stty -a' (or `stty everything') should show `cs8' somewhere. If it shows `cs7' instead, use `stty cs8 -istrip' (or `stty pass8') to fix it. * If there is an rlogin connection between the xterm and the Emacs, the `-8' argument may need to be given to rlogin to make it pass all 8 bits of every character. * If the Emacs is running under Ultrix, it is reported that evaluating (set-input-mode t nil) helps. * If all else fails, you can make xterm generate "ESC W" when you type M-W, which is the same conversion Emacs would make if it got the M-W anyway. In X11R4, the following resource specification will do this: XTerm.VT100.EightBitInput: false (This changes the behavior of the insert-eight-bit action.) With older xterms, you can specify this behavior with a translation: XTerm.VT100.Translations: #override \ Meta<KeyPress>: string(0x1b) insert() You might have to replace `Meta' with `Alt'. 121: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0? This is a result of an internationalization extension in X11R4 and the fact that HP is now using this extension. Emacs assumes that XLookupString returns the same result regardless of the Meta key state which is no longer necessarily true. Until Emacs is fixed, the temporary kludge is to run this command after each time the X server is started but preferably before any xterm clients are: xmodmap -e 'remove mod1 = Mode_switch' NOTE: This will disable the use of the extra keysyms systemwide, which may be undesirable if you actually intend to use them. 122: Where can I get key bindings to make Emacs emulate WordStar? There is a package `wordstar' by Jim Frost <jimf@saber.com> located under the "misc" directory at the Emacs Lisp Archive. 123: Where can I get an XEDIT emulator for Emacs? This question comes up once every couple of months. Searing for "xedit" through most recent Lisp Code Directory fails to match any entries. Using Emacs with Alternate Character Sets 124: How do I make Emacs display 8-bit characters? GNU Emacs 19 has built-in support for 8-bit characters. Here is an excerpt from the `European Display' page of the on-line manual: Some European languages use accented letters and other special symbols. The ISO 8859 Latin-1 character set defines character codes for many European languages in the range 160 to 255. Emacs can display those characters according to Latin-1, provided the terminal or font in use supports them. The `M-x standard-display-european' command toggles European character display mode. With a numeric argument, `M-x standard-display-european' enables European character display if and only if the argument is positive. Some operating systems let you specify the language you are using by setting a locale. Emacs handles one common special case of this: if your locale name for character types contains the string `8859-1' or `88591', Emacs automatically enables European character display mode when it starts up. 125: How do I input 8-bit characters? Again, from the `European Display' page of the on-line manual: If you enter non-ASCII ISO Latin-1 characters often, you might find ISO Accents mode convenient. When this minor mode is enabled, the characters ``', `'', `"', `^', `/' and `~' modify the following letter by adding the corresponding diacritical mark to it, if possible. To enable or disable ISO Accents mode, use the command `M-x iso-accents-mode'. This command affects only the current buffer. To enter one of those six special characters, type the character, followed by a space. Some of those characters have a corresponding "dead key" accent character in the ISO Latin-1 character set; to enter that character, type the corresponding ASCII character twice. For example, `''' enters the Latin-1 character acute-accent (character code 0264). 126: Where can I get an Emacs that can handle kanji characters? Nemacs 3.3.2 (Nihongo GNU Emacs) is a modified version of GNU Emacs 18.55 that handles kanji characters. It is available via anonymous FTP: /crl.nmsu.edu:pub/misc/nemacs-3.3.2.tar.Z /ftp.cs.titech.ac.jp:pub/gnu-rel/nemacs/nemacs-3.3.2.tar.gz You might also need files for "wnn," a kanji input method (wnn-4.0.3{-README,.tar.Z} {on which machine?}). You need a terminal (or terminal emulator) that can display text encoded in JIS, Shift-JIS, or EUC (Extended Unix Code), or the ability to run Nemacs as a direct X Windows client. 127: Where can I get an Emacs that can handle Chinese? Cemacs by Stephen G. Simpson <simpson@math.psu.edu> is a patch to Emacs 18.57 (the ctl-arrow patch) and some Emacs Lisp code that combined with Cxterm allows using Chinese characters. It is available via anonymous FTP: /cs.purdue.edu:pub/ygz/cemacs.tar.Z Cxterm, a patch to Emacs 18.57 that allows you to enter Chinese characters, is available from the same place: /cs.purdue.edu:pub/ygz/cxterm-11.5.1.tar.Z 128: Where is an Emacs that can handle Semitic (right-to-left) alphabets? Joel M. Hoffman <joel@wam.umd.edu> writes: A couple of years ago a wrote a hebrew.el file that allows right-to-left editing of Hebrew. I relied on the hardware to display the Hebrew letters, given the right codes, but not for any right-to-left support; the hardware also doesn't have to send any specific char. codes. Emacs keeps track of when the user is typing Hebrew vs. English. (The VT-* terminals in Israel contain built-in support for Hebrew.) To get it to work I had to modify only a few lines of GNU Emacs's source code --- just enough to make it 8-bit clean. [and in a separate message:] It doesn't produce time-order ["sefer" format] (I wouldn't recommend trying that with Emacs, because converting time-order to screen-order with arbitrarily long lines is a bit tricky), but I also concocted a quick filter to convert screen-order into time-order. I'll be happy to send you the requisite files if you want them. If you're using it for anything large, however, you'll want something that works better. Joel Hoffman has also written a "bi-directional bi-lingual Emacs-like" editor for MS-DOS named Ibelbe (Itty Bitty Emacs-Like Bidirectional Editor). Ibelbe is written in Turbo Pascal and comes with source code. Here is the description: Ibelbe looks like Emacs (it even has a minibuffer and filename completion), and fully supports both right-to-left and left-to-right editing. Other than an EGA monitor or better, no special hardware is required. You will need an EGA Hebrew font to use Ibelbe with Hebrew. Anonymous FTP: /israel.nysernet.org:israel/computers/software/msdos/ibelbe.zip /israel.nysernet.org:israel/computers/software/msdos/hebfont.zip Joseph Friedman <yossi@deshaw.com, yossi@Neon.Stanford.EDU> has written patches for Emacs 18.55 and 18.58 that provide Semitic language support under X Windows. Warren Burstein <warren@itex.jct.ac.il> says he has mapped 7-bit keys by modifying self-insert-command "for Hebrew input on 7-bit keyboards." A good suggestion is to query archie for files named with `hebrew'. Mail and News 129: How do I change the included text prefix in mail/news followups? If you read mail with Rmail or news with Gnus, set the variable mail-yank-prefix. For VM, set vm-included-text-prefix. For mh-e, set mh-ins-buf-prefix. For fancier control of citations, use Supercite. See question 93. A related problem is how to prevent Emacs from including various headers of the replied-to message. For this, you should set the value of mail-yank-ignored-headers, which takes a regexp value. 130: How do I save a copy of outgoing mail? You can either mail yourself a copy by including a `BCC:' header in the mail message, or store a copy of the message directly to a file by including an `FCC:' header. If you use standard mail, you can automatically create a `BCC:' to yourself by putting (setq mail-self-blind t) in your .emacs. You can automatically include an `FCC:' field by putting something like the following in your .emacs file: (setq mail-archive-file-name (expand-file-name "~/outgoing")) The output file will be in Unix mail format, which can be read directly by VM, but not always by Rmail. See question 132. If you use mh-e add an FCC: or BCC: field to your components file. It does not work to put `set record filename' in the .mailrc file. 131: Why doesn't Emacs expand my aliases when sending mail? * You must separate multiple addresses in the headers of the mail buffer with commas. This is because Emacs supports RFC822 standard addresses like this one: To: Willy Smith <wks@xpnsv.lwyrs.com> However, you do not need to separate addresses with commas in your .mailrc file. WARNING: Emacs breaks up aliases in the .mailrc file into multiple addresses both on commas and on whitespace, regardless of any use of quotes. This is probably a bug. You can get around this by directly setting the value of mail-aliases. * Emacs normally only reads the `.mailrc' file once per session, when you start to compose your first mail message. If you edit .mailrc, you can type "M-ESC (build-mail-aliases) RET" to make Emacs reread .mailrc. (You have to include the parentheses where they are shown!) * Emacs does not interpret vendor-specific additions to the format of the .mailrc file such as the `source' command. It also ignores any `set' commands. The only commands it looks at are `alias' and `group' commands. * If you like, you can expand mail aliases as abbrevs, as soon as you type them in. To enable this feature, execute the following: (add-hook 'mail-setup-hook 'mail-abbrevs-setup) 132: Why does Rmail think all my saved messages are one big message? A file created through the FCC: field in a message is in Unix Mail format, not the format that Rmail uses (BABYL format). Rmail will try to convert a Unix mail file into BABYL format on input, but sometimes it makes errors. For guaranteed safety, you can make the saved- messages file be an inbox for your Rmail file by using the function set-rmail-inbox-list. 133: How can I sort the messages in my Rmail folder? In Rmail, type C-c C-s C-h to get a list of sorting functions and their key bindings. 134: Why does Rmail need to write to /usr/spool/mail? This is the behavior of the `movemail' program which Rmail uses. This indicates that movemail is configured to use lock files. RMS writes: Certain systems require lock files to interlock access to mail files. On these systems, movemail must write lock files, or you risk losing mail. You simply must arrange to let movemail write them. Other systems use the flock system call to interlock access. On these systems, you should configure movemail to use flock. 135: How do I recover my mail files after Rmail munges their format? If you have just done rmail-input on a file and you don't want to save it in Rmail's format (called BABYL), just kill the buffer (with C-x k). If you typed M-x rmail and it read some messages out of your inbox and you want to put them in a Unix mail file, use C-o on each message. If you want to convert an existing file from BABYL format to Unix mail format, use the command M-x unrmail: it will prompt you for the input and output file names. 136: How do I make Emacs automatically start my mail/news reader? To start Emacs in Gnus: emacs -f gnus in Rmail: emacs -f rmail A more convenient way to start with Gnus: alias gnus 'emacs -f gnus' gnus It is probably unwise to automatically start your mail or news reader from your .emacs file. This would cause problems if you needed to run two copies of Emacs at one time. Also, this would make it difficult for you to start Emacs quickly when you needed to. 137: How do I read news under Emacs? Use M-x gnus. It is documented in Info (see question 14). 138: Why doesn't Gnus work via NNTP? There is a bug in NNTP version 1.5.10, such that when multiple requests are sent to the NNTP server, the server only handles the first one before blocking waiting for more input which never comes. NNTP version 1.5.11 claims to fix this. You can work around the bug inside Emacs like this: (setq nntp-maximum-request 1) You can find out what version of NNTP your news server is running by telnetting to the NNTP port (usually 119) on the news server machine (i.e., `telnet server-machine 119'). The server should give its version number in the welcome message. Type `quit' to get out. 139: How do I view text with embedded underlining (e.g., ClariNews)? Underlining appears like this: _^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^Hi_^Hn_^Hg You can destructively remove underlining with M-x ununderline-region. For ClariNews articles, clari-clean.el by David N. Blank-Edelman <dnb@meshugge.media.mit.edu> will remove both underlining and overstriking automatically. It is available on the Lisp Code Directory (see question 77). 140: How do I save all the items of a multi-part posting in Gnus? Use gnus-uu. Type C-c C-v C-h in the Gnus summary buffer to see a list of available commands. 141: Why does Gnus put the subjects in replies beyond the 80th column? This is a feature. If you set gnus-thread-hide-subject to non-nil, Gnus will only display the subject of the first posting in a thread, even if some of the replies use different subjects. It hides the subjects by putting them past the edge of the window and setting truncate lines to t. If your screen looks messed up, then for some reason truncate-lines in your `*Subject*' buffer has been set to nil. It should be set to t. 142: How do I make Gnus start up faster? Remove all the newsgroups in which you have no interest from your .newsrc file by using Gnus's C-k or C-w commands in the `*Newsgroup*' buffer, perhaps after displaying all newsgroups with the L command. Unsubscribing will not speed up Gnus. 143: How do I catch up all newsgroups in Gnus? In the `*Newsgroup*' buffer, type the following magical incantation: M-< C-x ( c y M-0 C-x ) Leave off the "M-<" if you only want to catch up from point to the end of the `*Newsgroup' buffer. 144: Why can't I kill in Gnus on the Newsgroups/Keywords/Control line? Gnus will complain that the `Newsgroups:', `Keywords:', and `Control:' headers are `Unknown header field's. For the `Newsgroups:' header, there is an easy workaround: kill on the `Xref' header instead, which will be present on any cross-posted article (as long as your site carries the cross-post group). If you really want to kill on one of these headers, you can do it like this: (gnus-kill nil "^Newsgroups: .*\\(bad\\.group\\|worse\\.group\\)") 145: How do I get rid of flashing messages in Gnus for slow connections? Set nntp-debug-read to nil. 146: Why is catch up slow in Gnus? Because Gnus is marking crosspostings read. You can control this with the variable gnus-use-cross-reference. 147: Why does Gnus hang for a long time when posting? David Lawrence <tale@uunet.uu.net> explains: The problem is almost always interaction between NNTP and C News. NNTP POST asks C News's inews to not background itself but rather hang around and give its exit status so it knows whether the post was successful. (That wait will on some systems not return the exit status of the waited for job is a different sort of problem.) It ends up taking a long time because inews is calling relaynews, which often waits for another relaynews to free the lock on the news system so it can file the article. My preferred solution is to change inews to not call relaynews, but rather use newsspool. This loses some error-catching functionality, but is for the most part safe as inews will detect a lot of the errors on its own. The C News folks have sped up inews, too, so speed should look better to most folks as that update propagates around. 148: Why don't my news postings in Gnus get past the local machine? It could be that your Distribution: field is "local" or a synonym, or your Path: field may be wrong. This piece of code may fix the latter problem: (setq gnus-use-generic-path t) 149: Why doesn't Gnus generate the `Lines:' header? The posting software down the line from Gnus often generates a "Lines:" header so Gnus doesn't have to. If you want it to, just add Lines to the list in gnus-required-headers: (add-hook 'gnus-startup-hook '(lambda () (setq gnus-required-headers (cons 'Lines gnus-required-headers)))) 150: How do I kill all articles in Gnus but those matching a pattern? Example kill file code: ;; kill everything (gnus-kill "subject" "" nil nil) ;; then restore stuff by our favorite poster (gnus-kill "from" "good-guy" (function (lambda () (if (eq ?X (char-after (save-excursion (beginning-of-line 1) (point)))) (gnus-summary-clear-mark-forward 1)))) t) ------------------------------------------------------------ Slightly modified by Richard Stallman Copyright 1994 Reuven M. Lerner Copyright 1992, 1993 Steven Byrnes Copyright 1990, 1991, 1992 Joseph Brian Wells This list of frequently asked questions about GNU Emacs with answers ("FAQ") may be translated into other languages, transformed into other formats (e.g. Texinfo, Info, WWW, WAIS), and updated with new information. The same conditions apply to any derivative of the FAQ as apply to the FAQ itself. Every copy of the FAQ must include this notice or an approved translation, information on who is currently maintaining the FAQ and how to contact them (including their e-mail address), and information on where the latest version of the FAQ is archived (including FTP information). The FAQ may be copied and redistributed under these conditions, except that the FAQ may not be embedded in a larger literary work unless that work itself allows free copying and redistribution. ------------------------------------------------------------ Special thanks to members of the FAQ team, who worked hard to ensure that answers were up-to-date: Ethan Bradford <ethanb@u.washington.edu>, Luis Fernandes <elf@eccles.ee.ryerson.ca>, Denby Wong <3dw16@qlink.QueensU.CA>, Yair Friedman <yair@cs.huji.ac.il>, Thi <ttn@netcom.com>, Richard Levitte <levitte@e.kth.se>, "William G. Dubuque" <wgd@martigny.ai.mit.edu>, and Guan-Hsong Hsu <ghsu@relay.nswc.navy.mil>.