Mercurial > emacs
changeset 597:434e13b1fc95
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Mon, 23 Mar 1992 04:01:01 +0000 |
parents | d02d6c2f7f80 |
children | 75b23846ac96 |
files | etc/FAQ |
diffstat | 1 files changed, 2801 insertions(+), 1917 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/FAQ Sat Mar 21 07:56:45 1992 +0000 +++ b/etc/FAQ Mon Mar 23 04:01:01 1992 +0000 @@ -1,71 +1,224 @@ -This is a list of frequently asked questions (FAQ) about GNU Emacs with -answers. This list is designed to cut down on the noise in the -gnu.emacs.help newsgroup (which is also the help-gnu-emacs mailing list) -that results from people repeatedly asking many of the same questions. + GNU Emacs FAQ: Introduction -This list is maintained by me, Joe Wells. My e-mail address is -jbw@bu.edu. If jbw@bu.edu doesn't work try jbw@bucsf.bu.edu. +[To find what has changed, view the `Changes' posting or inspect the change + bars in the text of the questions.] + +This is the introduction to a list of frequently asked questions (FAQ) about +GNU Emacs with answers. This article contains a listing of the questions; +subsequent articles contain the questions and answers. -Feel free to contribute text for the answers that I haven't written yet, -to suggest new questions, to suggest changes in the wording, to suggest -deletions, etc. Please include either "FAQ" or "frequently asked -questions" in the subject of messages you send to me to help keep me from -accidentally filing your message in the wrong mail folder. - -Here is a short list of new questions and questions that are now answered: +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 me! -New questions: - - Why doesn't "C-c C-c" interrupt subprocesses under HP/UX? - How do I make Emacs send 8-bit characters to my terminal? - Why does ispell sometimes ignore the local dictionary? - Where can I get Emacs with NeWS support? - -Questions with improved answers: +If you know the answer of a question is in the FAQ, please reply to the +question by e-mail instead of posting. Help reduce noise! - Has someone written an GNU Emacs Lisp package that does XXX? - How do I get Emacs running on VMS under DECwindows? - Why does Emacs crash from a bus error in XLookupString under OpenLook? - Why does Emacs hang with message "Unknown XMenu" with X11R4? - How do I use regexps (regular expressions) in Emacs? - How do I make Emacs "typeover" or "overwrite" when I type instead of - always inserting? - How do I get Emacs for my PC? - How can I highlight a region? - Where can I get GNU Emacs Lisp packages that don't come with Emacs? - Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, or Patch? +The FAQ is crossposted to `comp.emacs' because some sites do not receive the +`gnu.*' newsgroups. The FAQ is also crossposted to `news.answers'. + +Please suggest new questions, answers, wording changes, deletions, etc. The +most helpful form for suggestions is a context diff (ie., the output of `diff +-c'). Include `FAQ' in the subject of messages sent to me about the FAQ. + +Please do not send questions to me just because you do not want to disturb a +lot of people and you think I would know the answer. I do not have time to +answer questions individually. :-( -Minor changes: +Full instructions for getting the latest FAQ are in question 29. Also see the +`Introduction to news.answers' posting in the `news.answers' newsgroup, or send +e-mail to `mail-server@pit-manager.mit.edu' with `help' on a body line, or use +FTP, WAIS, or Prospero to pit-manager.mit.edu. - Where does the name "Emacs" come from? - In C mode, can I show just the lines that will be left after #ifdef - commands are handled by the compiler? - What does "M-x command" mean? - How do I get a printed copy of the GNU Emacs manual? - What do things like this mean: C-h, M-C-a, RET, etc.? - Why doesn't GNUS work anymore via NNTP? - What does Emacs do every time it starts up? - -Enjoy, +Future plans for this FAQ list include: + + * A new section devoted to GNUS questions. + * Verification for files available via FTP and for mailing lists. + * Up-to-date IP addresses for sites mentioned for FTP access. + * A Texinfo version. + * Marking questions in the list below that have been changed recently. -- -Joe Wells <jbw@bu.edu> -------------------------------------------------- -GNU Emacs Frequently Asked Questions with Answers (part 1 of 2) +Joe Wells <jbw@cs.bu.edu> + +Member of the League for Programming Freedom --- send e-mail for details +---------------------------------------------------------------------- + +Notation Used in the Answers + +1: What do things like this mean: C-h, M-C-a, RET, etc.? +2: What do you mean when you write things like this: type "ESC a"? +3: What if I don't have a Meta key? +4: What if I don't have an Escape key? +5: What does "M-x command" mean? +6: What do things like this mean: etc/SERVICE, src/config.h, + lisp/default.el? +7: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL? + +Sources of Information and Help + +8: I'm just starting GNU Emacs; how do I do basic editing? +9: How do I find out how to do something in GNU Emacs? +10: Where can I get GNU Emacs on the net (or by snail mail)? +11: Where can I get help in installing GNU Emacs? +12: How do I get a printed copy of the GNU Emacs manual? +13: How do I install a piece of Texinfo documentation? +14: How do I print a Texinfo file? +15: Can I view Info files without using GNU Emacs? +16: Where can I get documentation on GNU Emacs Lisp? +17: Has someone written an GNU Emacs Lisp package that does XXX? +18: Where can I get GNU Emacs Lisp packages that don't come with Emacs? +19: How do I submit code to the Emacs Lisp Archive? +20: What informational files are available for GNU Emacs? +21: Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, + Ange-FTP, VIP, Dired, Ispell, Epoch, Demacs, Freemacs, or Patch? +22: What is the real legal meaning of the GNU copyleft? +23: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug, + comp.emacs, etc.? +24: How do I unsubscribe to this mailing list? +25: What is the LPF and why should I join it? +26: What is the current address of the FSF? +27: What is the current address of the LPF? +28: Where can I get other up-to-date GNU stuff? +29: Where can I get the latest version of this document (the FAQ list)? + +GNU Emacs and Various Computing Environments + +30: Where does the name "Emacs" come from? +31: What is the latest version of GNU Emacs? +32: When will GNU Emacs 19 be available? +33: What will be different about GNU Emacs 19? +34: Is there an Emacs that has better mouse and X window support? +35: Where can I get the "unofficial HP GNU Emacs"? +36: Where can I get Emacs for my PC? +37: Where can I get Emacs for my Atari ST? +38: Where can I get Emacs for my Amiga? +39: Where can I get Emacs for my Apple computer? +40: Where can I get Emacs with NeWS support? +41: How do I get Emacs running on VMS under DECwindows? +42: How do I use emacstool under SunView? +43: How do I make Emacs display 8-bit characters? +44: How do I input 8-bit characters? +45: How do I use an already running Emacs from another window? +46: Where can I get an Emacs that can handle kanji characters? +47: Where can I get an Emacs that can handle Chinese? +48: Where is an Emacs that can handle Semitic (right-to-left) alphabets? + +Binding Keys to Commands -Sat Dec 8 01:30:53 1990 +49: Why does Emacs say "Key sequence XXX uses invalid prefix characters"? +50: Why doesn't this [terminal or window-system setup] code work in my + .emacs file, but it works just fine after Emacs starts up? +51: Other than that, why does my key binding fail? +52: How do I use function keys under X Windows? +53: How do I tell what characters my function or arrow keys emit? +54: Why does Emacs spontaneously start displaying "I-search:" and beeping? +55: How do I disable the use of C-s and C-q for flow control? +56: What do I do if my terminal is sending C-s and C-q for flow control and + I can't disable it? +57: How do I make Emacs honor C-s and C-q for flow control instead of for + commands? +58: Why does Emacs never see C-s and C-q through my network connection? +59: How do I use commands bound to C-s and C-q (or any key) if these keys + are filtered out? +60: How do I "swap" two keys? +61: Why does the "BackSpace" key invoke help? +62: How do I type DEL on PC terminal emulators? +63: Can I make my "Compose" key behave like a "Meta" key? +64: Why don't the arrow keys work? +65: How do I bind a combination of modifier key and function key? +66: Why doesn't my Meta key work in an xterm window? +67: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0? +68: Where can I get key bindings to make Emacs emulate WordStar? + +Building/Installing/Porting Emacs and Machine/OS-Specific Bugs + +69: Why does Emacs crash with "Fatal error (6).Abort" under SunOS 4.1? +70: Why do I get an "f68881_used undefined" error, when I build Emacs on my + Sun 3? +71: Why does Emacs ignore my X resources (my .Xdefaults file)? +72: How do I get Emacs to compile with all features under OpenWindows? +73: How do I build Emacs under HP-UX 8.0? +74: What should I do if I have trouble building Emacs? + +Weird/Confusing Problems + +75: Does Emacs have problems with files larger than 8 megabytes? +76: Why does Emacs start up using the wrong directory? +77: How do I edit a file with a "$" in its name? +78: Why does Shell mode lose track of the shell's current directory? +79: Why doesn't Emacs expand my aliases when sending mail? +80: Why doesn't my change to load-path work? +81: Why does the cursor always go to the wrong column when I move up or + down one line? +82: Why does Emacs hang with message "Unknown XMenu error" with X11R4? +83: Why doesn't display-time show the load average in the mode line + anymore? +84: Why doesn't GNUS work anymore via NNTP? +85: Why does ispell sometimes ignore the local dictionary? +86: How do I get rid of the ^M junk in my Shell buffer? +87: Are there any security risks in GNU Emacs? +88: How do I recover my mail files after RMAIL munges their format? +89: Why do I get "Process shell exited abnormally with code 1"? + +Configuring Emacs for Yourself + +90: How do I set up a .emacs file properly? +91: How do you debug a .emacs file? +92: How do I turn on abbrevs by default just in mode XXX? +93: How do I turn on Auto-Fill mode by default? +94: How do I make Emacs use a certain major mode for certain files? +95: What are the valid X resource settings (ie., stuff in .Xdefaults file)? +96: How do I stop Emacs from beeping on a terminal? +97: How do I turn down the bell volume in Emacs running under X Windows? +98: How do I change load-path? +99: How do I change the included text prefix in mail/news followups? + +Emacs Lisp Programming + +100: What dialect of Lisp is Emacs Lisp? +101: How close is Emacs Lisp to Common Lisp? +102: How do I execute a piece of Emacs Lisp code? +103: How do I make a set of operations work only within a region? +104: How can I highlight text in Emacs? +105: How do I change Emacs's idea of the tab character's length? + +Carrying Out Common Tasks + +106: How do I insert ">"'s in the beginning of every line in a buffer? +107: How do I insert "_^H" characters before each character in a paragraph + to get an underlined paragraph? +108: How do I repeat a command as many times as possible? +109: How do I search for or delete unprintable (8-bit or control) + characters? +110: How do I control Emacs's case-sensitivity when searching/replacing? +111: How do I tell Emacs to automatically indent a new line to the + indentation of the previous line? +112: How do I make Emacs "typeover" or "overwrite" instead of inserting? +113: How do I show which parenthesis matches the one I'm looking at? +114: 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? +115: How do I read news under Emacs? +116: In C mode, can I show just the lines that will be left after #ifdef + commands are handled by the compiler? +117: Is there an equivalent to the "." (dot) command of vi? +118: How do I make Emacs display the current line (or column) number? +119: How do I tell Emacs to iconify itself? +120: How do I use regexps (regular expressions) in Emacs? +121: How do I perform a replace operation across more than one file? +122: How do I make Emacs wrap words for me? +123: Where can I get a better spelling checker for Emacs? +124: How can I spell-check TeX or *roff documents? +125: How can I make Emacs automatically scroll horizontally? -If you are viewing this file 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. - - -Notation Used in the Answers (READ THIS SECTION FIRST!) - +Notation Used in the Answers - + You may skip this section if you are reasonably familiar with GNU Emacs. Some of these are not actually frequently asked questions, but knowing them is important for understanding the answers to the rest of the @@ -73,37 +226,44 @@ 1: What do things like this mean: C-h, M-C-a, RET, etc.? - C-a means while holding down the "Control" key press the "a" key. The + C-a means press the "a" key while holding down the "Control" key. The ASCII code this sends will generally be the value that would be sent by pressing just "a" minus 96 or 64. Either way it will be a number from 0 to 31. - M-a means while holding down the "Meta" key press the "a" key. The + M-a means press the "a" key while holding down the "Meta" key. The ASCII code this sends is the sum of the ASCII code that would be sent by pressing just "a" and 128. - M-C-a means while holding down both the "Control" key and the "Meta" key - press the "a" key. - - C-M-a is a synonym for M-C-a. - - RET means press the "Return" key. RET is the same as C-m. This sends - ASCII code 13. - - LFD means press the "Linefeed" key. LFD is also the same as C-j. This - sends ASCII code 10. Under Unix, ASCII code 10 is more often called - "Newline". - - DEL means press the "Delete" key. DEL is the same as C-?. This sends - ASCII code 127. - - ESC means press the "Escape" key. ESC is the same as C-[. This sends - ASCII code 27. - - SPC means press the "Space" key. This send ASCII code 32. - - TAB means press the "Tab" key. TAB is the same as C-i. This send ASCII - code 9. + M-C-a means press the "a" key while holding down both the "Control" key + and the "Meta" key. C-M-a is a synonym for M-C-a. + + * RET means press the "Return" key. RET is the same as C-m. This sends + ASCII code 13. + * LFD means press the "Linefeed" key. LFD is also the same as C-j. This + sends ASCII code 10. Under Unix, ASCII code 10 is more often called + "Newline". + * DEL means press the "Delete" key. DEL is the same as C-?. This sends + ASCII code 127. (WARNING: It is a misnomer to call C-? a "control" key, + since 127 has both bits 6 and 7 turned ON, and the rule for control keys + is that they have 6 and 7 turned OFF. Also, on very few keyboards does + Control-? generate ASCII code 127. In fact, Control-? (which is + actually Control-Shift-/) is more likely to generate C-_, ASCII code + 31!) + * ESC means press the "Escape" key. ESC is the same as C-[. This sends + ASCII code 27. + * SPC means press the "Space" key. This send ASCII code 32. + * TAB means press the "Tab" key. TAB is the same as C-i. This send ASCII + code 9. + + For C-@ and C-^, usually you don't have to hold down the shift key and you + can type Control-2 or Control-6 instead. For C-_, you may have to hold + down the shift key, typing Control-Shift-Hyphen. C-@ can often be + generated by typing Control-Space. C-@ is often called the NUL character, + and has ASCII value 0. C-_ can often be generated by typing Control-7 or + Control-/. C-? (aka DEL) may be generated by typing Shift-BackSpace or + + Control-BackSpace. Try Control with all of the digits on your keyboard to + + see what gets generated. To read more about this online, type "C-h i m emacs RET m characters RET", and also "C-h i m emacs RET m keys RET". @@ -111,7 +271,8 @@ 2: What do you mean when you write things like this: type "ESC a"? I will enclose key sequences that are longer than one key inside double - quotes. These notations refer to single keys (some with modifiers): + quotes. These notations refer to single key strokes (some with + modifiers): C-x, M-x, M-C-x RET, LFD, DEL, ESC, SPC, TAB @@ -124,7 +285,8 @@ 3: What if I don't have a Meta key? Instead of typing M-a, you can type "ESC a" instead. In fact, Emacs - converts M-a internally into "ESC a" anyway. + converts M-a internally into "ESC a" anyway (depending on the value of + meta-prefix-char). 4: What if I don't have an Escape key? @@ -148,15 +310,15 @@ candidate for this. To run non-interactive Emacs functions, use M-ESC instead and type a - Lisp form. + Lisp form that invokes the function (see question 102). 6: What do things like this mean: etc/SERVICE, src/config.h, lisp/default.el? These are the names of files that are part of the GNU Emacs - distribution. The GNU Emacs distribution is so big that it is divided - into several subdirectories; the important subdirectories are named - "etc", "lisp", and "src". + distribution. The GNU Emacs distribution is divided into several + subdirectories; the important subdirectories are named "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 exec-directory RET". The directory name @@ -164,24 +326,30 @@ directory of your installed GNU Emacs distribution. Some of these files are available individually via FTP or e-mail, see - question 16. - -7: What are FSF, LPF, OSF, GNU, RMS, FTP, BTW, and GPL? + question 20. + +7: 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 M. Stallman + RMS == Richard Matthew Stallman FTP == File Transfer Protocol - BTW == By the way GPL == GNU General Public Licence - NOTE: Avoid confusing the FSF, the LPF, and the OSF. The LPF only - opposes look-and-feel copyrights and software patents. The FSF aims to - make high quality free software available for everyone. The OSF is a - commercial organization which wants to provide an alternative, - standardized version of Unix not controlled by AT&T. + 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 commercial + organization which wants to provide an alternative, standardized version + of Unix not controlled by AT&T. + + 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. @@ -192,7 +360,7 @@ 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. + WARNING: Your system administrator may have changed C-h to act like DEL. 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 @@ -200,151 +368,290 @@ sequence listed. Each of the resulting key sequences invokes help. NOTE: Emacs's help facility works best if help is invoked by a single - key. The variable help-char should hold the value of this character. + key. The variable help-char should hold the value of this character. + Andrew Arensburger <arensb@kong.gsfc.nasa.gov> wrote a patch that allows + + the help facility to work properly when invoked by multiple character + + sequences. + 9: 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. - You should become familiar with the online documentation for Emacs. The - complete text of the Emacs manual is available online in a hypertext - format via the "Info" manual reader. Type "C-h i" to invoke Info. - - You can order a hardcopy of the manual from the FSF. See question 12. - - You can list all of the commands whose names contain a certain word - (actually which match a regular expression) using the "command-apropos" - command. Type "C-h a" to invoke this command. - - You can list all of the functions and variables whose names contain a - certain word using the "apropos" command. M-x apropos invokes this - command. - - You may find that command-apropos and apropos are extremely slow on your - system. This will be fixed in Emacs 19. If you can't wait that long, - I can send you the "fast-apropos.el" file that contains the fix. This - file also contains a "super-apropos" command that will list all the - functions and variables whose documentation strings contain a certain - word. - - 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". + * You should become familiar with the online documentation for Emacs. The + + complete text of the Emacs manual is available online in a hypertext + format via the "Info" manual reader. Type "C-h i" to invoke Info. + + * You can order a hardcopy of the manual from the FSF. See question 12. + + + * 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 file in the Emacs distribution. + + * You can list all of the commands whose names contain a certain word + + (actually which match a regular expression) using the "command-apropos" + command. Type "C-h a" to invoke this command. + + * You can list all of the functions and variables whose names contain a + + certain word using the "apropos" command. M-x apropos invokes this + command. + + * 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". + + NOTE: You may find that command-apropos and apropos are extremely slow + on your system. This will be fixed in Emacs 19. If you can't wait that + long, there is a "fast-apropos.el" file available in the Emacs Lisp + Archive (see question 18) that contains the fix. This file + also contains a "super-apropos" command that will list all the functions + and variables whose documentation strings contain a certain word. 10: Where can I get GNU Emacs on the net (or by snail mail)? - Look in the files etc/DISTRIB and etc/FTP for information. If you don't - already have GNU Emacs, see question 16. + Look in the files etc/DISTRIB and etc/FTP for information on nearby + archive sites. If you don't already have GNU Emacs, see question 20 ! + for how to get these two files. + + The latest version is always available via anonymous FTP at MIT + (prep.ai.mit.edu:pub/gnu/emacs-18.58.tar.Z). ! 11: Where can I get help in installing GNU Emacs? Look in the file etc/SERVICE for names of companies and individuals who - will sell you this type of service. - - This file in the version 18.55 distribution is not completely up to - date. The imminent release of 18.56 will help that. An up-to-date - version of the SERVICE file is available on prep.ai.mit.edu. See - question 16 for how to retrieve this file. + will sell you this type of service. An up-to-date version of the + SERVICE file is available on prep.ai.mit.edu. See question 20 + for how to retrieve this file. 12: 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 - $15. A set of 6 manuals is $60. - - The full TeX source for the manual also comes with Emacs, if you're - daring enough to try to print out this 300 page manual yourself. (We're - talking about killing an entire tree here. This kind of printer usage - can make you very unpopular. Besides, if you order it from the FSF, the - price may be tax-deductible as a business expense.) - - If you absolutely have to print your own copy, and you don't have TeX, - you can get a PostScript version from: - - Anonymous FTP: - site: abcfd20.larc.nasa.gov - file: /pub/docs/emacs-18.55.PS.Z (size: 472K) + $20. For 6 or more manuals the price is $13 each. {The price may be ! + tax-deductible as a business expense. Can someone tell me for certain? I ! + know that pure donations to the FSF are tax-deductible, but I don't know ! + about payments for manuals or tapes.} ! + + 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 + 300 page manual yourself (see question 14). + + If you absolutely have to print your own copy, and you don't have TeX, you + can get a PostScript version via anonymous FTP (cs.ubc.ca: - + src/gnu/manuals_ps/emacs-18.57.ps.Z, which site requests that you please + CONFINE ANY MAJOR FTPING TO LATE EVENINGS OR EARLY MORNINGS OUR TIME + (pacific time zone, GMT-8)). + + If you don't have TeX you can convert the Texinfo sources into + {t,n,ps}roff format with the "texi2roff" program, which is available via + anonymous FTP (archive.cis.ohio-state.edu: + /pub/gnu/texi2roff/texi2roff.shar.Z) Carl Witty <cwitty@cs.stanford.edu> writes: - The Emacs manual is also available online in the Info system, which is - available by typing "C-h i". In this form, it has hypertext links and - is very easy to browse or search; many people prefer it to the printed - manual. - -13: Has someone written an GNU Emacs Lisp package that does XXX? + The Emacs manual is also available online in the Info system, which is + available by typing "C-h i". In this form, it has hypertext links and + is very easy to browse or search; many people prefer it to the printed + manual. + +13: How do I install a piece of Texinfo documentation? + + First create Info files from the Texinfo files with the "makeinfo" + program. makeinfo is available as part of the latest Texinfo package + (prep.ai.mit.edu:/pub/gnu/texinfo-2.12.tar.Z). - + + 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 online. + + Neither texinfo-format-buffer nor the makeinfo program install 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 6 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 are 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 setting the value of the variable Info-directory + to its pathname. For example, to use a private Info directory which + is a subdirectory of your home directory named "Info", you could do + this: + + (setq Info-directory (expand-file-name "~/Info")) + + You will need a top-level Info file named "dir" in this directory. + You can include the system-wide Info directory in your private Info + directory with symbolic links or by copying it. + + * You can use an enhanced version of lisp/info.el that handles multiple + + Info directories. Then you can more easily use a mix of private and + + shared Info files. Dave Gillespie <daveg@csvax.cs.caltech.edu> has + + written one such enhancement and I am told there are others. + + +14: 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 13. + +15: Can I view Info files without using GNU Emacs? + + Yes, the `info', `xinfo', and `ivinfo' programs do this. info uses + curses, xinfo uses standard X11R4 libraries, and ivinfo uses InterViews. + You can get info as part of the latest Texinfo package (see question 13). + xinfo is available separately (prep.ai.mit.edu: + pub/gnu/xinfo-1.01.01.tar.Z). ivinfo is available in a comp.sources.misc + archive or from Tom Horsley <tom@ssd.csd.harris.com>. For ivinfo, you + need Stanford's InterViews C++ X library, available via anonymous FTP + (interviews.stanford.edu). + +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 for Emacs + 18 under Unix. It is available from the FSF for $50 (or 5 for $200). The + latest revision available for FTP is edition 1.03 dated 28 January 1991. + + For online use, a set of pregenerated Info files is available with the + Texinfo source for the Emacs Lisp manual via anonymous FTP (Emacs Lisp + Archive, prep.ai.mit.edu:pub/gnu/elisp-manual-1.03.tar.Z). (You can also ! + create the Info files from the Texinfo source.) See question 13 for + details on how to install these files online. + + If you are daring enough to try to print this 550 page manual out + yourself, for instructions see question 14. + + Also, as a popular USENET saying goes, "Use the Force, Read the Source". + +17: Has someone written an GNU Emacs Lisp package that does XXX? Probably. A listing of Emacs Lisp packages, called the Lisp Code - Directory, is being maintained by Dave Brennan <brennan@dg-rtp.dg.com>. - You can search through this list to find if someone has written - something that fits your needs. + Directory, is being maintained by Dave Brennan <brennan@hal.com> and ! + Dave Sill <de5@ornl.gov>. You can search through this list to find if + someone has written something that fits your needs. This list is file "LCD-datafile.Z" in the Emacs Lisp Archive. (See - question 14.) The files "lispdir.el.Z" and "lispdir.doc.Z" - in the archive contain information to help you use the list. - -14: Where can I get GNU Emacs Lisp packages that don't come with Emacs? + question 18 for methods for getting this file.) The files "lispdir.el.Z" + and "lispdir.doc.Z" in the archive contain 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 look things up in the database. + For example, the command "M-x lisp-dir-apropos RET ange-ftp RET" produces + this (outdated) output: + + GNU Emacs Lisp Code Apropos -- "ange-ftp" + + ange-ftp (3.112) 91-08-12 + Andy Norman, <ange@hplb.hpl.hp.com> + archive.cis.ohio-state.edu: + /pub/gnu/emacs/elisp-archive/as-is/ange-ftp.el.Z + transparent FTP Support for GNU Emacs + +18: 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 13). Then check local archives and + are looking for. (See question 17). Then check local archives and the Emacs Lisp Archive to find a copy of the relevant files. Then, 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: - site: tut.cis.ohio-state.edu - directory: /pub/gnu/emacs/elisp-archive - file: README.Z + 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. + + You can access the Emacs Lisp Archive via anonymous FTP + (archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/). Fetch the + file "README" first. NOTE: Any files with names ending in ".Z" are compressed, and you should - use "binary" mode in FTP to retrive them. You should also use binary + use "binary" mode in FTP to retrieve them. You should also use binary mode whenever you retrieve any files with names ending in ".elc". - Submissions for the archive should be sent to Dave Sill <de5@ornl.gov>. - If you have ftp access, the submission can be deposited in the directory - /pub/gnu/emacs/elisp-archive/incoming on tut.cis.ohio-state.edu. - Whenever possible submissions should contain an LCD-datafile entry since - this helps reduce administrative overhead for the maintainers. Before - submitting anything, first read the file "guidelines.Z", which is - available in the archive. - -15: Where can I get documentation on GNU Emacs Lisp? - - Obtain the GNU Emacs Lisp Reference Manual for Emacs 18 under Unix. It - is available from the FSF for $50. The latest revision is edition 1.02 - dated July 1990. - - Within Emacs, you can type "C-h f" to get the documentation for a - function, "C-h v" for a variable. - - Also, as a popular USENET saying goes, "Use the Force, Read the Source". - - You can also get the Texinfo source for the manual, if you are daring - enough to try to print this 550 page manual out yourself. This is - available in the Emacs Lisp Archive and also via: - - Anonymous FTP: - site: prep.ai.mit.edu - file: /pub/gnu/elisp.tar.Z - - A set of pregenerated Info files comes with the Texinfo source for the - Emacs Lisp manual, so you don't have to format it yourself for online - use. (You can create the Info files from the Texinfo source.) See - question 21 for details on how to install these files online. - -16: What informational files are available? - - This isn't a frequently asked question, but it should be! +19: How do I submit code to the Emacs Lisp Archive? + + Submissions should be mailed to elisp-archive@cis.ohio-state.edu. Mail + messages (submissions) are automatically saved and periodically archived. + Urgent mail may be sent directly to Dave Sill <de5@ornl.gov> or Dave + Brennan <brennan@hal.com> or should contain the string "urgent" in the ! + subject. The incomoing ftp directory is no longer available at the + request of Ohio State. + + However, if someone has a submission with multiple files (which would be + archived as a tar file) or binary files, then FTP transfer is preferred + and can be arranged via an anonymous FTP site. This is faster than + uudecoding, unsharing, etc., and re-packaging files. + + Before submitting anything, please read the file "guidelines.Z", which is + available in the archive. Whenever possible submissions should contain + a complete LCD entry since this helps reduce administrative overhead for + the maintainers. You can include an entry in this format: + + ;; LCD Archive Entry: + ;; package name|author's name|email address + ;; |description + ;; |date|version|archive path + + For example: + + ;; LCD Archive Entry: + ;; tex-complete|Sebastian Kremer|sk@thp.Uni-Koeln.DE + ;; |Minibuffer name completion for editing [La]TeX. + ;; |91-03-26|$Revision: 1.12 $|~/packages/tex-complete.el.Z + + Dave Brennan has software which automatically looks for data in this + format. The format is fairly flexible. The entry ends when a line is + reached with a different prefix or the seventh field terminator is + seen. + +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: - site: prep.ai.mit.edu - directory: /pub/gnu/etc - - APPLE -- Special Report: Apple's New Look and Feel + individually via anonymous FTP (prep.ai.mit.edu:/pub/gnu/etc/): + + APPLE -- Why the FSF doen'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 @@ -355,7 +662,7 @@ MACHINES -- Status of GNU Emacs on Various Machines and Systems MAILINGLISTS -- GNU Project Electronic Mailing Lists SERVICE -- GNU Service Directory - SUN-SUPPORT -- includes the popular "Using Emacstool with GNU Emacs" + SUN-SUPPORT -- including "Using Emacstool with GNU Emacs" ! These files are available in the "etc" directory of the GNU Emacs distribution: @@ -365,42 +672,411 @@ GOSDIFF -- Differences between GNU Emacs and Gosling (Unipress??) Emacs 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) + OPTIONS -- a complete explanation of startup option handling + + 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. - These files are available from the FSF via e-mail: - - * GNU's Bulletin, June, 1990 -- this file includes: - GNU'S Who - What Is the Free Software Foundation? - What Is Copyleft? - GNUs Flashes - Possible New Terms for GNU Libraries by Richard Stallman - "League for Programming Freedom" by Michael Bloom and Richard Stallman - Free Software Support - GNU Project Status Report - GNU Wish List - GNU Documentation - GNU Software Available Now - Contents of the Emacs Release Tape - Contents of the Pre-Release Tape - Contents of the X11 Tapes - VMS Emacs and Compiler Tapes - How to Get GNU Software - Freemacs, an Extensible Editor for MS-DOS - Thank GNUs - FSF Order Form - * GNU Task List - * GNU Coding Standards - * Legal issues about contributing code to GNU - * GNU Project Status Report - -17: What is the current address of the FSF? + These additional files are available from the FSF via e-mail: + + * GNU's Bulletin, June, 1991 -- this file includes: + GNU'S Who + What Is the Free Software Foundation? + What Is Copyleft? + A Small Way to Help Free Software + GNUs Flashes (important recent developments for project GNU) + Free Software Support (and how to get it!) + Copyrighted Programming Languages + AT&T Threatens Users of X Windows (and other software patent threats) + Project Gutenberg + GNU Project Status Report + GNU in Japan + GNU Wish List + Help Keep Government Software Free + GNU Software Available Now + Contents of the Emacs Tape + Contents of the Compiler Tape + Contents of the X11 Tapes + VMS Emacs and Compiler Tapes + GNU Documentation + How to Get GNU Software + Free Software for Microcomputers + GNU Software on Apple computers + GNU Software on the Amiga + GNU Software on the Atari + GNUish MS-DOS project + Freemacs, an Extensible Editor for MS-DOS + GNU in Japan + FSF Order Form + Thank GNUs + * Legal issues about contributing code to GNU + * GNU Project Status Report + +21: Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, + Ange-FTP, VIP, Dired, Ispell, Epoch, Demacs, Freemacs, or Patch? + + {If you know of any other packages that are so substantial that they + deserve to be mentioned here, please tell me. Having its own mailing list + or newsgroup or more than half a megabyte of source code are good signs.} + + * VM (View Mail) -- another mail reader within Emacs + + Author: Kyle Jones <kyle@uunet.uu.net> + Latest released version: 4.41 + Beta test version: 5.31 + Anonymous FTP: + Emacs Lisp Archive: packages/vm-4.41.tar.Z, as-is/timer.shar.Z - + ftp.uu.net:/pub/vm-{4.41,5.31beta}.tar.Z + Newsgroups and mailing lists: + Info-VM: + gnu.emacs.vm.info + info-vm-request@uunet.uu.net (for subscriptions) + info-vm@uunet.uu.net (for submissions) + + Bug-VM: + gnu.emacs.vm.bug + bug-vm-request@uunet.uu.net (for subscriptions) + bug-vm@uunet.uu.net (for submissions) + + + * SuperCite -- mail and news citation package within Emacs + + Author: Barry Warsaw <bwarsaw@cen.com> + Mailing list: supercite-request@anthem.nlm.nih.gov (for subscriptions) + supercite@anthem.nlm.nih.gov (for submissions) + + Latest version: 2.2 + Anonymous FTP: + Emacs Lisp Archive: packages/sc-2.2.tar.Z + Via e-mail: + To: library@cme.nist.gov + Subject: help + + NOTE: Superyank is an old version of SuperCite. + + * GNUS -- news reader within Emacs + + Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp> + Latest official version: 3.13 + Unofficial test version: 3.14.1 + Anonymous FTP: + cs.umn.edu:pub/gnu/emacs/gnus-3.14.1.tar.Z. + aun.uninett.no:pub/gnus-3.14.1.tar.Z + wnoc-fuk.wide.ad.jp:pub/GNU/etc/gnus-3.14.1.tar.Z + liasun3.epfl.ch:pub/gnu/emacs/gnus-3.14.1.tar.Z + aix370.rrz.uni-koeln.de:/pub/gnu/emacs/gnus-3.14.1.tar.Z + funet.fi:/networking/news/gnus-3.14.1.tar.Z + src.doc.ic.ac.uk:/gnu/EmacsBits/gnus/gnus-3.14.1.tar.Z + Emacs Lisp Archive: packages/gnus-3.13.tar.Z + Newsgroups and mailing lists: + English-only: + gnu.emacs.gnus + 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) + + + * Calc -- poor man's Mathematica within Emacs + + Author: Dave Gillespie <daveg@csvax.cs.caltech.edu> + Latest released version: 2.02 ! + Anonymous FTP: + csvax.cs.caltech.edu:pub/calc-2.02.tar.Z ! + prep.ai.mit.edu:pub/gnu/calc-2.02.tar.Z ! + NOTE: Unlike Wolfram Research, Dave has never threatened to sue anyone + for having a program with a similar command language to Calc. :-) + + * Calendar/Diary -- calendar manager within Emacs + + Author: Ed Reingold <reingold@cs.uiuc.edu> + Latest version: 4.01 + Anonymous FTP: + emr.cs.uiuc.edu:/pub/emacs/calendar + Via e-mail: + To: reingold@cs.uiuc.edu + Subject: send-emacs-cal + Put your best internet e-mail address in the body. + + * Ange-FTP -- adds transparent FTP access to Emacs's file access routines + + Author: Andy Norman <ange@hplb.hpl.hp.com> + Latest version: 3.143 + Anonymous FTP: + ftp.gnu.ai.mit.edu:ange-ftp/ange-ftp.el.Z + Emacs Lisp Archive: + as-is/ange-ftp.el.Z (current version) + packages/ange-ftp.el.Z (old version) + Mailing list: ange-ftp-lovers-request@anorman.hpl.hp.com (subscriptions) ! + ange-ftp-lovers@anorman.hpl.hp.com (for submissions) + + NOTE: now with support for accessing VMS systems + + * VIP -- vi emulation for Emacs - + + Author: Aamod Sane <sane@cs.uiuc.edu> + Latest released version: 4.3 + + Anonymous FTP: + cs.uiuc.edu:pub/vip4.3.tar.Z + Emacs Lisp Archive: modes/vip-mode.tar.Z + NOTE: This version much more closely emulates vi than the one + distributed with Emacs. + + Version distributed with Emacs: 3.5 + Author: Masahiko Sato <ms@sail.stanford.edu, + masahiko@sato.riec.tohoku.junet> + + * Dired -- directory editor for Emacs + + Author: Sebastian Kremer <sk@thp.uni-koeln.de> + Latest released version: 5.239 + + Anonymous FTP: ftp.cs.buffalo.edu:pub/Emacs/diredall.tar.Z - + ftp.uni-koeln.de:pub/gnu/emacs/diredall.tar.Z - + NOTE: This is a huge improvement over the Dired distributed with Emacs. + This version will be in Emacs 19. + + * AUC TeX -- enhanced LaTeX mode + + + + Author: Kresten Krab Thorup <krab@iesd.auc.dk> + + Latest released version: 5.4 + + Anonymous FTP: iesd.auc.dk:pub/emacs-lisp/auc-tex-5.4.tar.Z + + 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) + + + + * Hyperbole -- extensible hypertext management system within Emacs + + + + Author: Bob Weiner <rsw@cs.brown.edu> + + Anonymous FTP: + + wilma.cs.brown.edu:pub/hyperbole/h*.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. + + + + * Ispell -- spell checker in C with interface for Emacs + + + Author: Geoff Kuenning <geoff@itcorp.com> (latest of many) + Latest released version: 2.0.02 + Beta test version: 3.0 (9 patches) + Anonymous FTP: + archive.cis.ohio-state.edu:/pub/gnu/ispell/* (version 2.0.02) + ftp.cs.ucla.edu:/pub/ispell/* (version 3.0, patches, dictionaries) + NOTE: Do not send mail to Geoff asking him to send you the latest + version of Ispell. He does not have free e-mail. + + * Epoch -- enhanced GNU Emacs with better X interface + + Latest released version: 3.2 + Beta test version: 4.0 beta patchlevel 0 ! + Anonymous FTP: + cs.uiuc.edu:pub/epoch-files/epoch/epoch-4.0b0.tar.Z ! + cs.uiuc.edu:pub/epoch-files/epoch/epoch-3.2{.tar.Z,-patch-{1,2.tar.Z}} + Newsgroup and mailing lists: ! + Epoch: ! + gnu.emacs.epoch + epoch-request@cs.uiuc.edu (for subscriptions) + epoch@cs.uiuc.edu (for submissions) + + Epoch-Design: + + epoch-design-request@cs.uiuc.edu (for subscriptions) + + epoch-design@cs.uiuc.edu (for submissions) + + + * Demacs -- GNU Emacs altered to work under MS-DOS on 386 and 486 machines + + Authors: Manabu Higashida <manabu@sigmath.osaka-u.ac.jp> + HIRANO Satoshi <hirano@tkl.iis.u-tokyo.ac.jp> + Latest released version: 1.2.0 + Anonymous FTP: + utsun.s.u-tokyo.ac.jp:GNU/demacs/* (nearest to U.S.A.) + ftp.sigmath.osaka-u.ac.jp:pub/Msdos/Demacs/* + wnoc-fuk.wide.ad.jp:pub/msdos/Demacs/* + ftp.3com.com:pub/gnu/msdos/demacs/* + + mindseye.berkeley.edu:pub/kanji/demacs/* + + ftp.hawaii.edu:pub/editors/demacs.tar.Z + + ftp.math.ksu.edu:pub/pc/demacs/* + + wsmr-simtel20.army.mil:pd1:<msdos.demacs>* + + ftp.uni-koeln.de: (PLEASE USE ONLY OUTSIDE WORKING HOURS!) + + msdos/gnuprogs/dem120e.zip (executables, lisp-code, doc) + msdos/gnuprogs/dem120s.zip (sources, diffs) + ftp.lysator.liu.se:pub/msdos/gnu/emacs/????????????? + mizar.docs.uu.se:pub/gnu/demacs/* + + iamsun.unibe.ch:PC/demacs/* + + flop.informatik.tu-muenchen.de:outgoing/demacs.tar + + ftp.funet.fi:pub/gnu/emacs/demacs/* + + garbo.uwasa.fi:pc/editor/dem120{e,s}.zip + + ftp.win.tue.nl:pub/gnu/demacs/* + + ugle.unit.no:pub/gnu/Demacs/* + + {Does anyone know which sites have the Kanji version?} + + Via e-mail: + + From garbo.uwasa.fi: + + To: mailserv@garbo.uwasa.fi + + Subject: garbo-request + + Body: send pc/editor/dem120e.zip + + send pc/editor/dem120s.zip + + quit + + Downloading: + EXEC-PC (Milwaukee, WI) 414-789-4210 (2400 bps) + in the Mahoney MS-DOS file area in its Editors/wordprocessors + library (F), named GNUEMACS.ZIP + Channel 1 (Cambridge, MA) 617-345-8873 (9600 bps) + in the New Uploads file area, named GNUEMACS.ZIP + NOTE: Use the -d option of [pk]unzip for all .zip archives. Some sites + have Demacs lharc'ed. {Can anyone tell me FTP sites for programs to + extract lharc and zip format files? Or even better, give me a pointer + to another FAQ that answers these questions.} + Mailing list: + + NOTE: There is no mailing list for Demacs. However, there is a list + + for DJGPP, which is the environment that Demacs runs in. Many + + Demacs problems are actually issues with DJGPP. + + DJGPP: + + Subscriptions: + + To: listserv@sun.soe.clarkson.edu + + body: add <your-address> djgpp + + or put "help" in the body. + + If this fails, mail to djgpp-request@sun.soe.clarkson.edu. + + Submissions: + + djgpp@sun.soe.clarkson.edu + + + * Freemacs -- a small Emacs for MS-DOS + + Author: Russ Nelson <nelson@sun.soe.clarkson.edu> + + Latest released version: 1.6a + Anonymous FTP: + simtel20.army.mil:PD:<MSDOS.FREEMACS>* + grape.ecs.clarkson.edu:pub/msdos/freemacs/* + Via e-mail: + To: archive-server@sun.soe.clarkson.edu + body: help + Via snail mail: + address: Russell Nelson, 11 Grant St., Potsdam, NY 13676 + Send $15 copying fee, and specify preferred floppy disk format: + 5.25", 360K, or 3.50", 720K + Mailing lists: + Subscriptions: + To: listserv@sun.soe.clarkson.edu + body: add <your-address> <name-of-list> + or put "help" in the body. + List distribution addresses: + freemacs-announce@sun.soe.clarkson.edu + freemacs-help@sun.soe.clarkson.edu + freemacs-workers@sun.soe.clarkson.edu (send bug reports here) + + * Patch -- program to apply "diffs" for updating files + + Author: Larry Wall <lwall@netlabs.com> + Latest version: 2.0 patchlevel 12u5 + (This is the version that supports the new "unified" diff format.) + Anonymous FTP: + prep.ai.mit.edu:pub/gnu/patch-2.0.12u4.tar.Z + +22: What is the real legal meaning of the GNU copyleft? + + 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. + + If you still want to find out about the legal meaning of the copyleft, + please ask yourself if this means you are not paying attention to the + spirit. + +23: 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, Epsilon, etc. + + 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 get source code. Be + careful to remove the gnu.* groups from the "Newsgroups:" line when + posting a followup that recommends such software. + + The correct place 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. + +24: 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 recieve 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. + +25: What is the LPF and why should I join it? + + The LPF opposes the expanding danger of software patents and + look-and-feel copyrights. Write to league@prep.ai.mit.edu for more + information. You can get papers describing the LPF's views via + anonymous FTP (prep.ai.mit.edu:/pub/lpf/*) or via anonymous UUCP + (osu-cis!~/lpf/*). + +26: What is the current address of the FSF? Snail mail address: - Free Software Foundation + Free Software Foundation, Inc. 675 Massachusetts Avenue Cambridge, MA 02139, USA @@ -408,10 +1084,9 @@ (617) 876-3296 E-mail addresses: - gnu@prep.ai.mit.edu {probably read by Len Tower} - gnulists@prep - -18: What is the current address of the LPF? + gnu@prep.ai.mit.edu + +27: What is the current address of the LPF? Snail mail address: League for Programming Freedom @@ -421,403 +1096,728 @@ Phone number: (617) 243-4061 { or 243-4091, I'm not sure ... } + {Will someone please tell me which of the above numbers is correct?} E-mail address: league@prep.ai.mit.edu -19: Where can I get the up-to-date GNU stuff? +28: 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. See the files etc/DISTRIB and etc/FTP for more information. (To get copies of these - files, see question 16.) - -20: Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, or Patch? - - 1. VM: - - Author: Kyle Jones <kyle@xanth.cs.odu.edu> - - Mailing lists: info-vm-request@uunet.uu.net - info-vm@uunet.uu.net - bug-vm-request@uunet.uu.net - bug-vm@uunet.uu.net - - Anonymous FTP: - - Last released version: 4.41 - site: tut.cis.ohio-state.edu - file: /pub/gnu/vm/vm-4.41.tar.Z - - Beta test version: 5.18 - site: abcfd20.larc.nasa.gov - directory: /pub/vm - - 2. Supercite: - - Author: Barry Warsaw <warsaw@warsaw.nlm.nih.gov> - - Latest version: 2.1 - - Mailing lists: supercite@warsaw.nlm.nih.gov - supercite-request@warsaw.nlm.nih.gov - - Anonymous FTP: - site: durer.cme.nist.gov [129.6.32.4] - files:/pub/gnu/elisp/supercite-2.1.shar.0# (where # is replaced by 1 or 2) - - NOTE: Superyank is an old version of Supercite. - - 3. GNUS: - - Author: Masanobu Umeda - - Latest version: 3.13 - - Anonymous FTP: - site: tut.cis.ohio-state.edu - files: /pub/gnu/gnus/3.13.##-of-11.Z (where ## is replaced by 00 -- 11) - - 4. Calc: - - Author: Dave Gillespie <daveg@csvax.cs.caltech.edu> - - Latest version: 1.06 - - Anonymous FTP: - site: csvax.cs.caltech.edu [131.215.131.131] - or any comp.sources.misc archive - - 5. Calendar/Diary - - Author: Ed Reingold <reingold@cs.uiuc.edu> - - Latest version: 4 - - E-mail: - Subject: send-emacs-cal - body: your best internet e-mail address - - 6. Patch - - Author: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> - - Latest version: 2.0 patchlevel 12 - - Anonymous FTP: - site: any comp.sources.unix archive - - or, for Europeans: - - site: archive.cs.ruu.nl [131.211.80.5] - file: /pub/UNIX/patch-2.0.tar.Z - -21: How do I install a piece of Texinfo documentation? - - First create Info files from the Texinfo files with M-x - texinfo-format-buffer. There is also a program called "makeinfo" that - provides better error checking and runs faster. Currently, it comes - with the Emacs Lisp manual (which comes on the GNU Emacs tape). - - 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 online. - - Neither texinfo-format-buffer nor the makeinfo program install 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 6 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. - -22: What is the real legal meaning of the GNU copyleft? + files, see question 20.) + + For Europeans, the site nic.funet.fi duplicates the directory /pub/gnu + from prep.ai.mit.edu. + +29: Where can I get the latest version of this document (the FAQ list)? + + The GNU Emacs FAQ is available in several ways: + + 1. 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 of which I know will 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 G" from the *Subject* buffer or "C-u SPC" + from the *Newsgroup* buffer to view all articles in a newsgroup. + + The FAQ articles' message IDs are: + + <GNU-Emacs-FAQ-0.92Feb23210646@bigbird.bu.edu> ! + <GNU-Emacs-FAQ-1.92Feb23210646@bigbird.bu.edu> ! + <GNU-Emacs-FAQ-2.92Feb23210646@bigbird.bu.edu> ! + <GNU-Emacs-FAQ-3.92Feb23210646@bigbird.bu.edu> + + + If you are viewing this in the GNUS `*Article*' buffer, you can move + point within one of the above message IDs and type "r" to fetch the + referenced article into the `*Article*' buffer. Type "o" in the + `*Article*' buffer to restore the previous contents of the `*Article*' + buffer. If you are not viewing this in the GNUS `*Article*' buffer, + use M-x gnus-Article-refer-article instead of "r". GNUS must be + running and you must display the `*Article*' buffer to see the results. + + 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 + April 15, 1992. ! + + 2. Via anonymous FTP. You can fetch the FAQ articles via anonymous FTP + + (pit-manager.mit.edu:pub/usenet/news.answers/GNU-Emacs-FAQ/part?). ! + + 3. Via e-mail. You can send the following magical incantation in the body + + of a message to mail-server@pit-manager.mit.edu: + + send usenet/news.answers/GNU-Emacs-FAQ/part0 ! + send usenet/news.answers/GNU-Emacs-FAQ/part1 ! + send usenet/news.answers/GNU-Emacs-FAQ/part2 + + send usenet/news.answers/GNU-Emacs-FAQ/part3 + + + + 4. Via WAIS. The GNU Emacs FAQ is available via WAIS indexed on a + + per-question basis from the "faq" database on bigbird.bu.edu on the + + non-standard IP port number of 2210. This is probably the best way to + + find out if there is something in the FAQ related to your question. I + + use this myself to answer questions I see posted on gnu.emacs.help. ! + ! + The articles of the GNU Emacs FAQ are also available from the "usenet" ! + database on pit-manager.mit.edu (on the standard IP port: 210), along ! + with a lot of other FAQ articles. However, these are all indexed at ! + the whole article level instead of at the question level. This is a ! + better place to look if you want to fetch the entire FAQ. ! + ! + 5. 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. 18.58 is the latest ! + version, and it was released in February 1992. ! + + + +GNU Emacs and Various Computing Environments + +30: Where does the name "Emacs" come from? + + EMACS originally was an acronym for Editor MACroS. The first Emacs was + a set of macros written by Richard Stallman and Guy Steele for the + editor TECO (Text Editor and COrrector (originally Tape Editor and + COrrector)) on a PDP-10. (Amusing fact: many people have told me that + TECO code looks a lot like line noise. See alt.lang.teco if you are + interested.) + +31: What is the latest version of GNU Emacs? + + GNU Emacs 18.58 is the current version. Fixes from 18.57 include better ! + mail address parsing, an X visual bell speedup, a call-process ! + enhancement, a regexp matching change, the ability to apply a numeric ! + argument to a self-inserting digit, getting X resource values from the ! + RESOURCE_MANAGER property, more reliable shell mode job control, and a ! + change to copy-keymap. Also, support has been added for many new system ! + types. ! + + The June 1991 GNU's Bulletin says this about the status of Emacs: + + + GNU Emacs 18.57 is the current version. The undo facility has been + completely rewritten and now holds unlimited data temporarily, and a + user-specified amount for the long term. + + Berkeley is distributing GNU Emacs with the 4.3 BSD distribution, and + numerous companies distribute it also. + + Emacs 18 maintenance continues for simple bug fixes. + + To visit a file with information about what has changed in recent ! + versions, type "C-h n". ! + +32: When will GNU Emacs 19 be available? + + Good question, I don't know. For that matter, neither do the developers. + It will undoubtedly be available sometime in the 1990s. :-) People are + actually using alpha-test version of Emacs 19, which is a good sign. Work + has begun on features for Emacs 20. 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. - - If you still want to find out about the legal meaning of the copyleft, - please ask yourself if this means you are not paying attention to the - spirit. - -23: 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 16 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, etc. - - 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. - -24: Should I send questions directly to people who post a lot on the net, - instead of posting myself? - - I don't know about the others, but please don't send such messages to me - just because you don't want to disturb a lot of people. Send messages - to individuals that concern things that individual has written. - - - -GNU Emacs, all its Variants, and other Editors - -25: Where does the name "Emacs" come from? - - EMACS originally was an acronym for Editor MACroS. The first Emacs was - a set of macros written by Richard Stallman for the editor TECO (Tape - Editor and COrrector {Text Editor and COrrector?}) on a PDP-10. - (Amusing fact: many people have told me that TECO code looks a lot like - line noise.) - -26: What is the latest version of GNU Emacs? - - GNU Emacs 18.55. GNU Emacs 18.56 is coming out with some bug fixes, but - no additional functionality. - -27: When will GNU Emacs 19 be available? - - Good question, I don't know. For that matter, neither do the - developers. It will undoubtedly be available sometime in the 1990s. - -28: What will be different about GNU Emacs 19? - - From the latest "GNU's Bulletin": - - Version 19 approaches release with a host of new features: before and - after change hooks; X selection processing (including CLIPBOARD - selections); scrollbars; support for European character sets; floating - point numbers; per-buffer mouse commands; interfacing with the X - resource manager; mouse-tracking; Lisp-level binding of function keys; - and multiple X windows (`screens' to Emacs). - - Thanks go to Alan Carroll and the people who worked on Epoch for - generating initial feedback to a multi-windowed Emacs. Emacs 19 - supports two styles of multiple windows, one with a separate screen for - the minibuffer, and another with a minibuffer attached to each screen. - - More features of Version 19 are buffer allocation, which uses a new - mechanism capable of returning storage to the system when a buffer is - killed, and a new input system---all input now arrives in the form of - Lisp objects. - - Other features being considered for Version 19 include: - - * Associating property lists with regions of text in a buffer. - * Multiple font, color, and pixmaps defined by those properties. - * Different visibility conditions for the regions, and for the various - windows showing one buffer. - * Incremental syntax analysis for various programming languages. - * Hooks to be run if point or mouse moves outside a certain range. - * Source-level debugging for Emacs Lisp. - * Incrementally saving undo history in a file, so that recover-file also - reinstalls buffer's undo history. - * Static menu bars, and better pop-up menus. + Work is progressing steadily on 19 and it the to-do list is getting + smaller. But I don't want to make the mistake of predicting when it + will be ready. + +33: What will be different about GNU Emacs 19? + + From the June 1991 GNU's Bulletin: + + Version 19 approaches release, counting among its new features: before + and after change hooks, source-level debugging of Emacs Lisp programs, X + selection processing (including clipboard selections), scrollbars, + support for European character sets, floating point numbers, per-buffer + mouse commands, X resource manager interfacing, mouse-tracking, + Lisp-level binding of function keys, multiple X windows (`screens' to + Emacs), a new input system---all input now arrives in the form of Lisp + objects---and buffer allocation, which uses a new mechanism capable of + returning storage to the system when a buffer is killed. + + Thanks go to Alan Carroll and the people who worked on Epoch for + generating initial feedback to a multi-windowed Emacs. Emacs 19 + supports two styles of multiple windows, one with a separate screen for + the minibuffer, and another with a minibuffer attached to each screen. + + Features being considered for later releases of Emacs include: + associating property lists with regions of text in a buffer; multiple + fonts, color, and pixmaps defined by those properties; different + visibility conditions for the regions, and for various windows showing + one buffer; hooks to be run if point or mouse moves outside a certain + range; incrementally saving undo history in a file; static menu bars; + and better pop-up menus. + + Mention of these two items disappeared in the January 1991 GNU's bulletin: + + * Incremental syntax analysis for various programming languages (Leif). * A more sophisticated emacsclient/server model, which would provide network transparent Emacs widget functionality. - Also, Emacs 19 will have a Emacs Lisp source code debugger. - -29: Is there an Emacs that has better mouse and X window support? +34: Is there an Emacs that has better mouse and X window support? Emacs 18 has some limited X Window System support, but there are problems. Emacs 19 will have amazing mouse and window support. Right now, there is a modified version of Emacs 18.55 called "Epoch" which has - greatly improved mouse and window support. The latest version of Epoch - is available via: - - Anonymous FTP: - site: cs.uiuc.edu - directory: pub/epoch-files/epoch - file: epoch-3.2b (b stands for beta) + greatly improved mouse and window support. To obtain Epoch, see + question 21. + + There are numerous Emacs Lisp packages that have been written to extend + Emacs 18's mouse handling capabilities. Some of these packages also have + patches to the C code to provide enhanced capabilities. Look up "mouse" + in the Lisp Code Directory (see question 17). NOTE: Epoch only works with the X Window System; it does not work on ordinary terminals. -30: How do I get Emacs for my PC? - - GNU Emacs won't run on a PC directly under MS-DOS. There have been - reports of people running GNU Emacs under a special program under MS-DOS - on 286 or 386 machines, but I don't know the details. - - You can try a variety of similar programs such as MG, MicroEmacs, - Freemacs, etc. +35: Where can I get the "unofficial HP GNU Emacs"? + + The unofficial HP GNU Emacs is available via anonymous FTP + (me10.lbl.gov:pub/interex/HUGE/HUGE.{README.HP,tar.Z.??}, + ee.utah.edu:HUGE/*, PLEASE FTP DURING NON-WORK HOURS!!!) and takes about + 35 megabytes of disk space to build. It is useful for non-HP machines, + but some of the added features will only work under HP-UX. + + You will need to get patches to work with HP-UX 8.0 or on 700 series + machines via e-mail from Darryl Okahata <darrylo@sr.hp.com>. + +36: Where can I get Emacs for my PC? + + ** Demacs + + For 386 or 486 PCs, there is a version of GNU Emacs called Demacs. To get + Demacs see question 21. + + From the announcement message: + + Demacs is almost a full set of GNU Emacs but does not support some + features: asynchronous process, locking a file, etc. + + Demacs provides following DOS specific features: + + * File type: text or binary file translation. + * "8bit clean" display mode. + * 8086 software interrupt call by int86 lisp function. + * Machine specific features such as function key support. + * File name completion with drive name. + * Child process (suspend-emacs, call-process). + * Enhanced dired mode which can work without 'ls.exe'. + + To our regret `shell-mode' does not work, but `compile' command works + properly. + + 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. + + There are a variety of other Emacses for MS-DOS including among them the + following. + + ** Freemacs Russ Nelson <nelson@sun.soe.clarkson.edu>, the author, describes Freemacs: - * Freemacs is free, and it was designed from the start to be - programmable. - * Freemacs is the only IBM-PC editor that tries to be like GNU Emacs. - * Freemacs can only edit files less than 64K in length. - * Freemacs doesn't have undo. - - Carl Witty <cwitty@cs.stanford.edu> writes about Freemacs: - - Better is Freemacs, which follows the tradition of ITS and GNU Emacs - by having an full, turing-complete extension language which is - incompatible with everything else. In fact, it's even closer to ITS - Emacs than GNU Emacs is, because Mint (Freemacs' extension language) - is absolutely illegible without weeks of study, much like TECO. - - You can get Freemacs several ways: - - 1. Anonymous FTP: - site: simtel20.army.mil, directory: PD:<MSDOS.FREEMACS> - site: grape.ecs.clarkson.edu [128.153.13.196], directory: /e/freemacs - - 2. E-mail: - address: archive-server@sun.soe.clarkson.edu, or - archive-server%sun.soe@omnigate (BITNET), or - {smart-host}!sun.soe.clarkson.edu!archive-server (UUCP) - body: help - - 3. Snail mail: - address: Russell Nelson, 11 Grant St., Potsdam, NY 13676 - Send $15 copying fee, and specify preferred floppy disk format: - 5.25", 1.2 Meg, or 5.25", 360K, or 3.50", 720K - - I don't know much about MicroEmacs. All I know is that the latest - version is 3.10 and it is available via: + * Freemacs is free, and it was designed from the start to be + programmable. + * Freemacs is the only IBM-PC editor that tries to be like GNU Emacs. + * Freemacs can only edit files less than 64K in length. + * Freemacs doesn't have undo. + + Carl Witty <cwitty@cs.stanford.edu> describes Freemacs: + + Better is Freemacs, which follows the tradition of ITS and GNU Emacs by + having an full, turing-complete extension language which is incompatible + with everything else. In fact, it's even closer to ITS Emacs than GNU + Emacs is, because Mint (Freemacs' extension language) is absolutely + illegible without weeks of study, much like TECO. + + To get Freemacs see question 21. + + ** MicroEmacs + + MicroEmacs is a descendant of Microemacs {originally by Dave Conroy?}. It + + is programmable in a BASIC-like language. Many of the keybindings are + + different from GNU Emacs. It is rumored that MicroEmacs can not correctly + + edit files larger than memory. The author is Daniel Lawrence + + <dan@mdbs.uucp, dan@midas.mgmt.purdue.edu, nwd@j.cc.purdue.edu>. The - + latest version is 3.10 and it is available via anonymous FTP + (midas.mgmt.purdue.edu (non-working hours only), durer.cme.nist.gov, + wuarchive.wustl.edu:/mirrors/msdos/memacs/*). Version 3.11 is in beta + test. + + ** JOVE + + Another Emacs for small machines is JOVE (Jonathan's Own Version of + Emacs). The latest official version is 4.14. There appears to be a newer + version. People rumored to be working on JOVE include Mark Moraes + <moraes@cs.toronto.edu> and Bill Marsh <bmarsh@cod.nosc.mil>. It is + available via anonymous FTP (cs.rochester.edu:/pub/jove.tar.4.14.Z, + cs.toronto.edu:/pub/moraes/jove4.14.3.tar.Z, ftp.uu.net:????). + + + ** MG + + MG is another descendant of Microemacs. MG used to stand for + MicroGNUEmacs, but now just stands for MG. The look-and-feel of MG is + + intended to be close to that of GNU Emacs. It is rumored that MG can not + + correctly edit files larger than memory. The current version is rumored + + to be 2. There is a version 3 in beta which works on the Amiga. It is + also available via anonymous FTP (ftp.white.toronto.edu:pub/mg/*, + wuarchive.wustl.edu: /mirrors/unix-c/editors/mg*, procyon.cis.ksu.edu + (source and executable)). + +37: Where can I get Emacs for my Atari ST? + + Anonymous FTP: + cs.uni-sb.de:/pub/atari/emacs/???????? + +38: Where can I get Emacs for my Amiga? + + All of the files are lharc-ed. + + Anonymous FTP: + oes.orst.edu:/pub/almanac/comp/amiga/software/gnuemacs-1.10/* + + Via e-mail: + To: almanac@oes.orst.edu: + body: + mode uuencode + send computer amiga software gnuemacs <file> + <file> is replaced by one of the following: + Required: d1.lzh d2.lzh + Recommended: d3_info.lzh d3_infolisp.lzh + Optional: d3_autoloaded.lzh d3_entertainmentetc.lzh + d3_entertainmentlisp.lzh d4_src.lzh d5_languagelisp.lzh + d5_viclone.lzh d6_gnulibsrc.lzh d6_mailpackage.lzh + d6_mathpackage.lzh d6_misc.lzh d6_textformat.lzh + The `d#' at the beginning of each file is its disk number, which is + referred to by the documentation. + +39: 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. + +40: Where can I get Emacs with NeWS support? + + Chris Maio's NeWS support package for GNU Emacs is available via + anonymous FTP (columbia.edu:pub/ps-emacs.tar.Z, - + archive.cis.ohio-state.edu:pub/gnu/emacs/ps-emacs.tar.Z) and via e-mail ! + (body: send NeWS emacs-support, To: archive-server@columbia.edu). + + +41: How do I get Emacs running on VMS under DECwindows? + + Hal R. Brand <BRAND@addvax.llnl.gov> is said to have a VMS save set with a + ready-to-run VMS version of Emacs 18.55 for X Windows. It is available + via anonymous FTP (addvax.llnl.gov). It is possible that the VMS versions + + of Emacs at other sites have X support compiled in. See etc/FTP for + + locations. + + + Johan Vromans <jv@mh.nl> writes: + + Getting Emacs to run on VMS with DECwindows requires a number of changes + to the sources. Fortunately this has been done already. Joshua Marantz + <josh@viewlogic.com> did most of the work for Emacs 18.52, and the mods + were ported to 18.55 by Johan Vromans <jv@mh.nl>. Also included is the + handling of DEC's LK201 keyboard. You need to apply the changes to a + fresh Emacs 18.55 distribution on a Unix system, and then you can copy + the sources to VMS to perform the compile/link/build. + + The set of changes have been posted a number of times three times the + last 12 months, so they should be widely available. + +42: How do I use emacstool under SunView? + + First read the man page for emacstool (etc/emacstool.1). The file ! + etc/SUN-SUPPORT includes further information. + + +43: How do I make Emacs display 8-bit characters? + + There is a patch called the `8-bit ctl-arrow patch' that allows Emacs to + display characters with codes from 128 to 255. {It appears to be by + Kenneth Cline <cline@proof.ergo.cs.cmu.edu>.} + + Anonymous FTP: + cs.purdue.edu:pub/ygz/cemacs.tar.Z:cemacs/8bit-patch-18.57 + sics.se:archive/emacs-18.55-8bit-diff (new version not available) + laas.laas.fr:pub/emacs/patch-8bit-18.5{5,7} + + Via e-mail: + + To: mail-server@sics.se + body: send emacs-18.55-8bit-diff + + Anders Edenbrandt <anderse@dna.lth.se> has produced a more comprehensive + patch that allows for 8-bit input and output. Anonymous FTP: - site: durer.cme.nist.gov - - Another Emacs for small machines is Jove (Jonathan's Own Version of - Emacs). The latest version is 4.9. It is available via: - - Anonymous FTP: - sites: hipl.psych.nyu.edu, cs.toronto.edu, cayuga.cs.rochester.edu - - Yet another Emacs is "mg", which used to stand for MicroGNUEmacs, but - now just stands for "mg". It is available via: + sics.se:archive/emacs-8bit-diff-lth + gatekeeper.dec.com:pub/GNU/DS-emacs-18.57-8bit-diff-lth + + The most comprehensive patches for 8-bit output are by Howard Gayle for - + Emacs 18.55. These patches allow displaying any arbitrary string for a + given 8-bit character (except TAB and C-j). Also supported is defining + + the sorting order and the uppercase and lowercase translations. It is + + reported that the 8-bit character support in Emacs 19 is largely based on + + these patches. Thomas Bellman <Bellman@lysator.liu.se> has updated these ! + patches for Emacs 18.57. ! Anonymous FTP: - site: snow.white.toronto.edu - -31: Where can I get Emacs for my Atari ST? - - The latest version for the ST is available via: - - Anonymous FTP: - site: cs.uni-sb.de [134.96.7.254] - directory: /pub/atari/emacs - -32: Where can I get Emacs with NeWS support? - - Chris Maio's NeWS support package for GNU Emacs is available via: - - Anonymous FTP: - site: columbia.edu - file: /pub/ps-emacs.tar.Z - - site: tut.cis.ohio-state.edu - file: /pub/gnu/emacs/ps-emacs.tar.Z + sics.se:archive/emacs-gayle.tar.Z (patches for 18.55) + + ftp.lysator.liu.se:pub/emacs/gayle-18.57.diff.tar.Z (patches for 18.57) + + ftp.lysator.liu.se:pub/emacs/emacs-18.57-gayle.tar.Z (patched 18.57) + + + + Nemacs displays 8-bit characters, and it may be useful for displaying the + + 8-bit ISO-8859 alphabet, but I don't know for sure. See question 46. + + +44: How do I input 8-bit characters? + + Minor modes for ISO Latin-1 that allow one to easily input this character + set have been written by several people. Such modes have been written by ! + Matthieu Herrb <matthieu@laas.fr> (laas.laas.fr:pub/emacs/iso-latin-1.el), ! + Johan Vromans <jv@mh.nl> {FTP site??}, and Marc Shapiro + + <shapiro@sor.inria.fr> {FTP site??}. + + + These approaches differ from the one taken by Anders Edenbrandt in that + his method uses direct 8-bit input, while these methods use a compose + sequence for 8-bit characters. {I have heard conflicting reports on + whether this results in losing the Meta key. Perhaps this depends on + whether Emacs is running under X. Can someone resolve this?} + + Karl Heuer <karl@haddock.ima.isc.com> is said to have a patch to allow ! + 8-bit input. + +45: 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.) When the user is done + editing a file, the user can type "C-x #" to indicate this. This will + switch to another buffer created at the request of emacsclient if there + are any. When "C-x #" has been invoked on all of the files that the + emacsclient requested to be edited, Emacs will send notification of this + to `server' which will pass this on to the emacsclient, which will then + exit. + + 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, which is not necessarily the same as the one the emacsclient sees. + + The Emacs process should not be suspended at the time emacsclient is + + invoked. Thus, 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, not just the ability to visit files, and also does not require + + the client program to wait for completion. It is available via anonymous + + FTP (Emacs Lisp Archive: packages/gnuserv.shar). + +46: 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, uhccux.uhcc.hawaii.edu: + editors/Nemacs-3.3.2/*, miki.cs.titech.ac.jp: + JAPAN/nemacs/nemacs-3.3.2.tar.Z). 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 Window client. + + +47: 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 + (crl.nmsu.edu:pub/chinese/cemacs.tar.Z, cs.purdue.edu: + pub/ygz/cemacs.tar.Z). Cxterm is available from the same place + (cs.purdue.edu: pub/ygz/cxterm-11.5.1.tar.Z). + +48: 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. + + Joseph Friedman <yossi@Neon.Stanford.EDU> wrote something for Emacs that + provides Hebrew 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". Binding Keys to Commands -33: Why does my key binding fail? - - Most likely, it failed because "ESC [" was already defined. Evaluate +49: Why does Emacs say "Key sequence XXX uses invalid prefix characters"? + + Most likely, it failed because the key sequence you were binding started + with "ESC [" and this sequence was already bound to a command. Evaluate this form first: (define-key esc-map "[" nil) -34: Why doesn't this [terminal or window-system setup] code work in my + NOTE: By default, "ESC [" is bound to backward-paragraph, and if you do ! + this you will lose this key binding. For most people, this is not a + problem. + +50: Why doesn't this [terminal or window-system setup] code work in my .emacs file, but it works just fine after Emacs starts up? This is because you're trying to do something in your .emacs file that needs to be postponed until after the terminal/window-system setup code is loaded. This is a result of the order in which things are done - during the startup of Emacs. + during the startup of Emacs. For more details see question 64. In order to postpone the execution of Emacs Lisp code until after the terminal/window-system setup, set the value of the variable term-setup-hook or window-setup-hook to be a function which does what you want. - See question 72 for a complete explanation of what Emacs - does every time it is started. + See etc/OPTIONS for a complete explanation of what Emacs does every time + it is started. Here is a simple example of how to set term-setup-hook: (setq term-setup-hook (function (lambda () - (if (string-match "^vt220" (or (getenv "TERM") "")) - ;; Make vt220's "Do" key behave like M-x: - (define-key CSI-map "29~" 'execute-extended-command))))) - -35: How do I use function keys under X Windows? - - If compiled on a Sun, Emacs recognizes the function keys that are - normally on a Sun keyboard, and you can bind them the same way you - normally bind Sun keys. Each function key will generate a key sequence - that looks like "ESC [ ### z", where ### is replaced by a number. - - If not compiled on a Sun, the function keys will appear to Emacs in a - way remarkably similar to the keys of a VT220 terminal. Each function - key will generate a key sequence that looks like "ESC [ ### ~". + (cond ((string-match "\\`vt220" (or (getenv "TERM") "")) + ;; Make vt220's "Do" key behave like M-x: + (define-key CSI-map "29~" 'execute-extended-command)) + )))) + +51: Other than that, why does my key binding fail? + + One possible reason that I've seen many times is improperly specifying + the character ESC in the key binding string. In an Emacs Lisp string, + ESC is specified as "\e". (ESC can also be specified as itself, the + ASCII character with value 27, but this can cause serious problems when + you try to print/view/mail the file.) Thus, for example, to bind the + key sequence "ESC O D" to the command 'my-backward-char, the simplest + incantation is this: + + (global-set-key "\eOD" 'my-backward-char) + + These are also correct (and represent what the above command actually + does): + + (define-key global-map "\eOD" 'my-backward-char) + (define-key esc-map "OD" 'my-backward-char) + + The string forms for the keys RET, LFD, DEL, ESC, SPC, and TAB are + respectively "\r", "\n", "\C-?", "\e", " ", and "\t". + +52: How do I use function keys under X Windows? + + This depends on whether you are running Emacs inside a terminal emulator + window, or whether you are allowing Emacs to create its own X window. + You can tell which you are doing by noticing whether Emacs creates a new + window when you start it. + + If you are running Emacs inside a terminal emulator window, then it + behaves exactly as it does on any other tty. In this case, for function + keys to be useful, they must generate character sequences that are sent + to the programs running inside the window as input. The "xterm" program + has two different sets of character sequences that it generates when + function keys are pressed, depending on the sunFunctionKeys X resource + and the -sf and +sf command line options. (To find out what these key + sequences are, see question 53.) In addition, with xterm, + you can override what key sequence a specific function key (or any other + key) will generate with the "translations" resource. This, for example: + + XTerm.VT100.Translations: #override \ + <KeyPress>F1: string(0x1b) string("[xyzzy") + + makes the function key F1 generate the character sequence "ESC [xyzzy". + + On the other hand, if Emacs is managing its own X window, the following + description applies. Emacs receives `KeyPress' events from the X server + when a key is pressed while the keyboard focus is in its window. The + KeyPress event contains an X `keysym' code, which is simply an arbitrary + number corresponding to the name of the keysym, and information on which + "modifiers" such as `control' and `shift' are active. For example, the + `Tab' keysym is 0xff09. (Generally, a key on the keyboard will generate a + keysym whose name is the same as the label on the key, ie. the `Tab' key + will normally generate the `Tab' keysym. This can be changed with the + xmodmap program.) Emacs recognizes all the keysyms that correspond to + standard ASCII characters and internally uses the ASCII character instead. + + (WARNING: I am about to describe a gross, disgusting hack to you, have + your barf bag ready.) + + When Emacs receives the X keysym of one of the arrow keys, it behaves + the same as if it had received a letter key with the control modifier + down as follows (this is hard-coded): + + Up becomes C-p + Down becomes C-n + Right becomes C-f + Left becomes C-b + + The way Emacs treats other keysyms depends on what kind of machine it was + compiled on. The type of the display machine is irrelevant! Function + + keys are mapped internally to escape sequences, while other keys are + completely ignored. + + 1. If compiled on a Sun, Emacs recognizes these X keysyms that + are normally on a Sun keyboard: + + F1 through F9 + L1 through L10 (same as F11 through F20) + R1 through R15 (same as F21 through F35) + (The keys labelled R8, R10, R12, and R14 usually are mapped to the ! + X keysyms Up, Left, Right, and Down.) + Break (the "Alternate" key is given this keysym) + + These keys work like Sun function keys. When Emacs recieves the + keysym, it will internally use character sequences that look like "ESC + [ ### z", where ### is replaced by a number. The character sequences + are identical to those generated by Sun's keyboard under SunView. Any + function key not listed above generates "ESC [ - 1 z". + + In order to use these key sequences, they should be bound to commands + using the standard key binding methods, just as if Emacs were running + on a regular terminal. + + WARNING: F11 and L1 are the same keysym in X, as are F12 and L2, etc. + {Yes, this is stupid. Complain to the X consortium.} + + 2. If not compiled on a Sun, the function keys will appear to Emacs in a + way remarkably similar to the keys of a DEC LK201 keyboard (used on + some VT series terminals). These X keysyms will be recognized: + + F1 through F20 + Help (treated same as F15) + Menu (treated same as F16, is the LK201 "Do" key) + Find + Insert (LK201 "Insert Here" key) + Select + + These keysyms are supposed to be recognized, but they are not due to a + bug (which is fixed in Emacs 18.58): + + + Prior (LK201 "Prev Screen" key) + Next (LK201 "Next Screen" key) + + And finally, the LK201 key labelled `Remove' (or `Delete') is often ! + mapped to the Delete keysym which generates the DEL character (C-?) ! + instead of the key sequence given by the LK201 `Remove' key. It may + + also be mapped to some other keysym, such as `_Remove', in which case + + you can't use it from within Emacs at all. + + + Each function key will be internally converted to a character sequence + that looks like "ESC [ ## ~", where ## is replaced by a number. The + character sequences are identical to those generated by a LK201 + keyboard. Any function key not listed above generates "ESC [ - 1 ~". For the complete list of the numbers which are generated by the function - keys, look in the file src/x11term.c. - - However, this may be inadequate for you if you have function keys Emacs - doesn't know about. Johan Vromans <jv@mh.nl> explains: - - There are a number of tricks that can be helpful. The most elegant - solution, however, is to use the function "x-rebind-key". This function - is commented out in the source for good reasons --- it's buggy. - - It is rather easy to replace this function with the function - epoch:rebind-key from the Epoch distribution. - - After implementing this, all keyboard keys can be configured to send - user definable sequences, e.g. + keys, look in the file src/x11term.c at the definitions of the function + "stringFuncVal". + + If you are running Emacs on a Sun machine, even if your X display is + running on a non-Sun machine (eg., an X terminal), you get the setup + described above for Suns. The determining factor is what type of + machine Emacs is running (was compiled) on, not what type of machine + your X display is on. + + If you have function keys not listed above on your keyboard, you can use + + `xmodmap' to change their keysym assignments to get keys that Emacs will ! + recognize, but that may screw up other programs. ! + + X resources are not used by Emacs to affect the key sequences generated. + In particular, there are no X key "translations" for Emacs. + + + If you have function keys not listed above and you don't want to use + xmodmap to change their names, you might want to make a modification to + your Emacs. Johan Vromans <jv@mh.nl> explains: + + There are a number of tricks that can be helpful. The most elegant + solution, however, is to use the function "x-rebind-key". This function + is commented out in the source for good reasons --- it's buggy. + + It is rather easy to replace this function with the function + epoch:rebind-key from the Epoch distribution. + + After implementing this, all keyboard keys can be configured to send + user definable sequences, e.g. (x-rebind-key "KP_F1" 0 "\033OP") - This will have the keypad key PF1 send the sequence \eOP, just like an - ordinary VTxxx terminal. - - Another method is to handle the keys in the C source. Although this may - be slightly more efficient, it is much less flexible. - - Finally, some people have established a convention to have the special - keys send a sequence of characters that indicate the key and its - modifiers instead of a plain escape sequence. This is also a good - method. The advantage of sending the plain escape sequences is that you - require only one setup for Emacs running under X and on normal - terminals, e.g. - - (x-rebind-key "KP_F1" 0 "\033OP") - - will have key PF1 send \eOP, and, probably in another setup file: - - (global-set-key "\eOP" 'specific-function) - - to bind PF1 to a function. The last statement applies for normal VTxxx - terminal also. - -36: How do I tell what characters my function keys emit? + This will have the keypad key PF1 send the sequence "ESC O P", just like + an ordinary VT series terminal. + + This is what I do in my Emacs. Note that you need to add an entry to + syms_of_xfns at the bottom of src/x11fns.c. I can send a patch that has + + the necessary changes, so you don't have to get the Epoch sources. + + +53: How do I tell what characters my function or arrow keys emit? + Use this function by Randal L. Schwartz <merlyn@iwarp.intel.com>: @@ -832,33 +1832,96 @@ quit-flag nil)) ; quit-flag maybe set by C-g (message "Characters entered: %s" (key-description chars)))) - - -Problems with Key Bindings and Input - -37: Why does Emacs spontaneously go into "I-search:" mode? + Alternatively, use the "C-h l" view-lossage command, which will display + the last 100 characters Emacs has seen in its input stream. Kevin + + Gallagher <kgallagh@digi.lonestar.org> suggests typing some unique string + + like "wxyz", typing the key in question, then typing "C-h l". The + + characters that appear between "wxyz" and "C-h l" were generated by the + + key. + + +54: 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 a more detailed discussion, read the file PROBLEMS in the Emacs - distribution. - -38: What do I do if my terminal is sending C-s and C-q for flow control and - I can't disable it? - - Use this piece of Emacs Lisp: + characters and interpreting them as commands. (The C-s character normally + invokes the isearch-forward command.) The best solution is to disable the + use of C-s and C-q for flow control. If you can't do that, you can make + Emacs treat C-s and C-q as flow control characters by evaluating this + form: (set-input-mode nil t) -39: How do I make Emacs use C-s and C-q for flow control instead of for + 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 unclear. I don't know if this has any effect when used in + lisp/site-init.el when building Emacs; I've never tried that. {Can + someone tell me whether it works?} Putting things in users' .emacs files + has a number of problems. 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). + + If some of your users are connecting through XON/XOFF flow-controlled + connections, but some are not, then here is a possible solution. Disable + C-s and C-q by setting keyboard-translate-table in lisp/site-init.el, + either with swap-keys (see question 60) or with the following form: + + ;; by Roger Crew <crew@cs.stanford.edu>: + (setq keyboard-translate-table + "\C-@\C-a\C-b\C-c\C-d\C-e\C-f\C-g\C-h\C-i\C-j\C-k\C-l\C-m\C-n\C-o\C-p\C-^\C-r\C-\\\C-t\C-u\C-v\C-w\C-x\C-y\C-z\C-[\C-s\C-]\C-q\C-_") + + Then in lisp/default.el, if it is determined to be safe, they can be + reenabled (being careful not to screw up any other key mappings users + might have established using keyboard-translate-table, use swap-keys for + this), or else set-input-mode can be called to further disable C-s and + C-q. + + For further discussion of this issue, read the file etc/PROBLEMS in the + + Emacs distribution. + +55: How do I disable the use of C-s and C-q for flow control? + + Your terminal may be using C-s and C-q for XON/XOFF flow control. For + + example, VT series terminals do this. On some terminals, it may be + + possible to turn this off from a setup menu. This is also true for some + + terminal emulation programs on PCs. + + + + If you are using a dialup connection, the modems may be using XON/XOFF + + flow control. I don't know how to get around this. Also, some network + + box between the terminal and your computer may be using XON/XOFF flow ! + control. You will probably have to ask your local network experts for + help with this. + +56: What do I do if my terminal is sending C-s and C-q for flow control and + I can't disable it? + + See question 54. + +57: How do I make Emacs honor C-s and C-q for flow control instead of for commands? - Same answer as previous question. - -40: How do I use commands bound to C-s and C-q (or any key) if these keys + See question 54. + +58: Why does Emacs never see C-s and C-q through my network connection? + + 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. + +59: How do I use commands bound to C-s and C-q (or any key) if these keys are filtered out? I suggest swapping C-s with C-\ and C-q with C-^: @@ -866,820 +1929,526 @@ (swap-keys ?\C-s ?\C-\\) (swap-keys ?\C-q ?\C-^) - See question 41 for the implementation of swap-keys. - -41: How do I "swap" two keys? + See question 60 for the implementation of swap-keys. This method + + has the advantage that it simultaneously swaps the characters everywhere + + throughout Emacs, while just switching the keybindings will miss important + + places where the character codes are stored (eg., the search-repeat-char + + variable, major mode keymaps, etc.). + + + + WARNING: 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. + + +60: How do I "swap" two keys? When Emacs receives a character, you can make Emacs behave as though it received another character by setting the value of - keyboard-translate-table. The following Emacs Lisp will do this for - you, allowing you to "swap" keys. - - WARNING: the value of C-g (7) is hard coded in several places both - before and after the translation specified by keyboard-translate-table - is carried out. Thus, swapping C-g with another key may cause problems; - rebinding C-g may also cause problems. (Well, I've never done it, so I - don't know for sure.) + keyboard-translate-table. The following Emacs Lisp will do this for you, + allowing you to "swap" keys. After arranging for this Lisp to be + evaluated by Emacs, you can evaluate `(swap-keys ?A ?B)' to swap A and B. + The function `show-mapped-keys' will allow you to see what low-level key + + mappings are in effect. + + + WARNING: the value of C-g (7) is still hard coded in one place in the + minibuffer code. Thus, swapping C-g with another key may cause a minor + problem. (Fixed in Emacs 18.58.) (defun swap-keys (key1 key2) "Swap keys KEY1 and KEY2 using map-key." - (map-key key1 key2 t) + (map-key key1 key2) (map-key key2 key1)) - (defvar map-keys-alist nil - "Association list of key mappings currently in effect. - If (FROM . TO) is an element, that means key FROM is currently mapped to TO.") - - (defun map-key (from to &optional no-update) - "Make key FROM behave as though key TO was typed instead. - If optional argument NO-UPDATE is non-nil, the key-mapping does not take - effect until a subsequent map-key or unmap-key." - (let ((alist-entry (assq from map-keys-alist))) - (if alist-entry - (setcdr alist-entry to) - (setq map-keys-alist (cons (cons from to) map-keys-alist)))) - (or no-update (map-keys-update))) - - (defun unmap-key (key) - "Undo any mapping of key KEY." - (setq map-keys-alist (delq (assq key map-keys-alist) map-keys-alist)) - (map-keys-update)) - - ;; Makes keyboard-translate-table reflect the key mappings in - ;; map-keys-alist. - - (defun map-keys-update () - (if (null map-keys-alist) - ;; Emacs runs fasted if keyboard-translate-table is nil - (setq keyboard-translate-table nil) - (let ((max-key-mapped - ;; Find the mapped key with largest value - (apply 'max - (mapcar - (function - (lambda (x) - (car x))) - map-keys-alist))) - (i 0)) - ;; keyboard-translate-table doesn't have to be any longer than - ;; necessary. This speeds up Emacs. - (setq keyboard-translate-table (make-string (1+ max-key-mapped) 0)) - (while (<= i max-key-mapped) - (aset keyboard-translate-table i (or (cdr (assq i map-keys-alist)) i)) - (setq i (1+ i)))))) - -42: Why does the "Backspace" key invoke help? - - The Backspace key (on every keyboard I've used) sends ASCII code 8. C-h - sends the same code. In Emacs by default C-h invokes "help-command". - 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 some people this solution may be problematic: - - 1. 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 ^? - - 2. 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 best solution is to swap C-h and DEL: - - (swap-keys ?\C-h ?\C-?) - - See question 41 for the implementation of swap-keys. - -43: How do I type DEL on PC terminal emulators? + (defun map-key (from to) + "Make key FROM behave as though key TO was typed instead." + (setq keyboard-translate-table + (concat keyboard-translate-table + (let* ((i (length keyboard-translate-table)) + (j from) + (k i) + (str (make-string (max 0 (- j (1- i))) ?X))) + (while (<= k j) + (aset str (- k i) k) + (setq k (1+ k))) + str))) + (aset keyboard-translate-table from to) + (let ((i (1- (length keyboard-translate-table)))) + (while (and (>= i 0) (eq (aref keyboard-translate-table i) i)) + (setq i (1- i))) + (setq keyboard-translate-table + (if (eq i -1) + nil + (substring keyboard-translate-table 0 (1+ i)))))) + + (defun show-mapped-keys () + + "Analyze keyboard-translate-table and display mapped keys." + + (interactive) + + (let (mapping-alist + + (l (length keyboard-translate-table)) + + (i 0) + + e pair) + + (while (< i l) + + (setq e (aref keyboard-translate-table i)) + + (or (eq i e) + + (setq mapping-alist (cons (cons i e) mapping-alist))) + + (setq i (1+ i))) + + (cond (mapping-alist + + (princ "Mapped Keys: ") + + (setq mapping-alist (nreverse mapping-alist))) + + (t + + (princ "No keys mapped"))) + + (while mapping-alist + + (setq pair (car mapping-alist) + + i (car pair) + + e (cdr pair)) + + (princ (single-key-description i)) + + (cond ((eq i (cdr (setq pair (assq e mapping-alist)))) + + (setq mapping-alist (delq pair mapping-alist)) + + (princ " <=> ")) + + (t + + (princ " => "))) + + (princ (single-key-description e)) + + (setq mapping-alist (cdr mapping-alist)) + + (if mapping-alist (princ ", "))))) + + + NOTE: You must evaluate the definition of swap-keys before calling it! + The easiest way is to list it first in the file (eg., your .emacs file). + +61: Why does the "BackSpace" key invoke help? + + The BackSpace key (on every keyboard I've used) 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. ! + ! + * Under X Windows, the easiest solution is to change the BackSpace key ! + into a Delete key like this: ! + ! + xmodmap -e "keysym BackSpace = Delete" ! + ! + * Some terminals (eg., 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: + + + (swap-keys ?\C-h ?\C-?) + + See question 60 for the implementation of swap-keys. + + * Another approach is to switch keybindings and put help on "C-x h" ! + instead: + + (global-set-key "\C-h" 'delete-backward-char) + (global-set-key "\C-xh" 'help-command) ; override mark-whole-buffer + + Other popular key bindings for help are M-? and "C-x ?". + + + WARNING: This method fails to correctly bind BackSpace in the various ! + major and minor modes that define their own backward character ! + deletion or help commands, such as C mode and Lisp mode. To actually + do that for every mode is a lot of work. There are probably other + + places where the correspondence between help and C-h is hardcoded. + + +62: How do I type DEL on PC terminal emulators? Someone whose name I forgot wrote: - Most PCs have deficient keyboards that don't have both Backspace and - Delete keys. Whether C-h (backspace) or DEL is generated by the - "Backspace" key varies from one terminal emulator to another. If you're - lucky, you can reconfigure the keyboard so that it generates DEL. If - not, you will have to hunt to figure out what keystroke will do it --- - possibilities include various shifted and controlled versions of - "Backspace", the "Del" key on the numeric keypad (which might depend on - "Shift" or "NumLock"), or perhaps C-? (Control-?). - - If this is too hard, you may want to swap the delete key with some other - key. See question 42. - + Most PCs have deficient keyboards that don't have both BackSpace and + Delete keys. Whether C-h (BackSpace) or DEL is generated by the + BackSpace key varies from one terminal emulator to another. If you're ! + lucky, you can reconfigure the keyboard so that it generates DEL. If + not, you will have to hunt to figure out what keystroke will do it --- + possibilities include various shifted and controlled versions of + BackSpace, the `Del' key on the numeric keypad (which might depend on ! + Shift or NumLock), or perhaps C-? (Control-?). ! + + If this is too hard, you may want to swap the Delete key with some other + key. See question 61. + +63: Can I make my "Compose" 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 on an + X workstation, you might have luck using the "xmodmap" program. + +64: Why don't the arrow keys work? + + When Emacs starts up, it doesn't know anything about arrow keys at all + (except when running under X, see question 52). During the + process of starting up, Emacs will load a terminal-specific initialization + file for your terminal type (as determined by the environment variable + TERM), if one exists. This file has the responsibility for enabling the + arrow keys. + + There are several things that can go wrong: + + 1. There is no initialization file for your terminal. + + You can determine this by looking in the lisp/term directory. If your + terminal type (as determined by the TERM environment variable) is + xxx-yy-z, then the first of these files in the lisp/term directory will + be loaded as the terminal-specific initialization file: xxx-yy-z.el, + xxx-yy.el, or xxx.el. + + If there is none there, one can be made for your terminal, or you can + just add code to your own .emacs to handle this problem for yourself. + For example, if your terminal's arrow keys send these character + sequences: + + Up: ESC [ A + Down: ESC [ B + Right: ESC [ C + Left: ESC [ D + + then you can bind these keys to the appropriate commands with code in + your .emacs like this: + + (setq term-setup-hook + (function + (lambda () + (cond ((string-match "\\`xyzzy" (or (getenv "TERM") "")) + ;; First, must unmap the binding for M-[ + (or (keymapp (lookup-key global-map "\e[")) + (define-key global-map "\e[" nil)) + ;; Enable terminal type xyzzy's arrow keys: + (define-key global-map "\e[A" 'previous-line) + (define-key global-map "\e[B" 'next-line) + (define-key global-map "\e[C" 'forward-char) + (define-key global-map "\e[D" 'backward-char)) + ((string-match "\\`abcde" (or (getenv "TERM") "")) + ;; Do something different for terminal type abcde + ;; ..... + )))))) + + This technique allows you to easily add more `cond' cases for different + terminal types. + + NOTE: You will have to restart Emacs to get this change to take effect + when using this technique. + + NOTE: Your arrow keys may send sequences beginning with "ESC O" when + + Emacs is running, even if they send sequences beginning with "ESC [" at + + all other times. This is because Emacs uses any command there may be + + in your terminal's termcap entry for putting the terminal into + + `Application Keypad Mode'. Just map these sequences the same way as + + above. + + + The next two cases are problems even if there is a initialization file for + your terminal type. + + 2. Your terminal's arrow keys send individual control characters. + + For example, the arrow keys on an ADM-3 send C-h, C-j, C-k, and C-l. + + + There is not much Emacs can do in this situation, since all the control + characters except for C-^ and C-\ are already used as Emacs commands. + It may be possible to convince the terminal to send something else when + + you press the arrow keys; it is worth investigating. + + + You have to make the hard choices of how to rebind keys to commands to + make things work the way you want. Another alternative is to start + + learning the standard Emacs keybindings for moving point around: C-b, + + C-f, C-p, and C-n. Personally, I no longer use the arrow keys when + + editing. + + + 3. Your terminal's arrow keys send sequences beginning with "ESC [". + + Due to an extremely poor design decision (ie., these sequences are ANSI + standard), none of the the terminal-specific initialization files that + are distributed with Emacs will bind these character sequences to the + appropriate commands by default. (This also applies to any other + function keys which generate character sequences starting with "ESC + [".) This is because it was deemed far more important to preserve the + binding of M-[ to the backward-paragraph command. It appears that this + will change in Emacs 19. + + Some of the terminal-specific initialization files that come with Emacs + provide a command `enable-arrow-keys' that will fix this problem. To + get this automatically invoked, put this in your .emacs: + + (setq term-setup-hook + (function + (lambda () + (if (fboundp 'enable-arrow-keys) (enable-arrow-keys))))) + + We put this in our lisp/default.el file, so users don't have to worry + about it: + + ;; don't override a user's term-setup-hook + (or term-setup-hook + (setq term-setup-hook + (function + (lambda () + (and (fboundp 'enable-arrow-keys) + ;; don't override a user key mapping + (eq 'backward-paragraph (lookup-key esc-map "[")) + (enable-arrow-keys)))))) + + If your terminal type is `sun', you should put this in your .emacs + instead (or in addition to the above): + + (setq sun-esc-bracket t) + + If your terminal type is `xterm', you will have to bind the arrow keys + as in part 1 above, since the xterm.el file doesn't do anything useful. + + It is possible that the terminal-specific initialization file for your + terminal type was written locally and does not follow the rule + mentioned above. In this case you may need to inspect it to find out + how to enable the arrow keys. (Actually, if it was written locally, it + probably enables the arrow keys by default.) + +65: How do I bind a combination of modifier key and function key? + + Unless you're using Emacs under emacstool (or xvetool?) or you have a + working version of x-rebind-key (see question 52), you can't do this + with Emacs alone. When using emacstool, Emacs sees different character + sequences for the combination of a modifier and a function key from what + it sees for the function key alone. See etc/emacstool.1 for more + information. Since Emacs sees different character sequences, you can bind + these different sequences to different commands. + + If you are running Emacs inside a terminal emulator window like xterm, you + can modify its translation tables to make it generate different character + sequences for the combination of a modifier and a function key. For + example, this X resource setting: + + XTerm.VT100.Translations: #override \ + Shift<KeyPress>F1: string(0x1b) string("[xyzzy") + + makes Shift-F1 generate the character sequence "ESC [ xyzzy". You can + bind these character sequences in Emacs as normal. + +66: Why doesn't my Meta key work in an xterm window? + + Try all of these methods before asking for further help: + + * If you are using `olwm' as your window manager, switch to another window + + manager. :-) {Seriously though, does anyone know a good generic + + solution to allow the use of the Meta key with Emacs under olwm?} + + + + * For X11R4: 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". + +67: 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. + +68: Where can I get key bindings to make Emacs emulate WordStar? + + Look for the package `wordstar' in the Emacs Lisp Archive (see question + 18). -Building/Installing/Porting Emacs and Machine/OS-Specific Bugs: + +Building/Installing/Porting Emacs and Machine/OS-Specific Bugs - -44: Why do I get an "f68881_used undefined" error, when I build Emacs on my +69: Why does Emacs crash with "Fatal error (6).Abort" under SunOS 4.1? + + I had hoped this question would go away after Emacs 18.57 was released, + but people continue to compile 18.55. + + There is a bug in the "localtime" routine supplied with SunOS 4.1. A + private function called by tzsetwall zeroes the byte just past an eight + byte region it mallocs. This corrupts GNU malloc's memory pool. When GNU + malloc detects this it aborts. + + In the 18.57 release "#define SYSTEM_MALLOC" was added to the ! + configuration file for SunOS 4.1, which allowed Emacs to work. However, ! + Sun's realloc behaves horribly when alternated with malloc, so your + + process size can balloon rapidly in certain situations quickly using up + + all available memory. Thus, you may prefer the approach taken by Emacs + + 18.58, which has a different fix that makes GNU's malloc always allocate + + at least 16 bytes. + + + + Eirik Fuller <eirik@theory.tn.cornell.edu> supplies most of the following + + information: + + + In SunOS 4.1.1, it appears that Sun has still not fixed their bug, since + the localtime.o file did not change. They must be aware of it since they + suggest using "#define SYSTEM_MALLOC" to compile Emacs in their + documentation. It is reported that this same bug causes mysterious + behavior in Sun's /usr/etc/rpc.mountd. + + For people who want to fix this problem for real, there is a fixed version + of the localtime.o file available via anonymous FTP (titan.rice.edu: + incoming/localtime.tar.Z). {Someone has reported that this file is now + missing.} The new localtime.o file should be installed in the + /usr/lib/libc{.a,.so.*} files. Read the `ar' man page and the README file + in /usr/lib/shlib.etc for instructions. - + + Now stop asking this question! :-) :-) + +70: Why do I get an "f68881_used undefined" error, when I build Emacs on my Sun 3? Barry A. Warsaw <warsaw@cme.nist.gov> writes: - Some of the code that is being linked on the "ld" line of emacs' - build command has been compiled with the -f68881 option. Most - common reason is that you're linking with X libraries which were - built with -f68881 option set. You need to either remove all - dependencies to the 68881 (may mean a recompile of the X libraries - with -fswitch or -fsoft option), or you need to link emacs with - the 68881 startup file /usr/lib/Mcrt1.o. Make this change to - src/ymakefile: - - change: #define START_FILES crt0.o - to: #define START_FILES crt0.o /usr/lib/Mcrt1.o - - The order of these start files is critical. - -45: Why does Emacs crash under SunOS 4.1? - - Under SunOS 4.1, Emacs dies with this message: - - Fatal error (6).Abort - - There is a bug in the "localtime" routine supplied with SunOS 4.1. - A private function called by tzsetwall zeroes the byte just past an - eight byte region it mallocs. This corrupts GNU malloc's memory pool. - - Put "#define SYSTEM_MALLOC" in src/config.h. - - Or, for the purists: - - Put "#define SUNOS_LOCALTIME_BUG" in src/config.h and apply the following - patch to src/malloc.c. - - (Patch by Eirik Fuller <eirik@elf.tn.cornell.edu>.) - - >*** malloc.c~ Fri Apr 7 22:12:10 1989 - >--- malloc.c Tue May 8 07:07:22 1990 - >*************** - >*** 476,482 **** - >--- 476,487 ---- - > multiple of 8, then figure out which nestf[] area to use. - > Both the beginning of the header and the beginning of the - > block should be on an eight byte boundary. */ - >+ #ifdef SUNOS_LOCALTIME_BUG - >+ /* SunOS 4.1 localtime scribbles on the ninth byte. */ - >+ nbytes = (n + ((sizeof *p + 15) & ~15) + EXTRA + 15) & ~15; - >+ #else - > nbytes = (n + ((sizeof *p + 7) & ~7) + EXTRA + 7) & ~7; - >+ #endif - > { - > register unsigned int shiftr = (nbytes - 1) >> 2; - > - -46: Why does Emacs occasionally cause segmentation faults and machine - panics on my DECstation 3100? - - Bruce Cole <cole@dip.cs.wisc.edu> writes: - - > We're running Emacs 18.54 on an Ultrix Risc DECsystem 5400. Three - > times we've had the machine hang with the following message: - > - > panic: tblmod on invalid pte - > - > Ultrix support tells us this is caused by Emacs. Has anyone - > experienced this? DEC says it only happens on RISC boxes. - - This is due to a MIPS specific Ultrix kernel bug. I sent DEC a - description of the bug with a bug fix. The Kernel bug manifests itself - with Emacs since Emacs uses a non-standard data start address on Ultrix - MIPS machines. - - I haven't often seen Emacs cause MIPS machines to panic. Usually you - just see one of the following errors when you try to start up Emacs: - - segmentation fault (core dumped) - emacs: Bad address - Out of memory - data size rlimit exceeded, pid 6523, process tcsh (for example) - - Until DEC fixes their kernel, you can avoid the bug by changing the data - start address used by Emacs. - - > I have built two newer versions of GNU Emacs and it still happens. I - > should also mention that these faults happen quite rarely to some - > users (I may see it once a month), while other users see it a few - > times a week or even daily! - - The problem only occurs when a MIPS machine is doing a lot of paging. - Users who don't cause their workstation to page will not see this - problem. - - Patch to GNU Emacs 18.55: - - >*** m-pmax.h Thu Jun 8 11:53:55 1989 - >--- m-pmax.h.new Mon Jul 9 10:21:21 1990 - >*************** - >*** 1,3 **** - >--- 1,7 ---- - > #include "m-mips.h" - > #undef LIBS_MACHINE - > #undef BIG_ENDIAN - >+ #undef LD_SWITCH_MACHINE - >+ #undef DATA_START - >+ #define DATA_START 0x10000000 - >+ #define DATA_SEG_BITS 0x10000000 - -47: How do I get Emacs running on VMS under DECwindows? - - Hal R. Brand <BRAND@addvax.llnl.gov> is said to have a VMS save set with - a ready-to-run VMS version of Emacs for X Windows. It is available via: - - Anonymous FTP: - site: addvax.llnl.gov - - Johan Vromans <jv@mh.nl> writes: - - Getting Emacs to run on VMS with DECwindows requires a number of changes - to the sources. Fortunately this has been done already. Joshua Marantz - <josh@viewlogic.com> did most of the work for Emacs 18.52, and the mods - were ported to 18.55 by Johan Vromans <jv@mh.nl>. Also included is the - handling of DEC's LK201 keyboard. You need to apply the changes to a - fresh Emacs 18.55 distribution on a Unix system, and then you can copy - the sources to VMS to perform the compile/link/build. - - The set of changes have been posted a number of times three times the - last 12 months, so they should be widely available. - -48: Why won't src/alloc.c compile on a SPARCstation? - - {Could someone send me a better description of the symptoms ... Does it - really not compile, or does it refuse to link, or does it die when it's - run?} - - An object in src/alloc.c is declared as an array of char. However, on a - SPARCstation, this object must be aligned on a longword boundary. - gcc will align this object not on a longword boundary because it thinks - this is ok because the object is an array of char. - - Here is a solution: - - (Patch from the Epoch source code.) - - >*** dist-18.55.dist/src/alloc.c Mon Feb 13 05:23:35 1989 - >--- dist-18.55/src/alloc.c Mon Nov 27 23:30:13 1989 - >*************** - >*** 665,673 **** - > #define NSTATICS 200 - > - >- char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0}; - >- - > int staticidx = 0; - > - > #define staticvec ((Lisp_Object **) staticvec1) - > - > /* Put an entry in staticvec, pointing at the variable whose address is given */ - >--- 665,676 ---- - > #define NSTATICS 200 - > - > int staticidx = 0; - > - >+ #ifdef __GNUC__ - >+ Lisp_Object *staticvec[NSTATICS] = {0}; - >+ #else - >+ char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0}; - > #define staticvec ((Lisp_Object **) staticvec1) - >+ #endif - > - > /* Put an entry in staticvec, pointing at the variable whose address is given */ - - {Does anyone understand why one might want to declare staticvec as an - array of char instead of an array of LispObject?} - -49: Why do shells started from Emacs suspend themselves under SunOS 4.1? - - In SunOS 4.1, when subprocesses are started by an Emacs process started - by "rsh", the process stops with a message like this: - - Process shell stopped (tty input) - - SunOS 4.1 uses the POSIX standard's specification for job control. - Basically, a process must be a session leader to acquire a new - controlling terminal. - - A quick fix is to run Emacs as "/usr/etc/setsid emacs" instead. - - To fix it in Emacs, use this patch: - - (Patch by Eirik Fuller <eirik@elf.tn.cornell.edu>.) - - >*** /tmp/,RCSt1a12635 Fri Jul 6 11:29:10 1990 - >--- process.c Sat Jun 16 14:04:55 1990 - >*************** - >*** 1031,1036 **** - >--- 1031,1039 ---- - > int j = open ("/dev/tty", O_RDWR, 0); - > ioctl (j, TIOCNOTTY, 0); - > close (j); - >+ #ifndef USG - >+ setpgrp (0, 0); - >+ #endif - > } - > #endif /* TIOCNOTTY */ - > - -50: Why does Emacs crash from a bus error in XLookupString under OpenLook? - - The Sun OpenLook libraries use the XComposeStatus parameter on - XLookupString for composing key sequences. I'm told this is actually - supposed to be an optional parameter. - - (Patch by David J. MacKenzie <djm@eng.umd.edu>.) - - >*** dist-18.55.dist/src/x11term.c Wed Aug 2 21:56:42 1989 - >--- dist-18.55/src/x11term.c Fri Jul 13 19:22:32 1990 - >*************** - >*** 1213,1216 **** - >--- 1213,1218 ---- - > #endif /* not sun */ - > - >+ static XComposeStatus status; - >+ - > internal_socket_read(bufp, numchars) - > register unsigned char *bufp; - >*************** - >*** 1223,1227 **** - > BLOCK_INPUT_DECLARE (); - > XEvent event; - >- XComposeStatus status; - > KeySym keysym; - > - >--- 1225,1228 ---- - >*************** - >*** 1330,1334 **** - > nbytes = XLookupString (&event, - > mapping_buf, 20, &keysym, - >! 0); - > /* Someday this will be unnecessary as we will - > be able to use XRebindKeysym so XLookupString - >--- 1331,1335 ---- - > nbytes = XLookupString (&event, - > mapping_buf, 20, &keysym, - >! &status); - > /* Someday this will be unnecessary as we will - > be able to use XRebindKeysym so XLookupString - -51: Why doesn't "C-c C-c" interrupt subprocesses under HP/UX? - - Paul Stravers <stravers@dutentb.tudelft.nl> writes: - - In HP/UX we can (must) combine the two distinct calls - 1. ioctl (fildes, TIOCGPGRP, &gid); - 2. kill (-gid, signo); - into the single call - 1+2. ioctl (fildes, TIOCSIGSEND, signo); - - This is apparently the case under at least HP/UX versions 6.5 and 7.0. - - Here is a set of patches courtesy of Piet van Oostrum <piet@cs.ruu.nl> - that fixes these problems: - - 1. Signals to child processes work now (like the C-c C-c mentioned above) - - 2. When running under X11, C-g now correctly interrupts long-running commands - - 3. When running under X11, the window is redislayed even if emacs is doing - some work (e.g. if your window becomes visible after being behind another - one. - - 4. A nasty bug in alloca is solved. This bug is very infrequent unless you - apply the other patches. - - {I don't know for sure whether all of these patches are applicable only - under HP/UX. Perhaps someone can tell me.} - - >*** alloca.s.~1~ Fri Sep 15 16:35:39 1989 - >--- alloca.s Tue May 1 17:18:08 1990 - >*************** - >*** 92,103 **** - > sub.l &MAXREG*4,%d1 # space for saving registers - > mov.l %d1,%sp # save new value of sp - > tst.b PROBE(%sp) # create pages (sigh) - > move.w &MAXREG-1,%d0 - > copy_regs_loop: /* save caller's saved registers */ - >! mov.l (%a1)+,(%sp)+ - > dbra %d0,copy_regs_loop - >! mov.l %sp,%d0 # return value - >! mov.l %d1,%sp - > add.l &-4,%sp # adjust tos - > jmp (%a0) # rts - > #endif /* new hp assembler */ - >--- 92,105 ---- - > sub.l &MAXREG*4,%d1 # space for saving registers - > mov.l %d1,%sp # save new value of sp - > tst.b PROBE(%sp) # create pages (sigh) - >+ mov.l %a2,%d1 # save reg a2 - >+ mov.l %sp,%a2 - > move.w &MAXREG-1,%d0 - > copy_regs_loop: /* save caller's saved registers */ - >! mov.l (%a1)+,(%a2)+ - > dbra %d0,copy_regs_loop - >! mov.l %a2,%d0 # return value - >! mov.l %d1,%a2 # restore a2 - > add.l &-4,%sp # adjust tos - > jmp (%a0) # rts - > #endif /* new hp assembler */ - - >*** keyboard.c.~1~ Wed Apr 4 14:53:49 1990 - >--- keyboard.c Thu Apr 26 14:46:27 1990 - >*************** - >*** 719,724 **** - >--- 719,773 ---- - > errno = old_errno; - > } - > - >+ #ifdef HPUX - >+ /* tells if an alarm is outstanding for emptying the socket */ - >+ int socket_alarm; - >+ - >+ static void - >+ empty_socket_interrupt() - >+ { - >+ int nread; - >+ char buf[256 * BUFFER_SIZE_FACTOR]; - >+ register int i; - >+ int old_errno = errno; - >+ - >+ if (waiting_for_input) return; - >+ - >+ fcntl (fileno (stdin), F_SETFL, O_NDELAY); - >+ - >+ /* Read what is waiting. */ - >+ - >+ nread = (*read_socket_hook) (0, buf, sizeof buf); - >+ - >+ #ifdef EBADSLT - >+ if (nread == -1 && (errno == EAGAIN || errno == EBADSLT)) - >+ #else - >+ if (nread == -1 && errno == EAGAIN) - >+ #endif - >+ nread = 0; - >+ - >+ fcntl (fileno (stdin), F_SETFL, 0); - >+ - >+ /* Scan the chars for C-g and store them in kbd_buffer. */ - >+ kbd_ptr = kbd_buffer; - >+ for (i = 0; i < nread; i++) - >+ { - >+ kbd_buffer_store_char (buf[i]); - >+ /* Don't look at input that follows a C-g too closely. - >+ This reduces lossage due to autorepeat on C-g. */ - >+ if (buf[i] == Ctl ('G')) - >+ break; - >+ } - >+ - >+ /* reestablish interrupt */ - >+ signal (SIGALRM, empty_socket_interrupt); - >+ alarm (1); - >+ - >+ errno = old_errno; - >+ } - >+ - >+ #endif /* HPUX */ - >+ - > /* read a character from the keyboard; call the redisplay if needed */ - > /* commandflag 0 means do not do auto-saving, but do do redisplay. - > -1 means do not do redisplay, but do do autosaving. - >*************** - >*** 733,738 **** - >--- 782,794 ---- - > Lisp_Object tem; - > extern request_echo (); - > - >+ #ifdef HPUX - >+ if (socket_alarm) { - >+ alarm (0); - >+ socket_alarm = 0; - >+ } - >+ #endif - >+ - > if ((c = unread_command_char) >= 0) - > { - > unread_command_char = -1; - >*************** - >*** 869,874 **** - >--- 925,938 ---- - > } - > } - > - >+ #ifdef HPUX - >+ if (read_socket_hook) { - >+ socket_alarm = 1; - >+ signal (SIGALRM, empty_socket_interrupt); - >+ alarm (1); - >+ } - >+ #endif - >+ - > return c; - > } - > - >*************** - >*** 1094,1119 **** - > - > #else /* no FIONREAD */ - > #ifdef USG - > if (kbd_count) - > abort (); - > - > fcntl (fileno (stdin), F_SETFL, O_NDELAY); - >! kbd_ptr = kbd_buffer; - > if (read_socket_hook) - >! { - >! kbd_count = (*read_socket_hook) (0, kbd_buffer, sizeof kbd_buffer); - >! } - > else - >! { - >! kbd_count = read (fileno (stdin), kbd_buffer, sizeof kbd_buffer); - >! } - > #ifdef EBADSLT - >! if (kbd_count == -1 && (errno == EAGAIN || errno == EBADSLT)) - > #else - >! if (kbd_count == -1 && errno == EAGAIN) - > #endif - >! kbd_count = 0; - > fcntl (fileno (stdin), F_SETFL, 0); - > #else /* not USG */ - > you lose - > #endif /* not USG */ - >--- 1158,1209 ---- - > - > #else /* no FIONREAD */ - > #ifdef USG - >+ char buf[256 * BUFFER_SIZE_FACTOR]; - >+ register int i; - >+ #ifdef HPUX - >+ int mask; - >+ #endif - >+ - > if (kbd_count) - > abort (); - > - >+ #ifdef HPUX - >+ if (socket_alarm) - >+ mask = sigblock (sigmask (SIGALRM)); - >+ #endif - >+ - > fcntl (fileno (stdin), F_SETFL, O_NDELAY); - >! - >! /* Read what is waiting. */ - > if (read_socket_hook) - >! nread = (*read_socket_hook) (0, buf, sizeof buf); - > else - >! nread = read (fileno(stdin), buf, sizeof buf); - > #ifdef EBADSLT - >! if (nread == -1 && (errno == EAGAIN || errno == EBADSLT)) - > #else - >! if (nread == -1 && errno == EAGAIN) - > #endif - >! nread = 0; - >! - > fcntl (fileno (stdin), F_SETFL, 0); - >+ - >+ /* Scan the chars for C-g and store them in kbd_buffer. */ - >+ kbd_ptr = kbd_buffer; - >+ for (i = 0; i < nread; i++) - >+ { - >+ kbd_buffer_store_char (buf[i]); - >+ /* Don't look at input that follows a C-g too closely. - >+ This reduces lossage due to autorepeat on C-g. */ - >+ if (buf[i] == Ctl ('G')) - >+ break; - >+ } - >+ - >+ #ifdef HPUX - >+ if (socket_alarm) - >+ sigsetmask(mask); - >+ #endif - >+ - > #else /* not USG */ - > you lose - > #endif /* not USG */ - - >*** x11term.h~ Fri Sep 15 15:20:26 1989 - >--- x11term.h Thu Apr 26 14:03:25 1990 - >*************** - >*** 11,17 **** - >--- 11,22 ---- - > #define sigmask(no) (1L << ((no) - 1)) - > #endif - > - >+ #ifdef HPUX - > #define BLOCK_INPUT_DECLARE() int BLOCK_INPUT_mask - >+ #define BLOCK_INPUT() BLOCK_INPUT_mask = sigblock (sigmask (SIGALRM)) - >+ #define UNBLOCK_INPUT() sigsetmask (BLOCK_INPUT_mask) - >+ #else /* not HPUX */ - >+ #define BLOCK_INPUT_DECLARE() int BLOCK_INPUT_mask - > #ifdef SIGIO - > #define BLOCK_INPUT() BLOCK_INPUT_mask = sigblock (sigmask (SIGIO)) - > #define UNBLOCK_INPUT() sigsetmask (BLOCK_INPUT_mask) - >*************** - >*** 19,23 **** - >--- 24,29 ---- - > #define BLOCK_INPUT() - > #define UNBLOCK_INPUT() - > #endif /* SIGIO */ - >+ #endif /* HPUX */ - > - > #define CLASS "emacs" /* class id for GNU Emacs, used in .Xdefaults, etc. */ - - >*** process.c.orig Fri Sep 15 16:28:36 1989 - >--- process.c Fri Apr 20 13:17:06 1990 - >*************** - >*** 1057,1062 **** - >--- 1057,1079 ---- - > signal (SIGHUP, SIG_DFL); - > #endif - > #endif /* HAVE_PTYS */ - >+ - >+ /* Give child clean slate for signals */ - >+ #ifdef SIGCHLD - >+ #ifdef BSD4_1 - >+ sigrelse (SIGCHLD); - >+ #else /* not BSD4_1 */ - >+ #ifdef HPUX - >+ sigsetmask (0); - >+ #endif /* HPUX */ - >+ #if defined (BSD) || defined (UNIPLUS) - >+ sigsetmask (0); - >+ #else /* ordinary USG */ - >+ signal (SIGCHLD, sigchld); - >+ #endif /* ordinary USG */ - >+ #endif /* not BSD4_1 */ - >+ #endif /* SIGCHLD */ - >+ - > child_setup_tty (xforkout); - > child_setup (xforkin, xforkout, xforkout, new_argv, env); - > } - >*************** - >*** 1413,1427 **** - > if (read_kbd && kbd_count) - > nfds = 0; - > else - >! #ifdef IBMRTAIX - > nfds = select (MAXDESC, &Available, 0, 0, &timeout); - > #else - >- #ifdef HPUX - >- nfds = select (MAXDESC, &Available, 0, 0, &timeout); - >- #else - > nfds = select (MAXDESC, &Available, 0, &Exception, &timeout); - > #endif - >- #endif - > xerrno = errno; - > - > if (fix_screen_hook) - >--- 1430,1440 ---- - > if (read_kbd && kbd_count) - > nfds = 0; - > else - >! #if defined (IBMRTAIX) || defined (HPUX) - > nfds = select (MAXDESC, &Available, 0, 0, &timeout); - > #else - > nfds = select (MAXDESC, &Available, 0, &Exception, &timeout); - > #endif - > xerrno = errno; - > - > if (fix_screen_hook) - >*************** - >*** 1771,1776 **** - >--- 1784,1790 ---- - > error ("Process %s is not active", - > XSTRING (p->name)->data); - > - >+ #ifndef HPUX /* Can't get gid of tty's controlling session */ - > #ifdef TIOCGPGRP /* Not sure about this! (fnf) */ - > /* If we are using pgrps, get a pgrp number and make it negative. */ - > if (!NULL (current_group)) - >*************** - >*** 1785,1790 **** - >--- 1799,1805 ---- - > the child itself heads the pgrp. */ - > gid = - XFASTINT (p->pid); - > #endif /* not using pgrps */ - >+ #endif /* not HPUX */ - > - > switch (signo) - > { - >*************** - >*** 1800,1805 **** - >--- 1815,1827 ---- - > flush_pending_output (XFASTINT (p->infd)); - > break; - > } - >+ - >+ #ifdef HPUX - >+ if (!NULL (current_group)) - >+ ioctl (XFASTINT (p->infd), TIOCSIGSEND, signo); - >+ else - >+ kill (XFASTINT (p->pid), signo); - >+ #else /* not HPUX */ - > /* gid may be a pid, or minus a pgrp's number */ - > #ifdef BSD - > /* On bsd, [man says] kill does not accept a negative number to kill a pgrp. - >*************** - >*** 1808,1813 **** - >--- 1830,1836 ---- - > #else /* Not BSD. */ - > kill (gid, signo); - > #endif /* Not BSD. */ - >+ #endif /* Not HPUX */ - > - > /* Put notices in buffers now, since it is safe now. - > Because of this, we know that a process we have just killed - >% - - This is a separate patch to process.c, distinct from the immediately - preceding one. Both should be applied. - - >*** process.c.~1~ Fri Apr 20 13:17:06 1990 - >--- process.c Wed Oct 24 16:38:15 1990 - >*************** - >*** 1085,1095 **** - > /* If the subfork execv fails, and it exits, - > this close hangs. I don't know why. - > So have an interrupt jar it loose. */ - >! signal (SIGALRM, create_process_1); - >! alarm (1); - >! if (forkin >= 0) - >! close (forkin); - >! alarm (0); - > if (forkin != forkout && forkout >= 0) - > close (forkout); - > - >--- 1085,1100 ---- - > /* If the subfork execv fails, and it exits, - > this close hangs. I don't know why. - > So have an interrupt jar it loose. */ - >! - >! { int old_trap = signal (SIGALRM, create_process_1); - >! int old_alarm = alarm (1); - >! if (forkin >= 0) - >! close (forkin); - >! alarm (0); - >! signal (SIGALRM, old_trap); - >! /* don't bother with possible 1 sec loss */ - >! if (old_alarm) alarm (old_alarm); - >! } - > if (forkin != forkout && forkout >= 0) - > close (forkout); - -52: What should I do if I have trouble building Emacs? - - RMS writes: - - If you try to build Emacs and it does not run, the first thing to do is - look in the file called PROBLEMS to see if a solution is given there. - - If none is given, then please send a report by mail to - bug-gnu-emacs@prep.ai.mit.edu. Please do not send it to - help-gnu-emacs@prep.ai.mit.edu. - - Sending 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. + Some of the code that is being linked on the "ld" line of emacs' build + command has been compiled with the -f68881 option. Most common reason + is that you're linking with X libraries which were built with -f68881 + option set. You need to either remove all dependencies to the 68881 + (may mean a recompile of the X libraries with -fswitch or -fsoft + option), or you need to link emacs with the 68881 startup file + /usr/lib/Mcrt1.o. Make this change to src/ymakefile: + + change: #define START_FILES crt0.o + to: #define START_FILES crt0.o /usr/lib/Mcrt1.o + + The order of these start files is critical. + +71: Why does Emacs ignore my X resources (my .Xdefaults file)? + + * Try compiling Emacs with the XBACKWARDS macro defined. There is a bug + in some implementations of XGetDefault, which do not correspond to the + documentation or the header files. + + * Make sure you are either using the class name of `Emacs' or the correct + instance name. The instance name is normally the same as the name of + the file Emacs is in (ie., the last part of argv[0]), but this can be + overridden by -rn command line option or the WM_RES_NAME environment + variable. + + WARNING: The advice the man page gives to use `emacs' is often wrong. + + WARNING: Older versions of Emacs got the class name wrong. + + * Emacs currently ignores the -xrm command line argument. ! + + * Emacs does not yet handle X11R5 screen-specific resources. + + * Emacs has a bug where it ignores color specifications if running on a + 1-bit display (ie. a non-color display). + +72: How do I get Emacs to compile with all features under OpenWindows? + + Problems fixed in 18.58: the reference to include file <X11/X10.h>, ! + linking with the OpenWindows libX11.a. ! + + If libX11.a is missing, you may need to use `add_services' to add the + + `OpenWindows Programmers' optional software category from the CD-ROM. To + + get the Xmenu stuff to work, you need to find a copy of MIT's liboldX.a. + + Questions for the net {please send me answers!}: + + * Are compiled versions of liboldX.A for Sun 4s running SunOS 4.* + available for FTP anywhere? + * What is the solution to the "not a sun window" problem with xvetool? - + +73: How do I build Emacs under HP-UX 8.0? + + Problems fixed in 18.58: missing errnet.h, "Cannot do arithmetic with ! + pointers to objects of unknown size" (void *), not finding -lX11, unexec ! + making a bad dumped emacs due to shared libraries ("Fatal Error(11)- ! + Segmentation Fault", I think). ! + ! + If libX11.a is missing, 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. ! + +74: What should I do if I have trouble building Emacs? + + First look in the file etc/PROBLEMS 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 23. + + -Weird/Confusing Problems: + +Weird/Confusing Problems - -53: Does Emacs have problems with files larger than 8 Megs? - - 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 8388608 bytes. - - Leonard N. Zubkoff <lnz@lucid.com> writes: - - Putting the following two lines in src/config.h before compiling Emacs - allows for 26 bit integers and pointers: +75: Does Emacs have problems with files larger than 8 megabytes? + + 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 - See question 54 for an explanation. - -54: Why does Emacs use 24 bit integers and pointers? - - David Gillespie <daveg@csvax.cs.caltech.edu> writes: - - 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. See - question 53 to find how to recompile Emacs with 6-bit tags and - 26-bit integers and pointers if space is at a premium for you. - -55: Why does Emacs start up using the wrong directory? + WARNING: This method may result in `ILLEGAL DATATYPE' 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. - + +76: Why does Emacs start up using the wrong directory? Most likely, you have an environment variable named PWD that is set to a value other than the name of your current directory. This is most @@ -1687,132 +2456,118 @@ versions of) "csh" set and maintain the value of the PWD environment variable, but "sh" doesn't. If you start sh from ksh, change your current directory inside sh, and then start Emacs from inside sh, PWD - will have the wrong value but Emacs will use this value. See question - 72. - -56: How do I edit a file with a "$" in its name? + will have the wrong value but Emacs will use this value. See the + etc/OPTIONS file for more details. + + Perhaps an easier solution is not to use two shells. The "chsh" program + can often be used to change one's default login shell. + +77: 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. -57: 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. So it tries to guess by recognizing cd commands. A number - of fixes and enhancements to Shell Mode have been written, check the - Emacs Lisp Archive (question 14). - -58: Why doesn't Emacs expand my aliases when sending mail? - - First, you must separate multiple addresses with commas. - - 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. - -59: Why doesn't setting default-directory always work? - - There is a separate value of default-directory for each Emacs buffer. - The value in the current buffer is the one that is used. - -60: Why does my change to load-path not work? - - If you added file names with tildes (~) in them to your load-path, - you'll need to do something like this: - - (setq-default load-path (mapcar 'expand-file-name load-path)) - -61: Why does the cursor always go to the wrong column when I move up or +78: 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 17). + +79: 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. + + +80: Why doesn't my change to load-path work? + + If you added a directory name containing a tilde (~) to your load-path, + expecting the tilde to be interpreted as your home directory, then you + need to do something like this: + + (setq load-path (mapcar 'expand-file-name load-path)) + +81: Why does the cursor always go to the wrong column when I move up or down one line? You have inadvertently typed "C-x C-n" (set-goal-column) which sets the "goal-column" to the column where the cursor was. To undo this type "C-u C-x C-n". - If you make this mistake frequently, you might want to unbind this - command by doing (define-key ctl-x-map "\C-n" nil). - -62: Why don't the command line switches documented in the man page work? - - The "man page", ie. the file etc/emacs.1, hasn't been updated in a - while. The command line switches that it says work with X Windows are - for X10. See question 72 for details on what switches are - available using X11. {Would someone like to rewrite the man page? RMS - asked me and I haven't had time yet.} - -63: Why does gnus-Subject-mail-reply chop off the last character of the - article headers? - - There is a bug in some rnews functions that GNUS uses. Here is a patch: - - (Patch supplied by Karl Kleinpaste <karl_kleinpaste@cis.ohio-state.edu>.) - - >*** rnewspost.el.orig Thu Oct 5 10:32:47 1989 - >--- rnewspost.el Thu Oct 5 10:32:47 1989 - >*************** - >*** 252,258 **** - > (save-restriction - > (narrow-to-region (point-min) (progn (goto-line (point-min)) - > (search-forward "\n\n") - >! (- (point) 2))) - > (setq from (mail-fetch-field "from") - > subject (mail-fetch-field "subject") - > reply-to (mail-fetch-field "reply-to") - >--- 252,258 ---- - > (save-restriction - > (narrow-to-region (point-min) (progn (goto-line (point-min)) - > (search-forward "\n\n") - >! (- (point) 1))) - > (setq from (mail-fetch-field "from") - > subject (mail-fetch-field "subject") - > reply-to (mail-fetch-field "reply-to") - >*************** - >*** 289,295 **** - > ;@@ but rnews.el lacks support - > (narrow-to-region (point-min) (progn (goto-char (point-min)) - > (search-forward "\n\n") - >! (- (point) 2))))) - > (setq from (mail-fetch-field "from") - > news-reply-yank-from from - > ;; @@ not handling old Title: field - >--- 289,295 ---- - > ;@@ but rnews.el lacks support - > (narrow-to-region (point-min) (progn (goto-char (point-min)) - > (search-forward "\n\n") - >! (- (point) 1))))) - > (setq from (mail-fetch-field "from") - > news-reply-yank-from from - > ;; @@ not handling old Title: field - >*************** - >*** 365,371 **** - > ;@@ but rnews.el lacks support - > (narrow-to-region (point-min) (progn (goto-char (point-min)) - > (search-forward "\n\n") - >! (- (point) 2))))) - > (setq news-reply-yank-from (mail-fetch-field "from") - > ;; @@ not handling old Article-I.D.: field - > news-reply-yank-message-id (mail-fetch-field "message-id"))) - >--- 365,371 ---- - > ;@@ but rnews.el lacks support - > (narrow-to-region (point-min) (progn (goto-char (point-min)) - > (search-forward "\n\n") - >! (- (point) 1))))) - > (setq news-reply-yank-from (mail-fetch-field "from") - > ;; @@ not handling old Article-I.D.: field - > news-reply-yank-message-id (mail-fetch-field "message-id"))) - -64: Why does Emacs hang with message "Unknown XMenu" with X11R4? + If you make this mistake frequently, you might want to unbind or disable + this command by doing one of these two: + + (define-key ctl-x-map "\C-n" nil) + (put 'set-goal-column 'disabled t) + +82: Why does Emacs hang with message "Unknown XMenu error" with X11R4? + Many different X errors can produce this message. Here is the solution to one problem: - X11 Release 4 now enforces some conditions in the X protocol that were - previously allowed to pass unnoticed. You need to put the X11R4 server - into X11R3 bug compatibility mode for Emacs's Xmenu code to work. You - can do this with the command "xset bc". - -65: Why isn't the load average displayed by display-time? + X11 Release 4 (and later, including OpenWindows) enforces some conditions ! + in the X protocol that were previously allowed to pass unnoticed. You + need to put the X11R4 server into X11R3 bug compatibility mode for Emacs's + Xmenu code to work. You can do this with the command "xset bc". + +83: Why doesn't display-time show the load average in the mode line + anymore? + + In GNU Emacs 18.56, a change was made in the display-time code. + Formerly, in version 18.55, Emacs used a program named "loadst" to + notify Emacs of the change in time every minute. loadst also sent Emacs + the system load average if it was installed with sufficient privilege to + get that information (or was on a system where no such privilege was + needed). Emacs then displayed this information in the mode line. + + In version 18.56, this code was changed to use a program named "wakeup". + wakeup doesn't send Emacs any information, it's only purpose is to send + Emacs *something* every minute, thus invoking the filter function in + Emacs once a minute. The filter function in Emacs does all the work of + finding the time, date, and load average. However, getting the load + average requires the privilege to read kernel memory on most systems. + Since giving Emacs this privilege would destroy any security a system + might have, for almost everyone this is not an option. In addition, + Emacs does not have the code built into it to get this information on + the systems which have special system calls for this purpose, even + though loadst had code for this. + + The solution I use is to get the files lisp/display-time.el and + etc/loadst.c from version 18.55 and use those with 18.58. (I have heard ! + a rumor that loadst disappeared because of the legal action Unipress + threatened against IBM.) + + WARNING: Do not install Emacs setgid kmem unless you wish to destroy + any security your system might have!!!!!!!!!! + + If you are using Emacs 18.55 or earlier, or already using the solution I + describe above, read further: The most likely cause of the problem is that "loadst" can't read the special file /dev/kmem. To properly install loadst, it should be either @@ -1823,83 +2578,188 @@ Another possibility is that your version of Unix doesn't have the load average data available in /dev/kmem. Your version of Unix might have a special system call to retrieve this information (eg., inq_stats under - UMAX). - -66: Why doesn't GNUS work anymore via NNTP? + UMAX), and loadst might not have been enhanced to cope with this. + +84: Why doesn't GNUS work anymore 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. + 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) - (setq nntp-buggy-select t) - - Or you could fix the NNTP server in one of these ways: - - 1. Test whether there is data in stdin's stdio buffer before calling - "select" using something like "((fileptr)->_cnt > 0)". Best choice. - 2. Remove call to select by not defining "TIMEOUT" in "common/conf.h". - 3. Put "setbuf (stdin, NULL)" in the NNTP server in the right spot. - This would be very inefficient. - 4. Rewrite the server to use an alarm instead of "select". - -67: Why can't I paste a selection I made in Emacs into my xterm window? - - A person whose name I lost writes: - - The strange interaction between Emacs, xterm, and the cut buffers is - because most xterm clients use selections instead of (well, superceding) - cut buffers. If there is a selection around, xterms will use that - instead of the cut buffer. Emacs doesn't know about selections, but you - can convince xterm to always use the cut buffer instead of selections by - adding this to your .Xdefaults: - - ! Solution by Thomas Narten, should work under X11R3 and later - ! GNU Emacs only copies to CUT_BUFFER0. xterm by default wants to paste - ! from the PRIMARY selection. - XTerm*VT100.Translations: #override \ - ~Meta <Btn2Up>: insert-selection(CUT_BUFFER0) - - -68: Why does ispell sometimes ignore the local dictionary? - - You need to update the version of ispell to 2.0.02. A patch is - available via: - - Anonymous FTP: - site: tut.cis.ohio-state.edu - file: /pub/gnu/ispell/patch2.Z + + I also have a patch for NNTP 1.5.10 by Mike Pelletier + <stealth@engin.umich.edu> that is based on the timeout code that was in + 1.5.9. However, please try to upgrade to 1.5.11 first. + + 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 (ie., + `telnet server-machine 119'). The server should give its version number + in the welcome message. Type `quit' to get out. + +85: Why does ispell sometimes ignore the local dictionary? + + You need to update the version of ispell to 2.0.02. (Or you can switch to + version 3.0 which is still in beta-testing.) A patch is available via + anonymous FTP (archive.cis.ohio-state.edu: /pub/gnu/ispell/patch2.Z). You also need to change a line in ispell.el from: - (defconst ispell-version "2.0.01") ;; Check against output of "ispell -v". + (defconst ispell-version "2.0.01") ; Check against output of "ispell -v". to: - (defconst ispell-version "2.0.02") ;; Check against output of "ispell -v". + (defconst ispell-version "2.0.02") ; Check against output of "ispell -v". + +86: How do I get rid of the ^M junk in my Shell buffer? + + 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.) + +87: Are there any security risks in GNU Emacs? + + 1. the `movemail' incident (No, this is not a risk.) + + Cliff Stoll in his book "The Cuckoo's Egg" describes this in chapter 4. + The site at LBL had installed the `etc/movemail' program setuid root. + Since `movemail' had not been designed for this situation, a security + hole was created and users could get root priveleges. + + `movemail' has since been changed so that even if it is installed + setuid root this security hole will not be a result. + + I have heard reports that the Internet worm took advantage of this + configuration problem. + + 2. 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. + + However, 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. It is reasonable + 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. + +88: How do I recover my mail files after RMAIL munges their format? + + Users who just want to try RMAIL out to see how it works end up trapped + using it because saved mail in their `mbox' file has been converted into ! + an incompatible format (BABYL) that only RMAIL understands. RMAIL + provides no obvious way to reverse this transformation. To convert a mail + file back to standard Unix format, there are several methods: + + * Use the rmail-output ("C-o") command within RMAIL on each message in the + file. First use M-x rmail or M-x rmail-input to visit the RMAIL file in + Rmail mode. Type "1 j" to go to the first message. Use the C-o command + to output the message to a Unix format file. Type "n" to go to the next + message. Repeat. + + * If the file contains hundreds of messages, you may not want to repeat + this for all of them. Instead of the above, after getting to the first + message type this (where "mbox" is the file you want to put the messages + in): + + C-x ( C-o mbox RET M-s ^From: RET M-0 C-x ) + + (The rmail-search command ("M-s") is used instead of just "n" because it + is the only command which will cause an error when it reaches the last + message in the file, which is necessary to terminate the keyboard macro. + This will fail if there are messages in the file that don't have a + `From:' header. This assumes rmail-delete-after-output is nil.) + + It is wise to save a copy of the RMAIL file first, in case you make a + mistake. + + * There are software packages available for converting files or even + entire directories of BABYL files to standard Unix format. These are + helpful in this situation, but are intended mainly for people who have + used RMAIL for a long time and are converting to some other mail reader. + Lookup `rmail', `vm', and `babyl' in the Emacs Lisp Archive (see + question 18). + + You may wish to disable RMAIL to avoid accidentally destroying your mbox + file (I have this in my .emacs): + + (put 'rmail 'disabled t) ; avoid mbox destruction + +89: 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. This program should be compiled and installed with + execute permission for everyone in Emacs's program directory, which is + normally /usr/local/emacs/etc. 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". + + See also etc/PROBLEMS for other possible causes of this message. + -Configuring Emacs for yourself: +Configuring Emacs for Yourself - -69: How do I set up a .emacs file properly? - - I'm going to be sending out a sample .emacs file in a separate message - later this month. It will be based largely on AT&T's sample .emacs - file, which was sent to me by Dan Jacobson. In fact it might be - identical. - -70: How do you debug a .emacs file? +90: How do I set up a .emacs file properly? + + See the section of the manual on the .emacs file, inside the section on + customization. To reach this section of the online Info manual, type + this: + + C-h i m emacs RET g init SPC file RET + + 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. :-) + +91: How do you debug a .emacs file? First start Emacs with the "-q" command line option. Then, in the *scratch* buffer, type the following: - (setq debug-on-error t) C-j - (load-file "~/.emacs") C-j - - (C-j stands for Control-J, ie., hold the control key and press J.) + (setq debug-on-error t) LFD + (load-file "~/.emacs") LFD + + (Type LFD by pressing C-j.) If you have an error in your .emacs file, this will invoke the debugger when the error occurs. If you don't know how to use the debugger do @@ -1907,9 +2767,9 @@ WARNING: this will not discover errors caused by trying to do something that requires the terminal/window-system initialization code to have - been loaded. See question 34. - -71: How do I turn on abbrevs by default just in mode XXX? + been loaded. See question 50. + +92: How do I turn on abbrevs by default just in mode XXX? Put this in your .emacs file: @@ -1922,256 +2782,114 @@ (lambda () (setq abbrev-mode t)))) -72: What does Emacs do every time it starts up? - - This question is not itself frequently asked, but helps to answer other - questions. - - Here is a complete explanation of the order in which things are done - during startup. - - 1. These command line switches are handled, only if they appear before - all other command line arguments, and only if they appear in this - order: - - "-map". Only under VMS. Instead of "undumping", under VMS the - contents of a dump file are mapped over a section of memory (very - quickly initializing lots of variables). - - "-t". The next argument is treated as the name of a terminal to use - instead of whatever is connected to the stdin, stdout, and stderr - FILE pointers. - - "-display" (synonym: "-d"). The next argument is treated as the - name of an X Window System server with which to connect. This - overrides the DISPLAY environment variable. - - "-nw". This means don't connect to an X Window server even if the - DISPLAY environment variable was set or the "-display" switch was - specified. Instead, Emacs talks to a regular dumb terminal. - - "-batch". Emacs is noninteractive. The variable "noninteractive" - is t. This disables any full screen interaction either with a - dumb terminal or with a window system. In addition, Emacs will - die after processing all command line arguments. - - All of Emacs's internal data structures are initialized between steps 2 - and 5. - - 2. The "*scratch*" buffer is created and its value of default-directory - is set from the result of calling the "getwd" library routine. - (getwd does what the "pwd" program does.) - - 3. If X11 is being used, Emacs determines the name under which it looks - for X resource values. (I haven't checked how it does this under - X10.) - - 1. If there is a "-rn" command line switch, it is handled now, no - matter where it is on the command line. (Later it will be - processed again and ignored.) The next argument is used as - Emacs's resource name. - - 2. If the "-rn" switch was missing, Emacs looks for the WM_RES_NAME - environment variable. - - 3. If neither of the previous two steps succeed, Emacs uses the - filename with which it was invoked as its resource name. - - 4. If X11 is being used, these command line switches are handled now, - no matter where they appear in the command line. (Under X10, they - are not handled until step 13.) WARNING: this can cause strange - interactions with the processing of the remaining command line - arguments in step 13. - - In addition, under both X11 and X10, X resources (ie. the stuff in - an .Xdefaults file) are handled now. Command line switches take - precedence over resources. - - After each command line switch are given the equivalent resource - names in this format: (X10 name / X11 instance name / X11 class name). - - "-r". Reverse video. (ReverseVideo/reverseVideo/ReverseVideo) - "-font" (synonym: "-fn"). Font. (BodyFont/font/Font) - "-wn". Window name (X11 only). (/title/Title) - "-in". Icon name (X11 only). (/iconName/Title) - "-i". Use built-in icon bitmap. (BitMapIcon//) - - "-b". Border width (in pixels). - (BorderWidth/borderWidth/BorderWidth) - - "-ib". Internal border width (in pixels) (default: 1). - (/internalBorder/BorderWidth) - - "-geometry" (synonym: "-w"). Window shape and size. "-geometry" is - X11 only, but its synonym "-w" was available under X10. - (/geometry/Geometry) - - Color options only: - - "-fg". Foreground color. (Foreground/foreground/Foreground) - "-bg". Background color. (Background/background/Background) - "-bd". Border color. (Border/borderColor/BorderColor) - "-cr". Cursor color. (Cursor/cursorColor/Foreground) - "-ms". Mouse pointer color. (Mouse/pointerColor/Foreground) - - In addition, under X10, the resource "Keymap" was handled now. - - 5. If your Emacs isn't "dumped", the default Lisp libraries are - "loaded" now. - - 6. Emacs enters a "recursive edit". The first time Emacs does a - recursive edit, steps 7 through 15 are followed, and then Emacs - enters its normal editing mode. - - 7. If the environment variable PWD exists, the value of - default-directory in the *scratch* buffer is set to the value of - PWD. This often causes problems and confusion when the value of PWD - doesn't actually contain the pathname of the current directory. - - 8. Now the "-no-init-file" (synonym: "-q") and "-user" (synonym: "-u") - command line switches are handled. They must follow the switches - mentioned in step 1, and must precede any other command line - arguments. Actually, both of these options can be specified; - whichever is last on the command line wins. - - 9. The user's ".emacs" file is loaded now, if the -no-init-file option - was not specified. If the -user option was specified, that user's - .emacs file is loaded instead. A user's .emacs file is a file named - ".emacs" in the user's "home" directory. If no such file exists, - this step has no effect. - - 10. The system wide "default" file is loaded now, if the variable - inhibit-default-init is nil. The user can set this variable in the - .emacs file to skip this step. - - 11. If the *scratch* buffer still exists now, the value of - initial-major-mode is called as a function in this buffer. - Normally, this puts this buffer in Lisp Interaction mode. - - 12. Now the terminal/window-system setup file is loaded. The name of - this file is determined as follows: - - 1. It starts with the value of term-file-prefix. Normally this is - "term/", but the user can set it to another value. If this - variable is nil, this entire step is skipped. - - 2. For a window system, the prefix is followed by the name of the - value of the variable window-system, followed by "-win". For X - Windows, this means the name is "term/x-win". - - 3. For a terminal, the prefix is followed by the value of the - environment variable TERM, for example, "term/vt200". If Emacs - cannot find such a file to load, it retries by stripping off - suffixes that begin with a hyphen. For example, if TERM is - "vt200-40", first Emacs will try "term/vt200-40", and if that - fails it will try "term/vt200". - - 13. The rest of the command line arguments are handled at this point, in - the order they appear: - - "-funcall" (synonyms: "-f", "-e"). The next argument is treated as - the name of a function, which is called with no arguments. - - "-load" (synonym: "-l"). The next argument is treated as the name - of a file to load. NOTE: the value of the variable load-path - will be restored after this file is done loading. Thus, trying - to change load-path in such a file will fail!! - - "-kill". When this argument is handled, Emacs kills itself. - - "+DDD", where D is a digit. DDD is used as a line number to go to. - When the next ordinary file argument on the command line is - handled, Emacs positions point in that file on line DDD. - - An ordinary filename. Emacs edits this file using the function - find-file. If the filename is not an "absolute" filename, it is - expanded relative to the value that default-directory in the - *scratch* buffer had at the beginning of step 11. The buffer - visiting this file becomes the current buffer. - - "-insert" (synonym: "-i"). The next argument is treated as the name - of a file. This file is inserted in the current buffer. - Initially, this is the *scratch* buffer. Otherwise it is the - buffer visiting the file most recently specified on the command - line. WARNING: the synonym "-i" doesn't work under X11. - - Other command line switches may have been created by modifying the - value of the variable command-switch-alist. If X Windows is being - used, all X-specific switches mentioned above in steps 3 and 4 will - be processed. Under X11, they will have already been handled, and - will be ignored now. Under X10, they are being handled for the - first time. - - 14. The values of the variables term-setup-hook and window-setup-hook - are called as functions with no arguments, in the order listed. - - 15. If the user did not specify any of the command line options handled - in step 13, and the variable inhibit-startup-message is still nil, - the familiar Emacs startup message is displayed. - -73: What are the valid X resource settings (ie., stuff in .Xdefaults file)? - - See question 72. - - WARNING: Don't pay any attention to the documentation in etc/XDOC or - etc/emacs.1. It's way out of date. {Would someone like to rewrite it? - RMS asked me and I haven't had time yet.} - -74: How do I turn down the bell volume in Emacs running under X Windows? +93: How do I turn on Auto-Fill mode by default? + + To turn on Auto-Fill mode just once for one buffer, you type "M-x + auto-fill-mode". To turn it on for every buffer in, for example, Text + mode, do this: + + (setq 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) + +94: 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-*- + +95: What are the valid X resource settings (ie., stuff in .Xdefaults file)? + + See the Emacs man page, or the etc/OPTIONS file. Ignore the information + in etc/XDOC which is way out of date. + +96: 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) + +97: How do I turn down the bell volume in Emacs running under X Windows? Under Epoch you can do: (setq epoch::bell-volume 20) Under normal GNU Emacs you must modify the XTfeep function in - src/x11term.c, and change the number 50 to some other number: - - XTfeep () - { - BLOCK_INPUT_DECLARE (); - #ifdef XDEBUG - fprintf (stderr, "XTfeep\n"); - #endif - BLOCK_INPUT (); - XBell (XXdisplay,50); /* change this 50 */ - UNBLOCK_INPUT (); - } - -75: How do I make Emacs send 8-bit characters to my terminal? - - Johan Widen <jw@sics.se> writes: - - A patch for emacs-18.55 is available by ftp and mail-server from - sics.se. - - Anonymous FTP: - site: sics.se [192.16.123.90] - file: archive/emacs-18.55-8bit-diff - - E-mail: - To: mail-server@sics.se - body: send emacs-18.55-8bit-diff + src/x11term.c. This simplest fix is to change the number 50 to -50 in the ! + call the XBell. Then "xset b 0" will turn off Emacs's beeping. ! + + Explanation: After "xset b BASE": + + + XBell (disp, VAL) beeps with volume BASE - (BASE*VAL)/100 + VAL, + XBell (disp, -VAL) beeps with volume BASE - (BASE*VAL)/100. + + Stu Grossman <grossman@sunburn.stanford.edu> wrote a patch that allows the + + bell volume to be adjusted from inside Emacs. + + +98: 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 (append load-path '("/XXX/YYY/"))) + + To do this relative to your home directory: + + (setq load-path (append load-path (list (expand-file-name "~/YYY/")))) + +99: How do I change the included text prefix in mail/news followups? + + Many people want Emacs to prefix included text with something like " > " ! + instead of with three spaces. One way is to change the code of the ! + function `mail-yank-original' in lisp/sendmail.el that prefixes with ! + spaces. A more flexible solution is to use SuperCite, which provides wide ! + configurability in how you format included text in replies. See question + 21. Both of these solutions work for Rmail and GNUS. ! + ! + 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. ! -Emacs Lisp programming: +Emacs Lisp Programming - -76: What dialect of Lisp is Emacs Lisp? - - It's the dialect of Lisp called Emacs Lisp. (No joke!) People also - call it elisp or e-lisp. (NOTE: The term "Elisp" is trademarked by - someone else.) - -77: How close is Emacs Lisp to Common Lisp? - - Pretty far. GNU Emacs Lisp is case-sensitive, uses dynamic scoping, - doesn't have packages, doesn't have multiple return values, doesn't have - reader macros, etc. For people used to Common Lisp, some of the +100: What dialect of Lisp is Emacs Lisp? + + Quite simply, it is the dialect of Lisp called GNU Emacs Lisp. People ! + also call it elisp or e-lisp. (NOTE: The term "Elisp" is trademarked by + someone else. {I believe it is by Uniworks Inc., the sellers of CCA ! + Emacs.}) ! + +101: How close is Emacs Lisp to Common Lisp? + + They are not close. GNU Emacs Lisp is case-sensitive, uses dynamic + scoping, doesn't have packages, doesn't have multiple return values, + doesn't have reader macros, doesn't have rational, floating point, or + arbitrary size numbers, etc. For people used to Common Lisp, some of the functions in Common Lisp that are not in Emacs Lisp by default are provided in the file lisp/cl.el. There is a Texinfo manual describing these functions in man/cl.texinfo. -78: How do I execute a piece of Emacs Lisp code? +102: How do I execute a piece of Emacs Lisp code? There are a number of ways to execute (called "evaluate") an Emacs Lisp "form": @@ -2179,9 +2897,9 @@ * 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 C-j - after it. The result of evaluating the form will be inserted in the - buffer. + * 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 in Emacs-Lisp mode, typing M-C-x evaluates a top-level form before or around point. @@ -2195,94 +2913,167 @@ * 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.) -79: How do I make a set of operations fully local to a region? + These functions are also used for evaluating Lisp forms: + + load-library, eval-region, eval-current-buffer, require, autoload + +103: How do I make a set of operations work only within a region? ! Use narrow-to-region inside of save-restriction. -80: How can I highlight a region? - - There are ways to get highlighting in GNU Emacs 18.55, but they all - require patching the C code of Emacs and rebuilding. They are also slow - and the highlighting disappears if you scroll or redraw the screen. One - patch is by Kenichi Handa <handa@etl.go.jp>. - - You can hightlight regions in a variety of ways in Epoch. GNU Emacs 19 +104: How can I highlight text in Emacs? + + There are ways to get highlighting (reverse video) in GNU Emacs 18.58, but ! + either they require patching the C code of Emacs and rebuilding, or they + are slow and the highlighting disappears if you scroll or redraw the + screen and it can not follow the point. Howard Gayle's patches for 8-bit ! + output appear to allow highlighting (see question 43). Another ! + patch for highlighting is by Kenichi Handa <handa@etl.go.jp>. There is a ! + patch for use with X by Andy Norman <ange@hplb.hpl.hp.com> (and modified + + for 18.57 by Matthieu Herrb <matthieu@laas.fr>), which is available for + + FTP (laas.laas.fr:pub/emacs/patch-X11-18.5{5,7}). + + + You can highlight regions in a variety of ways in Epoch. GNU Emacs 19 will have everything you need, but won't be out soon. -81: How do I change Emacs's idea of the tab character's length? + Similar comments apply to displaying text in different fonts, except that + + it is even harder. + + +105: How do I change Emacs's idea of the tab character's length? Example: (setq default-tab-width 10). -82: What is the difference between (interactive "P") and (interactive "p")? - - The value that is a result of "P" can be a list, a symbol, or an - integer; the value that is a result of "p" is always an integer: - - Prefix keys typed result of: "P" "p" - nothing nil 1 - "M-1" 1 1 - "C-u 1" 1 1 - "M--" '- -1 - "C-u -" '- -1 - "C-u" (4) 4 - "C-u C-u" (16) 16 - -Carrying Out Common Tasks: +Carrying Out Common Tasks - -83: How do I insert ">"'s in the beginning of every line in a buffer? +106: How do I insert ">"'s in the beginning of every line in a buffer? Type "M-x replace-regexp RET ^ RET > RET". ("replace-regexp" can be shortened to "repl TAB r".) To do this only in the region, type "C-x n M-x replace-regexp RET ^ RET - > RET C-x w". (You're going to remember that, right?) - -84: How do I insert "_^H" characters before each character in a - paragraph to get an underlined paragraph? + > RET C-x w". - + + WARNING: The command narrow-to-region (C-x n) is disabled by default + because it can be very confusing (ie., "Oh no! Where did my file go?"). + +107: How do I insert "_^H" characters before each character in a paragraph + to get an underlined paragraph? M-x underline-region. -85: How do I repeat a command as many times as possible? - - 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 +108: 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. -86: How do I search for an unprintable (8-bit) character that appears - in a buffer as \237? - - C-s C-q 2 3 7 - - (This assumes the value of search-quote-char is 17 (C-q).) - -87: How do I tell Emacs to automatically indent a new line to the +109: How do I search for or delete 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 (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 (\t, \n, \r, \f) as an + interactive argument to isearch-forward-regexp or re-search-forward, you + need to use C-q. + + 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 a replace-regexp: + + M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET RET + + Notes: + + * With isearch, you can type RET to get a quoted LFD (not a quoted RET). + + * You don't need to quote TAB with either isearch or typing something in + the minibuffer. + + Here are the Emacs Lisp forms of the above regexps: + + ;; regexp matching all printable characters: + "[\t\n\r\f -~]" + + ;; regexp matching all unprintable characters: + "[^\t\n\r\f -~]" + + ;; alternative regexps for all unprintable characters: + "[\C-@-\C-h\C-k\C-n-\C-_\C-?-\377]" + "[\000-\010\013\016-\037\177-\377]" + + (To use "[\000-\010\013\016-\037\177-\377]" interactively, type: + + [ C-q 000 - C-q 010 C-q 013 C-q 016 - C-q 037 C-q 177 - C-q 377 ] + + ) + +110: 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: + + + + (setq XXX-mode-hook + + (function + + (lambda () + + (setq case-fold-search nil)))) + + +111: How do I tell Emacs to automatically indent a new line to the indentation of the previous line? - M-x indented-text-mode. (This is a major mode.) - - If you have auto-fill mode on (minor mode), 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. - -88: How do I make Emacs "typeover" or "overwrite" when I type instead of - always inserting? - - M-x overwrite-mode (minor mode). - - WARNING: delete-backward-char (usually the delete key) doesn't work - properly in overwrite mode. It deletes the character to the left, - rather than replacing it with a space. - -89: How do I show which parenthesis matches the one I'm looking at? + One solution is the major mode Indented Text Mode (M-x indented-tex-mode). + + If you have Auto-Fill mode on (a minor mode, see question 93), + 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. + +112: How do I make Emacs "typeover" or "overwrite" instead of inserting? - + + M-x overwrite-mode (a minor mode). + +113: How do I show which parenthesis matches the one I'm looking at? If you're looking at a right parenthesis (or brace or bracket) you can - delete it and reinsert it. + 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 balanced parentheses, so you can see which parentheses match. (You can train it @@ -2293,48 +3084,47 @@ parenthese, like in vi. In addition, if the cursor isn't over a parenthese, it simply inserts a % like normal. - (By an unknown contributor.) + ;; 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 "[([{]") (forward-sexp 1) (backward-char)) - ((looking-at "[])}]") (forward-char) (backward-sexp 1)) + (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))))) -90: How do I make Emacs behave like this: when I go up or down, the cursor +114: 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 ...) -91: How do I read news under Emacs? - - There are at least three news reading packages that operate inside - Emacs. "rnews" comes with Emacs. "GNUS" and "Gnews" come separately. - - {I've never used rnews; could someone write a description? BTW, rnews - will be replaced with GNUS in Emacs 19.} - - Both GNUS and Gnews handle reading news over NNTP. I think both can - also read from a local news spool. GNUS also supports reading mail - stored in MH folders or articles saved by GNUS. - - GNUS is written (mostly) by Masanobu Umeda. His (?) latest e-mail - address was umerin@tc.nagasaki.go.jp, but I don't think he has an e-mail - address right now. The latest version is GNUS 3.13. There is a - newsgroup for discussion of GNUS called gnu.emacs.gnus. This newsgroup - is gatewayed with the mailing list info-gnus-english to subscribe send - mail to info-gnus-english-request@cis.ohio-state.edu. There is also a - mailing list called info-gnus, which includes discussion in Japanese. - - Gnews was written by Matthew Wiener <e-mail address?>. {Could someone - tell me the # of the latest version, and how long it has been since - anyone has heard from Matthew?}. There is a newsgroup for Gnews called +115: How do I read news under Emacs? + + There are at least three news reading packages that operate inside Emacs. + "rnews" comes with Emacs. "GNUS" and "Gnews" come separately. rnews will + be replaced by GNUS in Emacs 19. + + rnews works only with a local news spool directory. Both GNUS and Gnews + handle reading news remotely via NNTP in addition to reading from a local + news spool. GNUS supports reading mail stored in MH folders or articles + saved by GNUS. + + Gnews is styled after `rn' and seems to work like Rmail. GNUS feels more + like VM. People have complained that GNUS uses a lot of CPU time (it + does). Some people have complained that Gnews is slower than GNUS. + + For more information about GNUS, see question 21. + + Gnews was written by Matthew P. Wiener <weemba@libra.wistar.upenn.edu>. + The latest version seems to be 2.0, posted October 3, 1988. Matthew + posted some fixes on October 26, 1988. Gnews does not appear to have been + supported after this date. In particular, it has been reported that Gnews + does not work with Emacs 18.57. There is a newsgroup for Gnews called gnu.emacs.gnews. -92: In C mode, can I show just the lines that will be left after #ifdef +116: 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.) @@ -2344,7 +3134,9 @@ (autoload 'hide-ifdef-mode "hideif" nil t) -93: Is there an equivalent to the "." (dot) command of vi? + {Yes, I know, this should be in lisp/loaddefs.el already.} + +117: Is there an equivalent to the "." (dot) command of vi? ("." is the redo command in vi. It redoes the last insertion/deletion.) @@ -2357,44 +3149,136 @@ To repeat something on each line I recommend using keyboard macros. -94: How do I use emacstool under SunView? - - The file etc/SUN-SUPPORT includes the document "Using Emacstool with GNU - Emacs". Also read the man page for emacstool (etc/emacstool.1). - -95: How do I get Emacs to display the current line number on the mode line? - - There is no "correct" way to constantly display the current line number - on the mode line in Emacs 18. Emacs is not a line-oriented editor, and - really has no idea what "lines" of the buffer are displayed in the - window. It would require a lot of work at the C code level to make - Emacs keep track of this. - - Emacs 19 will probably be able to do this, but probably not with great - efficiency. +118: 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". Typing "C-x l" 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. WARNING: "C-x l" gives the wrong value when point is at the - beginning of a line. - - People have written various kludges to display the current line number - on the mode line. Look in the Lisp Code Directory. (See question 13.) - -96: How do I tell Emacs to iconify itself? + what-line". Use "M-x goto-line" to go to a specific line. To find the + + current column number, type "M-ESC (current-column)". + + + Typing "C-x l" 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. WARNING: + "C-x l" gives the wrong value when point is at the beginning of a line. + + There is no "correct" way to constantly display the current line (or ! + column) number on the mode line in Emacs 18, or to display the line + + numbers next to the lines. Emacs is not a line-oriented editor, and + + really has no idea what "lines" of the buffer are displayed in the window. + + It would require a lot of work at the C code level to make Emacs keep + + track of this. It would not be that hard to get the column number, but it + + would still require changes at the C code level. + + + + vi emulation mode does not emulate this capability of vi (as far as I + + know). + + + + Emacs 19 will probably be able to show the line number on the mode-line, + + but probably very inefficiently. + + + + People have written various kludges to display line numbers. Look in the + + Lisp Code Directory. (See question 17.) + +119: How do I tell Emacs to iconify itself? You need to modify C source and recompile. Either that or get Epoch - instead. For the interested I have a patch to allow Emacs to iconify - itself. - -97: How do I use regexps (regular expressions) in Emacs? + instead. For the interested I have a patch by Robert Forsman + <thoth@reef.cis.ufl.edu> to allow Emacs to iconify itself and a patch by + Matt Wette <mwette@mr-ed.jpl.nasa.gov> to allow Emacs to start up + iconified. I don't know whether these two patches work together. + + {Are either of these two patches available via anonymous FTP anywhere?} + +120: How do I use regexps (regular expressions) in Emacs? This is documented in the Emacs manual. To read the manual section online, type "C-h i m emacs RET m regexps RET". + 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, unless Newline is mentioned as one of the - characters not to match. + ([^...]) 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 (eg. `\sw') are not meaningful + + inside character set regexps (eg. `[aeiou]'). (This is typical for regexp + + syntax.) + + +121: 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. To read the relevant online manual section, type "C-h i m + emacs RET m tags RET m tags search RET". + + 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,global-replace,query}.el.Z). + +122: How do I make Emacs wrap words for me? + + M-x auto-fill-mode. The default maximum line width is 74, determined by + the variable fill-column. To find how to turn this on automatically see + question 93. + +123: Where can I get a better spelling checker for Emacs? + + Use Ispell. See question 21. + +124: How can I spell-check TeX or *roff documents? + + If you want to spell-check TeX or *roff documents with Ispell, you need to ! + arrange for a filter program that understands how to strip TeX or *roff ! + formatting commands to be run. In the TeX distribution, there are several ! + different programs named `detex', all with incompatible options, and a ! + very old pair of programs named `detex' and `delatex', which should ! + probably be avoided. The most useful one for Ispell is `detex' by Daniel ! + Trinkle. A more recent version is available via FTP + + (arthur.cs.purdue.edu: pub/trinkle/detex-2.3.tar.Z). Raphael Cerf ! + <cerf@clipper.ens.fr> recently released a program named `xetal' ! + (spi.ens.fr:pub/unix/tex/???). There is a program that comes with Unix ! + named `deroff' for stripping formatting commands from *roff files. ! + ! + Here is an example of code you can put in a .emacs file to use these ! + programs: ! + ! + ;; Based on suggestions by David G. Grubbs <dgg@ksr.com> and Paul Palmer ! + ;; <palmerp@math.orst.edu>. ! + ! + ;; Assuming the use of detex 2.3 by Daniel Trinkle: ! + ;; -w means one word per line. ! + ;; -n means don't expand \input or \include commands. ! + ;; -l means force LaTeX mode. ! + ! + (require 'ispell) ; for the make-variable-buffer-local statements ! + (setq plain-TeX-mode-hook ! + (function ! + (lambda () ! + (setq ispell-filter-hook "detex") + + (setq ispell-filter-hook-args '("-nw"))))) ! + (setq LaTeX-mode-hook ! + (function + (lambda () + (setq ispell-filter-hook "detex") ! + (setq ispell-filter-hook-args '("-lnw"))))) ! + (setq nroff-mode-hook + (function + (lambda () + (setq ispell-filter-hook "deroff") + (setq ispell-filter-hook-args '("-w"))))) + + + + You will have to adjust the arguments for programs other than Trinkle's + + detex or for other versions of deroff. Experiment running the command + + from the shell to find the correct options. If you don't have a filter + + that knows how to output one word per line, you must pipe its output + + through another filter to break up the output. + + +125: How can I make Emacs automatically scroll horizontally? + + Sorry, you can't. The best you can do is rewrite a large number of + commands and make them check if the point is still on the screen after + they are done. {Has someone done this already?}