diff options
| author | Jim Blandy | 1992-03-23 04:01:01 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-03-23 04:01:01 +0000 |
| commit | cecdf47e0e801624490950707a805ce7dbe4b5a6 (patch) | |
| tree | 536d946c2b788eceb571d950b02741499530d90a /etc/FAQ | |
| parent | badb0a976ee93bb9718657782f18dc9aa5bd67f0 (diff) | |
| download | emacs-cecdf47e0e801624490950707a805ce7dbe4b5a6.tar.gz emacs-cecdf47e0e801624490950707a805ce7dbe4b5a6.zip | |
*** empty log message ***
Diffstat (limited to 'etc/FAQ')
| -rw-r--r-- | etc/FAQ | 4344 |
1 files changed, 2614 insertions, 1730 deletions
| @@ -1,71 +1,224 @@ | |||
| 1 | This is a list of frequently asked questions (FAQ) about GNU Emacs with | 1 | GNU Emacs FAQ: Introduction |
| 2 | answers. This list is designed to cut down on the noise in the | ||
| 3 | gnu.emacs.help newsgroup (which is also the help-gnu-emacs mailing list) | ||
| 4 | that results from people repeatedly asking many of the same questions. | ||
| 5 | 2 | ||
| 6 | This list is maintained by me, Joe Wells. My e-mail address is | 3 | [To find what has changed, view the `Changes' posting or inspect the change |
| 7 | jbw@bu.edu. If jbw@bu.edu doesn't work try jbw@bucsf.bu.edu. | 4 | bars in the text of the questions.] |
| 8 | 5 | ||
| 9 | Feel free to contribute text for the answers that I haven't written yet, | 6 | This is the introduction to a list of frequently asked questions (FAQ) about |
| 10 | to suggest new questions, to suggest changes in the wording, to suggest | 7 | GNU Emacs with answers. This article contains a listing of the questions; |
| 11 | deletions, etc. Please include either "FAQ" or "frequently asked | 8 | subsequent articles contain the questions and answers. |
| 12 | questions" in the subject of messages you send to me to help keep me from | ||
| 13 | accidentally filing your message in the wrong mail folder. | ||
| 14 | 9 | ||
| 15 | Here is a short list of new questions and questions that are now answered: | 10 | The FAQ is posted to reduce the noise level in the `gnu.emacs.help' newsgroup |
| 11 | (which is also the `help-gnu-emacs' mailing list) which results from the | ||
| 12 | repetition of frequently asked questions, wrong answers to these questions, | ||
| 13 | corrections to the wrong answers, corrections to the corrections, debate, name | ||
| 14 | calling, etc. Also, it serves as a repository of the canonical "best" answers | ||
| 15 | to these questions. However, if you know a better answer or even a slight | ||
| 16 | change that improves an answer, please tell me! | ||
| 16 | 17 | ||
| 17 | New questions: | 18 | If you know the answer of a question is in the FAQ, please reply to the |
| 19 | question by e-mail instead of posting. Help reduce noise! | ||
| 18 | 20 | ||
| 19 | Why doesn't "C-c C-c" interrupt subprocesses under HP/UX? | 21 | The FAQ is crossposted to `comp.emacs' because some sites do not receive the |
| 20 | How do I make Emacs send 8-bit characters to my terminal? | 22 | `gnu.*' newsgroups. The FAQ is also crossposted to `news.answers'. |
| 21 | Why does ispell sometimes ignore the local dictionary? | ||
| 22 | Where can I get Emacs with NeWS support? | ||
| 23 | 23 | ||
| 24 | Questions with improved answers: | 24 | Please suggest new questions, answers, wording changes, deletions, etc. The |
| 25 | most helpful form for suggestions is a context diff (ie., the output of `diff | ||
| 26 | -c'). Include `FAQ' in the subject of messages sent to me about the FAQ. | ||
| 25 | 27 | ||
| 26 | Has someone written an GNU Emacs Lisp package that does XXX? | 28 | Please do not send questions to me just because you do not want to disturb a |
| 27 | How do I get Emacs running on VMS under DECwindows? | 29 | lot of people and you think I would know the answer. I do not have time to |
| 28 | Why does Emacs crash from a bus error in XLookupString under OpenLook? | 30 | answer questions individually. :-( |
| 29 | Why does Emacs hang with message "Unknown XMenu" with X11R4? | ||
| 30 | How do I use regexps (regular expressions) in Emacs? | ||
| 31 | How do I make Emacs "typeover" or "overwrite" when I type instead of | ||
| 32 | always inserting? | ||
| 33 | How do I get Emacs for my PC? | ||
| 34 | How can I highlight a region? | ||
| 35 | Where can I get GNU Emacs Lisp packages that don't come with Emacs? | ||
| 36 | Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, or Patch? | ||
| 37 | 31 | ||
| 38 | Minor changes: | 32 | Full instructions for getting the latest FAQ are in question 29. Also see the |
| 33 | `Introduction to news.answers' posting in the `news.answers' newsgroup, or send | ||
| 34 | e-mail to `mail-server@pit-manager.mit.edu' with `help' on a body line, or use | ||
| 35 | FTP, WAIS, or Prospero to pit-manager.mit.edu. | ||
| 39 | 36 | ||
| 40 | Where does the name "Emacs" come from? | 37 | Future plans for this FAQ list include: |
| 41 | In C mode, can I show just the lines that will be left after #ifdef | 38 | |
| 42 | commands are handled by the compiler? | 39 | * A new section devoted to GNUS questions. |
| 43 | What does "M-x command" mean? | 40 | * Verification for files available via FTP and for mailing lists. |
| 44 | How do I get a printed copy of the GNU Emacs manual? | 41 | * Up-to-date IP addresses for sites mentioned for FTP access. |
| 45 | What do things like this mean: C-h, M-C-a, RET, etc.? | 42 | * A Texinfo version. |
| 46 | Why doesn't GNUS work anymore via NNTP? | 43 | * Marking questions in the list below that have been changed recently. |
| 47 | What does Emacs do every time it starts up? | ||
| 48 | |||
| 49 | Enjoy, | ||
| 50 | 44 | ||
| 51 | -- | 45 | -- |
| 52 | Joe Wells <jbw@bu.edu> | 46 | Joe Wells <jbw@cs.bu.edu> |
| 53 | ------------------------------------------------- | 47 | |
| 54 | GNU Emacs Frequently Asked Questions with Answers (part 1 of 2) | 48 | Member of the League for Programming Freedom --- send e-mail for details |
| 49 | ---------------------------------------------------------------------- | ||
| 50 | |||
| 51 | Notation Used in the Answers | ||
| 52 | |||
| 53 | 1: What do things like this mean: C-h, M-C-a, RET, etc.? | ||
| 54 | 2: What do you mean when you write things like this: type "ESC a"? | ||
| 55 | 3: What if I don't have a Meta key? | ||
| 56 | 4: What if I don't have an Escape key? | ||
| 57 | 5: What does "M-x command" mean? | ||
| 58 | 6: What do things like this mean: etc/SERVICE, src/config.h, | ||
| 59 | lisp/default.el? | ||
| 60 | 7: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL? | ||
| 61 | |||
| 62 | Sources of Information and Help | ||
| 63 | |||
| 64 | 8: I'm just starting GNU Emacs; how do I do basic editing? | ||
| 65 | 9: How do I find out how to do something in GNU Emacs? | ||
| 66 | 10: Where can I get GNU Emacs on the net (or by snail mail)? | ||
| 67 | 11: Where can I get help in installing GNU Emacs? | ||
| 68 | 12: How do I get a printed copy of the GNU Emacs manual? | ||
| 69 | 13: How do I install a piece of Texinfo documentation? | ||
| 70 | 14: How do I print a Texinfo file? | ||
| 71 | 15: Can I view Info files without using GNU Emacs? | ||
| 72 | 16: Where can I get documentation on GNU Emacs Lisp? | ||
| 73 | 17: Has someone written an GNU Emacs Lisp package that does XXX? | ||
| 74 | 18: Where can I get GNU Emacs Lisp packages that don't come with Emacs? | ||
| 75 | 19: How do I submit code to the Emacs Lisp Archive? | ||
| 76 | 20: What informational files are available for GNU Emacs? | ||
| 77 | 21: Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, | ||
| 78 | Ange-FTP, VIP, Dired, Ispell, Epoch, Demacs, Freemacs, or Patch? | ||
| 79 | 22: What is the real legal meaning of the GNU copyleft? | ||
| 80 | 23: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug, | ||
| 81 | comp.emacs, etc.? | ||
| 82 | 24: How do I unsubscribe to this mailing list? | ||
| 83 | 25: What is the LPF and why should I join it? | ||
| 84 | 26: What is the current address of the FSF? | ||
| 85 | 27: What is the current address of the LPF? | ||
| 86 | 28: Where can I get other up-to-date GNU stuff? | ||
| 87 | 29: Where can I get the latest version of this document (the FAQ list)? | ||
| 88 | |||
| 89 | GNU Emacs and Various Computing Environments | ||
| 90 | |||
| 91 | 30: Where does the name "Emacs" come from? | ||
| 92 | 31: What is the latest version of GNU Emacs? | ||
| 93 | 32: When will GNU Emacs 19 be available? | ||
| 94 | 33: What will be different about GNU Emacs 19? | ||
| 95 | 34: Is there an Emacs that has better mouse and X window support? | ||
| 96 | 35: Where can I get the "unofficial HP GNU Emacs"? | ||
| 97 | 36: Where can I get Emacs for my PC? | ||
| 98 | 37: Where can I get Emacs for my Atari ST? | ||
| 99 | 38: Where can I get Emacs for my Amiga? | ||
| 100 | 39: Where can I get Emacs for my Apple computer? | ||
| 101 | 40: Where can I get Emacs with NeWS support? | ||
| 102 | 41: How do I get Emacs running on VMS under DECwindows? | ||
| 103 | 42: How do I use emacstool under SunView? | ||
| 104 | 43: How do I make Emacs display 8-bit characters? | ||
| 105 | 44: How do I input 8-bit characters? | ||
| 106 | 45: How do I use an already running Emacs from another window? | ||
| 107 | 46: Where can I get an Emacs that can handle kanji characters? | ||
| 108 | 47: Where can I get an Emacs that can handle Chinese? | ||
| 109 | 48: Where is an Emacs that can handle Semitic (right-to-left) alphabets? | ||
| 110 | |||
| 111 | Binding Keys to Commands | ||
| 112 | |||
| 113 | 49: Why does Emacs say "Key sequence XXX uses invalid prefix characters"? | ||
| 114 | 50: Why doesn't this [terminal or window-system setup] code work in my | ||
| 115 | .emacs file, but it works just fine after Emacs starts up? | ||
| 116 | 51: Other than that, why does my key binding fail? | ||
| 117 | 52: How do I use function keys under X Windows? | ||
| 118 | 53: How do I tell what characters my function or arrow keys emit? | ||
| 119 | 54: Why does Emacs spontaneously start displaying "I-search:" and beeping? | ||
| 120 | 55: How do I disable the use of C-s and C-q for flow control? | ||
| 121 | 56: What do I do if my terminal is sending C-s and C-q for flow control and | ||
| 122 | I can't disable it? | ||
| 123 | 57: How do I make Emacs honor C-s and C-q for flow control instead of for | ||
| 124 | commands? | ||
| 125 | 58: Why does Emacs never see C-s and C-q through my network connection? | ||
| 126 | 59: How do I use commands bound to C-s and C-q (or any key) if these keys | ||
| 127 | are filtered out? | ||
| 128 | 60: How do I "swap" two keys? | ||
| 129 | 61: Why does the "BackSpace" key invoke help? | ||
| 130 | 62: How do I type DEL on PC terminal emulators? | ||
| 131 | 63: Can I make my "Compose" key behave like a "Meta" key? | ||
| 132 | 64: Why don't the arrow keys work? | ||
| 133 | 65: How do I bind a combination of modifier key and function key? | ||
| 134 | 66: Why doesn't my Meta key work in an xterm window? | ||
| 135 | 67: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0? | ||
| 136 | 68: Where can I get key bindings to make Emacs emulate WordStar? | ||
| 55 | 137 | ||
| 56 | Sat Dec 8 01:30:53 1990 | 138 | Building/Installing/Porting Emacs and Machine/OS-Specific Bugs |
| 57 | 139 | ||
| 140 | 69: Why does Emacs crash with "Fatal error (6).Abort" under SunOS 4.1? | ||
| 141 | 70: Why do I get an "f68881_used undefined" error, when I build Emacs on my | ||
| 142 | Sun 3? | ||
| 143 | 71: Why does Emacs ignore my X resources (my .Xdefaults file)? | ||
| 144 | 72: How do I get Emacs to compile with all features under OpenWindows? | ||
| 145 | 73: How do I build Emacs under HP-UX 8.0? | ||
| 146 | 74: What should I do if I have trouble building Emacs? | ||
| 58 | 147 | ||
| 59 | If you are viewing this file in a GNU Emacs Buffer, you can type "M-2 C-x | 148 | Weird/Confusing Problems |
| 60 | $" to get an overview of just the questions. Then, when you want to look | ||
| 61 | at the text of the answers, just type "C-x $". | ||
| 62 | 149 | ||
| 63 | To search for a question numbered XXX, type "M-C-s ^XXX:", followed by a | 150 | 75: Does Emacs have problems with files larger than 8 megabytes? |
| 64 | C-r if that doesn't work, then type ESC to end the search. | 151 | 76: Why does Emacs start up using the wrong directory? |
| 152 | 77: How do I edit a file with a "$" in its name? | ||
| 153 | 78: Why does Shell mode lose track of the shell's current directory? | ||
| 154 | 79: Why doesn't Emacs expand my aliases when sending mail? | ||
| 155 | 80: Why doesn't my change to load-path work? | ||
| 156 | 81: Why does the cursor always go to the wrong column when I move up or | ||
| 157 | down one line? | ||
| 158 | 82: Why does Emacs hang with message "Unknown XMenu error" with X11R4? | ||
| 159 | 83: Why doesn't display-time show the load average in the mode line | ||
| 160 | anymore? | ||
| 161 | 84: Why doesn't GNUS work anymore via NNTP? | ||
| 162 | 85: Why does ispell sometimes ignore the local dictionary? | ||
| 163 | 86: How do I get rid of the ^M junk in my Shell buffer? | ||
| 164 | 87: Are there any security risks in GNU Emacs? | ||
| 165 | 88: How do I recover my mail files after RMAIL munges their format? | ||
| 166 | 89: Why do I get "Process shell exited abnormally with code 1"? | ||
| 65 | 167 | ||
| 168 | Configuring Emacs for Yourself | ||
| 66 | 169 | ||
| 67 | Notation Used in the Answers (READ THIS SECTION FIRST!) | 170 | 90: How do I set up a .emacs file properly? |
| 171 | 91: How do you debug a .emacs file? | ||
| 172 | 92: How do I turn on abbrevs by default just in mode XXX? | ||
| 173 | 93: How do I turn on Auto-Fill mode by default? | ||
| 174 | 94: How do I make Emacs use a certain major mode for certain files? | ||
| 175 | 95: What are the valid X resource settings (ie., stuff in .Xdefaults file)? | ||
| 176 | 96: How do I stop Emacs from beeping on a terminal? | ||
| 177 | 97: How do I turn down the bell volume in Emacs running under X Windows? | ||
| 178 | 98: How do I change load-path? | ||
| 179 | 99: How do I change the included text prefix in mail/news followups? | ||
| 68 | 180 | ||
| 181 | Emacs Lisp Programming | ||
| 182 | |||
| 183 | 100: What dialect of Lisp is Emacs Lisp? | ||
| 184 | 101: How close is Emacs Lisp to Common Lisp? | ||
| 185 | 102: How do I execute a piece of Emacs Lisp code? | ||
| 186 | 103: How do I make a set of operations work only within a region? | ||
| 187 | 104: How can I highlight text in Emacs? | ||
| 188 | 105: How do I change Emacs's idea of the tab character's length? | ||
| 189 | |||
| 190 | Carrying Out Common Tasks | ||
| 191 | |||
| 192 | 106: How do I insert ">"'s in the beginning of every line in a buffer? | ||
| 193 | 107: How do I insert "_^H" characters before each character in a paragraph | ||
| 194 | to get an underlined paragraph? | ||
| 195 | 108: How do I repeat a command as many times as possible? | ||
| 196 | 109: How do I search for or delete unprintable (8-bit or control) | ||
| 197 | characters? | ||
| 198 | 110: How do I control Emacs's case-sensitivity when searching/replacing? | ||
| 199 | 111: How do I tell Emacs to automatically indent a new line to the | ||
| 200 | indentation of the previous line? | ||
| 201 | 112: How do I make Emacs "typeover" or "overwrite" instead of inserting? | ||
| 202 | 113: How do I show which parenthesis matches the one I'm looking at? | ||
| 203 | 114: How do I make Emacs behave like this: when I go up or down, the cursor | ||
| 204 | should stay in the same column even if the line is too short? | ||
| 205 | 115: How do I read news under Emacs? | ||
| 206 | 116: In C mode, can I show just the lines that will be left after #ifdef | ||
| 207 | commands are handled by the compiler? | ||
| 208 | 117: Is there an equivalent to the "." (dot) command of vi? | ||
| 209 | 118: How do I make Emacs display the current line (or column) number? | ||
| 210 | 119: How do I tell Emacs to iconify itself? | ||
| 211 | 120: How do I use regexps (regular expressions) in Emacs? | ||
| 212 | 121: How do I perform a replace operation across more than one file? | ||
| 213 | 122: How do I make Emacs wrap words for me? | ||
| 214 | 123: Where can I get a better spelling checker for Emacs? | ||
| 215 | 124: How can I spell-check TeX or *roff documents? | ||
| 216 | 125: How can I make Emacs automatically scroll horizontally? | ||
| 217 | |||
| 218 | |||
| 219 | |||
| 220 | Notation Used in the Answers - | ||
| 221 | |||
| 69 | You may skip this section if you are reasonably familiar with GNU Emacs. | 222 | You may skip this section if you are reasonably familiar with GNU Emacs. |
| 70 | Some of these are not actually frequently asked questions, but knowing | 223 | Some of these are not actually frequently asked questions, but knowing |
| 71 | them is important for understanding the answers to the rest of the | 224 | them is important for understanding the answers to the rest of the |
| @@ -73,37 +226,44 @@ Notation Used in the Answers (READ THIS SECTION FIRST!) | |||
| 73 | 226 | ||
| 74 | 1: What do things like this mean: C-h, M-C-a, RET, etc.? | 227 | 1: What do things like this mean: C-h, M-C-a, RET, etc.? |
| 75 | 228 | ||
| 76 | C-a means while holding down the "Control" key press the "a" key. The | 229 | C-a means press the "a" key while holding down the "Control" key. The |
| 77 | ASCII code this sends will generally be the value that would be sent by | 230 | ASCII code this sends will generally be the value that would be sent by |
| 78 | pressing just "a" minus 96 or 64. Either way it will be a number from 0 | 231 | pressing just "a" minus 96 or 64. Either way it will be a number from 0 |
| 79 | to 31. | 232 | to 31. |
| 80 | 233 | ||
| 81 | M-a means while holding down the "Meta" key press the "a" key. The | 234 | M-a means press the "a" key while holding down the "Meta" key. The |
| 82 | ASCII code this sends is the sum of the ASCII code that would be sent by | 235 | ASCII code this sends is the sum of the ASCII code that would be sent by |
| 83 | pressing just "a" and 128. | 236 | pressing just "a" and 128. |
| 84 | 237 | ||
| 85 | M-C-a means while holding down both the "Control" key and the "Meta" key | 238 | M-C-a means press the "a" key while holding down both the "Control" key |
| 86 | press the "a" key. | 239 | and the "Meta" key. C-M-a is a synonym for M-C-a. |
| 87 | 240 | ||
| 88 | C-M-a is a synonym for M-C-a. | 241 | * RET means press the "Return" key. RET is the same as C-m. This sends |
| 89 | 242 | ASCII code 13. | |
| 90 | RET means press the "Return" key. RET is the same as C-m. This sends | 243 | * LFD means press the "Linefeed" key. LFD is also the same as C-j. This |
| 91 | ASCII code 13. | 244 | sends ASCII code 10. Under Unix, ASCII code 10 is more often called |
| 92 | 245 | "Newline". | |
| 93 | LFD means press the "Linefeed" key. LFD is also the same as C-j. This | 246 | * DEL means press the "Delete" key. DEL is the same as C-?. This sends |
| 94 | sends ASCII code 10. Under Unix, ASCII code 10 is more often called | 247 | ASCII code 127. (WARNING: It is a misnomer to call C-? a "control" key, |
| 95 | "Newline". | 248 | since 127 has both bits 6 and 7 turned ON, and the rule for control keys |
| 96 | 249 | is that they have 6 and 7 turned OFF. Also, on very few keyboards does | |
| 97 | DEL means press the "Delete" key. DEL is the same as C-?. This sends | 250 | Control-? generate ASCII code 127. In fact, Control-? (which is |
| 98 | ASCII code 127. | 251 | actually Control-Shift-/) is more likely to generate C-_, ASCII code |
| 99 | 252 | 31!) | |
| 100 | ESC means press the "Escape" key. ESC is the same as C-[. This sends | 253 | * ESC means press the "Escape" key. ESC is the same as C-[. This sends |
| 101 | ASCII code 27. | 254 | ASCII code 27. |
| 102 | 255 | * SPC means press the "Space" key. This send ASCII code 32. | |
| 103 | SPC means press the "Space" key. This send ASCII code 32. | 256 | * TAB means press the "Tab" key. TAB is the same as C-i. This send ASCII |
| 104 | 257 | code 9. | |
| 105 | TAB means press the "Tab" key. TAB is the same as C-i. This send ASCII | 258 | |
| 106 | code 9. | 259 | For C-@ and C-^, usually you don't have to hold down the shift key and you |
| 260 | can type Control-2 or Control-6 instead. For C-_, you may have to hold | ||
| 261 | down the shift key, typing Control-Shift-Hyphen. C-@ can often be | ||
| 262 | generated by typing Control-Space. C-@ is often called the NUL character, | ||
| 263 | and has ASCII value 0. C-_ can often be generated by typing Control-7 or | ||
| 264 | Control-/. C-? (aka DEL) may be generated by typing Shift-BackSpace or + | ||
| 265 | Control-BackSpace. Try Control with all of the digits on your keyboard to + | ||
| 266 | see what gets generated. | ||
| 107 | 267 | ||
| 108 | To read more about this online, type "C-h i m emacs RET m characters | 268 | To read more about this online, type "C-h i m emacs RET m characters |
| 109 | RET", and also "C-h i m emacs RET m keys RET". | 269 | RET", and also "C-h i m emacs RET m keys RET". |
| @@ -111,7 +271,8 @@ Notation Used in the Answers (READ THIS SECTION FIRST!) | |||
| 111 | 2: What do you mean when you write things like this: type "ESC a"? | 271 | 2: What do you mean when you write things like this: type "ESC a"? |
| 112 | 272 | ||
| 113 | I will enclose key sequences that are longer than one key inside double | 273 | I will enclose key sequences that are longer than one key inside double |
| 114 | quotes. These notations refer to single keys (some with modifiers): | 274 | quotes. These notations refer to single key strokes (some with |
| 275 | modifiers): | ||
| 115 | 276 | ||
| 116 | C-x, M-x, M-C-x | 277 | C-x, M-x, M-C-x |
| 117 | RET, LFD, DEL, ESC, SPC, TAB | 278 | RET, LFD, DEL, ESC, SPC, TAB |
| @@ -124,7 +285,8 @@ Notation Used in the Answers (READ THIS SECTION FIRST!) | |||
| 124 | 3: What if I don't have a Meta key? | 285 | 3: What if I don't have a Meta key? |
| 125 | 286 | ||
| 126 | Instead of typing M-a, you can type "ESC a" instead. In fact, Emacs | 287 | Instead of typing M-a, you can type "ESC a" instead. In fact, Emacs |
| 127 | converts M-a internally into "ESC a" anyway. | 288 | converts M-a internally into "ESC a" anyway (depending on the value of |
| 289 | meta-prefix-char). | ||
| 128 | 290 | ||
| 129 | 4: What if I don't have an Escape key? | 291 | 4: What if I don't have an Escape key? |
| 130 | 292 | ||
| @@ -148,15 +310,15 @@ Notation Used in the Answers (READ THIS SECTION FIRST!) | |||
| 148 | candidate for this. | 310 | candidate for this. |
| 149 | 311 | ||
| 150 | To run non-interactive Emacs functions, use M-ESC instead and type a | 312 | To run non-interactive Emacs functions, use M-ESC instead and type a |
| 151 | Lisp form. | 313 | Lisp form that invokes the function (see question 102). |
| 152 | 314 | ||
| 153 | 6: What do things like this mean: etc/SERVICE, src/config.h, | 315 | 6: What do things like this mean: etc/SERVICE, src/config.h, |
| 154 | lisp/default.el? | 316 | lisp/default.el? |
| 155 | 317 | ||
| 156 | These are the names of files that are part of the GNU Emacs | 318 | These are the names of files that are part of the GNU Emacs |
| 157 | distribution. The GNU Emacs distribution is so big that it is divided | 319 | distribution. The GNU Emacs distribution is divided into several |
| 158 | into several subdirectories; the important subdirectories are named | 320 | subdirectories; the important subdirectories are named "etc", "lisp", |
| 159 | "etc", "lisp", and "src". | 321 | and "src". |
| 160 | 322 | ||
| 161 | If you use GNU Emacs, but don't know where it is kept on your system, | 323 | If you use GNU Emacs, but don't know where it is kept on your system, |
| 162 | start Emacs, then type "C-h v exec-directory RET". The directory name | 324 | start Emacs, then type "C-h v exec-directory RET". The directory name |
| @@ -164,24 +326,30 @@ Notation Used in the Answers (READ THIS SECTION FIRST!) | |||
| 164 | directory of your installed GNU Emacs distribution. | 326 | directory of your installed GNU Emacs distribution. |
| 165 | 327 | ||
| 166 | Some of these files are available individually via FTP or e-mail, see | 328 | Some of these files are available individually via FTP or e-mail, see |
| 167 | question 16. | 329 | question 20. |
| 168 | 330 | ||
| 169 | 7: What are FSF, LPF, OSF, GNU, RMS, FTP, BTW, and GPL? | 331 | 7: What are FSF, LPF, OSF, GNU, RMS, FTP, and GPL? |
| 170 | 332 | ||
| 171 | FSF == Free Software Foundation | 333 | FSF == Free Software Foundation |
| 172 | LPF == League for Programming Freedom | 334 | LPF == League for Programming Freedom |
| 173 | OSF == Open Software Foundation | 335 | OSF == Open Software Foundation |
| 174 | GNU == GNU's Not Unix | 336 | GNU == GNU's Not Unix |
| 175 | RMS == Richard M. Stallman | 337 | RMS == Richard Matthew Stallman |
| 176 | FTP == File Transfer Protocol | 338 | FTP == File Transfer Protocol |
| 177 | BTW == By the way | ||
| 178 | GPL == GNU General Public Licence | 339 | GPL == GNU General Public Licence |
| 179 | 340 | ||
| 180 | NOTE: Avoid confusing the FSF, the LPF, and the OSF. The LPF only | 341 | NOTE: Avoid confusing the FSF, the LPF, and the OSF. The LPF opposes |
| 181 | opposes look-and-feel copyrights and software patents. The FSF aims to | 342 | look-and-feel copyrights and software patents. The FSF aims to make high |
| 182 | make high quality free software available for everyone. The OSF is a | 343 | quality free software available for everyone. The OSF is a commercial |
| 183 | commercial organization which wants to provide an alternative, | 344 | organization which wants to provide an alternative, standardized version |
| 184 | standardized version of Unix not controlled by AT&T. | 345 | of Unix not controlled by AT&T. |
| 346 | |||
| 347 | NOTE: The word "free" in the title of the Free Software Foundation refers | ||
| 348 | to "freedom", not "zero dollars". Anyone can charge any price for | ||
| 349 | GPL-covered software that they want to. However, in practice, the freedom | ||
| 350 | enforced by the GPL leads to low prices, because you can always get the | ||
| 351 | software for less money from someone else, because everyone has the right | ||
| 352 | to resell or give away GPL-covered software. | ||
| 185 | 353 | ||
| 186 | 354 | ||
| 187 | 355 | ||
| @@ -192,7 +360,7 @@ Sources of Information and Help | |||
| 192 | Type "C-h t" to invoke the self-paced tutorial. Typing just C-h is | 360 | Type "C-h t" to invoke the self-paced tutorial. Typing just C-h is |
| 193 | how to enter the help system. | 361 | how to enter the help system. |
| 194 | 362 | ||
| 195 | WARNING: your system administrator may have changed C-h to act like DEL. | 363 | WARNING: Your system administrator may have changed C-h to act like DEL. |
| 196 | You can use M-x help-for-help instead to invoke help. To discover what | 364 | You can use M-x help-for-help instead to invoke help. To discover what |
| 197 | key (if any) invokes help on your system, type "M-x where-is RET | 365 | key (if any) invokes help on your system, type "M-x where-is RET |
| 198 | help-for-help RET". This will print a comma-separated list of key | 366 | help-for-help RET". This will print a comma-separated list of key |
| @@ -200,151 +368,290 @@ Sources of Information and Help | |||
| 200 | sequence listed. Each of the resulting key sequences invokes help. | 368 | sequence listed. Each of the resulting key sequences invokes help. |
| 201 | 369 | ||
| 202 | NOTE: Emacs's help facility works best if help is invoked by a single | 370 | NOTE: Emacs's help facility works best if help is invoked by a single |
| 203 | key. The variable help-char should hold the value of this character. | 371 | key. The variable help-char should hold the value of this character. |
| 372 | Andrew Arensburger <arensb@kong.gsfc.nasa.gov> wrote a patch that allows + | ||
| 373 | the help facility to work properly when invoked by multiple character + | ||
| 374 | sequences. + | ||
| 204 | 375 | ||
| 205 | 9: How do I find out how to do something in GNU Emacs? | 376 | 9: How do I find out how to do something in GNU Emacs? |
| 206 | 377 | ||
| 207 | There are several methods for finding out how to do things in Emacs. | 378 | There are several methods for finding out how to do things in Emacs. |
| 208 | 379 | ||
| 209 | You should become familiar with the online documentation for Emacs. The | 380 | * You should become familiar with the online documentation for Emacs. The + |
| 210 | complete text of the Emacs manual is available online in a hypertext | 381 | complete text of the Emacs manual is available online in a hypertext |
| 211 | format via the "Info" manual reader. Type "C-h i" to invoke Info. | 382 | format via the "Info" manual reader. Type "C-h i" to invoke Info. |
| 212 | 383 | ||
| 213 | You can order a hardcopy of the manual from the FSF. See question 12. | 384 | * You can order a hardcopy of the manual from the FSF. See question 12. + |
| 214 | 385 | ||
| 215 | You can list all of the commands whose names contain a certain word | 386 | * You can get a printed reference card listing commands and keys to invoke + |
| 216 | (actually which match a regular expression) using the "command-apropos" | 387 | them. You can order one from the FSF for $1 (or 10 for $5), or you can |
| 217 | command. Type "C-h a" to invoke this command. | 388 | print your own from the etc/refcard.tex file in the Emacs distribution. |
| 218 | 389 | ||
| 219 | You can list all of the functions and variables whose names contain a | 390 | * You can list all of the commands whose names contain a certain word + |
| 220 | certain word using the "apropos" command. M-x apropos invokes this | 391 | (actually which match a regular expression) using the "command-apropos" |
| 221 | command. | 392 | command. Type "C-h a" to invoke this command. |
| 222 | 393 | ||
| 223 | You may find that command-apropos and apropos are extremely slow on your | 394 | * You can list all of the functions and variables whose names contain a + |
| 224 | system. This will be fixed in Emacs 19. If you can't wait that long, | 395 | certain word using the "apropos" command. M-x apropos invokes this |
| 225 | I can send you the "fast-apropos.el" file that contains the fix. This | 396 | command. |
| 226 | file also contains a "super-apropos" command that will list all the | ||
| 227 | functions and variables whose documentation strings contain a certain | ||
| 228 | word. | ||
| 229 | 397 | ||
| 230 | There are many other commands in Emacs for getting help and information. | 398 | * There are many other commands in Emacs for getting help and information. + |
| 231 | To get a list of these commands, type "C-h C-h C-h". | 399 | To get a list of these commands, type "C-h C-h C-h". |
| 400 | |||
| 401 | NOTE: You may find that command-apropos and apropos are extremely slow | ||
| 402 | on your system. This will be fixed in Emacs 19. If you can't wait that | ||
| 403 | long, there is a "fast-apropos.el" file available in the Emacs Lisp | ||
| 404 | Archive (see question 18) that contains the fix. This file | ||
| 405 | also contains a "super-apropos" command that will list all the functions | ||
| 406 | and variables whose documentation strings contain a certain word. | ||
| 232 | 407 | ||
| 233 | 10: Where can I get GNU Emacs on the net (or by snail mail)? | 408 | 10: Where can I get GNU Emacs on the net (or by snail mail)? |
| 234 | 409 | ||
| 235 | Look in the files etc/DISTRIB and etc/FTP for information. If you don't | 410 | Look in the files etc/DISTRIB and etc/FTP for information on nearby |
| 236 | already have GNU Emacs, see question 16. | 411 | archive sites. If you don't already have GNU Emacs, see question 20 ! |
| 412 | for how to get these two files. | ||
| 413 | |||
| 414 | The latest version is always available via anonymous FTP at MIT | ||
| 415 | (prep.ai.mit.edu:pub/gnu/emacs-18.58.tar.Z). ! | ||
| 237 | 416 | ||
| 238 | 11: Where can I get help in installing GNU Emacs? | 417 | 11: Where can I get help in installing GNU Emacs? |
| 239 | 418 | ||
| 240 | Look in the file etc/SERVICE for names of companies and individuals who | 419 | Look in the file etc/SERVICE for names of companies and individuals who |
| 241 | will sell you this type of service. | 420 | will sell you this type of service. An up-to-date version of the |
| 242 | 421 | SERVICE file is available on prep.ai.mit.edu. See question 20 | |
| 243 | This file in the version 18.55 distribution is not completely up to | 422 | for how to retrieve this file. |
| 244 | date. The imminent release of 18.56 will help that. An up-to-date | ||
| 245 | version of the SERVICE file is available on prep.ai.mit.edu. See | ||
| 246 | question 16 for how to retrieve this file. | ||
| 247 | 423 | ||
| 248 | 12: How do I get a printed copy of the GNU Emacs manual? | 424 | 12: How do I get a printed copy of the GNU Emacs manual? |
| 249 | 425 | ||
| 250 | You can order a printed copy of the GNU Emacs manual from the FSF for | 426 | You can order a printed copy of the GNU Emacs manual from the FSF for |
| 251 | $15. A set of 6 manuals is $60. | 427 | $20. For 6 or more manuals the price is $13 each. {The price may be ! |
| 428 | tax-deductible as a business expense. Can someone tell me for certain? I ! | ||
| 429 | know that pure donations to the FSF are tax-deductible, but I don't know ! | ||
| 430 | about payments for manuals or tapes.} ! | ||
| 431 | |||
| 432 | The full TeX source for the manual also comes in the "man" directory of | ||
| 433 | the Emacs distribution, if you're daring enough to try to print out this | ||
| 434 | 300 page manual yourself (see question 14). | ||
| 435 | |||
| 436 | If you absolutely have to print your own copy, and you don't have TeX, you | ||
| 437 | can get a PostScript version via anonymous FTP (cs.ubc.ca: - | ||
| 438 | src/gnu/manuals_ps/emacs-18.57.ps.Z, which site requests that you please | ||
| 439 | CONFINE ANY MAJOR FTPING TO LATE EVENINGS OR EARLY MORNINGS OUR TIME | ||
| 440 | (pacific time zone, GMT-8)). | ||
| 441 | |||
| 442 | If you don't have TeX you can convert the Texinfo sources into | ||
| 443 | {t,n,ps}roff format with the "texi2roff" program, which is available via | ||
| 444 | anonymous FTP (archive.cis.ohio-state.edu: | ||
| 445 | /pub/gnu/texi2roff/texi2roff.shar.Z) | ||
| 252 | 446 | ||
| 253 | The full TeX source for the manual also comes with Emacs, if you're | 447 | Carl Witty <cwitty@cs.stanford.edu> writes: |
| 254 | daring enough to try to print out this 300 page manual yourself. (We're | ||
| 255 | talking about killing an entire tree here. This kind of printer usage | ||
| 256 | can make you very unpopular. Besides, if you order it from the FSF, the | ||
| 257 | price may be tax-deductible as a business expense.) | ||
| 258 | 448 | ||
| 259 | If you absolutely have to print your own copy, and you don't have TeX, | 449 | The Emacs manual is also available online in the Info system, which is |
| 260 | you can get a PostScript version from: | 450 | available by typing "C-h i". In this form, it has hypertext links and |
| 451 | is very easy to browse or search; many people prefer it to the printed | ||
| 452 | manual. | ||
| 261 | 453 | ||
| 262 | Anonymous FTP: | 454 | 13: How do I install a piece of Texinfo documentation? |
| 263 | site: abcfd20.larc.nasa.gov | ||
| 264 | file: /pub/docs/emacs-18.55.PS.Z (size: 472K) | ||
| 265 | 455 | ||
| 266 | Carl Witty <cwitty@cs.stanford.edu> writes: | 456 | First create Info files from the Texinfo files with the "makeinfo" |
| 457 | program. makeinfo is available as part of the latest Texinfo package | ||
| 458 | (prep.ai.mit.edu:/pub/gnu/texinfo-2.12.tar.Z). - | ||
| 459 | |||
| 460 | For information about the Texinfo format, read the Texinfo manual which | ||
| 461 | comes with Emacs. This manual also comes installed in Info format, so you | ||
| 462 | can read it online. | ||
| 267 | 463 | ||
| 268 | The Emacs manual is also available online in the Info system, which is | 464 | Neither texinfo-format-buffer nor the makeinfo program install the |
| 269 | available by typing "C-h i". In this form, it has hypertext links and | 465 | resulting Info files in Emacs's Info tree. To install Info files: |
| 270 | is very easy to browse or search; many people prefer it to the printed | ||
| 271 | manual. | ||
| 272 | 466 | ||
| 273 | 13: Has someone written an GNU Emacs Lisp package that does XXX? | 467 | 1. Move the files to the "info" directory in the installed Emacs |
| 468 | distribution. See question 6 if you don't know where that | ||
| 469 | is. | ||
| 470 | |||
| 471 | 2. Edit the file info/dir in the installed Emacs distribution, and add a | ||
| 472 | line for the top level node in the Info package that you are | ||
| 473 | installing. Follow the examples are already in this file. The format | ||
| 474 | is: | ||
| 475 | |||
| 476 | * Topic: (relative-pathname). Short description of topic. | ||
| 477 | |||
| 478 | If you want to install Info files and you don't have the necessary | ||
| 479 | privileges, you have several options: ! | ||
| 480 | ! | ||
| 481 | * Info files don't actually need to be installed before being used. You ! | ||
| 482 | can feed a file name to the Info-goto-node command (invoked by pressing | ||
| 483 | "g" in Info mode) by typing the name of the file in parentheses. This | ||
| 484 | goes to the node named "Top" in that file. For example, to view a Info | ||
| 485 | file named "XXX" in your home directory, you can type this: | ||
| 486 | |||
| 487 | C-h i g (~/XXX) RET | ||
| 488 | |||
| 489 | * You can create your own Info directory. You can tell Emacs where the ! | ||
| 490 | Info directory is by setting the value of the variable Info-directory | ||
| 491 | to its pathname. For example, to use a private Info directory which | ||
| 492 | is a subdirectory of your home directory named "Info", you could do | ||
| 493 | this: | ||
| 494 | |||
| 495 | (setq Info-directory (expand-file-name "~/Info")) | ||
| 496 | |||
| 497 | You will need a top-level Info file named "dir" in this directory. | ||
| 498 | You can include the system-wide Info directory in your private Info | ||
| 499 | directory with symbolic links or by copying it. | ||
| 500 | |||
| 501 | * You can use an enhanced version of lisp/info.el that handles multiple + | ||
| 502 | Info directories. Then you can more easily use a mix of private and + | ||
| 503 | shared Info files. Dave Gillespie <daveg@csvax.cs.caltech.edu> has + | ||
| 504 | written one such enhancement and I am told there are others. + | ||
| 505 | |||
| 506 | 14: How do I print a Texinfo file? | ||
| 507 | |||
| 508 | NOTE: You can't get nice printed output from Info files; you must still + | ||
| 509 | have the original Texinfo source file for the manual you want to print. + | ||
| 510 | |||
| 511 | 1. Make sure the first line of the Texinfo file looks like this: | ||
| 512 | |||
| 513 | \input texinfo | ||
| 514 | |||
| 515 | You may need to alter "texinfo" to the full pathname of the | ||
| 516 | texinfo.tex file, which comes with Emacs as man/texinfo.tex (or copy | ||
| 517 | or link it into the current directory). | ||
| 518 | |||
| 519 | 2. tex XXX.texinfo | ||
| 520 | |||
| 521 | 3. texindex XXX.?? | ||
| 522 | |||
| 523 | The "texindex" program comes with Emacs as man/texindex.c. | ||
| 524 | |||
| 525 | 4. tex XXX.texinfo | ||
| 526 | |||
| 527 | 5. Print the DVI file XXX.dvi in the normal way for printing DVI files | ||
| 528 | at your site. | ||
| 529 | |||
| 530 | To get more general instructions, retrieve the latest Texinfo package | ||
| 531 | mentioned in question 13. | ||
| 532 | |||
| 533 | 15: Can I view Info files without using GNU Emacs? | ||
| 534 | |||
| 535 | Yes, the `info', `xinfo', and `ivinfo' programs do this. info uses | ||
| 536 | curses, xinfo uses standard X11R4 libraries, and ivinfo uses InterViews. | ||
| 537 | You can get info as part of the latest Texinfo package (see question 13). | ||
| 538 | xinfo is available separately (prep.ai.mit.edu: | ||
| 539 | pub/gnu/xinfo-1.01.01.tar.Z). ivinfo is available in a comp.sources.misc | ||
| 540 | archive or from Tom Horsley <tom@ssd.csd.harris.com>. For ivinfo, you | ||
| 541 | need Stanford's InterViews C++ X library, available via anonymous FTP | ||
| 542 | (interviews.stanford.edu). | ||
| 543 | |||
| 544 | 16: Where can I get documentation on GNU Emacs Lisp? | ||
| 545 | |||
| 546 | Within Emacs, you can type "C-h f" to get the documentation for a | ||
| 547 | function, "C-h v" for a variable. | ||
| 548 | |||
| 549 | For more information, obtain the GNU Emacs Lisp Reference Manual for Emacs | ||
| 550 | 18 under Unix. It is available from the FSF for $50 (or 5 for $200). The | ||
| 551 | latest revision available for FTP is edition 1.03 dated 28 January 1991. | ||
| 552 | |||
| 553 | For online use, a set of pregenerated Info files is available with the | ||
| 554 | Texinfo source for the Emacs Lisp manual via anonymous FTP (Emacs Lisp | ||
| 555 | Archive, prep.ai.mit.edu:pub/gnu/elisp-manual-1.03.tar.Z). (You can also ! | ||
| 556 | create the Info files from the Texinfo source.) See question 13 for | ||
| 557 | details on how to install these files online. | ||
| 558 | |||
| 559 | If you are daring enough to try to print this 550 page manual out | ||
| 560 | yourself, for instructions see question 14. | ||
| 561 | |||
| 562 | Also, as a popular USENET saying goes, "Use the Force, Read the Source". | ||
| 563 | |||
| 564 | 17: Has someone written an GNU Emacs Lisp package that does XXX? | ||
| 274 | 565 | ||
| 275 | Probably. A listing of Emacs Lisp packages, called the Lisp Code | 566 | Probably. A listing of Emacs Lisp packages, called the Lisp Code |
| 276 | Directory, is being maintained by Dave Brennan <brennan@dg-rtp.dg.com>. | 567 | Directory, is being maintained by Dave Brennan <brennan@hal.com> and ! |
| 277 | You can search through this list to find if someone has written | 568 | Dave Sill <de5@ornl.gov>. You can search through this list to find if |
| 278 | something that fits your needs. | 569 | someone has written something that fits your needs. |
| 279 | 570 | ||
| 280 | This list is file "LCD-datafile.Z" in the Emacs Lisp Archive. (See | 571 | This list is file "LCD-datafile.Z" in the Emacs Lisp Archive. (See |
| 281 | question 14.) The files "lispdir.el.Z" and "lispdir.doc.Z" | 572 | question 18 for methods for getting this file.) The files "lispdir.el.Z" |
| 282 | in the archive contain information to help you use the list. | 573 | and "lispdir.doc.Z" in the archive contain information to help you use the |
| 574 | list. Once you have installed lispdir.el and LCD-datafile, then you can | ||
| 575 | use the "M-x lisp-dir-apropos" command to look things up in the database. | ||
| 576 | For example, the command "M-x lisp-dir-apropos RET ange-ftp RET" produces | ||
| 577 | this (outdated) output: | ||
| 578 | |||
| 579 | GNU Emacs Lisp Code Apropos -- "ange-ftp" | ||
| 580 | |||
| 581 | ange-ftp (3.112) 91-08-12 | ||
| 582 | Andy Norman, <ange@hplb.hpl.hp.com> | ||
| 583 | archive.cis.ohio-state.edu: | ||
| 584 | /pub/gnu/emacs/elisp-archive/as-is/ange-ftp.el.Z | ||
| 585 | transparent FTP Support for GNU Emacs | ||
| 283 | 586 | ||
| 284 | 14: Where can I get GNU Emacs Lisp packages that don't come with Emacs? | 587 | 18: Where can I get GNU Emacs Lisp packages that don't come with Emacs? |
| 285 | 588 | ||
| 286 | First, check the Lisp Code Directory to find the name of the package you | 589 | First, check the Lisp Code Directory to find the name of the package you |
| 287 | are looking for. (See question 13). Then check local archives and | 590 | are looking for. (See question 17). Then check local archives and |
| 288 | the Emacs Lisp Archive to find a copy of the relevant files. Then, if | 591 | the Emacs Lisp Archive to find a copy of the relevant files. Then, if |
| 289 | you still haven't found it, you can send e-mail to the author asking for | 592 | you still haven't found it, you can send e-mail to the author asking for |
| 290 | a copy. | 593 | a copy. |
| 291 | 594 | ||
| 292 | You can access the Emacs Lisp Archive via: | 595 | NOTE: The archive maintainers do not have time to answer individual |
| 596 | requests for packages or the list of packages in the archive. If you | ||
| 597 | cannot use FTP or UUCP to access the archive yourself, try to find a | ||
| 598 | friend who can, but please don't ask the maintainers. | ||
| 293 | 599 | ||
| 294 | Anonymous FTP: | 600 | You can access the Emacs Lisp Archive via anonymous FTP |
| 295 | site: tut.cis.ohio-state.edu | 601 | (archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/). Fetch the |
| 296 | directory: /pub/gnu/emacs/elisp-archive | 602 | file "README" first. |
| 297 | file: README.Z | ||
| 298 | 603 | ||
| 299 | NOTE: Any files with names ending in ".Z" are compressed, and you should | 604 | NOTE: Any files with names ending in ".Z" are compressed, and you should |
| 300 | use "binary" mode in FTP to retrive them. You should also use binary | 605 | use "binary" mode in FTP to retrieve them. You should also use binary |
| 301 | mode whenever you retrieve any files with names ending in ".elc". | 606 | mode whenever you retrieve any files with names ending in ".elc". |
| 302 | 607 | ||
| 303 | Submissions for the archive should be sent to Dave Sill <de5@ornl.gov>. | 608 | 19: How do I submit code to the Emacs Lisp Archive? |
| 304 | If you have ftp access, the submission can be deposited in the directory | ||
| 305 | /pub/gnu/emacs/elisp-archive/incoming on tut.cis.ohio-state.edu. | ||
| 306 | Whenever possible submissions should contain an LCD-datafile entry since | ||
| 307 | this helps reduce administrative overhead for the maintainers. Before | ||
| 308 | submitting anything, first read the file "guidelines.Z", which is | ||
| 309 | available in the archive. | ||
| 310 | 609 | ||
| 311 | 15: Where can I get documentation on GNU Emacs Lisp? | 610 | Submissions should be mailed to elisp-archive@cis.ohio-state.edu. Mail |
| 611 | messages (submissions) are automatically saved and periodically archived. | ||
| 612 | Urgent mail may be sent directly to Dave Sill <de5@ornl.gov> or Dave | ||
| 613 | Brennan <brennan@hal.com> or should contain the string "urgent" in the ! | ||
| 614 | subject. The incomoing ftp directory is no longer available at the | ||
| 615 | request of Ohio State. | ||
| 312 | 616 | ||
| 313 | Obtain the GNU Emacs Lisp Reference Manual for Emacs 18 under Unix. It | 617 | However, if someone has a submission with multiple files (which would be |
| 314 | is available from the FSF for $50. The latest revision is edition 1.02 | 618 | archived as a tar file) or binary files, then FTP transfer is preferred |
| 315 | dated July 1990. | 619 | and can be arranged via an anonymous FTP site. This is faster than |
| 620 | uudecoding, unsharing, etc., and re-packaging files. | ||
| 316 | 621 | ||
| 317 | Within Emacs, you can type "C-h f" to get the documentation for a | 622 | Before submitting anything, please read the file "guidelines.Z", which is |
| 318 | function, "C-h v" for a variable. | 623 | available in the archive. Whenever possible submissions should contain |
| 624 | a complete LCD entry since this helps reduce administrative overhead for | ||
| 625 | the maintainers. You can include an entry in this format: | ||
| 319 | 626 | ||
| 320 | Also, as a popular USENET saying goes, "Use the Force, Read the Source". | 627 | ;; LCD Archive Entry: |
| 628 | ;; package name|author's name|email address | ||
| 629 | ;; |description | ||
| 630 | ;; |date|version|archive path | ||
| 321 | 631 | ||
| 322 | You can also get the Texinfo source for the manual, if you are daring | 632 | For example: |
| 323 | enough to try to print this 550 page manual out yourself. This is | ||
| 324 | available in the Emacs Lisp Archive and also via: | ||
| 325 | 633 | ||
| 326 | Anonymous FTP: | 634 | ;; LCD Archive Entry: |
| 327 | site: prep.ai.mit.edu | 635 | ;; tex-complete|Sebastian Kremer|sk@thp.Uni-Koeln.DE |
| 328 | file: /pub/gnu/elisp.tar.Z | 636 | ;; |Minibuffer name completion for editing [La]TeX. |
| 637 | ;; |91-03-26|$Revision: 1.12 $|~/packages/tex-complete.el.Z | ||
| 329 | 638 | ||
| 330 | A set of pregenerated Info files comes with the Texinfo source for the | 639 | Dave Brennan has software which automatically looks for data in this |
| 331 | Emacs Lisp manual, so you don't have to format it yourself for online | 640 | format. The format is fairly flexible. The entry ends when a line is |
| 332 | use. (You can create the Info files from the Texinfo source.) See | 641 | reached with a different prefix or the seventh field terminator is |
| 333 | question 21 for details on how to install these files online. | 642 | seen. |
| 334 | 643 | ||
| 335 | 16: What informational files are available? | 644 | 20: What informational files are available for GNU Emacs? |
| 336 | 645 | ||
| 337 | This isn't a frequently asked question, but it should be! | 646 | This isn't a frequently asked question, but it should be! A variety of |
| 647 | informational files about GNU Emacs and relevant aspects of the GNU | ||
| 648 | project are available for you to read. | ||
| 338 | 649 | ||
| 339 | The following files are available in the "etc" directory of the GNU | 650 | The following files are available in the "etc" directory of the GNU |
| 340 | Emacs distribution, and also the latest versions are available | 651 | Emacs distribution, and also the latest versions are available |
| 341 | individually via: | 652 | individually via anonymous FTP (prep.ai.mit.edu:/pub/gnu/etc/): |
| 342 | |||
| 343 | Anonymous FTP: | ||
| 344 | site: prep.ai.mit.edu | ||
| 345 | directory: /pub/gnu/etc | ||
| 346 | 653 | ||
| 347 | APPLE -- Special Report: Apple's New Look and Feel | 654 | APPLE -- Why the FSF doen't support GNU Emacs on Apple computers |
| 348 | DISTRIB -- GNU Emacs Availability Information, | 655 | DISTRIB -- GNU Emacs Availability Information, |
| 349 | including the popular "Free Software Foundation Order Form" | 656 | including the popular "Free Software Foundation Order Form" |
| 350 | FTP -- How to get GNU Software by Internet FTP or by UUCP | 657 | FTP -- How to get GNU Software by Internet FTP or by UUCP |
| @@ -355,7 +662,7 @@ Sources of Information and Help | |||
| 355 | MACHINES -- Status of GNU Emacs on Various Machines and Systems | 662 | MACHINES -- Status of GNU Emacs on Various Machines and Systems |
| 356 | MAILINGLISTS -- GNU Project Electronic Mailing Lists | 663 | MAILINGLISTS -- GNU Project Electronic Mailing Lists |
| 357 | SERVICE -- GNU Service Directory | 664 | SERVICE -- GNU Service Directory |
| 358 | SUN-SUPPORT -- includes the popular "Using Emacstool with GNU Emacs" | 665 | SUN-SUPPORT -- including "Using Emacstool with GNU Emacs" ! |
| 359 | 666 | ||
| 360 | These files are available in the "etc" directory of the GNU Emacs | 667 | These files are available in the "etc" directory of the GNU Emacs |
| 361 | distribution: | 668 | distribution: |
| @@ -365,42 +672,411 @@ Sources of Information and Help | |||
| 365 | GOSDIFF -- Differences between GNU Emacs and Gosling (Unipress??) Emacs | 672 | GOSDIFF -- Differences between GNU Emacs and Gosling (Unipress??) Emacs |
| 366 | COPYING -- GNU Emacs General Public License | 673 | COPYING -- GNU Emacs General Public License |
| 367 | NEWS -- GNU Emacs News, a history of user-visible changes | 674 | NEWS -- GNU Emacs News, a history of user-visible changes |
| 675 | LPF -- Why you should join the League for Programming Freedom | ||
| 676 | FAQ -- GNU Emacs Frequently Asked Questions (You're reading it) | ||
| 677 | OPTIONS -- a complete explanation of startup option handling | ||
| 678 | |||
| 679 | These files are available via anonymous FTP (prep.ai.mit.edu:/pub/gnu/): | ||
| 680 | |||
| 681 | tasks -- GNU Task List | ||
| 682 | standards.text -- GNU Coding Standards | ||
| 368 | 683 | ||
| 369 | In addition, all of the above files are available directly from the FSF | 684 | In addition, all of the above files are available directly from the FSF |
| 370 | via e-mail. Of course, please try to get them from a local source | 685 | via e-mail. Of course, please try to get them from a local source |
| 371 | first. | 686 | first. |
| 372 | 687 | ||
| 373 | These files are available from the FSF via e-mail: | 688 | These additional files are available from the FSF via e-mail: |
| 374 | 689 | ||
| 375 | * GNU's Bulletin, June, 1990 -- this file includes: | 690 | * GNU's Bulletin, June, 1991 -- this file includes: |
| 376 | GNU'S Who | 691 | GNU'S Who |
| 377 | What Is the Free Software Foundation? | 692 | What Is the Free Software Foundation? |
| 378 | What Is Copyleft? | 693 | What Is Copyleft? |
| 379 | GNUs Flashes | 694 | A Small Way to Help Free Software |
| 380 | Possible New Terms for GNU Libraries by Richard Stallman | 695 | GNUs Flashes (important recent developments for project GNU) |
| 381 | "League for Programming Freedom" by Michael Bloom and Richard Stallman | 696 | Free Software Support (and how to get it!) |
| 382 | Free Software Support | 697 | Copyrighted Programming Languages |
| 383 | GNU Project Status Report | 698 | AT&T Threatens Users of X Windows (and other software patent threats) |
| 384 | GNU Wish List | 699 | Project Gutenberg |
| 385 | GNU Documentation | 700 | GNU Project Status Report |
| 386 | GNU Software Available Now | 701 | GNU in Japan |
| 387 | Contents of the Emacs Release Tape | 702 | GNU Wish List |
| 388 | Contents of the Pre-Release Tape | 703 | Help Keep Government Software Free |
| 389 | Contents of the X11 Tapes | 704 | GNU Software Available Now |
| 390 | VMS Emacs and Compiler Tapes | 705 | Contents of the Emacs Tape |
| 391 | How to Get GNU Software | 706 | Contents of the Compiler Tape |
| 392 | Freemacs, an Extensible Editor for MS-DOS | 707 | Contents of the X11 Tapes |
| 393 | Thank GNUs | 708 | VMS Emacs and Compiler Tapes |
| 394 | FSF Order Form | 709 | GNU Documentation |
| 395 | * GNU Task List | 710 | How to Get GNU Software |
| 396 | * GNU Coding Standards | 711 | Free Software for Microcomputers |
| 397 | * Legal issues about contributing code to GNU | 712 | GNU Software on Apple computers |
| 398 | * GNU Project Status Report | 713 | GNU Software on the Amiga |
| 399 | 714 | GNU Software on the Atari | |
| 400 | 17: What is the current address of the FSF? | 715 | GNUish MS-DOS project |
| 716 | Freemacs, an Extensible Editor for MS-DOS | ||
| 717 | GNU in Japan | ||
| 718 | FSF Order Form | ||
| 719 | Thank GNUs | ||
| 720 | * Legal issues about contributing code to GNU | ||
| 721 | * GNU Project Status Report | ||
| 722 | |||
| 723 | 21: Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, | ||
| 724 | Ange-FTP, VIP, Dired, Ispell, Epoch, Demacs, Freemacs, or Patch? | ||
| 725 | |||
| 726 | {If you know of any other packages that are so substantial that they | ||
| 727 | deserve to be mentioned here, please tell me. Having its own mailing list | ||
| 728 | or newsgroup or more than half a megabyte of source code are good signs.} | ||
| 729 | |||
| 730 | * VM (View Mail) -- another mail reader within Emacs | ||
| 731 | |||
| 732 | Author: Kyle Jones <kyle@uunet.uu.net> | ||
| 733 | Latest released version: 4.41 | ||
| 734 | Beta test version: 5.31 | ||
| 735 | Anonymous FTP: | ||
| 736 | Emacs Lisp Archive: packages/vm-4.41.tar.Z, as-is/timer.shar.Z - | ||
| 737 | ftp.uu.net:/pub/vm-{4.41,5.31beta}.tar.Z | ||
| 738 | Newsgroups and mailing lists: | ||
| 739 | Info-VM: | ||
| 740 | gnu.emacs.vm.info | ||
| 741 | info-vm-request@uunet.uu.net (for subscriptions) | ||
| 742 | info-vm@uunet.uu.net (for submissions) + | ||
| 743 | Bug-VM: | ||
| 744 | gnu.emacs.vm.bug | ||
| 745 | bug-vm-request@uunet.uu.net (for subscriptions) | ||
| 746 | bug-vm@uunet.uu.net (for submissions) + | ||
| 747 | |||
| 748 | * SuperCite -- mail and news citation package within Emacs | ||
| 749 | |||
| 750 | Author: Barry Warsaw <bwarsaw@cen.com> | ||
| 751 | Mailing list: supercite-request@anthem.nlm.nih.gov (for subscriptions) | ||
| 752 | supercite@anthem.nlm.nih.gov (for submissions) + | ||
| 753 | Latest version: 2.2 | ||
| 754 | Anonymous FTP: | ||
| 755 | Emacs Lisp Archive: packages/sc-2.2.tar.Z | ||
| 756 | Via e-mail: | ||
| 757 | To: library@cme.nist.gov | ||
| 758 | Subject: help | ||
| 759 | |||
| 760 | NOTE: Superyank is an old version of SuperCite. | ||
| 761 | |||
| 762 | * GNUS -- news reader within Emacs | ||
| 763 | |||
| 764 | Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp> | ||
| 765 | Latest official version: 3.13 | ||
| 766 | Unofficial test version: 3.14.1 | ||
| 767 | Anonymous FTP: | ||
| 768 | cs.umn.edu:pub/gnu/emacs/gnus-3.14.1.tar.Z. | ||
| 769 | aun.uninett.no:pub/gnus-3.14.1.tar.Z | ||
| 770 | wnoc-fuk.wide.ad.jp:pub/GNU/etc/gnus-3.14.1.tar.Z | ||
| 771 | liasun3.epfl.ch:pub/gnu/emacs/gnus-3.14.1.tar.Z | ||
| 772 | aix370.rrz.uni-koeln.de:/pub/gnu/emacs/gnus-3.14.1.tar.Z | ||
| 773 | funet.fi:/networking/news/gnus-3.14.1.tar.Z | ||
| 774 | src.doc.ic.ac.uk:/gnu/EmacsBits/gnus/gnus-3.14.1.tar.Z | ||
| 775 | Emacs Lisp Archive: packages/gnus-3.13.tar.Z | ||
| 776 | Newsgroups and mailing lists: | ||
| 777 | English-only: | ||
| 778 | gnu.emacs.gnus | ||
| 779 | info-gnus-english-request@cis.ohio-state.edu (for subscriptions) | ||
| 780 | info-gnus-english@cis.ohio-state.edu (for submissions) + | ||
| 781 | Japanese (and some English): | ||
| 782 | info-gnus-request@flab.fujitsu.co.jp (for subscriptions) | ||
| 783 | info-gnus@flab.fujitsu.co.jp (for submissions) + | ||
| 784 | |||
| 785 | * Calc -- poor man's Mathematica within Emacs | ||
| 786 | |||
| 787 | Author: Dave Gillespie <daveg@csvax.cs.caltech.edu> | ||
| 788 | Latest released version: 2.02 ! | ||
| 789 | Anonymous FTP: | ||
| 790 | csvax.cs.caltech.edu:pub/calc-2.02.tar.Z ! | ||
| 791 | prep.ai.mit.edu:pub/gnu/calc-2.02.tar.Z ! | ||
| 792 | NOTE: Unlike Wolfram Research, Dave has never threatened to sue anyone | ||
| 793 | for having a program with a similar command language to Calc. :-) | ||
| 794 | |||
| 795 | * Calendar/Diary -- calendar manager within Emacs | ||
| 796 | |||
| 797 | Author: Ed Reingold <reingold@cs.uiuc.edu> | ||
| 798 | Latest version: 4.01 | ||
| 799 | Anonymous FTP: | ||
| 800 | emr.cs.uiuc.edu:/pub/emacs/calendar | ||
| 801 | Via e-mail: | ||
| 802 | To: reingold@cs.uiuc.edu | ||
| 803 | Subject: send-emacs-cal | ||
| 804 | Put your best internet e-mail address in the body. | ||
| 805 | |||
| 806 | * Ange-FTP -- adds transparent FTP access to Emacs's file access routines | ||
| 807 | |||
| 808 | Author: Andy Norman <ange@hplb.hpl.hp.com> | ||
| 809 | Latest version: 3.143 | ||
| 810 | Anonymous FTP: | ||
| 811 | ftp.gnu.ai.mit.edu:ange-ftp/ange-ftp.el.Z | ||
| 812 | Emacs Lisp Archive: | ||
| 813 | as-is/ange-ftp.el.Z (current version) | ||
| 814 | packages/ange-ftp.el.Z (old version) | ||
| 815 | Mailing list: ange-ftp-lovers-request@anorman.hpl.hp.com (subscriptions) ! | ||
| 816 | ange-ftp-lovers@anorman.hpl.hp.com (for submissions) + | ||
| 817 | NOTE: now with support for accessing VMS systems | ||
| 818 | |||
| 819 | * VIP -- vi emulation for Emacs - | ||
| 820 | |||
| 821 | Author: Aamod Sane <sane@cs.uiuc.edu> | ||
| 822 | Latest released version: 4.3 + | ||
| 823 | Anonymous FTP: | ||
| 824 | cs.uiuc.edu:pub/vip4.3.tar.Z | ||
| 825 | Emacs Lisp Archive: modes/vip-mode.tar.Z | ||
| 826 | NOTE: This version much more closely emulates vi than the one | ||
| 827 | distributed with Emacs. | ||
| 828 | |||
| 829 | Version distributed with Emacs: 3.5 | ||
| 830 | Author: Masahiko Sato <ms@sail.stanford.edu, | ||
| 831 | masahiko@sato.riec.tohoku.junet> | ||
| 832 | |||
| 833 | * Dired -- directory editor for Emacs | ||
| 834 | |||
| 835 | Author: Sebastian Kremer <sk@thp.uni-koeln.de> | ||
| 836 | Latest released version: 5.239 + | ||
| 837 | Anonymous FTP: ftp.cs.buffalo.edu:pub/Emacs/diredall.tar.Z - | ||
| 838 | ftp.uni-koeln.de:pub/gnu/emacs/diredall.tar.Z - | ||
| 839 | NOTE: This is a huge improvement over the Dired distributed with Emacs. | ||
| 840 | This version will be in Emacs 19. | ||
| 841 | |||
| 842 | * AUC TeX -- enhanced LaTeX mode + | ||
| 843 | + | ||
| 844 | Author: Kresten Krab Thorup <krab@iesd.auc.dk> + | ||
| 845 | Latest released version: 5.4 + | ||
| 846 | Anonymous FTP: iesd.auc.dk:pub/emacs-lisp/auc-tex-5.4.tar.Z + | ||
| 847 | Mailing list: + | ||
| 848 | auc-tex-request@iesd.auc.dk (for subscriptions) + | ||
| 849 | auc-tex@iesd.auc.dk (for submissions) + | ||
| 850 | auc-tex_mgr@iesd.auc.dk (auc-tex development team) + | ||
| 851 | + | ||
| 852 | * Hyperbole -- extensible hypertext management system within Emacs + | ||
| 853 | + | ||
| 854 | Author: Bob Weiner <rsw@cs.brown.edu> + | ||
| 855 | Anonymous FTP: + | ||
| 856 | wilma.cs.brown.edu:pub/hyperbole/h*.tar.Z + | ||
| 857 | Mailing lists: + | ||
| 858 | hyperbole-announce -- Hyperbole release announcements only. + | ||
| 859 | Subscriptions: + | ||
| 860 | To: hyperbole-request@cs.brown.edu + | ||
| 861 | Subject: Add <mailbox@domain.name> to hyperbole-announce. + | ||
| 862 | hyperbole -- Hyperbole discussion. + | ||
| 863 | Subscriptions: + | ||
| 864 | To: hyperbole-request@cs.brown.edu + | ||
| 865 | Subject: Add <mailbox@domain.name> to hyperbole. + | ||
| 866 | Submissions: + | ||
| 867 | hyperbole@cs.brown.edu + | ||
| 868 | NOTE: Any member of the hyperbole mailing list is automatically a + | ||
| 869 | member of the hyperbole-announce mailing list. + | ||
| 870 | NOTE: No .UUCP or ! addresses are allowed on these mailing lists. + | ||
| 871 | + | ||
| 872 | * Ispell -- spell checker in C with interface for Emacs + | ||
| 873 | |||
| 874 | Author: Geoff Kuenning <geoff@itcorp.com> (latest of many) | ||
| 875 | Latest released version: 2.0.02 | ||
| 876 | Beta test version: 3.0 (9 patches) | ||
| 877 | Anonymous FTP: | ||
| 878 | archive.cis.ohio-state.edu:/pub/gnu/ispell/* (version 2.0.02) | ||
| 879 | ftp.cs.ucla.edu:/pub/ispell/* (version 3.0, patches, dictionaries) | ||
| 880 | NOTE: Do not send mail to Geoff asking him to send you the latest | ||
| 881 | version of Ispell. He does not have free e-mail. | ||
| 882 | |||
| 883 | * Epoch -- enhanced GNU Emacs with better X interface | ||
| 884 | |||
| 885 | Latest released version: 3.2 | ||
| 886 | Beta test version: 4.0 beta patchlevel 0 ! | ||
| 887 | Anonymous FTP: | ||
| 888 | cs.uiuc.edu:pub/epoch-files/epoch/epoch-4.0b0.tar.Z ! | ||
| 889 | cs.uiuc.edu:pub/epoch-files/epoch/epoch-3.2{.tar.Z,-patch-{1,2.tar.Z}} | ||
| 890 | Newsgroup and mailing lists: ! | ||
| 891 | Epoch: ! | ||
| 892 | gnu.emacs.epoch | ||
| 893 | epoch-request@cs.uiuc.edu (for subscriptions) | ||
| 894 | epoch@cs.uiuc.edu (for submissions) + | ||
| 895 | Epoch-Design: + | ||
| 896 | epoch-design-request@cs.uiuc.edu (for subscriptions) + | ||
| 897 | epoch-design@cs.uiuc.edu (for submissions) + | ||
| 898 | |||
| 899 | * Demacs -- GNU Emacs altered to work under MS-DOS on 386 and 486 machines | ||
| 900 | |||
| 901 | Authors: Manabu Higashida <manabu@sigmath.osaka-u.ac.jp> | ||
| 902 | HIRANO Satoshi <hirano@tkl.iis.u-tokyo.ac.jp> | ||
| 903 | Latest released version: 1.2.0 | ||
| 904 | Anonymous FTP: | ||
| 905 | utsun.s.u-tokyo.ac.jp:GNU/demacs/* (nearest to U.S.A.) | ||
| 906 | ftp.sigmath.osaka-u.ac.jp:pub/Msdos/Demacs/* | ||
| 907 | wnoc-fuk.wide.ad.jp:pub/msdos/Demacs/* | ||
| 908 | ftp.3com.com:pub/gnu/msdos/demacs/* + | ||
| 909 | mindseye.berkeley.edu:pub/kanji/demacs/* + | ||
| 910 | ftp.hawaii.edu:pub/editors/demacs.tar.Z + | ||
| 911 | ftp.math.ksu.edu:pub/pc/demacs/* + | ||
| 912 | wsmr-simtel20.army.mil:pd1:<msdos.demacs>* + | ||
| 913 | ftp.uni-koeln.de: (PLEASE USE ONLY OUTSIDE WORKING HOURS!) + | ||
| 914 | msdos/gnuprogs/dem120e.zip (executables, lisp-code, doc) | ||
| 915 | msdos/gnuprogs/dem120s.zip (sources, diffs) | ||
| 916 | ftp.lysator.liu.se:pub/msdos/gnu/emacs/????????????? | ||
| 917 | mizar.docs.uu.se:pub/gnu/demacs/* + | ||
| 918 | iamsun.unibe.ch:PC/demacs/* + | ||
| 919 | flop.informatik.tu-muenchen.de:outgoing/demacs.tar + | ||
| 920 | ftp.funet.fi:pub/gnu/emacs/demacs/* + | ||
| 921 | garbo.uwasa.fi:pc/editor/dem120{e,s}.zip + | ||
| 922 | ftp.win.tue.nl:pub/gnu/demacs/* + | ||
| 923 | ugle.unit.no:pub/gnu/Demacs/* + | ||
| 924 | {Does anyone know which sites have the Kanji version?} + | ||
| 925 | Via e-mail: + | ||
| 926 | From garbo.uwasa.fi: + | ||
| 927 | To: mailserv@garbo.uwasa.fi + | ||
| 928 | Subject: garbo-request + | ||
| 929 | Body: send pc/editor/dem120e.zip + | ||
| 930 | send pc/editor/dem120s.zip + | ||
| 931 | quit + | ||
| 932 | Downloading: | ||
| 933 | EXEC-PC (Milwaukee, WI) 414-789-4210 (2400 bps) | ||
| 934 | in the Mahoney MS-DOS file area in its Editors/wordprocessors | ||
| 935 | library (F), named GNUEMACS.ZIP | ||
| 936 | Channel 1 (Cambridge, MA) 617-345-8873 (9600 bps) | ||
| 937 | in the New Uploads file area, named GNUEMACS.ZIP | ||
| 938 | NOTE: Use the -d option of [pk]unzip for all .zip archives. Some sites | ||
| 939 | have Demacs lharc'ed. {Can anyone tell me FTP sites for programs to | ||
| 940 | extract lharc and zip format files? Or even better, give me a pointer | ||
| 941 | to another FAQ that answers these questions.} | ||
| 942 | Mailing list: + | ||
| 943 | NOTE: There is no mailing list for Demacs. However, there is a list + | ||
| 944 | for DJGPP, which is the environment that Demacs runs in. Many + | ||
| 945 | Demacs problems are actually issues with DJGPP. + | ||
| 946 | DJGPP: + | ||
| 947 | Subscriptions: + | ||
| 948 | To: listserv@sun.soe.clarkson.edu + | ||
| 949 | body: add <your-address> djgpp + | ||
| 950 | or put "help" in the body. + | ||
| 951 | If this fails, mail to djgpp-request@sun.soe.clarkson.edu. + | ||
| 952 | Submissions: + | ||
| 953 | djgpp@sun.soe.clarkson.edu + | ||
| 954 | |||
| 955 | * Freemacs -- a small Emacs for MS-DOS | ||
| 956 | |||
| 957 | Author: Russ Nelson <nelson@sun.soe.clarkson.edu> + | ||
| 958 | Latest released version: 1.6a | ||
| 959 | Anonymous FTP: | ||
| 960 | simtel20.army.mil:PD:<MSDOS.FREEMACS>* | ||
| 961 | grape.ecs.clarkson.edu:pub/msdos/freemacs/* | ||
| 962 | Via e-mail: | ||
| 963 | To: archive-server@sun.soe.clarkson.edu | ||
| 964 | body: help | ||
| 965 | Via snail mail: | ||
| 966 | address: Russell Nelson, 11 Grant St., Potsdam, NY 13676 | ||
| 967 | Send $15 copying fee, and specify preferred floppy disk format: | ||
| 968 | 5.25", 360K, or 3.50", 720K | ||
| 969 | Mailing lists: | ||
| 970 | Subscriptions: | ||
| 971 | To: listserv@sun.soe.clarkson.edu | ||
| 972 | body: add <your-address> <name-of-list> | ||
| 973 | or put "help" in the body. | ||
| 974 | List distribution addresses: | ||
| 975 | freemacs-announce@sun.soe.clarkson.edu | ||
| 976 | freemacs-help@sun.soe.clarkson.edu | ||
| 977 | freemacs-workers@sun.soe.clarkson.edu (send bug reports here) | ||
| 978 | |||
| 979 | * Patch -- program to apply "diffs" for updating files | ||
| 980 | |||
| 981 | Author: Larry Wall <lwall@netlabs.com> | ||
| 982 | Latest version: 2.0 patchlevel 12u5 | ||
| 983 | (This is the version that supports the new "unified" diff format.) | ||
| 984 | Anonymous FTP: | ||
| 985 | prep.ai.mit.edu:pub/gnu/patch-2.0.12u4.tar.Z | ||
| 986 | |||
| 987 | 22: What is the real legal meaning of the GNU copyleft? | ||
| 988 | |||
| 989 | RMS writes: | ||
| 990 | |||
| 991 | The legal meaning of the GNU copyleft is less important than the spirit, | ||
| 992 | which is that Emacs is a free software project and that work pertaining | ||
| 993 | to Emacs should also be free software. "Free" means that all users have | ||
| 994 | the freedom to study, share, change and improve Emacs. To make sure | ||
| 995 | everyone has this freedom, pass along source code when you distribute | ||
| 996 | any version of Emacs or a related program, and give the recipients the | ||
| 997 | same freedom that you enjoyed. | ||
| 998 | |||
| 999 | If you still want to find out about the legal meaning of the copyleft, | ||
| 1000 | please ask yourself if this means you are not paying attention to the | ||
| 1001 | spirit. | ||
| 1002 | |||
| 1003 | 23: What are appropriate messages for gnu.emacs.help, gnu.emacs.bug, | ||
| 1004 | comp.emacs, etc.? | ||
| 1005 | |||
| 1006 | The file etc/MAILINGLISTS discusses the purpose of each GNU | ||
| 1007 | mailing-list. (See question 20 on how to get a copy.) For | ||
| 1008 | those which are gatewayed with newsgroups, it lists both the newsgroup | ||
| 1009 | name and the mailing list address. | ||
| 1010 | |||
| 1011 | comp.emacs is for discussion of Emacs programs in general. This | ||
| 1012 | includes GNU Emacs along with various other implementations like JOVE, | ||
| 1013 | MicroEmacs, Freemacs, MG, Unipress, CCA, Epsilon, etc. | ||
| 1014 | |||
| 1015 | Many people post GNU Emacs questions to comp.emacs because they don't | ||
| 1016 | receive any of the gnu.* newsgroups. Arguments have been made both for | ||
| 1017 | and against posting GNU-Emacs-specific material to comp.emacs. You have | ||
| 1018 | to decide for yourself. | ||
| 1019 | |||
| 1020 | Messages advocating "non-free" software are considered unacceptable on any | ||
| 1021 | of the gnu.* newsgroups except for gnu.misc.discuss, which was created to | ||
| 1022 | hold the extensive flame-wars on the subject. "non-free" software | ||
| 1023 | includes any software for which the end user can't get source code. Be | ||
| 1024 | careful to remove the gnu.* groups from the "Newsgroups:" line when | ||
| 1025 | posting a followup that recommends such software. | ||
| 1026 | |||
| 1027 | The correct place to report GNU Emacs bugs is by e-mail to | ||
| 1028 | bug-gnu-emacs@prep.ai.mit.edu. Anything sent here also appears in the | ||
| 1029 | newsgroup gnu.emacs.bug, but please use e-mail instead of news to submit | ||
| 1030 | the bug report. This way a reliable return address is available so you | ||
| 1031 | can be contacted for further details. | ||
| 1032 | |||
| 1033 | RMS explains: ! | ||
| 1034 | |||
| 1035 | Sending bug reports to help-gnu-emacs (which has the effect of posting | ||
| 1036 | on gnu.emacs.help) is undesirable because it takes the time of an | ||
| 1037 | unnecessarily large group of people, most of whom are just users and | ||
| 1038 | have no idea how to fix these problem. bug-gnu-emacs reaches a much | ||
| 1039 | smaller group of people who are more likely to know what to do and have | ||
| 1040 | expressed a wish to receive more messages about Emacs than the others. | ||
| 1041 | |||
| 1042 | However, RMS says there are circumstances when it is okay to post to + | ||
| 1043 | gnu.emacs.help: + | ||
| 1044 | + | ||
| 1045 | If you have reported a bug and you don't hear about a possible fix, then + | ||
| 1046 | after a suitable delay (such as a week) it is okay to post on + | ||
| 1047 | gnu.emacs.help asking if anyone can help you. + | ||
| 1048 | |||
| 1049 | If you are unsure whether you have a bug, RMS describes how to tell: ! | ||
| 1050 | |||
| 1051 | ... if Emacs crashes, that is a bug. If Emacs gets compilation errors | ||
| 1052 | while building, that is a bug. If Emacs crashes while building, that is | ||
| 1053 | a bug. If Lisp code does not do what the documentation says it does, | ||
| 1054 | that is a bug. | ||
| 1055 | |||
| 1056 | 24: How do I unsubscribe to this mailing list? | ||
| 1057 | |||
| 1058 | If you are receiving a GNU mailing list named "XXX", you might be able | ||
| 1059 | to unsubscribe to it by sending a request to the address | ||
| 1060 | "XXX-request@prep.ai.mit.edu". However, this will not work if you are | ||
| 1061 | not listed on the main mailing list, but instead recieve the mail from a | ||
| 1062 | distribution point. In that case, you will have to track down at which | ||
| 1063 | distribution point you are listed. Inspecting the "Received:" headers | ||
| 1064 | on the mail messages may help, along with liberal use of the "EXPN" or | ||
| 1065 | "VRFY" sendmail commands through "telnet <site-address> smtp". Ask your | ||
| 1066 | postmaster for help. | ||
| 1067 | |||
| 1068 | 25: What is the LPF and why should I join it? | ||
| 1069 | |||
| 1070 | The LPF opposes the expanding danger of software patents and | ||
| 1071 | look-and-feel copyrights. Write to league@prep.ai.mit.edu for more | ||
| 1072 | information. You can get papers describing the LPF's views via | ||
| 1073 | anonymous FTP (prep.ai.mit.edu:/pub/lpf/*) or via anonymous UUCP | ||
| 1074 | (osu-cis!~/lpf/*). | ||
| 1075 | |||
| 1076 | 26: What is the current address of the FSF? | ||
| 401 | 1077 | ||
| 402 | Snail mail address: | 1078 | Snail mail address: |
| 403 | Free Software Foundation | 1079 | Free Software Foundation, Inc. |
| 404 | 675 Massachusetts Avenue | 1080 | 675 Massachusetts Avenue |
| 405 | Cambridge, MA 02139, USA | 1081 | Cambridge, MA 02139, USA |
| 406 | 1082 | ||
| @@ -408,10 +1084,9 @@ Sources of Information and Help | |||
| 408 | (617) 876-3296 | 1084 | (617) 876-3296 |
| 409 | 1085 | ||
| 410 | E-mail addresses: | 1086 | E-mail addresses: |
| 411 | gnu@prep.ai.mit.edu {probably read by Len Tower} | 1087 | gnu@prep.ai.mit.edu |
| 412 | gnulists@prep | ||
| 413 | 1088 | ||
| 414 | 18: What is the current address of the LPF? | 1089 | 27: What is the current address of the LPF? |
| 415 | 1090 | ||
| 416 | Snail mail address: | 1091 | Snail mail address: |
| 417 | League for Programming Freedom | 1092 | League for Programming Freedom |
| @@ -421,403 +1096,728 @@ Sources of Information and Help | |||
| 421 | 1096 | ||
| 422 | Phone number: | 1097 | Phone number: |
| 423 | (617) 243-4061 { or 243-4091, I'm not sure ... } | 1098 | (617) 243-4061 { or 243-4091, I'm not sure ... } |
| 1099 | {Will someone please tell me which of the above numbers is correct?} | ||
| 424 | 1100 | ||
| 425 | E-mail address: | 1101 | E-mail address: |
| 426 | league@prep.ai.mit.edu | 1102 | league@prep.ai.mit.edu |
| 427 | 1103 | ||
| 428 | 19: Where can I get the up-to-date GNU stuff? | 1104 | 28: Where can I get other up-to-date GNU stuff? |
| 429 | 1105 | ||
| 430 | The most up-to-date official GNU stuff is normally kept on | 1106 | The most up-to-date official GNU stuff is normally kept on |
| 431 | prep.ai.mit.edu and is available for anonymous FTP. See the files | 1107 | prep.ai.mit.edu and is available for anonymous FTP. See the files |
| 432 | etc/DISTRIB and etc/FTP for more information. (To get copies of these | 1108 | etc/DISTRIB and etc/FTP for more information. (To get copies of these |
| 433 | files, see question 16.) | 1109 | files, see question 20.) |
| 1110 | |||
| 1111 | For Europeans, the site nic.funet.fi duplicates the directory /pub/gnu | ||
| 1112 | from prep.ai.mit.edu. | ||
| 1113 | |||
| 1114 | 29: Where can I get the latest version of this document (the FAQ list)? | ||
| 1115 | |||
| 1116 | The GNU Emacs FAQ is available in several ways: | ||
| 1117 | |||
| 1118 | 1. Via USENET. If you can read news, the FAQ should be available in your + | ||
| 1119 | news spool, in both the "gnu.emacs.help" and "comp.emacs" newsgroups. | ||
| 1120 | Every news reader of which I know will allow you to read any news | ||
| 1121 | article that is still in the news spool, even if you have read the | ||
| 1122 | article before. You may need to read the instructions for your news | ||
| 1123 | reader to discover how to do this. In "rn", this command will do this | ||
| 1124 | for you at the "article selection level": | ||
| 1125 | |||
| 1126 | ?GNU Emacs FAQ?rc:m | ||
| 1127 | |||
| 1128 | In GNUS, you should type "C-u G" from the *Subject* buffer or "C-u SPC" | ||
| 1129 | from the *Newsgroup* buffer to view all articles in a newsgroup. | ||
| 1130 | |||
| 1131 | The FAQ articles' message IDs are: | ||
| 1132 | |||
| 1133 | <GNU-Emacs-FAQ-0.92Feb23210646@bigbird.bu.edu> ! | ||
| 1134 | <GNU-Emacs-FAQ-1.92Feb23210646@bigbird.bu.edu> ! | ||
| 1135 | <GNU-Emacs-FAQ-2.92Feb23210646@bigbird.bu.edu> ! | ||
| 1136 | <GNU-Emacs-FAQ-3.92Feb23210646@bigbird.bu.edu> + | ||
| 1137 | |||
| 1138 | If you are viewing this in the GNUS `*Article*' buffer, you can move | ||
| 1139 | point within one of the above message IDs and type "r" to fetch the | ||
| 1140 | referenced article into the `*Article*' buffer. Type "o" in the | ||
| 1141 | `*Article*' buffer to restore the previous contents of the `*Article*' | ||
| 1142 | buffer. If you are not viewing this in the GNUS `*Article*' buffer, | ||
| 1143 | use M-x gnus-Article-refer-article instead of "r". GNUS must be | ||
| 1144 | running and you must display the `*Article*' buffer to see the results. | ||
| 1145 | |||
| 1146 | If the FAQ articles have expired and been deleted from your news spool, | ||
| 1147 | it might (or might not) do some good to complain to your news | ||
| 1148 | administrator, because the most recent FAQ should not expire before | ||
| 1149 | April 15, 1992. ! | ||
| 1150 | |||
| 1151 | 2. Via anonymous FTP. You can fetch the FAQ articles via anonymous FTP + | ||
| 1152 | (pit-manager.mit.edu:pub/usenet/news.answers/GNU-Emacs-FAQ/part?). ! | ||
| 1153 | |||
| 1154 | 3. Via e-mail. You can send the following magical incantation in the body + | ||
| 1155 | of a message to mail-server@pit-manager.mit.edu: | ||
| 1156 | |||
| 1157 | send usenet/news.answers/GNU-Emacs-FAQ/part0 ! | ||
| 1158 | send usenet/news.answers/GNU-Emacs-FAQ/part1 ! | ||
| 1159 | send usenet/news.answers/GNU-Emacs-FAQ/part2 + | ||
| 1160 | send usenet/news.answers/GNU-Emacs-FAQ/part3 + | ||
| 1161 | + | ||
| 1162 | 4. Via WAIS. The GNU Emacs FAQ is available via WAIS indexed on a + | ||
| 1163 | per-question basis from the "faq" database on bigbird.bu.edu on the + | ||
| 1164 | non-standard IP port number of 2210. This is probably the best way to + | ||
| 1165 | find out if there is something in the FAQ related to your question. I + | ||
| 1166 | use this myself to answer questions I see posted on gnu.emacs.help. ! | ||
| 1167 | ! | ||
| 1168 | The articles of the GNU Emacs FAQ are also available from the "usenet" ! | ||
| 1169 | database on pit-manager.mit.edu (on the standard IP port: 210), along ! | ||
| 1170 | with a lot of other FAQ articles. However, these are all indexed at ! | ||
| 1171 | the whole article level instead of at the question level. This is a ! | ||
| 1172 | better place to look if you want to fetch the entire FAQ. ! | ||
| 1173 | ! | ||
| 1174 | 5. In the GNU Emacs distribution. Since GNU Emacs 18.56, the latest ! | ||
| 1175 | available version of the FAQ at the time of release has been part of | ||
| 1176 | the GNU Emacs distribution as file etc/FAQ. 18.58 is the latest ! | ||
| 1177 | version, and it was released in February 1992. ! | ||
| 1178 | |||
| 1179 | |||
| 1180 | |||
| 1181 | GNU Emacs and Various Computing Environments | ||
| 1182 | |||
| 1183 | 30: Where does the name "Emacs" come from? | ||
| 434 | 1184 | ||
| 435 | 20: Where can I get the latest VM, Supercite, GNUS, Calc, Calendar, or Patch? | 1185 | EMACS originally was an acronym for Editor MACroS. The first Emacs was |
| 1186 | a set of macros written by Richard Stallman and Guy Steele for the | ||
| 1187 | editor TECO (Text Editor and COrrector (originally Tape Editor and | ||
| 1188 | COrrector)) on a PDP-10. (Amusing fact: many people have told me that | ||
| 1189 | TECO code looks a lot like line noise. See alt.lang.teco if you are | ||
| 1190 | interested.) | ||
| 436 | 1191 | ||
| 437 | 1. VM: | 1192 | 31: What is the latest version of GNU Emacs? |
| 438 | 1193 | ||
| 439 | Author: Kyle Jones <kyle@xanth.cs.odu.edu> | 1194 | GNU Emacs 18.58 is the current version. Fixes from 18.57 include better ! |
| 1195 | mail address parsing, an X visual bell speedup, a call-process ! | ||
| 1196 | enhancement, a regexp matching change, the ability to apply a numeric ! | ||
| 1197 | argument to a self-inserting digit, getting X resource values from the ! | ||
| 1198 | RESOURCE_MANAGER property, more reliable shell mode job control, and a ! | ||
| 1199 | change to copy-keymap. Also, support has been added for many new system ! | ||
| 1200 | types. ! | ||
| 440 | 1201 | ||
| 441 | Mailing lists: info-vm-request@uunet.uu.net | 1202 | The June 1991 GNU's Bulletin says this about the status of Emacs: + |
| 442 | info-vm@uunet.uu.net | ||
| 443 | bug-vm-request@uunet.uu.net | ||
| 444 | bug-vm@uunet.uu.net | ||
| 445 | 1203 | ||
| 446 | Anonymous FTP: | 1204 | GNU Emacs 18.57 is the current version. The undo facility has been |
| 1205 | completely rewritten and now holds unlimited data temporarily, and a | ||
| 1206 | user-specified amount for the long term. | ||
| 447 | 1207 | ||
| 448 | Last released version: 4.41 | 1208 | Berkeley is distributing GNU Emacs with the 4.3 BSD distribution, and |
| 449 | site: tut.cis.ohio-state.edu | 1209 | numerous companies distribute it also. |
| 450 | file: /pub/gnu/vm/vm-4.41.tar.Z | ||
| 451 | 1210 | ||
| 452 | Beta test version: 5.18 | 1211 | Emacs 18 maintenance continues for simple bug fixes. |
| 453 | site: abcfd20.larc.nasa.gov | ||
| 454 | directory: /pub/vm | ||
| 455 | 1212 | ||
| 456 | 2. Supercite: | 1213 | To visit a file with information about what has changed in recent ! |
| 1214 | versions, type "C-h n". ! | ||
| 457 | 1215 | ||
| 458 | Author: Barry Warsaw <warsaw@warsaw.nlm.nih.gov> | 1216 | 32: When will GNU Emacs 19 be available? |
| 459 | 1217 | ||
| 460 | Latest version: 2.1 | 1218 | Good question, I don't know. For that matter, neither do the developers. |
| 1219 | It will undoubtedly be available sometime in the 1990s. :-) People are | ||
| 1220 | actually using alpha-test version of Emacs 19, which is a good sign. Work | ||
| 1221 | has begun on features for Emacs 20. | ||
| 461 | 1222 | ||
| 462 | Mailing lists: supercite@warsaw.nlm.nih.gov | 1223 | RMS writes: |
| 463 | supercite-request@warsaw.nlm.nih.gov | ||
| 464 | 1224 | ||
| 465 | Anonymous FTP: | 1225 | Work is progressing steadily on 19 and it the to-do list is getting |
| 466 | site: durer.cme.nist.gov [129.6.32.4] | 1226 | smaller. But I don't want to make the mistake of predicting when it |
| 467 | files:/pub/gnu/elisp/supercite-2.1.shar.0# (where # is replaced by 1 or 2) | 1227 | will be ready. |
| 468 | 1228 | ||
| 469 | NOTE: Superyank is an old version of Supercite. | 1229 | 33: What will be different about GNU Emacs 19? |
| 470 | 1230 | ||
| 471 | 3. GNUS: | 1231 | From the June 1991 GNU's Bulletin: |
| 472 | 1232 | ||
| 473 | Author: Masanobu Umeda | 1233 | Version 19 approaches release, counting among its new features: before |
| 1234 | and after change hooks, source-level debugging of Emacs Lisp programs, X | ||
| 1235 | selection processing (including clipboard selections), scrollbars, | ||
| 1236 | support for European character sets, floating point numbers, per-buffer | ||
| 1237 | mouse commands, X resource manager interfacing, mouse-tracking, | ||
| 1238 | Lisp-level binding of function keys, multiple X windows (`screens' to | ||
| 1239 | Emacs), a new input system---all input now arrives in the form of Lisp | ||
| 1240 | objects---and buffer allocation, which uses a new mechanism capable of | ||
| 1241 | returning storage to the system when a buffer is killed. | ||
| 474 | 1242 | ||
| 475 | Latest version: 3.13 | 1243 | Thanks go to Alan Carroll and the people who worked on Epoch for |
| 1244 | generating initial feedback to a multi-windowed Emacs. Emacs 19 | ||
| 1245 | supports two styles of multiple windows, one with a separate screen for | ||
| 1246 | the minibuffer, and another with a minibuffer attached to each screen. | ||
| 476 | 1247 | ||
| 477 | Anonymous FTP: | 1248 | Features being considered for later releases of Emacs include: |
| 478 | site: tut.cis.ohio-state.edu | 1249 | associating property lists with regions of text in a buffer; multiple |
| 479 | files: /pub/gnu/gnus/3.13.##-of-11.Z (where ## is replaced by 00 -- 11) | 1250 | fonts, color, and pixmaps defined by those properties; different |
| 1251 | visibility conditions for the regions, and for various windows showing | ||
| 1252 | one buffer; hooks to be run if point or mouse moves outside a certain | ||
| 1253 | range; incrementally saving undo history in a file; static menu bars; | ||
| 1254 | and better pop-up menus. | ||
| 480 | 1255 | ||
| 481 | 4. Calc: | 1256 | Mention of these two items disappeared in the January 1991 GNU's bulletin: |
| 482 | 1257 | ||
| 483 | Author: Dave Gillespie <daveg@csvax.cs.caltech.edu> | 1258 | * Incremental syntax analysis for various programming languages (Leif). |
| 1259 | * A more sophisticated emacsclient/server model, which would provide | ||
| 1260 | network transparent Emacs widget functionality. | ||
| 484 | 1261 | ||
| 485 | Latest version: 1.06 | 1262 | 34: Is there an Emacs that has better mouse and X window support? |
| 486 | 1263 | ||
| 487 | Anonymous FTP: | 1264 | Emacs 18 has some limited X Window System support, but there are |
| 488 | site: csvax.cs.caltech.edu [131.215.131.131] | 1265 | problems. Emacs 19 will have amazing mouse and window support. Right |
| 489 | or any comp.sources.misc archive | 1266 | now, there is a modified version of Emacs 18.55 called "Epoch" which has |
| 1267 | greatly improved mouse and window support. To obtain Epoch, see | ||
| 1268 | question 21. | ||
| 490 | 1269 | ||
| 491 | 5. Calendar/Diary | 1270 | There are numerous Emacs Lisp packages that have been written to extend |
| 1271 | Emacs 18's mouse handling capabilities. Some of these packages also have | ||
| 1272 | patches to the C code to provide enhanced capabilities. Look up "mouse" | ||
| 1273 | in the Lisp Code Directory (see question 17). | ||
| 492 | 1274 | ||
| 493 | Author: Ed Reingold <reingold@cs.uiuc.edu> | 1275 | NOTE: Epoch only works with the X Window System; it does not work on |
| 1276 | ordinary terminals. | ||
| 494 | 1277 | ||
| 495 | Latest version: 4 | 1278 | 35: Where can I get the "unofficial HP GNU Emacs"? |
| 496 | 1279 | ||
| 497 | E-mail: | 1280 | The unofficial HP GNU Emacs is available via anonymous FTP |
| 498 | Subject: send-emacs-cal | 1281 | (me10.lbl.gov:pub/interex/HUGE/HUGE.{README.HP,tar.Z.??}, |
| 499 | body: your best internet e-mail address | 1282 | ee.utah.edu:HUGE/*, PLEASE FTP DURING NON-WORK HOURS!!!) and takes about |
| 1283 | 35 megabytes of disk space to build. It is useful for non-HP machines, | ||
| 1284 | but some of the added features will only work under HP-UX. | ||
| 500 | 1285 | ||
| 501 | 6. Patch | 1286 | You will need to get patches to work with HP-UX 8.0 or on 700 series |
| 1287 | machines via e-mail from Darryl Okahata <darrylo@sr.hp.com>. | ||
| 502 | 1288 | ||
| 503 | Author: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1289 | 36: Where can I get Emacs for my PC? |
| 504 | 1290 | ||
| 505 | Latest version: 2.0 patchlevel 12 | 1291 | ** Demacs |
| 506 | 1292 | ||
| 507 | Anonymous FTP: | 1293 | For 386 or 486 PCs, there is a version of GNU Emacs called Demacs. To get |
| 508 | site: any comp.sources.unix archive | 1294 | Demacs see question 21. |
| 509 | 1295 | ||
| 510 | or, for Europeans: | 1296 | From the announcement message: |
| 511 | 1297 | ||
| 512 | site: archive.cs.ruu.nl [131.211.80.5] | 1298 | Demacs is almost a full set of GNU Emacs but does not support some |
| 513 | file: /pub/UNIX/patch-2.0.tar.Z | 1299 | features: asynchronous process, locking a file, etc. |
| 514 | 1300 | ||
| 515 | 21: How do I install a piece of Texinfo documentation? | 1301 | Demacs provides following DOS specific features: |
| 516 | 1302 | ||
| 517 | First create Info files from the Texinfo files with M-x | 1303 | * File type: text or binary file translation. |
| 518 | texinfo-format-buffer. There is also a program called "makeinfo" that | 1304 | * "8bit clean" display mode. |
| 519 | provides better error checking and runs faster. Currently, it comes | 1305 | * 8086 software interrupt call by int86 lisp function. |
| 520 | with the Emacs Lisp manual (which comes on the GNU Emacs tape). | 1306 | * Machine specific features such as function key support. |
| 1307 | * File name completion with drive name. | ||
| 1308 | * Child process (suspend-emacs, call-process). | ||
| 1309 | * Enhanced dired mode which can work without 'ls.exe'. | ||
| 521 | 1310 | ||
| 522 | For information about the Texinfo format, read the Texinfo manual which | 1311 | To our regret `shell-mode' does not work, but `compile' command works |
| 523 | comes with Emacs. This manual also comes installed in Info format, so | 1312 | properly. |
| 524 | you can read it online. | ||
| 525 | 1313 | ||
| 526 | Neither texinfo-format-buffer nor the makeinfo program install the | 1314 | Demacs was developed using an MS-DOS version of gcc called djgpp by D. J. |
| 527 | resulting Info files in Emacs's Info tree. To install Info files: | 1315 | Delorie <dj@ctron.com> which can compile and run large programs under |
| 1316 | MS-DOS, but not under MS Windows. Demacs was derived from Nemacs rather | ||
| 1317 | than straight from GNU Emacs. | ||
| 528 | 1318 | ||
| 529 | 1. Move the files to the "info" directory in the installed Emacs | 1319 | There are a variety of other Emacses for MS-DOS including among them the |
| 530 | distribution. See question 6 if you don't know where that | 1320 | following. |
| 531 | is. | ||
| 532 | 1321 | ||
| 533 | 2. Edit the file info/dir in the installed Emacs distribution, and add a | 1322 | ** Freemacs |
| 534 | line for the top level node in the Info package that you are | ||
| 535 | installing. | ||
| 536 | |||
| 537 | 22: What is the real legal meaning of the GNU copyleft? | ||
| 538 | |||
| 539 | RMS writes: | ||
| 540 | |||
| 541 | The legal meaning of the GNU copyleft is less important than the spirit, | ||
| 542 | which is that Emacs is a free software project and that work pertaining | ||
| 543 | to Emacs should also be free software. "Free" means that all users have | ||
| 544 | the freedom to study, share, change and improve Emacs. To make sure | ||
| 545 | everyone has this freedom, pass along source code when you distribute | ||
| 546 | any version of Emacs or a related program, and give the recipients the | ||
| 547 | same freedom that you enjoyed. | ||
| 548 | 1323 | ||
| 549 | If you still want to find out about the legal meaning of the copyleft, | 1324 | Russ Nelson <nelson@sun.soe.clarkson.edu>, the author, describes |
| 550 | please ask yourself if this means you are not paying attention to the | 1325 | Freemacs: |
| 551 | spirit. | ||
| 552 | 1326 | ||
| 553 | 23: What are appropriate messages for gnu.emacs.help/gnu.emacs.bug/comp.emacs | 1327 | * Freemacs is free, and it was designed from the start to be |
| 554 | etc.? | 1328 | programmable. |
| 1329 | * Freemacs is the only IBM-PC editor that tries to be like GNU Emacs. | ||
| 1330 | * Freemacs can only edit files less than 64K in length. | ||
| 1331 | * Freemacs doesn't have undo. | ||
| 555 | 1332 | ||
| 556 | The file etc/MAILINGLISTS discusses the purpose of each GNU | 1333 | Carl Witty <cwitty@cs.stanford.edu> describes Freemacs: |
| 557 | mailing-list. (See question 16 on how to get a copy.) For | ||
| 558 | those which are gatewayed with newsgroups, it lists both the newsgroup | ||
| 559 | name and the mailing list address. | ||
| 560 | 1334 | ||
| 561 | comp.emacs is for discussion of Emacs programs in general. This | 1335 | Better is Freemacs, which follows the tradition of ITS and GNU Emacs by |
| 562 | includes GNU Emacs along with various other implementations like JOVE, | 1336 | having an full, turing-complete extension language which is incompatible |
| 563 | MicroEmacs, Freemacs, MG, Unipress, CCA, etc. | 1337 | with everything else. In fact, it's even closer to ITS Emacs than GNU |
| 1338 | Emacs is, because Mint (Freemacs' extension language) is absolutely | ||
| 1339 | illegible without weeks of study, much like TECO. | ||
| 564 | 1340 | ||
| 565 | Many people post GNU Emacs questions to comp.emacs because they don't | 1341 | To get Freemacs see question 21. |
| 566 | receive any of the gnu.* newsgroups. Arguments have been made both for | ||
| 567 | and against posting GNU-Emacs-specific material to comp.emacs. You have | ||
| 568 | to decide for yourself. | ||
| 569 | 1342 | ||
| 570 | 24: Should I send questions directly to people who post a lot on the net, | 1343 | ** MicroEmacs |
| 571 | instead of posting myself? | ||
| 572 | 1344 | ||
| 573 | I don't know about the others, but please don't send such messages to me | 1345 | MicroEmacs is a descendant of Microemacs {originally by Dave Conroy?}. It + |
| 574 | just because you don't want to disturb a lot of people. Send messages | 1346 | is programmable in a BASIC-like language. Many of the keybindings are + |
| 575 | to individuals that concern things that individual has written. | 1347 | different from GNU Emacs. It is rumored that MicroEmacs can not correctly + |
| 1348 | edit files larger than memory. The author is Daniel Lawrence + | ||
| 1349 | <dan@mdbs.uucp, dan@midas.mgmt.purdue.edu, nwd@j.cc.purdue.edu>. The - | ||
| 1350 | latest version is 3.10 and it is available via anonymous FTP | ||
| 1351 | (midas.mgmt.purdue.edu (non-working hours only), durer.cme.nist.gov, | ||
| 1352 | wuarchive.wustl.edu:/mirrors/msdos/memacs/*). Version 3.11 is in beta | ||
| 1353 | test. | ||
| 576 | 1354 | ||
| 577 | 1355 | ** JOVE | |
| 578 | |||
| 579 | GNU Emacs, all its Variants, and other Editors | ||
| 580 | |||
| 581 | 25: Where does the name "Emacs" come from? | ||
| 582 | 1356 | ||
| 583 | EMACS originally was an acronym for Editor MACroS. The first Emacs was | 1357 | Another Emacs for small machines is JOVE (Jonathan's Own Version of |
| 584 | a set of macros written by Richard Stallman for the editor TECO (Tape | 1358 | Emacs). The latest official version is 4.14. There appears to be a newer |
| 585 | Editor and COrrector {Text Editor and COrrector?}) on a PDP-10. | 1359 | version. People rumored to be working on JOVE include Mark Moraes |
| 586 | (Amusing fact: many people have told me that TECO code looks a lot like | 1360 | <moraes@cs.toronto.edu> and Bill Marsh <bmarsh@cod.nosc.mil>. It is |
| 587 | line noise.) | 1361 | available via anonymous FTP (cs.rochester.edu:/pub/jove.tar.4.14.Z, |
| 588 | 1362 | cs.toronto.edu:/pub/moraes/jove4.14.3.tar.Z, ftp.uu.net:????). + | |
| 589 | 26: What is the latest version of GNU Emacs? | ||
| 590 | |||
| 591 | GNU Emacs 18.55. GNU Emacs 18.56 is coming out with some bug fixes, but | ||
| 592 | no additional functionality. | ||
| 593 | |||
| 594 | 27: When will GNU Emacs 19 be available? | ||
| 595 | |||
| 596 | Good question, I don't know. For that matter, neither do the | ||
| 597 | developers. It will undoubtedly be available sometime in the 1990s. | ||
| 598 | |||
| 599 | 28: What will be different about GNU Emacs 19? | ||
| 600 | |||
| 601 | From the latest "GNU's Bulletin": | ||
| 602 | |||
| 603 | Version 19 approaches release with a host of new features: before and | ||
| 604 | after change hooks; X selection processing (including CLIPBOARD | ||
| 605 | selections); scrollbars; support for European character sets; floating | ||
| 606 | point numbers; per-buffer mouse commands; interfacing with the X | ||
| 607 | resource manager; mouse-tracking; Lisp-level binding of function keys; | ||
| 608 | and multiple X windows (`screens' to Emacs). | ||
| 609 | |||
| 610 | Thanks go to Alan Carroll and the people who worked on Epoch for | ||
| 611 | generating initial feedback to a multi-windowed Emacs. Emacs 19 | ||
| 612 | supports two styles of multiple windows, one with a separate screen for | ||
| 613 | the minibuffer, and another with a minibuffer attached to each screen. | ||
| 614 | |||
| 615 | More features of Version 19 are buffer allocation, which uses a new | ||
| 616 | mechanism capable of returning storage to the system when a buffer is | ||
| 617 | killed, and a new input system---all input now arrives in the form of | ||
| 618 | Lisp objects. | ||
| 619 | |||
| 620 | Other features being considered for Version 19 include: | ||
| 621 | |||
| 622 | * Associating property lists with regions of text in a buffer. | ||
| 623 | * Multiple font, color, and pixmaps defined by those properties. | ||
| 624 | * Different visibility conditions for the regions, and for the various | ||
| 625 | windows showing one buffer. | ||
| 626 | * Incremental syntax analysis for various programming languages. | ||
| 627 | * Hooks to be run if point or mouse moves outside a certain range. | ||
| 628 | * Source-level debugging for Emacs Lisp. | ||
| 629 | * Incrementally saving undo history in a file, so that recover-file also | ||
| 630 | reinstalls buffer's undo history. | ||
| 631 | * Static menu bars, and better pop-up menus. | ||
| 632 | * A more sophisticated emacsclient/server model, which would provide | ||
| 633 | network transparent Emacs widget functionality. | ||
| 634 | 1363 | ||
| 635 | Also, Emacs 19 will have a Emacs Lisp source code debugger. | 1364 | ** MG |
| 636 | 1365 | ||
| 637 | 29: Is there an Emacs that has better mouse and X window support? | 1366 | MG is another descendant of Microemacs. MG used to stand for |
| 1367 | MicroGNUEmacs, but now just stands for MG. The look-and-feel of MG is + | ||
| 1368 | intended to be close to that of GNU Emacs. It is rumored that MG can not + | ||
| 1369 | correctly edit files larger than memory. The current version is rumored + | ||
| 1370 | to be 2. There is a version 3 in beta which works on the Amiga. It is | ||
| 1371 | also available via anonymous FTP (ftp.white.toronto.edu:pub/mg/*, | ||
| 1372 | wuarchive.wustl.edu: /mirrors/unix-c/editors/mg*, procyon.cis.ksu.edu | ||
| 1373 | (source and executable)). | ||
| 638 | 1374 | ||
| 639 | Emacs 18 has some limited X Window System support, but there are | 1375 | 37: Where can I get Emacs for my Atari ST? |
| 640 | problems. Emacs 19 will have amazing mouse and window support. Right | ||
| 641 | now, there is a modified version of Emacs 18.55 called "Epoch" which has | ||
| 642 | greatly improved mouse and window support. The latest version of Epoch | ||
| 643 | is available via: | ||
| 644 | 1376 | ||
| 645 | Anonymous FTP: | 1377 | Anonymous FTP: |
| 646 | site: cs.uiuc.edu | 1378 | cs.uni-sb.de:/pub/atari/emacs/???????? |
| 647 | directory: pub/epoch-files/epoch | ||
| 648 | file: epoch-3.2b (b stands for beta) | ||
| 649 | |||
| 650 | NOTE: Epoch only works with the X Window System; it does not work on | ||
| 651 | ordinary terminals. | ||
| 652 | 1379 | ||
| 653 | 30: How do I get Emacs for my PC? | 1380 | 38: Where can I get Emacs for my Amiga? |
| 654 | 1381 | ||
| 655 | GNU Emacs won't run on a PC directly under MS-DOS. There have been | 1382 | All of the files are lharc-ed. |
| 656 | reports of people running GNU Emacs under a special program under MS-DOS | ||
| 657 | on 286 or 386 machines, but I don't know the details. | ||
| 658 | 1383 | ||
| 659 | You can try a variety of similar programs such as MG, MicroEmacs, | 1384 | Anonymous FTP: |
| 660 | Freemacs, etc. | 1385 | oes.orst.edu:/pub/almanac/comp/amiga/software/gnuemacs-1.10/* |
| 661 | 1386 | ||
| 662 | Russ Nelson <nelson@sun.soe.clarkson.edu>, the author, describes | 1387 | Via e-mail: |
| 663 | Freemacs: | 1388 | To: almanac@oes.orst.edu: |
| 664 | 1389 | body: | |
| 665 | * Freemacs is free, and it was designed from the start to be | 1390 | mode uuencode |
| 666 | programmable. | 1391 | send computer amiga software gnuemacs <file> |
| 667 | * Freemacs is the only IBM-PC editor that tries to be like GNU Emacs. | 1392 | <file> is replaced by one of the following: |
| 668 | * Freemacs can only edit files less than 64K in length. | 1393 | Required: d1.lzh d2.lzh |
| 669 | * Freemacs doesn't have undo. | 1394 | Recommended: d3_info.lzh d3_infolisp.lzh |
| 1395 | Optional: d3_autoloaded.lzh d3_entertainmentetc.lzh | ||
| 1396 | d3_entertainmentlisp.lzh d4_src.lzh d5_languagelisp.lzh | ||
| 1397 | d5_viclone.lzh d6_gnulibsrc.lzh d6_mailpackage.lzh | ||
| 1398 | d6_mathpackage.lzh d6_misc.lzh d6_textformat.lzh | ||
| 1399 | The `d#' at the beginning of each file is its disk number, which is | ||
| 1400 | referred to by the documentation. | ||
| 1401 | |||
| 1402 | 39: Where can I get Emacs for my Apple computer? | ||
| 1403 | |||
| 1404 | The FSF is a participant in a boycott of Apple because of Apple's "look | ||
| 1405 | and feel" copyright suits. See the file etc/APPLE for more details. | ||
| 1406 | Because of this boycott, the FSF doesn't include support in GNU software | ||
| 1407 | for Apple computers such as the Macintosh. | ||
| 1408 | |||
| 1409 | Please don't help people port or develop software for Apple computers. | ||
| 1410 | |||
| 1411 | 40: Where can I get Emacs with NeWS support? | ||
| 1412 | |||
| 1413 | Chris Maio's NeWS support package for GNU Emacs is available via | ||
| 1414 | anonymous FTP (columbia.edu:pub/ps-emacs.tar.Z, - | ||
| 1415 | archive.cis.ohio-state.edu:pub/gnu/emacs/ps-emacs.tar.Z) and via e-mail ! | ||
| 1416 | (body: send NeWS emacs-support, To: archive-server@columbia.edu). + | ||
| 1417 | |||
| 1418 | 41: How do I get Emacs running on VMS under DECwindows? | ||
| 1419 | |||
| 1420 | Hal R. Brand <BRAND@addvax.llnl.gov> is said to have a VMS save set with a | ||
| 1421 | ready-to-run VMS version of Emacs 18.55 for X Windows. It is available | ||
| 1422 | via anonymous FTP (addvax.llnl.gov). It is possible that the VMS versions + | ||
| 1423 | of Emacs at other sites have X support compiled in. See etc/FTP for + | ||
| 1424 | locations. + | ||
| 670 | 1425 | ||
| 671 | Carl Witty <cwitty@cs.stanford.edu> writes about Freemacs: | 1426 | Johan Vromans <jv@mh.nl> writes: |
| 672 | 1427 | ||
| 673 | Better is Freemacs, which follows the tradition of ITS and GNU Emacs | 1428 | Getting Emacs to run on VMS with DECwindows requires a number of changes |
| 674 | by having an full, turing-complete extension language which is | 1429 | to the sources. Fortunately this has been done already. Joshua Marantz |
| 675 | incompatible with everything else. In fact, it's even closer to ITS | 1430 | <josh@viewlogic.com> did most of the work for Emacs 18.52, and the mods |
| 676 | Emacs than GNU Emacs is, because Mint (Freemacs' extension language) | 1431 | were ported to 18.55 by Johan Vromans <jv@mh.nl>. Also included is the |
| 677 | is absolutely illegible without weeks of study, much like TECO. | 1432 | handling of DEC's LK201 keyboard. You need to apply the changes to a |
| 1433 | fresh Emacs 18.55 distribution on a Unix system, and then you can copy | ||
| 1434 | the sources to VMS to perform the compile/link/build. | ||
| 678 | 1435 | ||
| 679 | You can get Freemacs several ways: | 1436 | The set of changes have been posted a number of times three times the |
| 1437 | last 12 months, so they should be widely available. | ||
| 680 | 1438 | ||
| 681 | 1. Anonymous FTP: | 1439 | 42: How do I use emacstool under SunView? |
| 682 | site: simtel20.army.mil, directory: PD:<MSDOS.FREEMACS> | ||
| 683 | site: grape.ecs.clarkson.edu [128.153.13.196], directory: /e/freemacs | ||
| 684 | 1440 | ||
| 685 | 2. E-mail: | 1441 | First read the man page for emacstool (etc/emacstool.1). The file ! |
| 686 | address: archive-server@sun.soe.clarkson.edu, or | 1442 | etc/SUN-SUPPORT includes further information. + |
| 687 | archive-server%sun.soe@omnigate (BITNET), or | ||
| 688 | {smart-host}!sun.soe.clarkson.edu!archive-server (UUCP) | ||
| 689 | body: help | ||
| 690 | 1443 | ||
| 691 | 3. Snail mail: | 1444 | 43: How do I make Emacs display 8-bit characters? |
| 692 | address: Russell Nelson, 11 Grant St., Potsdam, NY 13676 | ||
| 693 | Send $15 copying fee, and specify preferred floppy disk format: | ||
| 694 | 5.25", 1.2 Meg, or 5.25", 360K, or 3.50", 720K | ||
| 695 | 1445 | ||
| 696 | I don't know much about MicroEmacs. All I know is that the latest | 1446 | There is a patch called the `8-bit ctl-arrow patch' that allows Emacs to |
| 697 | version is 3.10 and it is available via: | 1447 | display characters with codes from 128 to 255. {It appears to be by |
| 1448 | Kenneth Cline <cline@proof.ergo.cs.cmu.edu>.} | ||
| 698 | 1449 | ||
| 699 | Anonymous FTP: | 1450 | Anonymous FTP: |
| 700 | site: durer.cme.nist.gov | 1451 | cs.purdue.edu:pub/ygz/cemacs.tar.Z:cemacs/8bit-patch-18.57 |
| 701 | 1452 | sics.se:archive/emacs-18.55-8bit-diff (new version not available) | |
| 702 | Another Emacs for small machines is Jove (Jonathan's Own Version of | 1453 | laas.laas.fr:pub/emacs/patch-8bit-18.5{5,7} |
| 703 | Emacs). The latest version is 4.9. It is available via: | ||
| 704 | 1454 | ||
| 705 | Anonymous FTP: | 1455 | Via e-mail: + |
| 706 | sites: hipl.psych.nyu.edu, cs.toronto.edu, cayuga.cs.rochester.edu | 1456 | To: mail-server@sics.se |
| 1457 | body: send emacs-18.55-8bit-diff | ||
| 707 | 1458 | ||
| 708 | Yet another Emacs is "mg", which used to stand for MicroGNUEmacs, but | 1459 | Anders Edenbrandt <anderse@dna.lth.se> has produced a more comprehensive |
| 709 | now just stands for "mg". It is available via: | 1460 | patch that allows for 8-bit input and output. |
| 710 | 1461 | ||
| 711 | Anonymous FTP: | 1462 | Anonymous FTP: |
| 712 | site: snow.white.toronto.edu | 1463 | sics.se:archive/emacs-8bit-diff-lth |
| 1464 | gatekeeper.dec.com:pub/GNU/DS-emacs-18.57-8bit-diff-lth | ||
| 713 | 1465 | ||
| 714 | 31: Where can I get Emacs for my Atari ST? | 1466 | The most comprehensive patches for 8-bit output are by Howard Gayle for - |
| 715 | 1467 | Emacs 18.55. These patches allow displaying any arbitrary string for a | |
| 716 | The latest version for the ST is available via: | 1468 | given 8-bit character (except TAB and C-j). Also supported is defining + |
| 1469 | the sorting order and the uppercase and lowercase translations. It is + | ||
| 1470 | reported that the 8-bit character support in Emacs 19 is largely based on + | ||
| 1471 | these patches. Thomas Bellman <Bellman@lysator.liu.se> has updated these ! | ||
| 1472 | patches for Emacs 18.57. ! | ||
| 717 | 1473 | ||
| 718 | Anonymous FTP: | 1474 | Anonymous FTP: |
| 719 | site: cs.uni-sb.de [134.96.7.254] | 1475 | sics.se:archive/emacs-gayle.tar.Z (patches for 18.55) + |
| 720 | directory: /pub/atari/emacs | 1476 | ftp.lysator.liu.se:pub/emacs/gayle-18.57.diff.tar.Z (patches for 18.57) + |
| 721 | 1477 | ftp.lysator.liu.se:pub/emacs/emacs-18.57-gayle.tar.Z (patched 18.57) + | |
| 722 | 32: Where can I get Emacs with NeWS support? | 1478 | + |
| 723 | 1479 | Nemacs displays 8-bit characters, and it may be useful for displaying the + | |
| 724 | Chris Maio's NeWS support package for GNU Emacs is available via: | 1480 | 8-bit ISO-8859 alphabet, but I don't know for sure. See question 46. + |
| 725 | 1481 | ||
| 726 | Anonymous FTP: | 1482 | 44: How do I input 8-bit characters? |
| 727 | site: columbia.edu | 1483 | |
| 728 | file: /pub/ps-emacs.tar.Z | 1484 | Minor modes for ISO Latin-1 that allow one to easily input this character |
| 729 | 1485 | set have been written by several people. Such modes have been written by ! | |
| 730 | site: tut.cis.ohio-state.edu | 1486 | Matthieu Herrb <matthieu@laas.fr> (laas.laas.fr:pub/emacs/iso-latin-1.el), ! |
| 731 | file: /pub/gnu/emacs/ps-emacs.tar.Z | 1487 | Johan Vromans <jv@mh.nl> {FTP site??}, and Marc Shapiro + |
| 1488 | <shapiro@sor.inria.fr> {FTP site??}. + | ||
| 1489 | |||
| 1490 | These approaches differ from the one taken by Anders Edenbrandt in that | ||
| 1491 | his method uses direct 8-bit input, while these methods use a compose | ||
| 1492 | sequence for 8-bit characters. {I have heard conflicting reports on | ||
| 1493 | whether this results in losing the Meta key. Perhaps this depends on | ||
| 1494 | whether Emacs is running under X. Can someone resolve this?} | ||
| 1495 | |||
| 1496 | Karl Heuer <karl@haddock.ima.isc.com> is said to have a patch to allow ! | ||
| 1497 | 8-bit input. | ||
| 1498 | |||
| 1499 | 45: How do I use an already running Emacs from another window? | ||
| 1500 | |||
| 1501 | The `emacsclient' program is for editing a file using an already running | ||
| 1502 | Emacs rather than starting up a new Emacs. It does this by sending a | ||
| 1503 | request to the already running Emacs, which must be expecting the request. + | ||
| 1504 | + | ||
| 1505 | * Setup + | ||
| 1506 | + | ||
| 1507 | Emacs must have executed the `server-start' function for emacsclient to ! | ||
| 1508 | work. This can be done either by a command line option: | ||
| 1509 | |||
| 1510 | emacs -f server-start | ||
| 1511 | |||
| 1512 | or by invoking server-start from the .emacs file: | ||
| 1513 | |||
| 1514 | (if (some conditions are met) (server-start)) | ||
| 1515 | |||
| 1516 | When this is done, Emacs starts a subprocess running a program called | ||
| 1517 | `server'. `server' creates a Unix domain socket in the user's home | ||
| 1518 | directory named `.emacs_server'. | ||
| 1519 | |||
| 1520 | To get your news reader, mail reader, etc., to invoke emacsclient, try + | ||
| 1521 | setting the environment variable EDITOR (or sometimes VISUAL) to the + | ||
| 1522 | value `emacsclient'. You may have to specify the full pathname of the + | ||
| 1523 | emacsclient program instead. Examples: + | ||
| 1524 | + | ||
| 1525 | # csh commands: + | ||
| 1526 | setenv EDITOR emacsclient + | ||
| 1527 | setenv EDITOR /usr/local/emacs/etc/emacsclient # using full pathname + | ||
| 1528 | + | ||
| 1529 | # sh command: + | ||
| 1530 | EDITOR=emacsclient export EDITOR + | ||
| 1531 | + | ||
| 1532 | * Normal use + | ||
| 1533 | |||
| 1534 | When emacsclient is run, it connects to the `.emacs_server' socket and ! | ||
| 1535 | passes its command line options to `server'. When `server' receives - | ||
| 1536 | these requests, it sends this information on the the Emacs process, | ||
| 1537 | which at the next opportunity will visit the files specified. (Line | ||
| 1538 | numbers can be specified just like with Emacs.) When the user is done | ||
| 1539 | editing a file, the user can type "C-x #" to indicate this. This will | ||
| 1540 | switch to another buffer created at the request of emacsclient if there | ||
| 1541 | are any. When "C-x #" has been invoked on all of the files that the | ||
| 1542 | emacsclient requested to be edited, Emacs will send notification of this | ||
| 1543 | to `server' which will pass this on to the emacsclient, which will then | ||
| 1544 | exit. | ||
| 1545 | |||
| 1546 | NOTE: `emacsclient' and `server' must be running on machines which share + | ||
| 1547 | the same filesystem for this to work. The pathnames that emacsclient + | ||
| 1548 | specifies should be correct for the filesystem that the Emacs process + | ||
| 1549 | sees, which is not necessarily the same as the one the emacsclient sees. + | ||
| 1550 | The Emacs process should not be suspended at the time emacsclient is + | ||
| 1551 | invoked. Thus, emacsclient should either be invoked from another X window + | ||
| 1552 | or from a shell window inside Emacs itself. + | ||
| 1553 | |||
| 1554 | There is an enhanced version of emacsclient/server called `gnuserv' by ! | ||
| 1555 | Andy Norman <ange@hplb.hpl.hp.com> which is available in the Emacs Lisp | ||
| 1556 | Archive. gnuserv uses Internet domain sockets, so it can work across most | ||
| 1557 | network connections. It also supports the execution of arbitrary Emacs | ||
| 1558 | Lisp forms, not just the ability to visit files, and also does not require + | ||
| 1559 | the client program to wait for completion. It is available via anonymous + | ||
| 1560 | FTP (Emacs Lisp Archive: packages/gnuserv.shar). | ||
| 1561 | |||
| 1562 | 46: Where can I get an Emacs that can handle kanji characters? - | ||
| 1563 | |||
| 1564 | Nemacs 3.3.2 (Nihongo GNU Emacs) is a modified version of GNU Emacs 18.55 | ||
| 1565 | that handles kanji characters. It is available via anonymous FTP | ||
| 1566 | (crl.nmsu.edu:pub/misc/nemacs-3.3.2.tar.Z, uhccux.uhcc.hawaii.edu: | ||
| 1567 | editors/Nemacs-3.3.2/*, miki.cs.titech.ac.jp: | ||
| 1568 | JAPAN/nemacs/nemacs-3.3.2.tar.Z). You might also need files for "wnn", a | ||
| 1569 | kanji input method (wnn-4.0.3{-README,.tar.Z} {on which machine?}). You + | ||
| 1570 | need a terminal (or terminal emulator) that can display text encoded in + | ||
| 1571 | JIS, Shift-JIS, or EUC (Extended Unix Code), or the ability to run Nemacs + | ||
| 1572 | as a direct X Window client. + | ||
| 1573 | |||
| 1574 | 47: Where can I get an Emacs that can handle Chinese? | ||
| 1575 | |||
| 1576 | `cemacs' by Stephen G. Simpson <simpson@math.psu.edu> is a patch to Emacs | ||
| 1577 | 18.57 (the ctl-arrow patch) and some Emacs Lisp code that combined with | ||
| 1578 | Cxterm allows using Chinese characters. It is available via anonymous FTP | ||
| 1579 | (crl.nmsu.edu:pub/chinese/cemacs.tar.Z, cs.purdue.edu: | ||
| 1580 | pub/ygz/cemacs.tar.Z). Cxterm is available from the same place | ||
| 1581 | (cs.purdue.edu: pub/ygz/cxterm-11.5.1.tar.Z). | ||
| 1582 | |||
| 1583 | 48: Where is an Emacs that can handle Semitic (right-to-left) alphabets? | ||
| 1584 | |||
| 1585 | Joel M. Hoffman <joel@wam.umd.edu> writes: | ||
| 1586 | |||
| 1587 | A couple of years ago a wrote a hebrew.el file that allows right-to-left | ||
| 1588 | editing of Hebrew. I relied on the hardware to display the Hebrew | ||
| 1589 | letters, given the right codes, but not for any right-to-left support; | ||
| 1590 | the hardware also doesn't have to send any specific char. codes. Emacs | ||
| 1591 | keeps track of when the user is typing Hebrew vs. English. (The VT-* | ||
| 1592 | terminals in Israel contain built-in support for Hebrew.) | ||
| 1593 | |||
| 1594 | To get it to work I had to modify only a few lines of GNU Emacs's source | ||
| 1595 | code --- just enough to make it 8-bit clean. | ||
| 1596 | |||
| 1597 | [and in a separate message:] | ||
| 1598 | |||
| 1599 | It doesn't produce time-order ["sefer" format] (I wouldn't recommend | ||
| 1600 | trying that with emacs, because converting time-order to screen-order | ||
| 1601 | with arbitrarily long lines is a bit tricky), but I also concocted a | ||
| 1602 | quick filter to convert screen-order into time-order. I'll be happy to | ||
| 1603 | send you the requisite files if you want them. If you're using it for | ||
| 1604 | anything large, however, you'll want something that works better. | ||
| 1605 | |||
| 1606 | Joseph Friedman <yossi@Neon.Stanford.EDU> wrote something for Emacs that | ||
| 1607 | provides Hebrew support under X Windows. | ||
| 1608 | |||
| 1609 | Warren Burstein <warren@itex.jct.ac.il> says he has mapped 7-bit keys by | ||
| 1610 | modifying self-insert-command "for Hebrew input on 7-bit keyboards". | ||
| 1611 | |||
| 1612 | A good suggestion is to query archie for files named with "hebrew". | ||
| 732 | 1613 | ||
| 733 | 1614 | ||
| 734 | 1615 | ||
| 735 | Binding Keys to Commands | 1616 | Binding Keys to Commands |
| 736 | 1617 | ||
| 737 | 33: Why does my key binding fail? | 1618 | 49: Why does Emacs say "Key sequence XXX uses invalid prefix characters"? |
| 738 | 1619 | ||
| 739 | Most likely, it failed because "ESC [" was already defined. Evaluate | 1620 | Most likely, it failed because the key sequence you were binding started |
| 1621 | with "ESC [" and this sequence was already bound to a command. Evaluate | ||
| 740 | this form first: | 1622 | this form first: |
| 741 | 1623 | ||
| 742 | (define-key esc-map "[" nil) | 1624 | (define-key esc-map "[" nil) |
| 743 | 1625 | ||
| 744 | 34: Why doesn't this [terminal or window-system setup] code work in my | 1626 | NOTE: By default, "ESC [" is bound to backward-paragraph, and if you do ! |
| 1627 | this you will lose this key binding. For most people, this is not a | ||
| 1628 | problem. | ||
| 1629 | |||
| 1630 | 50: Why doesn't this [terminal or window-system setup] code work in my | ||
| 745 | .emacs file, but it works just fine after Emacs starts up? | 1631 | .emacs file, but it works just fine after Emacs starts up? |
| 746 | 1632 | ||
| 747 | This is because you're trying to do something in your .emacs file that | 1633 | This is because you're trying to do something in your .emacs file that |
| 748 | needs to be postponed until after the terminal/window-system setup code | 1634 | needs to be postponed until after the terminal/window-system setup code |
| 749 | is loaded. This is a result of the order in which things are done | 1635 | is loaded. This is a result of the order in which things are done |
| 750 | during the startup of Emacs. | 1636 | during the startup of Emacs. For more details see question 64. |
| 751 | 1637 | ||
| 752 | In order to postpone the execution of Emacs Lisp code until after the | 1638 | In order to postpone the execution of Emacs Lisp code until after the |
| 753 | terminal/window-system setup, set the value of the variable | 1639 | terminal/window-system setup, set the value of the variable |
| 754 | term-setup-hook or window-setup-hook to be a function which does what | 1640 | term-setup-hook or window-setup-hook to be a function which does what |
| 755 | you want. | 1641 | you want. |
| 756 | 1642 | ||
| 757 | See question 72 for a complete explanation of what Emacs | 1643 | See etc/OPTIONS for a complete explanation of what Emacs does every time |
| 758 | does every time it is started. | 1644 | it is started. |
| 759 | 1645 | ||
| 760 | Here is a simple example of how to set term-setup-hook: | 1646 | Here is a simple example of how to set term-setup-hook: |
| 761 | 1647 | ||
| 762 | (setq term-setup-hook | 1648 | (setq term-setup-hook |
| 763 | (function | 1649 | (function |
| 764 | (lambda () | 1650 | (lambda () |
| 765 | (if (string-match "^vt220" (or (getenv "TERM") "")) | 1651 | (cond ((string-match "\\`vt220" (or (getenv "TERM") "")) |
| 766 | ;; Make vt220's "Do" key behave like M-x: | 1652 | ;; Make vt220's "Do" key behave like M-x: |
| 767 | (define-key CSI-map "29~" 'execute-extended-command))))) | 1653 | (define-key CSI-map "29~" 'execute-extended-command)) |
| 768 | 1654 | )))) | |
| 769 | 35: How do I use function keys under X Windows? | 1655 | |
| 770 | 1656 | 51: Other than that, why does my key binding fail? | |
| 771 | If compiled on a Sun, Emacs recognizes the function keys that are | 1657 | |
| 772 | normally on a Sun keyboard, and you can bind them the same way you | 1658 | One possible reason that I've seen many times is improperly specifying |
| 773 | normally bind Sun keys. Each function key will generate a key sequence | 1659 | the character ESC in the key binding string. In an Emacs Lisp string, |
| 774 | that looks like "ESC [ ### z", where ### is replaced by a number. | 1660 | ESC is specified as "\e". (ESC can also be specified as itself, the |
| 775 | 1661 | ASCII character with value 27, but this can cause serious problems when | |
| 776 | If not compiled on a Sun, the function keys will appear to Emacs in a | 1662 | you try to print/view/mail the file.) Thus, for example, to bind the |
| 777 | way remarkably similar to the keys of a VT220 terminal. Each function | 1663 | key sequence "ESC O D" to the command 'my-backward-char, the simplest |
| 778 | key will generate a key sequence that looks like "ESC [ ### ~". | 1664 | incantation is this: |
| 1665 | |||
| 1666 | (global-set-key "\eOD" 'my-backward-char) | ||
| 1667 | |||
| 1668 | These are also correct (and represent what the above command actually | ||
| 1669 | does): | ||
| 1670 | |||
| 1671 | (define-key global-map "\eOD" 'my-backward-char) | ||
| 1672 | (define-key esc-map "OD" 'my-backward-char) | ||
| 1673 | |||
| 1674 | The string forms for the keys RET, LFD, DEL, ESC, SPC, and TAB are | ||
| 1675 | respectively "\r", "\n", "\C-?", "\e", " ", and "\t". | ||
| 1676 | |||
| 1677 | 52: How do I use function keys under X Windows? | ||
| 1678 | |||
| 1679 | This depends on whether you are running Emacs inside a terminal emulator | ||
| 1680 | window, or whether you are allowing Emacs to create its own X window. | ||
| 1681 | You can tell which you are doing by noticing whether Emacs creates a new | ||
| 1682 | window when you start it. | ||
| 1683 | |||
| 1684 | If you are running Emacs inside a terminal emulator window, then it | ||
| 1685 | behaves exactly as it does on any other tty. In this case, for function | ||
| 1686 | keys to be useful, they must generate character sequences that are sent | ||
| 1687 | to the programs running inside the window as input. The "xterm" program | ||
| 1688 | has two different sets of character sequences that it generates when | ||
| 1689 | function keys are pressed, depending on the sunFunctionKeys X resource | ||
| 1690 | and the -sf and +sf command line options. (To find out what these key | ||
| 1691 | sequences are, see question 53.) In addition, with xterm, | ||
| 1692 | you can override what key sequence a specific function key (or any other | ||
| 1693 | key) will generate with the "translations" resource. This, for example: | ||
| 1694 | |||
| 1695 | XTerm.VT100.Translations: #override \ | ||
| 1696 | <KeyPress>F1: string(0x1b) string("[xyzzy") | ||
| 1697 | |||
| 1698 | makes the function key F1 generate the character sequence "ESC [xyzzy". | ||
| 1699 | |||
| 1700 | On the other hand, if Emacs is managing its own X window, the following | ||
| 1701 | description applies. Emacs receives `KeyPress' events from the X server | ||
| 1702 | when a key is pressed while the keyboard focus is in its window. The | ||
| 1703 | KeyPress event contains an X `keysym' code, which is simply an arbitrary | ||
| 1704 | number corresponding to the name of the keysym, and information on which | ||
| 1705 | "modifiers" such as `control' and `shift' are active. For example, the | ||
| 1706 | `Tab' keysym is 0xff09. (Generally, a key on the keyboard will generate a | ||
| 1707 | keysym whose name is the same as the label on the key, ie. the `Tab' key | ||
| 1708 | will normally generate the `Tab' keysym. This can be changed with the | ||
| 1709 | xmodmap program.) Emacs recognizes all the keysyms that correspond to | ||
| 1710 | standard ASCII characters and internally uses the ASCII character instead. | ||
| 1711 | |||
| 1712 | (WARNING: I am about to describe a gross, disgusting hack to you, have | ||
| 1713 | your barf bag ready.) | ||
| 1714 | |||
| 1715 | When Emacs receives the X keysym of one of the arrow keys, it behaves | ||
| 1716 | the same as if it had received a letter key with the control modifier | ||
| 1717 | down as follows (this is hard-coded): | ||
| 1718 | |||
| 1719 | Up becomes C-p | ||
| 1720 | Down becomes C-n | ||
| 1721 | Right becomes C-f | ||
| 1722 | Left becomes C-b | ||
| 1723 | |||
| 1724 | The way Emacs treats other keysyms depends on what kind of machine it was | ||
| 1725 | compiled on. The type of the display machine is irrelevant! Function + | ||
| 1726 | keys are mapped internally to escape sequences, while other keys are | ||
| 1727 | completely ignored. | ||
| 1728 | |||
| 1729 | 1. If compiled on a Sun, Emacs recognizes these X keysyms that | ||
| 1730 | are normally on a Sun keyboard: | ||
| 1731 | |||
| 1732 | F1 through F9 | ||
| 1733 | L1 through L10 (same as F11 through F20) | ||
| 1734 | R1 through R15 (same as F21 through F35) | ||
| 1735 | (The keys labelled R8, R10, R12, and R14 usually are mapped to the ! | ||
| 1736 | X keysyms Up, Left, Right, and Down.) | ||
| 1737 | Break (the "Alternate" key is given this keysym) | ||
| 1738 | |||
| 1739 | These keys work like Sun function keys. When Emacs recieves the | ||
| 1740 | keysym, it will internally use character sequences that look like "ESC | ||
| 1741 | [ ### z", where ### is replaced by a number. The character sequences | ||
| 1742 | are identical to those generated by Sun's keyboard under SunView. Any | ||
| 1743 | function key not listed above generates "ESC [ - 1 z". | ||
| 1744 | |||
| 1745 | In order to use these key sequences, they should be bound to commands | ||
| 1746 | using the standard key binding methods, just as if Emacs were running | ||
| 1747 | on a regular terminal. | ||
| 1748 | |||
| 1749 | WARNING: F11 and L1 are the same keysym in X, as are F12 and L2, etc. | ||
| 1750 | {Yes, this is stupid. Complain to the X consortium.} | ||
| 1751 | |||
| 1752 | 2. If not compiled on a Sun, the function keys will appear to Emacs in a | ||
| 1753 | way remarkably similar to the keys of a DEC LK201 keyboard (used on | ||
| 1754 | some VT series terminals). These X keysyms will be recognized: | ||
| 1755 | |||
| 1756 | F1 through F20 | ||
| 1757 | Help (treated same as F15) | ||
| 1758 | Menu (treated same as F16, is the LK201 "Do" key) | ||
| 1759 | Find | ||
| 1760 | Insert (LK201 "Insert Here" key) | ||
| 1761 | Select | ||
| 1762 | |||
| 1763 | These keysyms are supposed to be recognized, but they are not due to a | ||
| 1764 | bug (which is fixed in Emacs 18.58): + | ||
| 1765 | |||
| 1766 | Prior (LK201 "Prev Screen" key) | ||
| 1767 | Next (LK201 "Next Screen" key) | ||
| 1768 | |||
| 1769 | And finally, the LK201 key labelled `Remove' (or `Delete') is often ! | ||
| 1770 | mapped to the Delete keysym which generates the DEL character (C-?) ! | ||
| 1771 | instead of the key sequence given by the LK201 `Remove' key. It may + | ||
| 1772 | also be mapped to some other keysym, such as `_Remove', in which case + | ||
| 1773 | you can't use it from within Emacs at all. + | ||
| 1774 | |||
| 1775 | Each function key will be internally converted to a character sequence | ||
| 1776 | that looks like "ESC [ ## ~", where ## is replaced by a number. The | ||
| 1777 | character sequences are identical to those generated by a LK201 | ||
| 1778 | keyboard. Any function key not listed above generates "ESC [ - 1 ~". | ||
| 779 | 1779 | ||
| 780 | For the complete list of the numbers which are generated by the function | 1780 | For the complete list of the numbers which are generated by the function |
| 781 | keys, look in the file src/x11term.c. | 1781 | keys, look in the file src/x11term.c at the definitions of the function |
| 1782 | "stringFuncVal". | ||
| 782 | 1783 | ||
| 783 | However, this may be inadequate for you if you have function keys Emacs | 1784 | If you are running Emacs on a Sun machine, even if your X display is |
| 784 | doesn't know about. Johan Vromans <jv@mh.nl> explains: | 1785 | running on a non-Sun machine (eg., an X terminal), you get the setup |
| 1786 | described above for Suns. The determining factor is what type of | ||
| 1787 | machine Emacs is running (was compiled) on, not what type of machine | ||
| 1788 | your X display is on. | ||
| 785 | 1789 | ||
| 786 | There are a number of tricks that can be helpful. The most elegant | 1790 | If you have function keys not listed above on your keyboard, you can use + |
| 787 | solution, however, is to use the function "x-rebind-key". This function | 1791 | `xmodmap' to change their keysym assignments to get keys that Emacs will ! |
| 788 | is commented out in the source for good reasons --- it's buggy. | 1792 | recognize, but that may screw up other programs. ! |
| 789 | 1793 | ||
| 790 | It is rather easy to replace this function with the function | 1794 | X resources are not used by Emacs to affect the key sequences generated. |
| 791 | epoch:rebind-key from the Epoch distribution. | 1795 | In particular, there are no X key "translations" for Emacs. + |
| 792 | 1796 | ||
| 793 | After implementing this, all keyboard keys can be configured to send | 1797 | If you have function keys not listed above and you don't want to use |
| 794 | user definable sequences, e.g. | 1798 | xmodmap to change their names, you might want to make a modification to |
| 795 | 1799 | your Emacs. Johan Vromans <jv@mh.nl> explains: | |
| 796 | (x-rebind-key "KP_F1" 0 "\033OP") | ||
| 797 | 1800 | ||
| 798 | This will have the keypad key PF1 send the sequence \eOP, just like an | 1801 | There are a number of tricks that can be helpful. The most elegant |
| 799 | ordinary VTxxx terminal. | 1802 | solution, however, is to use the function "x-rebind-key". This function |
| 1803 | is commented out in the source for good reasons --- it's buggy. | ||
| 800 | 1804 | ||
| 801 | Another method is to handle the keys in the C source. Although this may | 1805 | It is rather easy to replace this function with the function |
| 802 | be slightly more efficient, it is much less flexible. | 1806 | epoch:rebind-key from the Epoch distribution. |
| 803 | 1807 | ||
| 804 | Finally, some people have established a convention to have the special | 1808 | After implementing this, all keyboard keys can be configured to send |
| 805 | keys send a sequence of characters that indicate the key and its | 1809 | user definable sequences, e.g. |
| 806 | modifiers instead of a plain escape sequence. This is also a good | ||
| 807 | method. The advantage of sending the plain escape sequences is that you | ||
| 808 | require only one setup for Emacs running under X and on normal | ||
| 809 | terminals, e.g. | ||
| 810 | 1810 | ||
| 811 | (x-rebind-key "KP_F1" 0 "\033OP") | 1811 | (x-rebind-key "KP_F1" 0 "\033OP") |
| 812 | 1812 | ||
| 813 | will have key PF1 send \eOP, and, probably in another setup file: | 1813 | This will have the keypad key PF1 send the sequence "ESC O P", just like |
| 1814 | an ordinary VT series terminal. | ||
| 814 | 1815 | ||
| 815 | (global-set-key "\eOP" 'specific-function) | 1816 | This is what I do in my Emacs. Note that you need to add an entry to |
| 1817 | syms_of_xfns at the bottom of src/x11fns.c. I can send a patch that has + | ||
| 1818 | the necessary changes, so you don't have to get the Epoch sources. + | ||
| 816 | 1819 | ||
| 817 | to bind PF1 to a function. The last statement applies for normal VTxxx | 1820 | 53: How do I tell what characters my function or arrow keys emit? + |
| 818 | terminal also. | ||
| 819 | |||
| 820 | 36: How do I tell what characters my function keys emit? | ||
| 821 | 1821 | ||
| 822 | Use this function by Randal L. Schwartz <merlyn@iwarp.intel.com>: | 1822 | Use this function by Randal L. Schwartz <merlyn@iwarp.intel.com>: |
| 823 | 1823 | ||
| @@ -832,33 +1832,96 @@ Binding Keys to Commands | |||
| 832 | quit-flag nil)) ; quit-flag maybe set by C-g | 1832 | quit-flag nil)) ; quit-flag maybe set by C-g |
| 833 | (message "Characters entered: %s" (key-description chars)))) | 1833 | (message "Characters entered: %s" (key-description chars)))) |
| 834 | 1834 | ||
| 835 | 1835 | Alternatively, use the "C-h l" view-lossage command, which will display | |
| 836 | 1836 | the last 100 characters Emacs has seen in its input stream. Kevin + | |
| 837 | Problems with Key Bindings and Input | 1837 | Gallagher <kgallagh@digi.lonestar.org> suggests typing some unique string + |
| 838 | 1838 | like "wxyz", typing the key in question, then typing "C-h l". The + | |
| 839 | 37: Why does Emacs spontaneously go into "I-search:" mode? | 1839 | characters that appear between "wxyz" and "C-h l" were generated by the + |
| 1840 | key. + | ||
| 1841 | |||
| 1842 | 54: Why does Emacs spontaneously start displaying "I-search:" and beeping? | ||
| 840 | 1843 | ||
| 841 | Your terminal (or something between your terminal and the computer) is | 1844 | Your terminal (or something between your terminal and the computer) is |
| 842 | sending C-s and C-q for flow control, and Emacs is receiving these | 1845 | sending C-s and C-q for flow control, and Emacs is receiving these |
| 843 | characters and interpreting them as commands. (The C-s character | 1846 | characters and interpreting them as commands. (The C-s character normally |
| 844 | normally invokes the isearch-forward command.) | 1847 | invokes the isearch-forward command.) The best solution is to disable the |
| 1848 | use of C-s and C-q for flow control. If you can't do that, you can make | ||
| 1849 | Emacs treat C-s and C-q as flow control characters by evaluating this | ||
| 1850 | form: | ||
| 845 | 1851 | ||
| 846 | For a more detailed discussion, read the file PROBLEMS in the Emacs | 1852 | (set-input-mode nil t) |
| 847 | distribution. | ||
| 848 | 1853 | ||
| 849 | 38: What do I do if my terminal is sending C-s and C-q for flow control and | 1854 | If you are fixing this for yourself, simply put the form in your .emacs |
| 1855 | file. If you are fixing this for your entire site, the best place to put | ||
| 1856 | it is unclear. I don't know if this has any effect when used in | ||
| 1857 | lisp/site-init.el when building Emacs; I've never tried that. {Can | ||
| 1858 | someone tell me whether it works?} Putting things in users' .emacs files | ||
| 1859 | has a number of problems. Putting this form in lisp/default.el has the | ||
| 1860 | problem that if the user's .emacs file has an error, this will prevent | ||
| 1861 | lisp/default.el from being loaded and Emacs may be unusable for the user, | ||
| 1862 | even for correcting their .emacs file (unless they're smart enough to move | ||
| 1863 | it to another name). | ||
| 1864 | |||
| 1865 | If some of your users are connecting through XON/XOFF flow-controlled | ||
| 1866 | connections, but some are not, then here is a possible solution. Disable | ||
| 1867 | C-s and C-q by setting keyboard-translate-table in lisp/site-init.el, | ||
| 1868 | either with swap-keys (see question 60) or with the following form: | ||
| 1869 | |||
| 1870 | ;; by Roger Crew <crew@cs.stanford.edu>: | ||
| 1871 | (setq keyboard-translate-table | ||
| 1872 | "\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-_") | ||
| 1873 | |||
| 1874 | Then in lisp/default.el, if it is determined to be safe, they can be | ||
| 1875 | reenabled (being careful not to screw up any other key mappings users | ||
| 1876 | might have established using keyboard-translate-table, use swap-keys for | ||
| 1877 | this), or else set-input-mode can be called to further disable C-s and | ||
| 1878 | C-q. | ||
| 1879 | |||
| 1880 | For further discussion of this issue, read the file etc/PROBLEMS in the + | ||
| 1881 | Emacs distribution. | ||
| 1882 | |||
| 1883 | 55: How do I disable the use of C-s and C-q for flow control? | ||
| 1884 | |||
| 1885 | Your terminal may be using C-s and C-q for XON/XOFF flow control. For + | ||
| 1886 | example, VT series terminals do this. On some terminals, it may be + | ||
| 1887 | possible to turn this off from a setup menu. This is also true for some + | ||
| 1888 | terminal emulation programs on PCs. + | ||
| 1889 | + | ||
| 1890 | If you are using a dialup connection, the modems may be using XON/XOFF + | ||
| 1891 | flow control. I don't know how to get around this. Also, some network + | ||
| 1892 | box between the terminal and your computer may be using XON/XOFF flow ! | ||
| 1893 | control. You will probably have to ask your local network experts for | ||
| 1894 | help with this. | ||
| 1895 | |||
| 1896 | 56: What do I do if my terminal is sending C-s and C-q for flow control and | ||
| 850 | I can't disable it? | 1897 | I can't disable it? |
| 851 | 1898 | ||
| 852 | Use this piece of Emacs Lisp: | 1899 | See question 54. |
| 853 | |||
| 854 | (set-input-mode nil t) | ||
| 855 | 1900 | ||
| 856 | 39: How do I make Emacs use C-s and C-q for flow control instead of for | 1901 | 57: How do I make Emacs honor C-s and C-q for flow control instead of for |
| 857 | commands? | 1902 | commands? |
| 858 | 1903 | ||
| 859 | Same answer as previous question. | 1904 | See question 54. |
| 1905 | |||
| 1906 | 58: Why does Emacs never see C-s and C-q through my network connection? | ||
| 1907 | |||
| 1908 | Eirik Fuller <eirik@theory.tn.cornell.edu> writes: | ||
| 860 | 1909 | ||
| 861 | 40: How do I use commands bound to C-s and C-q (or any key) if these keys | 1910 | Some versions of rlogin (and possibly telnet) do not pass flow control |
| 1911 | characters to the remote system to which they connect. On such systems, | ||
| 1912 | Emacs on the remote system cannot disable flow control on the local | ||
| 1913 | system. Sometimes "rlogin -8" will avoid this problem. | ||
| 1914 | |||
| 1915 | One way to cure this is to disable flow control on the local host (the | ||
| 1916 | one running rlogin, not the one running rlogind) using the stty command, | ||
| 1917 | before starting the rlogin process. On many systems, "stty start u stop | ||
| 1918 | u" will do this. | ||
| 1919 | |||
| 1920 | Some versions of tcsh will prevent even this from working. One way | ||
| 1921 | around this is to start another shell before starting rlogin, and issue | ||
| 1922 | the stty command to disable flow control from that shell. | ||
| 1923 | |||
| 1924 | 59: How do I use commands bound to C-s and C-q (or any key) if these keys | ||
| 862 | are filtered out? | 1925 | are filtered out? |
| 863 | 1926 | ||
| 864 | I suggest swapping C-s with C-\ and C-q with C-^: | 1927 | I suggest swapping C-s with C-\ and C-q with C-^: |
| @@ -866,820 +1929,526 @@ Problems with Key Bindings and Input | |||
| 866 | (swap-keys ?\C-s ?\C-\\) | 1929 | (swap-keys ?\C-s ?\C-\\) |
| 867 | (swap-keys ?\C-q ?\C-^) | 1930 | (swap-keys ?\C-q ?\C-^) |
| 868 | 1931 | ||
| 869 | See question 41 for the implementation of swap-keys. | 1932 | See question 60 for the implementation of swap-keys. This method + |
| 1933 | has the advantage that it simultaneously swaps the characters everywhere + | ||
| 1934 | throughout Emacs, while just switching the keybindings will miss important + | ||
| 1935 | places where the character codes are stored (eg., the search-repeat-char + | ||
| 1936 | variable, major mode keymaps, etc.). + | ||
| 1937 | + | ||
| 1938 | WARNING: If you do this for an entire site, the users will be confused by + | ||
| 1939 | the disparity between what the documentation says and how Emacs actually + | ||
| 1940 | behaves. + | ||
| 870 | 1941 | ||
| 871 | 41: How do I "swap" two keys? | 1942 | 60: How do I "swap" two keys? |
| 872 | 1943 | ||
| 873 | When Emacs receives a character, you can make Emacs behave as though it | 1944 | When Emacs receives a character, you can make Emacs behave as though it |
| 874 | received another character by setting the value of | 1945 | received another character by setting the value of |
| 875 | keyboard-translate-table. The following Emacs Lisp will do this for | 1946 | keyboard-translate-table. The following Emacs Lisp will do this for you, |
| 876 | you, allowing you to "swap" keys. | 1947 | allowing you to "swap" keys. After arranging for this Lisp to be |
| 1948 | evaluated by Emacs, you can evaluate `(swap-keys ?A ?B)' to swap A and B. | ||
| 1949 | The function `show-mapped-keys' will allow you to see what low-level key + | ||
| 1950 | mappings are in effect. + | ||
| 877 | 1951 | ||
| 878 | WARNING: the value of C-g (7) is hard coded in several places both | 1952 | WARNING: the value of C-g (7) is still hard coded in one place in the |
| 879 | before and after the translation specified by keyboard-translate-table | 1953 | minibuffer code. Thus, swapping C-g with another key may cause a minor |
| 880 | is carried out. Thus, swapping C-g with another key may cause problems; | 1954 | problem. (Fixed in Emacs 18.58.) |
| 881 | rebinding C-g may also cause problems. (Well, I've never done it, so I | ||
| 882 | don't know for sure.) | ||
| 883 | 1955 | ||
| 884 | (defun swap-keys (key1 key2) | 1956 | (defun swap-keys (key1 key2) |
| 885 | "Swap keys KEY1 and KEY2 using map-key." | 1957 | "Swap keys KEY1 and KEY2 using map-key." |
| 886 | (map-key key1 key2 t) | 1958 | (map-key key1 key2) |
| 887 | (map-key key2 key1)) | 1959 | (map-key key2 key1)) |
| 888 | 1960 | ||
| 889 | (defvar map-keys-alist nil | 1961 | (defun map-key (from to) |
| 890 | "Association list of key mappings currently in effect. | 1962 | "Make key FROM behave as though key TO was typed instead." |
| 891 | If (FROM . TO) is an element, that means key FROM is currently mapped to TO.") | 1963 | (setq keyboard-translate-table |
| 892 | 1964 | (concat keyboard-translate-table | |
| 893 | (defun map-key (from to &optional no-update) | 1965 | (let* ((i (length keyboard-translate-table)) |
| 894 | "Make key FROM behave as though key TO was typed instead. | 1966 | (j from) |
| 895 | If optional argument NO-UPDATE is non-nil, the key-mapping does not take | 1967 | (k i) |
| 896 | effect until a subsequent map-key or unmap-key." | 1968 | (str (make-string (max 0 (- j (1- i))) ?X))) |
| 897 | (let ((alist-entry (assq from map-keys-alist))) | 1969 | (while (<= k j) |
| 898 | (if alist-entry | 1970 | (aset str (- k i) k) |
| 899 | (setcdr alist-entry to) | 1971 | (setq k (1+ k))) |
| 900 | (setq map-keys-alist (cons (cons from to) map-keys-alist)))) | 1972 | str))) |
| 901 | (or no-update (map-keys-update))) | 1973 | (aset keyboard-translate-table from to) |
| 902 | 1974 | (let ((i (1- (length keyboard-translate-table)))) | |
| 903 | (defun unmap-key (key) | 1975 | (while (and (>= i 0) (eq (aref keyboard-translate-table i) i)) |
| 904 | "Undo any mapping of key KEY." | 1976 | (setq i (1- i))) |
| 905 | (setq map-keys-alist (delq (assq key map-keys-alist) map-keys-alist)) | 1977 | (setq keyboard-translate-table |
| 906 | (map-keys-update)) | 1978 | (if (eq i -1) |
| 907 | 1979 | nil | |
| 908 | ;; Makes keyboard-translate-table reflect the key mappings in | 1980 | (substring keyboard-translate-table 0 (1+ i)))))) |
| 909 | ;; map-keys-alist. | 1981 | |
| 910 | 1982 | (defun show-mapped-keys () + | |
| 911 | (defun map-keys-update () | 1983 | "Analyze keyboard-translate-table and display mapped keys." + |
| 912 | (if (null map-keys-alist) | 1984 | (interactive) + |
| 913 | ;; Emacs runs fasted if keyboard-translate-table is nil | 1985 | (let (mapping-alist + |
| 914 | (setq keyboard-translate-table nil) | 1986 | (l (length keyboard-translate-table)) + |
| 915 | (let ((max-key-mapped | 1987 | (i 0) + |
| 916 | ;; Find the mapped key with largest value | 1988 | e pair) + |
| 917 | (apply 'max | 1989 | (while (< i l) + |
| 918 | (mapcar | 1990 | (setq e (aref keyboard-translate-table i)) + |
| 919 | (function | 1991 | (or (eq i e) + |
| 920 | (lambda (x) | 1992 | (setq mapping-alist (cons (cons i e) mapping-alist))) + |
| 921 | (car x))) | 1993 | (setq i (1+ i))) + |
| 922 | map-keys-alist))) | 1994 | (cond (mapping-alist + |
| 923 | (i 0)) | 1995 | (princ "Mapped Keys: ") + |
| 924 | ;; keyboard-translate-table doesn't have to be any longer than | 1996 | (setq mapping-alist (nreverse mapping-alist))) + |
| 925 | ;; necessary. This speeds up Emacs. | 1997 | (t + |
| 926 | (setq keyboard-translate-table (make-string (1+ max-key-mapped) 0)) | 1998 | (princ "No keys mapped"))) + |
| 927 | (while (<= i max-key-mapped) | 1999 | (while mapping-alist + |
| 928 | (aset keyboard-translate-table i (or (cdr (assq i map-keys-alist)) i)) | 2000 | (setq pair (car mapping-alist) + |
| 929 | (setq i (1+ i)))))) | 2001 | i (car pair) + |
| 930 | 2002 | e (cdr pair)) + | |
| 931 | 42: Why does the "Backspace" key invoke help? | 2003 | (princ (single-key-description i)) + |
| 932 | 2004 | (cond ((eq i (cdr (setq pair (assq e mapping-alist)))) + | |
| 933 | The Backspace key (on every keyboard I've used) sends ASCII code 8. C-h | 2005 | (setq mapping-alist (delq pair mapping-alist)) + |
| 934 | sends the same code. In Emacs by default C-h invokes "help-command". | 2006 | (princ " <=> ")) + |
| 935 | The easiest solution to this problem is to use C-h (and Backspace) for | 2007 | (t + |
| 936 | help and DEL (the Delete key) for deleting the previous character. | 2008 | (princ " => "))) + |
| 937 | 2009 | (princ (single-key-description e)) + | |
| 938 | For some people this solution may be problematic: | 2010 | (setq mapping-alist (cdr mapping-alist)) + |
| 939 | 2011 | (if mapping-alist (princ ", "))))) + | |
| 940 | 1. They normally use Backspace outside of Emacs for deleting the | 2012 | |
| 941 | previous character typed. This can be solved by making DEL be the | 2013 | NOTE: You must evaluate the definition of swap-keys before calling it! |
| 942 | command for deleting the previous character outside of Emacs. This | 2014 | The easiest way is to list it first in the file (eg., your .emacs file). |
| 943 | command will do this on many Unix systems: | 2015 | |
| 944 | 2016 | 61: Why does the "BackSpace" key invoke help? | |
| 945 | stty erase ^? | 2017 | |
| 946 | 2018 | The BackSpace key (on every keyboard I've used) generates ASCII code 8. ! | |
| 947 | 2. The person may prefer using the Backspace key for deleting the | 2019 | C-h sends the same code. In Emacs by default C-h invokes `help-command'. |
| 948 | previous character because it is more conveniently located on their | 2020 | This is intended to be easy to remember since the first letter of `help' |
| 949 | keyboard or because they don't even have a separate Delete key. In | 2021 | is `h'. The easiest solution to this problem is to use C-h (and |
| 950 | this case, the best solution is to swap C-h and DEL: | 2022 | BackSpace) for help and DEL (the Delete key) for deleting the previous |
| 951 | 2023 | character. | |
| 952 | (swap-keys ?\C-h ?\C-?) | 2024 | |
| 953 | 2025 | For many people this solution may be problematic: | |
| 954 | See question 41 for the implementation of swap-keys. | 2026 | |
| 955 | 2027 | * They normally use BackSpace outside of Emacs for deleting the previous ! | |
| 956 | 43: How do I type DEL on PC terminal emulators? | 2028 | character typed. This can be solved by making DEL be the command for |
| 2029 | deleting the previous character outside of Emacs. This command will do | ||
| 2030 | this on many Unix systems: | ||
| 2031 | |||
| 2032 | stty erase '^?' | ||
| 2033 | |||
| 2034 | * The person may prefer using the BackSpace key for deleting the previous ! | ||
| 2035 | character because it is more conveniently located on their keyboard or | ||
| 2036 | because they don't even have a separate Delete key. In this case, the | ||
| 2037 | BackSpace key should be made to behave like Delete. There are several ! | ||
| 2038 | methods. ! | ||
| 2039 | ! | ||
| 2040 | * Under X Windows, the easiest solution is to change the BackSpace key ! | ||
| 2041 | into a Delete key like this: ! | ||
| 2042 | ! | ||
| 2043 | xmodmap -e "keysym BackSpace = Delete" ! | ||
| 2044 | ! | ||
| 2045 | * Some terminals (eg., VT3## terminals) allow the character generated by ! | ||
| 2046 | the BackSpace key to be changed from a setup menu. ! | ||
| 2047 | ! | ||
| 2048 | * You may be able to get a keyboard that is completely programmable. ! | ||
| 2049 | ! | ||
| 2050 | * Under X or on a dumb terminal, it is possible to swap the BackSpace and ! | ||
| 2051 | Delete keys inside Emacs: + | ||
| 2052 | |||
| 2053 | (swap-keys ?\C-h ?\C-?) | ||
| 2054 | |||
| 2055 | See question 60 for the implementation of swap-keys. | ||
| 2056 | |||
| 2057 | * Another approach is to switch keybindings and put help on "C-x h" ! | ||
| 2058 | instead: | ||
| 2059 | |||
| 2060 | (global-set-key "\C-h" 'delete-backward-char) | ||
| 2061 | (global-set-key "\C-xh" 'help-command) ; override mark-whole-buffer | ||
| 2062 | |||
| 2063 | Other popular key bindings for help are M-? and "C-x ?". + | ||
| 2064 | |||
| 2065 | WARNING: This method fails to correctly bind BackSpace in the various ! | ||
| 2066 | major and minor modes that define their own backward character ! | ||
| 2067 | deletion or help commands, such as C mode and Lisp mode. To actually | ||
| 2068 | do that for every mode is a lot of work. There are probably other + | ||
| 2069 | places where the correspondence between help and C-h is hardcoded. + | ||
| 2070 | |||
| 2071 | 62: How do I type DEL on PC terminal emulators? | ||
| 957 | 2072 | ||
| 958 | Someone whose name I forgot wrote: | 2073 | Someone whose name I forgot wrote: |
| 959 | 2074 | ||
| 960 | Most PCs have deficient keyboards that don't have both Backspace and | 2075 | Most PCs have deficient keyboards that don't have both BackSpace and |
| 961 | Delete keys. Whether C-h (backspace) or DEL is generated by the | 2076 | Delete keys. Whether C-h (BackSpace) or DEL is generated by the |
| 962 | "Backspace" key varies from one terminal emulator to another. If you're | 2077 | BackSpace key varies from one terminal emulator to another. If you're ! |
| 963 | lucky, you can reconfigure the keyboard so that it generates DEL. If | 2078 | lucky, you can reconfigure the keyboard so that it generates DEL. If |
| 964 | not, you will have to hunt to figure out what keystroke will do it --- | 2079 | not, you will have to hunt to figure out what keystroke will do it --- |
| 965 | possibilities include various shifted and controlled versions of | 2080 | possibilities include various shifted and controlled versions of |
| 966 | "Backspace", the "Del" key on the numeric keypad (which might depend on | 2081 | BackSpace, the `Del' key on the numeric keypad (which might depend on ! |
| 967 | "Shift" or "NumLock"), or perhaps C-? (Control-?). | 2082 | Shift or NumLock), or perhaps C-? (Control-?). ! |
| 2083 | |||
| 2084 | If this is too hard, you may want to swap the Delete key with some other | ||
| 2085 | key. See question 61. | ||
| 2086 | |||
| 2087 | 63: Can I make my "Compose" key behave like a "Meta" key? | ||
| 2088 | |||
| 2089 | On a dumb terminal such as a VT220, no. It is rumored that certain VT220 | ||
| 2090 | clones could have their Compose key configured this way. If you're on an | ||
| 2091 | X workstation, you might have luck using the "xmodmap" program. | ||
| 2092 | |||
| 2093 | 64: Why don't the arrow keys work? | ||
| 2094 | |||
| 2095 | When Emacs starts up, it doesn't know anything about arrow keys at all | ||
| 2096 | (except when running under X, see question 52). During the | ||
| 2097 | process of starting up, Emacs will load a terminal-specific initialization | ||
| 2098 | file for your terminal type (as determined by the environment variable | ||
| 2099 | TERM), if one exists. This file has the responsibility for enabling the | ||
| 2100 | arrow keys. | ||
| 2101 | |||
| 2102 | There are several things that can go wrong: | ||
| 2103 | |||
| 2104 | 1. There is no initialization file for your terminal. | ||
| 2105 | |||
| 2106 | You can determine this by looking in the lisp/term directory. If your | ||
| 2107 | terminal type (as determined by the TERM environment variable) is | ||
| 2108 | xxx-yy-z, then the first of these files in the lisp/term directory will | ||
| 2109 | be loaded as the terminal-specific initialization file: xxx-yy-z.el, | ||
| 2110 | xxx-yy.el, or xxx.el. | ||
| 2111 | |||
| 2112 | If there is none there, one can be made for your terminal, or you can | ||
| 2113 | just add code to your own .emacs to handle this problem for yourself. | ||
| 2114 | For example, if your terminal's arrow keys send these character | ||
| 2115 | sequences: | ||
| 2116 | |||
| 2117 | Up: ESC [ A | ||
| 2118 | Down: ESC [ B | ||
| 2119 | Right: ESC [ C | ||
| 2120 | Left: ESC [ D | ||
| 2121 | |||
| 2122 | then you can bind these keys to the appropriate commands with code in | ||
| 2123 | your .emacs like this: | ||
| 2124 | |||
| 2125 | (setq term-setup-hook | ||
| 2126 | (function | ||
| 2127 | (lambda () | ||
| 2128 | (cond ((string-match "\\`xyzzy" (or (getenv "TERM") "")) | ||
| 2129 | ;; First, must unmap the binding for M-[ | ||
| 2130 | (or (keymapp (lookup-key global-map "\e[")) | ||
| 2131 | (define-key global-map "\e[" nil)) | ||
| 2132 | ;; Enable terminal type xyzzy's arrow keys: | ||
| 2133 | (define-key global-map "\e[A" 'previous-line) | ||
| 2134 | (define-key global-map "\e[B" 'next-line) | ||
| 2135 | (define-key global-map "\e[C" 'forward-char) | ||
| 2136 | (define-key global-map "\e[D" 'backward-char)) | ||
| 2137 | ((string-match "\\`abcde" (or (getenv "TERM") "")) | ||
| 2138 | ;; Do something different for terminal type abcde | ||
| 2139 | ;; ..... | ||
| 2140 | )))))) | ||
| 2141 | |||
| 2142 | This technique allows you to easily add more `cond' cases for different | ||
| 2143 | terminal types. | ||
| 2144 | |||
| 2145 | NOTE: You will have to restart Emacs to get this change to take effect | ||
| 2146 | when using this technique. | ||
| 2147 | |||
| 2148 | NOTE: Your arrow keys may send sequences beginning with "ESC O" when + | ||
| 2149 | Emacs is running, even if they send sequences beginning with "ESC [" at + | ||
| 2150 | all other times. This is because Emacs uses any command there may be + | ||
| 2151 | in your terminal's termcap entry for putting the terminal into + | ||
| 2152 | `Application Keypad Mode'. Just map these sequences the same way as + | ||
| 2153 | above. + | ||
| 2154 | |||
| 2155 | The next two cases are problems even if there is a initialization file for | ||
| 2156 | your terminal type. | ||
| 2157 | |||
| 2158 | 2. Your terminal's arrow keys send individual control characters. | ||
| 2159 | |||
| 2160 | For example, the arrow keys on an ADM-3 send C-h, C-j, C-k, and C-l. + | ||
| 2161 | |||
| 2162 | There is not much Emacs can do in this situation, since all the control | ||
| 2163 | characters except for C-^ and C-\ are already used as Emacs commands. | ||
| 2164 | It may be possible to convince the terminal to send something else when + | ||
| 2165 | you press the arrow keys; it is worth investigating. + | ||
| 2166 | |||
| 2167 | You have to make the hard choices of how to rebind keys to commands to | ||
| 2168 | make things work the way you want. Another alternative is to start + | ||
| 2169 | learning the standard Emacs keybindings for moving point around: C-b, + | ||
| 2170 | C-f, C-p, and C-n. Personally, I no longer use the arrow keys when + | ||
| 2171 | editing. + | ||
| 2172 | |||
| 2173 | 3. Your terminal's arrow keys send sequences beginning with "ESC [". | ||
| 2174 | |||
| 2175 | Due to an extremely poor design decision (ie., these sequences are ANSI | ||
| 2176 | standard), none of the the terminal-specific initialization files that | ||
| 2177 | are distributed with Emacs will bind these character sequences to the | ||
| 2178 | appropriate commands by default. (This also applies to any other | ||
| 2179 | function keys which generate character sequences starting with "ESC | ||
| 2180 | [".) This is because it was deemed far more important to preserve the | ||
| 2181 | binding of M-[ to the backward-paragraph command. It appears that this | ||
| 2182 | will change in Emacs 19. | ||
| 2183 | |||
| 2184 | Some of the terminal-specific initialization files that come with Emacs | ||
| 2185 | provide a command `enable-arrow-keys' that will fix this problem. To | ||
| 2186 | get this automatically invoked, put this in your .emacs: | ||
| 2187 | |||
| 2188 | (setq term-setup-hook | ||
| 2189 | (function | ||
| 2190 | (lambda () | ||
| 2191 | (if (fboundp 'enable-arrow-keys) (enable-arrow-keys))))) | ||
| 2192 | |||
| 2193 | We put this in our lisp/default.el file, so users don't have to worry | ||
| 2194 | about it: | ||
| 2195 | |||
| 2196 | ;; don't override a user's term-setup-hook | ||
| 2197 | (or term-setup-hook | ||
| 2198 | (setq term-setup-hook | ||
| 2199 | (function | ||
| 2200 | (lambda () | ||
| 2201 | (and (fboundp 'enable-arrow-keys) | ||
| 2202 | ;; don't override a user key mapping | ||
| 2203 | (eq 'backward-paragraph (lookup-key esc-map "[")) | ||
| 2204 | (enable-arrow-keys)))))) | ||
| 2205 | |||
| 2206 | If your terminal type is `sun', you should put this in your .emacs | ||
| 2207 | instead (or in addition to the above): | ||
| 2208 | |||
| 2209 | (setq sun-esc-bracket t) | ||
| 2210 | |||
| 2211 | If your terminal type is `xterm', you will have to bind the arrow keys | ||
| 2212 | as in part 1 above, since the xterm.el file doesn't do anything useful. | ||
| 2213 | |||
| 2214 | It is possible that the terminal-specific initialization file for your | ||
| 2215 | terminal type was written locally and does not follow the rule | ||
| 2216 | mentioned above. In this case you may need to inspect it to find out | ||
| 2217 | how to enable the arrow keys. (Actually, if it was written locally, it | ||
| 2218 | probably enables the arrow keys by default.) | ||
| 2219 | |||
| 2220 | 65: How do I bind a combination of modifier key and function key? | ||
| 2221 | |||
| 2222 | Unless you're using Emacs under emacstool (or xvetool?) or you have a | ||
| 2223 | working version of x-rebind-key (see question 52), you can't do this | ||
| 2224 | with Emacs alone. When using emacstool, Emacs sees different character | ||
| 2225 | sequences for the combination of a modifier and a function key from what | ||
| 2226 | it sees for the function key alone. See etc/emacstool.1 for more | ||
| 2227 | information. Since Emacs sees different character sequences, you can bind | ||
| 2228 | these different sequences to different commands. | ||
| 2229 | |||
| 2230 | If you are running Emacs inside a terminal emulator window like xterm, you | ||
| 2231 | can modify its translation tables to make it generate different character | ||
| 2232 | sequences for the combination of a modifier and a function key. For | ||
| 2233 | example, this X resource setting: | ||
| 2234 | |||
| 2235 | XTerm.VT100.Translations: #override \ | ||
| 2236 | Shift<KeyPress>F1: string(0x1b) string("[xyzzy") | ||
| 2237 | |||
| 2238 | makes Shift-F1 generate the character sequence "ESC [ xyzzy". You can | ||
| 2239 | bind these character sequences in Emacs as normal. | ||
| 2240 | |||
| 2241 | 66: Why doesn't my Meta key work in an xterm window? | ||
| 2242 | |||
| 2243 | Try all of these methods before asking for further help: | ||
| 2244 | |||
| 2245 | * If you are using `olwm' as your window manager, switch to another window + | ||
| 2246 | manager. :-) {Seriously though, does anyone know a good generic + | ||
| 2247 | solution to allow the use of the Meta key with Emacs under olwm?} + | ||
| 2248 | + | ||
| 2249 | * For X11R4: Make sure it really is a Meta key. Use "xev" to find out + | ||
| 2250 | what keysym your Meta key generates. It should be either Meta_L or | ||
| 2251 | Meta_R. If it isn't, use xmodmap to fix the situation. | ||
| 2252 | |||
| 2253 | * Make sure the pty the xterm is using is passing 8 bit characters. | ||
| 2254 | "stty -a" (or "stty everything") should show "cs8" somewhere. If it | ||
| 2255 | shows "cs7" instead, use "stty cs8 -istrip" (or "stty pass8") to fix | ||
| 2256 | it. | ||
| 2257 | |||
| 2258 | * If there is an rlogin connection between the xterm and the Emacs, the | ||
| 2259 | "-8" argument may need to be given to rlogin to make it pass all 8 | ||
| 2260 | bits of every character. | ||
| 2261 | |||
| 2262 | * If the Emacs is running under Ultrix, it is reported that evaluating ! | ||
| 2263 | (set-input-mode t nil) helps. + | ||
| 2264 | |||
| 2265 | * If all else fails, you can make xterm generate "ESC W" when you type | ||
| 2266 | M-W, which is the same conversion Emacs would make if it got the M-W | ||
| 2267 | anyway. In X11R4, the following resource specification will do this: | ||
| 2268 | |||
| 2269 | XTerm.VT100.EightBitInput: false | ||
| 2270 | |||
| 2271 | (This changes the behavior of the insert-eight-bit action.) | ||
| 2272 | |||
| 2273 | With older xterms, you can specify this behavior with a translation: | ||
| 2274 | |||
| 2275 | XTerm.VT100.Translations: #override \ | ||
| 2276 | Meta<KeyPress>: string(0x1b) insert() | ||
| 2277 | |||
| 2278 | You might have to replace "Meta" with "Alt". | ||
| 2279 | |||
| 2280 | 67: Why doesn't my ExtendChar key work as a Meta key under HP-UX 8.0? | ||
| 2281 | |||
| 2282 | This is a result of an internationalization extension in X11R4 and the | ||
| 2283 | fact that HP is now using this extension. Emacs assumes that | ||
| 2284 | XLookupString returns the same result regardless of the Meta key state | ||
| 2285 | which is no longer necessarily true. Until Emacs is fixed, the temporary | ||
| 2286 | kludge is to run this command after each time the X server is started but | ||
| 2287 | preferably before any xterm clients are: | ||
| 2288 | |||
| 2289 | xmodmap -e 'remove mod1 = Mode_switch' | ||
| 968 | 2290 | ||
| 969 | If this is too hard, you may want to swap the delete key with some other | 2291 | NOTE: This will disable the use of the extra keysyms systemwide, which |
| 970 | key. See question 42. | 2292 | may be undesirable if you actually intend to use them. |
| 971 | 2293 | ||
| 2294 | 68: Where can I get key bindings to make Emacs emulate WordStar? | ||
| 2295 | |||
| 2296 | Look for the package `wordstar' in the Emacs Lisp Archive (see question | ||
| 2297 | 18). | ||
| 2298 | |||
| 972 | 2299 | ||
| 973 | 2300 | ||
| 974 | Building/Installing/Porting Emacs and Machine/OS-Specific Bugs: | 2301 | Building/Installing/Porting Emacs and Machine/OS-Specific Bugs - |
| 975 | 2302 | ||
| 976 | 44: Why do I get an "f68881_used undefined" error, when I build Emacs on my | 2303 | 69: Why does Emacs crash with "Fatal error (6).Abort" under SunOS 4.1? |
| 2304 | |||
| 2305 | I had hoped this question would go away after Emacs 18.57 was released, | ||
| 2306 | but people continue to compile 18.55. | ||
| 2307 | |||
| 2308 | There is a bug in the "localtime" routine supplied with SunOS 4.1. A | ||
| 2309 | private function called by tzsetwall zeroes the byte just past an eight | ||
| 2310 | byte region it mallocs. This corrupts GNU malloc's memory pool. When GNU | ||
| 2311 | malloc detects this it aborts. | ||
| 2312 | |||
| 2313 | In the 18.57 release "#define SYSTEM_MALLOC" was added to the ! | ||
| 2314 | configuration file for SunOS 4.1, which allowed Emacs to work. However, ! | ||
| 2315 | Sun's realloc behaves horribly when alternated with malloc, so your + | ||
| 2316 | process size can balloon rapidly in certain situations quickly using up + | ||
| 2317 | all available memory. Thus, you may prefer the approach taken by Emacs + | ||
| 2318 | 18.58, which has a different fix that makes GNU's malloc always allocate + | ||
| 2319 | at least 16 bytes. + | ||
| 2320 | + | ||
| 2321 | Eirik Fuller <eirik@theory.tn.cornell.edu> supplies most of the following + | ||
| 2322 | information: + | ||
| 2323 | |||
| 2324 | In SunOS 4.1.1, it appears that Sun has still not fixed their bug, since | ||
| 2325 | the localtime.o file did not change. They must be aware of it since they | ||
| 2326 | suggest using "#define SYSTEM_MALLOC" to compile Emacs in their | ||
| 2327 | documentation. It is reported that this same bug causes mysterious | ||
| 2328 | behavior in Sun's /usr/etc/rpc.mountd. | ||
| 2329 | |||
| 2330 | For people who want to fix this problem for real, there is a fixed version | ||
| 2331 | of the localtime.o file available via anonymous FTP (titan.rice.edu: | ||
| 2332 | incoming/localtime.tar.Z). {Someone has reported that this file is now | ||
| 2333 | missing.} The new localtime.o file should be installed in the | ||
| 2334 | /usr/lib/libc{.a,.so.*} files. Read the `ar' man page and the README file | ||
| 2335 | in /usr/lib/shlib.etc for instructions. - | ||
| 2336 | |||
| 2337 | Now stop asking this question! :-) :-) | ||
| 2338 | |||
| 2339 | 70: Why do I get an "f68881_used undefined" error, when I build Emacs on my | ||
| 977 | Sun 3? | 2340 | Sun 3? |
| 978 | 2341 | ||
| 979 | Barry A. Warsaw <warsaw@cme.nist.gov> writes: | 2342 | Barry A. Warsaw <warsaw@cme.nist.gov> writes: |
| 980 | 2343 | ||
| 981 | Some of the code that is being linked on the "ld" line of emacs' | 2344 | Some of the code that is being linked on the "ld" line of emacs' build |
| 982 | build command has been compiled with the -f68881 option. Most | 2345 | command has been compiled with the -f68881 option. Most common reason |
| 983 | common reason is that you're linking with X libraries which were | 2346 | is that you're linking with X libraries which were built with -f68881 |
| 984 | built with -f68881 option set. You need to either remove all | 2347 | option set. You need to either remove all dependencies to the 68881 |
| 985 | dependencies to the 68881 (may mean a recompile of the X libraries | 2348 | (may mean a recompile of the X libraries with -fswitch or -fsoft |
| 986 | with -fswitch or -fsoft option), or you need to link emacs with | 2349 | option), or you need to link emacs with the 68881 startup file |
| 987 | the 68881 startup file /usr/lib/Mcrt1.o. Make this change to | 2350 | /usr/lib/Mcrt1.o. Make this change to src/ymakefile: |
| 988 | src/ymakefile: | ||
| 989 | |||
| 990 | change: #define START_FILES crt0.o | ||
| 991 | to: #define START_FILES crt0.o /usr/lib/Mcrt1.o | ||
| 992 | |||
| 993 | The order of these start files is critical. | ||
| 994 | |||
| 995 | 45: Why does Emacs crash under SunOS 4.1? | ||
| 996 | |||
| 997 | Under SunOS 4.1, Emacs dies with this message: | ||
| 998 | |||
| 999 | Fatal error (6).Abort | ||
| 1000 | |||
| 1001 | There is a bug in the "localtime" routine supplied with SunOS 4.1. | ||
| 1002 | A private function called by tzsetwall zeroes the byte just past an | ||
| 1003 | eight byte region it mallocs. This corrupts GNU malloc's memory pool. | ||
| 1004 | |||
| 1005 | Put "#define SYSTEM_MALLOC" in src/config.h. | ||
| 1006 | |||
| 1007 | Or, for the purists: | ||
| 1008 | |||
| 1009 | Put "#define SUNOS_LOCALTIME_BUG" in src/config.h and apply the following | ||
| 1010 | patch to src/malloc.c. | ||
| 1011 | |||
| 1012 | (Patch by Eirik Fuller <eirik@elf.tn.cornell.edu>.) | ||
| 1013 | |||
| 1014 | >*** malloc.c~ Fri Apr 7 22:12:10 1989 | ||
| 1015 | >--- malloc.c Tue May 8 07:07:22 1990 | ||
| 1016 | >*************** | ||
| 1017 | >*** 476,482 **** | ||
| 1018 | >--- 476,487 ---- | ||
| 1019 | > multiple of 8, then figure out which nestf[] area to use. | ||
| 1020 | > Both the beginning of the header and the beginning of the | ||
| 1021 | > block should be on an eight byte boundary. */ | ||
| 1022 | >+ #ifdef SUNOS_LOCALTIME_BUG | ||
| 1023 | >+ /* SunOS 4.1 localtime scribbles on the ninth byte. */ | ||
| 1024 | >+ nbytes = (n + ((sizeof *p + 15) & ~15) + EXTRA + 15) & ~15; | ||
| 1025 | >+ #else | ||
| 1026 | > nbytes = (n + ((sizeof *p + 7) & ~7) + EXTRA + 7) & ~7; | ||
| 1027 | >+ #endif | ||
| 1028 | > { | ||
| 1029 | > register unsigned int shiftr = (nbytes - 1) >> 2; | ||
| 1030 | > | ||
| 1031 | |||
| 1032 | 46: Why does Emacs occasionally cause segmentation faults and machine | ||
| 1033 | panics on my DECstation 3100? | ||
| 1034 | |||
| 1035 | Bruce Cole <cole@dip.cs.wisc.edu> writes: | ||
| 1036 | |||
| 1037 | > We're running Emacs 18.54 on an Ultrix Risc DECsystem 5400. Three | ||
| 1038 | > times we've had the machine hang with the following message: | ||
| 1039 | > | ||
| 1040 | > panic: tblmod on invalid pte | ||
| 1041 | > | ||
| 1042 | > Ultrix support tells us this is caused by Emacs. Has anyone | ||
| 1043 | > experienced this? DEC says it only happens on RISC boxes. | ||
| 1044 | |||
| 1045 | This is due to a MIPS specific Ultrix kernel bug. I sent DEC a | ||
| 1046 | description of the bug with a bug fix. The Kernel bug manifests itself | ||
| 1047 | with Emacs since Emacs uses a non-standard data start address on Ultrix | ||
| 1048 | MIPS machines. | ||
| 1049 | |||
| 1050 | I haven't often seen Emacs cause MIPS machines to panic. Usually you | ||
| 1051 | just see one of the following errors when you try to start up Emacs: | ||
| 1052 | |||
| 1053 | segmentation fault (core dumped) | ||
| 1054 | emacs: Bad address | ||
| 1055 | Out of memory | ||
| 1056 | data size rlimit exceeded, pid 6523, process tcsh (for example) | ||
| 1057 | |||
| 1058 | Until DEC fixes their kernel, you can avoid the bug by changing the data | ||
| 1059 | start address used by Emacs. | ||
| 1060 | |||
| 1061 | > I have built two newer versions of GNU Emacs and it still happens. I | ||
| 1062 | > should also mention that these faults happen quite rarely to some | ||
| 1063 | > users (I may see it once a month), while other users see it a few | ||
| 1064 | > times a week or even daily! | ||
| 1065 | |||
| 1066 | The problem only occurs when a MIPS machine is doing a lot of paging. | ||
| 1067 | Users who don't cause their workstation to page will not see this | ||
| 1068 | problem. | ||
| 1069 | 2351 | ||
| 1070 | Patch to GNU Emacs 18.55: | 2352 | change: #define START_FILES crt0.o |
| 2353 | to: #define START_FILES crt0.o /usr/lib/Mcrt1.o | ||
| 1071 | 2354 | ||
| 1072 | >*** m-pmax.h Thu Jun 8 11:53:55 1989 | 2355 | The order of these start files is critical. |
| 1073 | >--- m-pmax.h.new Mon Jul 9 10:21:21 1990 | ||
| 1074 | >*************** | ||
| 1075 | >*** 1,3 **** | ||
| 1076 | >--- 1,7 ---- | ||
| 1077 | > #include "m-mips.h" | ||
| 1078 | > #undef LIBS_MACHINE | ||
| 1079 | > #undef BIG_ENDIAN | ||
| 1080 | >+ #undef LD_SWITCH_MACHINE | ||
| 1081 | >+ #undef DATA_START | ||
| 1082 | >+ #define DATA_START 0x10000000 | ||
| 1083 | >+ #define DATA_SEG_BITS 0x10000000 | ||
| 1084 | 2356 | ||
| 1085 | 47: How do I get Emacs running on VMS under DECwindows? | 2357 | 71: Why does Emacs ignore my X resources (my .Xdefaults file)? |
| 1086 | 2358 | ||
| 1087 | Hal R. Brand <BRAND@addvax.llnl.gov> is said to have a VMS save set with | 2359 | * Try compiling Emacs with the XBACKWARDS macro defined. There is a bug |
| 1088 | a ready-to-run VMS version of Emacs for X Windows. It is available via: | 2360 | in some implementations of XGetDefault, which do not correspond to the |
| 2361 | documentation or the header files. | ||
| 1089 | 2362 | ||
| 1090 | Anonymous FTP: | 2363 | * Make sure you are either using the class name of `Emacs' or the correct |
| 1091 | site: addvax.llnl.gov | 2364 | instance name. The instance name is normally the same as the name of |
| 2365 | the file Emacs is in (ie., the last part of argv[0]), but this can be | ||
| 2366 | overridden by -rn command line option or the WM_RES_NAME environment | ||
| 2367 | variable. | ||
| 1092 | 2368 | ||
| 1093 | Johan Vromans <jv@mh.nl> writes: | 2369 | WARNING: The advice the man page gives to use `emacs' is often wrong. |
| 1094 | 2370 | ||
| 1095 | Getting Emacs to run on VMS with DECwindows requires a number of changes | 2371 | WARNING: Older versions of Emacs got the class name wrong. |
| 1096 | to the sources. Fortunately this has been done already. Joshua Marantz | ||
| 1097 | <josh@viewlogic.com> did most of the work for Emacs 18.52, and the mods | ||
| 1098 | were ported to 18.55 by Johan Vromans <jv@mh.nl>. Also included is the | ||
| 1099 | handling of DEC's LK201 keyboard. You need to apply the changes to a | ||
| 1100 | fresh Emacs 18.55 distribution on a Unix system, and then you can copy | ||
| 1101 | the sources to VMS to perform the compile/link/build. | ||
| 1102 | |||
| 1103 | The set of changes have been posted a number of times three times the | ||
| 1104 | last 12 months, so they should be widely available. | ||
| 1105 | |||
| 1106 | 48: Why won't src/alloc.c compile on a SPARCstation? | ||
| 1107 | |||
| 1108 | {Could someone send me a better description of the symptoms ... Does it | ||
| 1109 | really not compile, or does it refuse to link, or does it die when it's | ||
| 1110 | run?} | ||
| 1111 | |||
| 1112 | An object in src/alloc.c is declared as an array of char. However, on a | ||
| 1113 | SPARCstation, this object must be aligned on a longword boundary. | ||
| 1114 | gcc will align this object not on a longword boundary because it thinks | ||
| 1115 | this is ok because the object is an array of char. | ||
| 1116 | |||
| 1117 | Here is a solution: | ||
| 1118 | |||
| 1119 | (Patch from the Epoch source code.) | ||
| 1120 | |||
| 1121 | >*** dist-18.55.dist/src/alloc.c Mon Feb 13 05:23:35 1989 | ||
| 1122 | >--- dist-18.55/src/alloc.c Mon Nov 27 23:30:13 1989 | ||
| 1123 | >*************** | ||
| 1124 | >*** 665,673 **** | ||
| 1125 | > #define NSTATICS 200 | ||
| 1126 | > | ||
| 1127 | >- char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0}; | ||
| 1128 | >- | ||
| 1129 | > int staticidx = 0; | ||
| 1130 | > | ||
| 1131 | > #define staticvec ((Lisp_Object **) staticvec1) | ||
| 1132 | > | ||
| 1133 | > /* Put an entry in staticvec, pointing at the variable whose address is given */ | ||
| 1134 | >--- 665,676 ---- | ||
| 1135 | > #define NSTATICS 200 | ||
| 1136 | > | ||
| 1137 | > int staticidx = 0; | ||
| 1138 | > | ||
| 1139 | >+ #ifdef __GNUC__ | ||
| 1140 | >+ Lisp_Object *staticvec[NSTATICS] = {0}; | ||
| 1141 | >+ #else | ||
| 1142 | >+ char staticvec1[NSTATICS * sizeof (Lisp_Object *)] = {0}; | ||
| 1143 | > #define staticvec ((Lisp_Object **) staticvec1) | ||
| 1144 | >+ #endif | ||
| 1145 | > | ||
| 1146 | > /* Put an entry in staticvec, pointing at the variable whose address is given */ | ||
| 1147 | |||
| 1148 | {Does anyone understand why one might want to declare staticvec as an | ||
| 1149 | array of char instead of an array of LispObject?} | ||
| 1150 | |||
| 1151 | 49: Why do shells started from Emacs suspend themselves under SunOS 4.1? | ||
| 1152 | |||
| 1153 | In SunOS 4.1, when subprocesses are started by an Emacs process started | ||
| 1154 | by "rsh", the process stops with a message like this: | ||
| 1155 | |||
| 1156 | Process shell stopped (tty input) | ||
| 1157 | |||
| 1158 | SunOS 4.1 uses the POSIX standard's specification for job control. | ||
| 1159 | Basically, a process must be a session leader to acquire a new | ||
| 1160 | controlling terminal. | ||
| 1161 | |||
| 1162 | A quick fix is to run Emacs as "/usr/etc/setsid emacs" instead. | ||
| 1163 | |||
| 1164 | To fix it in Emacs, use this patch: | ||
| 1165 | |||
| 1166 | (Patch by Eirik Fuller <eirik@elf.tn.cornell.edu>.) | ||
| 1167 | |||
| 1168 | >*** /tmp/,RCSt1a12635 Fri Jul 6 11:29:10 1990 | ||
| 1169 | >--- process.c Sat Jun 16 14:04:55 1990 | ||
| 1170 | >*************** | ||
| 1171 | >*** 1031,1036 **** | ||
| 1172 | >--- 1031,1039 ---- | ||
| 1173 | > int j = open ("/dev/tty", O_RDWR, 0); | ||
| 1174 | > ioctl (j, TIOCNOTTY, 0); | ||
| 1175 | > close (j); | ||
| 1176 | >+ #ifndef USG | ||
| 1177 | >+ setpgrp (0, 0); | ||
| 1178 | >+ #endif | ||
| 1179 | > } | ||
| 1180 | > #endif /* TIOCNOTTY */ | ||
| 1181 | > | ||
| 1182 | |||
| 1183 | 50: Why does Emacs crash from a bus error in XLookupString under OpenLook? | ||
| 1184 | |||
| 1185 | The Sun OpenLook libraries use the XComposeStatus parameter on | ||
| 1186 | XLookupString for composing key sequences. I'm told this is actually | ||
| 1187 | supposed to be an optional parameter. | ||
| 1188 | |||
| 1189 | (Patch by David J. MacKenzie <djm@eng.umd.edu>.) | ||
| 1190 | |||
| 1191 | >*** dist-18.55.dist/src/x11term.c Wed Aug 2 21:56:42 1989 | ||
| 1192 | >--- dist-18.55/src/x11term.c Fri Jul 13 19:22:32 1990 | ||
| 1193 | >*************** | ||
| 1194 | >*** 1213,1216 **** | ||
| 1195 | >--- 1213,1218 ---- | ||
| 1196 | > #endif /* not sun */ | ||
| 1197 | > | ||
| 1198 | >+ static XComposeStatus status; | ||
| 1199 | >+ | ||
| 1200 | > internal_socket_read(bufp, numchars) | ||
| 1201 | > register unsigned char *bufp; | ||
| 1202 | >*************** | ||
| 1203 | >*** 1223,1227 **** | ||
| 1204 | > BLOCK_INPUT_DECLARE (); | ||
| 1205 | > XEvent event; | ||
| 1206 | >- XComposeStatus status; | ||
| 1207 | > KeySym keysym; | ||
| 1208 | > | ||
| 1209 | >--- 1225,1228 ---- | ||
| 1210 | >*************** | ||
| 1211 | >*** 1330,1334 **** | ||
| 1212 | > nbytes = XLookupString (&event, | ||
| 1213 | > mapping_buf, 20, &keysym, | ||
| 1214 | >! 0); | ||
| 1215 | > /* Someday this will be unnecessary as we will | ||
| 1216 | > be able to use XRebindKeysym so XLookupString | ||
| 1217 | >--- 1331,1335 ---- | ||
| 1218 | > nbytes = XLookupString (&event, | ||
| 1219 | > mapping_buf, 20, &keysym, | ||
| 1220 | >! &status); | ||
| 1221 | > /* Someday this will be unnecessary as we will | ||
| 1222 | > be able to use XRebindKeysym so XLookupString | ||
| 1223 | |||
| 1224 | 51: Why doesn't "C-c C-c" interrupt subprocesses under HP/UX? | ||
| 1225 | |||
| 1226 | Paul Stravers <stravers@dutentb.tudelft.nl> writes: | ||
| 1227 | |||
| 1228 | In HP/UX we can (must) combine the two distinct calls | ||
| 1229 | 1. ioctl (fildes, TIOCGPGRP, &gid); | ||
| 1230 | 2. kill (-gid, signo); | ||
| 1231 | into the single call | ||
| 1232 | 1+2. ioctl (fildes, TIOCSIGSEND, signo); | ||
| 1233 | |||
| 1234 | This is apparently the case under at least HP/UX versions 6.5 and 7.0. | ||
| 1235 | |||
| 1236 | Here is a set of patches courtesy of Piet van Oostrum <piet@cs.ruu.nl> | ||
| 1237 | that fixes these problems: | ||
| 1238 | |||
| 1239 | 1. Signals to child processes work now (like the C-c C-c mentioned above) | ||
| 1240 | |||
| 1241 | 2. When running under X11, C-g now correctly interrupts long-running commands | ||
| 1242 | |||
| 1243 | 3. When running under X11, the window is redislayed even if emacs is doing | ||
| 1244 | some work (e.g. if your window becomes visible after being behind another | ||
| 1245 | one. | ||
| 1246 | |||
| 1247 | 4. A nasty bug in alloca is solved. This bug is very infrequent unless you | ||
| 1248 | apply the other patches. | ||
| 1249 | |||
| 1250 | {I don't know for sure whether all of these patches are applicable only | ||
| 1251 | under HP/UX. Perhaps someone can tell me.} | ||
| 1252 | |||
| 1253 | >*** alloca.s.~1~ Fri Sep 15 16:35:39 1989 | ||
| 1254 | >--- alloca.s Tue May 1 17:18:08 1990 | ||
| 1255 | >*************** | ||
| 1256 | >*** 92,103 **** | ||
| 1257 | > sub.l &MAXREG*4,%d1 # space for saving registers | ||
| 1258 | > mov.l %d1,%sp # save new value of sp | ||
| 1259 | > tst.b PROBE(%sp) # create pages (sigh) | ||
| 1260 | > move.w &MAXREG-1,%d0 | ||
| 1261 | > copy_regs_loop: /* save caller's saved registers */ | ||
| 1262 | >! mov.l (%a1)+,(%sp)+ | ||
| 1263 | > dbra %d0,copy_regs_loop | ||
| 1264 | >! mov.l %sp,%d0 # return value | ||
| 1265 | >! mov.l %d1,%sp | ||
| 1266 | > add.l &-4,%sp # adjust tos | ||
| 1267 | > jmp (%a0) # rts | ||
| 1268 | > #endif /* new hp assembler */ | ||
| 1269 | >--- 92,105 ---- | ||
| 1270 | > sub.l &MAXREG*4,%d1 # space for saving registers | ||
| 1271 | > mov.l %d1,%sp # save new value of sp | ||
| 1272 | > tst.b PROBE(%sp) # create pages (sigh) | ||
| 1273 | >+ mov.l %a2,%d1 # save reg a2 | ||
| 1274 | >+ mov.l %sp,%a2 | ||
| 1275 | > move.w &MAXREG-1,%d0 | ||
| 1276 | > copy_regs_loop: /* save caller's saved registers */ | ||
| 1277 | >! mov.l (%a1)+,(%a2)+ | ||
| 1278 | > dbra %d0,copy_regs_loop | ||
| 1279 | >! mov.l %a2,%d0 # return value | ||
| 1280 | >! mov.l %d1,%a2 # restore a2 | ||
| 1281 | > add.l &-4,%sp # adjust tos | ||
| 1282 | > jmp (%a0) # rts | ||
| 1283 | > #endif /* new hp assembler */ | ||
| 1284 | |||
| 1285 | >*** keyboard.c.~1~ Wed Apr 4 14:53:49 1990 | ||
| 1286 | >--- keyboard.c Thu Apr 26 14:46:27 1990 | ||
| 1287 | >*************** | ||
| 1288 | >*** 719,724 **** | ||
| 1289 | >--- 719,773 ---- | ||
| 1290 | > errno = old_errno; | ||
| 1291 | > } | ||
| 1292 | > | ||
| 1293 | >+ #ifdef HPUX | ||
| 1294 | >+ /* tells if an alarm is outstanding for emptying the socket */ | ||
| 1295 | >+ int socket_alarm; | ||
| 1296 | >+ | ||
| 1297 | >+ static void | ||
| 1298 | >+ empty_socket_interrupt() | ||
| 1299 | >+ { | ||
| 1300 | >+ int nread; | ||
| 1301 | >+ char buf[256 * BUFFER_SIZE_FACTOR]; | ||
| 1302 | >+ register int i; | ||
| 1303 | >+ int old_errno = errno; | ||
| 1304 | >+ | ||
| 1305 | >+ if (waiting_for_input) return; | ||
| 1306 | >+ | ||
| 1307 | >+ fcntl (fileno (stdin), F_SETFL, O_NDELAY); | ||
| 1308 | >+ | ||
| 1309 | >+ /* Read what is waiting. */ | ||
| 1310 | >+ | ||
| 1311 | >+ nread = (*read_socket_hook) (0, buf, sizeof buf); | ||
| 1312 | >+ | ||
| 1313 | >+ #ifdef EBADSLT | ||
| 1314 | >+ if (nread == -1 && (errno == EAGAIN || errno == EBADSLT)) | ||
| 1315 | >+ #else | ||
| 1316 | >+ if (nread == -1 && errno == EAGAIN) | ||
| 1317 | >+ #endif | ||
| 1318 | >+ nread = 0; | ||
| 1319 | >+ | ||
| 1320 | >+ fcntl (fileno (stdin), F_SETFL, 0); | ||
| 1321 | >+ | ||
| 1322 | >+ /* Scan the chars for C-g and store them in kbd_buffer. */ | ||
| 1323 | >+ kbd_ptr = kbd_buffer; | ||
| 1324 | >+ for (i = 0; i < nread; i++) | ||
| 1325 | >+ { | ||
| 1326 | >+ kbd_buffer_store_char (buf[i]); | ||
| 1327 | >+ /* Don't look at input that follows a C-g too closely. | ||
| 1328 | >+ This reduces lossage due to autorepeat on C-g. */ | ||
| 1329 | >+ if (buf[i] == Ctl ('G')) | ||
| 1330 | >+ break; | ||
| 1331 | >+ } | ||
| 1332 | >+ | ||
| 1333 | >+ /* reestablish interrupt */ | ||
| 1334 | >+ signal (SIGALRM, empty_socket_interrupt); | ||
| 1335 | >+ alarm (1); | ||
| 1336 | >+ | ||
| 1337 | >+ errno = old_errno; | ||
| 1338 | >+ } | ||
| 1339 | >+ | ||
| 1340 | >+ #endif /* HPUX */ | ||
| 1341 | >+ | ||
| 1342 | > /* read a character from the keyboard; call the redisplay if needed */ | ||
| 1343 | > /* commandflag 0 means do not do auto-saving, but do do redisplay. | ||
| 1344 | > -1 means do not do redisplay, but do do autosaving. | ||
| 1345 | >*************** | ||
| 1346 | >*** 733,738 **** | ||
| 1347 | >--- 782,794 ---- | ||
| 1348 | > Lisp_Object tem; | ||
| 1349 | > extern request_echo (); | ||
| 1350 | > | ||
| 1351 | >+ #ifdef HPUX | ||
| 1352 | >+ if (socket_alarm) { | ||
| 1353 | >+ alarm (0); | ||
| 1354 | >+ socket_alarm = 0; | ||
| 1355 | >+ } | ||
| 1356 | >+ #endif | ||
| 1357 | >+ | ||
| 1358 | > if ((c = unread_command_char) >= 0) | ||
| 1359 | > { | ||
| 1360 | > unread_command_char = -1; | ||
| 1361 | >*************** | ||
| 1362 | >*** 869,874 **** | ||
| 1363 | >--- 925,938 ---- | ||
| 1364 | > } | ||
| 1365 | > } | ||
| 1366 | > | ||
| 1367 | >+ #ifdef HPUX | ||
| 1368 | >+ if (read_socket_hook) { | ||
| 1369 | >+ socket_alarm = 1; | ||
| 1370 | >+ signal (SIGALRM, empty_socket_interrupt); | ||
| 1371 | >+ alarm (1); | ||
| 1372 | >+ } | ||
| 1373 | >+ #endif | ||
| 1374 | >+ | ||
| 1375 | > return c; | ||
| 1376 | > } | ||
| 1377 | > | ||
| 1378 | >*************** | ||
| 1379 | >*** 1094,1119 **** | ||
| 1380 | > | ||
| 1381 | > #else /* no FIONREAD */ | ||
| 1382 | > #ifdef USG | ||
| 1383 | > if (kbd_count) | ||
| 1384 | > abort (); | ||
| 1385 | > | ||
| 1386 | > fcntl (fileno (stdin), F_SETFL, O_NDELAY); | ||
| 1387 | >! kbd_ptr = kbd_buffer; | ||
| 1388 | > if (read_socket_hook) | ||
| 1389 | >! { | ||
| 1390 | >! kbd_count = (*read_socket_hook) (0, kbd_buffer, sizeof kbd_buffer); | ||
| 1391 | >! } | ||
| 1392 | > else | ||
| 1393 | >! { | ||
| 1394 | >! kbd_count = read (fileno (stdin), kbd_buffer, sizeof kbd_buffer); | ||
| 1395 | >! } | ||
| 1396 | > #ifdef EBADSLT | ||
| 1397 | >! if (kbd_count == -1 && (errno == EAGAIN || errno == EBADSLT)) | ||
| 1398 | > #else | ||
| 1399 | >! if (kbd_count == -1 && errno == EAGAIN) | ||
| 1400 | > #endif | ||
| 1401 | >! kbd_count = 0; | ||
| 1402 | > fcntl (fileno (stdin), F_SETFL, 0); | ||
| 1403 | > #else /* not USG */ | ||
| 1404 | > you lose | ||
| 1405 | > #endif /* not USG */ | ||
| 1406 | >--- 1158,1209 ---- | ||
| 1407 | > | ||
| 1408 | > #else /* no FIONREAD */ | ||
| 1409 | > #ifdef USG | ||
| 1410 | >+ char buf[256 * BUFFER_SIZE_FACTOR]; | ||
| 1411 | >+ register int i; | ||
| 1412 | >+ #ifdef HPUX | ||
| 1413 | >+ int mask; | ||
| 1414 | >+ #endif | ||
| 1415 | >+ | ||
| 1416 | > if (kbd_count) | ||
| 1417 | > abort (); | ||
| 1418 | > | ||
| 1419 | >+ #ifdef HPUX | ||
| 1420 | >+ if (socket_alarm) | ||
| 1421 | >+ mask = sigblock (sigmask (SIGALRM)); | ||
| 1422 | >+ #endif | ||
| 1423 | >+ | ||
| 1424 | > fcntl (fileno (stdin), F_SETFL, O_NDELAY); | ||
| 1425 | >! | ||
| 1426 | >! /* Read what is waiting. */ | ||
| 1427 | > if (read_socket_hook) | ||
| 1428 | >! nread = (*read_socket_hook) (0, buf, sizeof buf); | ||
| 1429 | > else | ||
| 1430 | >! nread = read (fileno(stdin), buf, sizeof buf); | ||
| 1431 | > #ifdef EBADSLT | ||
| 1432 | >! if (nread == -1 && (errno == EAGAIN || errno == EBADSLT)) | ||
| 1433 | > #else | ||
| 1434 | >! if (nread == -1 && errno == EAGAIN) | ||
| 1435 | > #endif | ||
| 1436 | >! nread = 0; | ||
| 1437 | >! | ||
| 1438 | > fcntl (fileno (stdin), F_SETFL, 0); | ||
| 1439 | >+ | ||
| 1440 | >+ /* Scan the chars for C-g and store them in kbd_buffer. */ | ||
| 1441 | >+ kbd_ptr = kbd_buffer; | ||
| 1442 | >+ for (i = 0; i < nread; i++) | ||
| 1443 | >+ { | ||
| 1444 | >+ kbd_buffer_store_char (buf[i]); | ||
| 1445 | >+ /* Don't look at input that follows a C-g too closely. | ||
| 1446 | >+ This reduces lossage due to autorepeat on C-g. */ | ||
| 1447 | >+ if (buf[i] == Ctl ('G')) | ||
| 1448 | >+ break; | ||
| 1449 | >+ } | ||
| 1450 | >+ | ||
| 1451 | >+ #ifdef HPUX | ||
| 1452 | >+ if (socket_alarm) | ||
| 1453 | >+ sigsetmask(mask); | ||
| 1454 | >+ #endif | ||
| 1455 | >+ | ||
| 1456 | > #else /* not USG */ | ||
| 1457 | > you lose | ||
| 1458 | > #endif /* not USG */ | ||
| 1459 | |||
| 1460 | >*** x11term.h~ Fri Sep 15 15:20:26 1989 | ||
| 1461 | >--- x11term.h Thu Apr 26 14:03:25 1990 | ||
| 1462 | >*************** | ||
| 1463 | >*** 11,17 **** | ||
| 1464 | >--- 11,22 ---- | ||
| 1465 | > #define sigmask(no) (1L << ((no) - 1)) | ||
| 1466 | > #endif | ||
| 1467 | > | ||
| 1468 | >+ #ifdef HPUX | ||
| 1469 | > #define BLOCK_INPUT_DECLARE() int BLOCK_INPUT_mask | ||
| 1470 | >+ #define BLOCK_INPUT() BLOCK_INPUT_mask = sigblock (sigmask (SIGALRM)) | ||
| 1471 | >+ #define UNBLOCK_INPUT() sigsetmask (BLOCK_INPUT_mask) | ||
| 1472 | >+ #else /* not HPUX */ | ||
| 1473 | >+ #define BLOCK_INPUT_DECLARE() int BLOCK_INPUT_mask | ||
| 1474 | > #ifdef SIGIO | ||
| 1475 | > #define BLOCK_INPUT() BLOCK_INPUT_mask = sigblock (sigmask (SIGIO)) | ||
| 1476 | > #define UNBLOCK_INPUT() sigsetmask (BLOCK_INPUT_mask) | ||
| 1477 | >*************** | ||
| 1478 | >*** 19,23 **** | ||
| 1479 | >--- 24,29 ---- | ||
| 1480 | > #define BLOCK_INPUT() | ||
| 1481 | > #define UNBLOCK_INPUT() | ||
| 1482 | > #endif /* SIGIO */ | ||
| 1483 | >+ #endif /* HPUX */ | ||
| 1484 | > | ||
| 1485 | > #define CLASS "emacs" /* class id for GNU Emacs, used in .Xdefaults, etc. */ | ||
| 1486 | |||
| 1487 | >*** process.c.orig Fri Sep 15 16:28:36 1989 | ||
| 1488 | >--- process.c Fri Apr 20 13:17:06 1990 | ||
| 1489 | >*************** | ||
| 1490 | >*** 1057,1062 **** | ||
| 1491 | >--- 1057,1079 ---- | ||
| 1492 | > signal (SIGHUP, SIG_DFL); | ||
| 1493 | > #endif | ||
| 1494 | > #endif /* HAVE_PTYS */ | ||
| 1495 | >+ | ||
| 1496 | >+ /* Give child clean slate for signals */ | ||
| 1497 | >+ #ifdef SIGCHLD | ||
| 1498 | >+ #ifdef BSD4_1 | ||
| 1499 | >+ sigrelse (SIGCHLD); | ||
| 1500 | >+ #else /* not BSD4_1 */ | ||
| 1501 | >+ #ifdef HPUX | ||
| 1502 | >+ sigsetmask (0); | ||
| 1503 | >+ #endif /* HPUX */ | ||
| 1504 | >+ #if defined (BSD) || defined (UNIPLUS) | ||
| 1505 | >+ sigsetmask (0); | ||
| 1506 | >+ #else /* ordinary USG */ | ||
| 1507 | >+ signal (SIGCHLD, sigchld); | ||
| 1508 | >+ #endif /* ordinary USG */ | ||
| 1509 | >+ #endif /* not BSD4_1 */ | ||
| 1510 | >+ #endif /* SIGCHLD */ | ||
| 1511 | >+ | ||
| 1512 | > child_setup_tty (xforkout); | ||
| 1513 | > child_setup (xforkin, xforkout, xforkout, new_argv, env); | ||
| 1514 | > } | ||
| 1515 | >*************** | ||
| 1516 | >*** 1413,1427 **** | ||
| 1517 | > if (read_kbd && kbd_count) | ||
| 1518 | > nfds = 0; | ||
| 1519 | > else | ||
| 1520 | >! #ifdef IBMRTAIX | ||
| 1521 | > nfds = select (MAXDESC, &Available, 0, 0, &timeout); | ||
| 1522 | > #else | ||
| 1523 | >- #ifdef HPUX | ||
| 1524 | >- nfds = select (MAXDESC, &Available, 0, 0, &timeout); | ||
| 1525 | >- #else | ||
| 1526 | > nfds = select (MAXDESC, &Available, 0, &Exception, &timeout); | ||
| 1527 | > #endif | ||
| 1528 | >- #endif | ||
| 1529 | > xerrno = errno; | ||
| 1530 | > | ||
| 1531 | > if (fix_screen_hook) | ||
| 1532 | >--- 1430,1440 ---- | ||
| 1533 | > if (read_kbd && kbd_count) | ||
| 1534 | > nfds = 0; | ||
| 1535 | > else | ||
| 1536 | >! #if defined (IBMRTAIX) || defined (HPUX) | ||
| 1537 | > nfds = select (MAXDESC, &Available, 0, 0, &timeout); | ||
| 1538 | > #else | ||
| 1539 | > nfds = select (MAXDESC, &Available, 0, &Exception, &timeout); | ||
| 1540 | > #endif | ||
| 1541 | > xerrno = errno; | ||
| 1542 | > | ||
| 1543 | > if (fix_screen_hook) | ||
| 1544 | >*************** | ||
| 1545 | >*** 1771,1776 **** | ||
| 1546 | >--- 1784,1790 ---- | ||
| 1547 | > error ("Process %s is not active", | ||
| 1548 | > XSTRING (p->name)->data); | ||
| 1549 | > | ||
| 1550 | >+ #ifndef HPUX /* Can't get gid of tty's controlling session */ | ||
| 1551 | > #ifdef TIOCGPGRP /* Not sure about this! (fnf) */ | ||
| 1552 | > /* If we are using pgrps, get a pgrp number and make it negative. */ | ||
| 1553 | > if (!NULL (current_group)) | ||
| 1554 | >*************** | ||
| 1555 | >*** 1785,1790 **** | ||
| 1556 | >--- 1799,1805 ---- | ||
| 1557 | > the child itself heads the pgrp. */ | ||
| 1558 | > gid = - XFASTINT (p->pid); | ||
| 1559 | > #endif /* not using pgrps */ | ||
| 1560 | >+ #endif /* not HPUX */ | ||
| 1561 | > | ||
| 1562 | > switch (signo) | ||
| 1563 | > { | ||
| 1564 | >*************** | ||
| 1565 | >*** 1800,1805 **** | ||
| 1566 | >--- 1815,1827 ---- | ||
| 1567 | > flush_pending_output (XFASTINT (p->infd)); | ||
| 1568 | > break; | ||
| 1569 | > } | ||
| 1570 | >+ | ||
| 1571 | >+ #ifdef HPUX | ||
| 1572 | >+ if (!NULL (current_group)) | ||
| 1573 | >+ ioctl (XFASTINT (p->infd), TIOCSIGSEND, signo); | ||
| 1574 | >+ else | ||
| 1575 | >+ kill (XFASTINT (p->pid), signo); | ||
| 1576 | >+ #else /* not HPUX */ | ||
| 1577 | > /* gid may be a pid, or minus a pgrp's number */ | ||
| 1578 | > #ifdef BSD | ||
| 1579 | > /* On bsd, [man says] kill does not accept a negative number to kill a pgrp. | ||
| 1580 | >*************** | ||
| 1581 | >*** 1808,1813 **** | ||
| 1582 | >--- 1830,1836 ---- | ||
| 1583 | > #else /* Not BSD. */ | ||
| 1584 | > kill (gid, signo); | ||
| 1585 | > #endif /* Not BSD. */ | ||
| 1586 | >+ #endif /* Not HPUX */ | ||
| 1587 | > | ||
| 1588 | > /* Put notices in buffers now, since it is safe now. | ||
| 1589 | > Because of this, we know that a process we have just killed | ||
| 1590 | >% | ||
| 1591 | |||
| 1592 | This is a separate patch to process.c, distinct from the immediately | ||
| 1593 | preceding one. Both should be applied. | ||
| 1594 | |||
| 1595 | >*** process.c.~1~ Fri Apr 20 13:17:06 1990 | ||
| 1596 | >--- process.c Wed Oct 24 16:38:15 1990 | ||
| 1597 | >*************** | ||
| 1598 | >*** 1085,1095 **** | ||
| 1599 | > /* If the subfork execv fails, and it exits, | ||
| 1600 | > this close hangs. I don't know why. | ||
| 1601 | > So have an interrupt jar it loose. */ | ||
| 1602 | >! signal (SIGALRM, create_process_1); | ||
| 1603 | >! alarm (1); | ||
| 1604 | >! if (forkin >= 0) | ||
| 1605 | >! close (forkin); | ||
| 1606 | >! alarm (0); | ||
| 1607 | > if (forkin != forkout && forkout >= 0) | ||
| 1608 | > close (forkout); | ||
| 1609 | > | ||
| 1610 | >--- 1085,1100 ---- | ||
| 1611 | > /* If the subfork execv fails, and it exits, | ||
| 1612 | > this close hangs. I don't know why. | ||
| 1613 | > So have an interrupt jar it loose. */ | ||
| 1614 | >! | ||
| 1615 | >! { int old_trap = signal (SIGALRM, create_process_1); | ||
| 1616 | >! int old_alarm = alarm (1); | ||
| 1617 | >! if (forkin >= 0) | ||
| 1618 | >! close (forkin); | ||
| 1619 | >! alarm (0); | ||
| 1620 | >! signal (SIGALRM, old_trap); | ||
| 1621 | >! /* don't bother with possible 1 sec loss */ | ||
| 1622 | >! if (old_alarm) alarm (old_alarm); | ||
| 1623 | >! } | ||
| 1624 | > if (forkin != forkout && forkout >= 0) | ||
| 1625 | > close (forkout); | ||
| 1626 | |||
| 1627 | 52: What should I do if I have trouble building Emacs? | ||
| 1628 | 2372 | ||
| 1629 | RMS writes: | 2373 | * Emacs currently ignores the -xrm command line argument. ! |
| 2374 | |||
| 2375 | * Emacs does not yet handle X11R5 screen-specific resources. | ||
| 2376 | |||
| 2377 | * Emacs has a bug where it ignores color specifications if running on a | ||
| 2378 | 1-bit display (ie. a non-color display). | ||
| 2379 | |||
| 2380 | 72: How do I get Emacs to compile with all features under OpenWindows? | ||
| 2381 | |||
| 2382 | Problems fixed in 18.58: the reference to include file <X11/X10.h>, ! | ||
| 2383 | linking with the OpenWindows libX11.a. ! | ||
| 1630 | 2384 | ||
| 1631 | If you try to build Emacs and it does not run, the first thing to do is | 2385 | If libX11.a is missing, you may need to use `add_services' to add the + |
| 1632 | look in the file called PROBLEMS to see if a solution is given there. | 2386 | `OpenWindows Programmers' optional software category from the CD-ROM. To + |
| 2387 | get the Xmenu stuff to work, you need to find a copy of MIT's liboldX.a. | ||
| 1633 | 2388 | ||
| 1634 | If none is given, then please send a report by mail to | 2389 | Questions for the net {please send me answers!}: |
| 1635 | bug-gnu-emacs@prep.ai.mit.edu. Please do not send it to | 2390 | |
| 1636 | help-gnu-emacs@prep.ai.mit.edu. | 2391 | * Are compiled versions of liboldX.A for Sun 4s running SunOS 4.* |
| 2392 | available for FTP anywhere? | ||
| 2393 | * What is the solution to the "not a sun window" problem with xvetool? - | ||
| 2394 | |||
| 2395 | 73: How do I build Emacs under HP-UX 8.0? | ||
| 2396 | |||
| 2397 | Problems fixed in 18.58: missing errnet.h, "Cannot do arithmetic with ! | ||
| 2398 | pointers to objects of unknown size" (void *), not finding -lX11, unexec ! | ||
| 2399 | making a bad dumped emacs due to shared libraries ("Fatal Error(11)- ! | ||
| 2400 | Segmentation Fault", I think). ! | ||
| 2401 | ! | ||
| 2402 | If libX11.a is missing, you may need to run `update' again to load the ! | ||
| 2403 | X11-PRG "fileset". This may be missing even if you specified "all ! | ||
| 2404 | filesets" the first time. ! | ||
| 2405 | |||
| 2406 | 74: What should I do if I have trouble building Emacs? | ||
| 2407 | |||
| 2408 | First look in the file etc/PROBLEMS to see if there is already a solution | ||
| 2409 | for your problem. Next check the FAQ (you're reading it). If you don't | ||
| 2410 | find a solution, then report your problem via e-mail to | ||
| 2411 | bug-gnu-emacs@prep.ai.mit.edu. Please do not post it to gnu.emacs.help or | ||
| 2412 | e-mail it to help-gnu-emacs@prep.ai.mit.edu. For further guidelines, see + | ||
| 2413 | question 23. + | ||
| 1637 | 2414 | ||
| 1638 | Sending to help-gnu-emacs (which has the effect of posting on | ||
| 1639 | gnu.emacs.help) is undesirable because it takes the time of an | ||
| 1640 | unnecessarily large group of people, most of whom are just users and | ||
| 1641 | have no idea how to fix these problem. bug-gnu-emacs reaches a much | ||
| 1642 | smaller group of people who are more likely to know what to do and have | ||
| 1643 | expressed a wish to receive more messages about Emacs than the others. | ||
| 1644 | 2415 | ||
| 1645 | Weird/Confusing Problems: | ||
| 1646 | 2416 | ||
| 1647 | 53: Does Emacs have problems with files larger than 8 Megs? | 2417 | Weird/Confusing Problems - |
| 1648 | 2418 | ||
| 1649 | Most installed versions of GNU Emacs will use 24 bit signed integers | 2419 | 75: Does Emacs have problems with files larger than 8 megabytes? |
| 1650 | (and 24 bit pointers!) internally. This limits the file size that Emacs | ||
| 1651 | can handle to 8388608 bytes. | ||
| 1652 | 2420 | ||
| 1653 | Leonard N. Zubkoff <lnz@lucid.com> writes: | 2421 | Most installed versions of GNU Emacs will use 24-bit signed integers (and + |
| 2422 | 24-bit pointers) internally. This limits the file size that Emacs can ! | ||
| 2423 | handle to 8,388,607 bytes (2^23 - 1). ! | ||
| 1654 | 2424 | ||
| 1655 | Putting the following two lines in src/config.h before compiling Emacs | 2425 | Leonard N. Zubkoff <lnz@lucid.com> suggests putting the following two ! |
| 1656 | allows for 26 bit integers and pointers: | 2426 | lines in src/config.h before compiling Emacs to allow for 26-bit integers ! |
| 2427 | and pointers (and thus filesizes of up to 33,554,431 bytes): + | ||
| 1657 | 2428 | ||
| 1658 | #define VALBITS 26 | 2429 | #define VALBITS 26 |
| 1659 | #define GCTYPEBITS 5 | 2430 | #define GCTYPEBITS 5 |
| 1660 | 2431 | ||
| 1661 | See question 54 for an explanation. | 2432 | WARNING: This method may result in `ILLEGAL DATATYPE' errors on some + |
| 1662 | 2433 | machines. + | |
| 1663 | 54: Why does Emacs use 24 bit integers and pointers? | ||
| 1664 | 2434 | ||
| 1665 | David Gillespie <daveg@csvax.cs.caltech.edu> writes: | 2435 | David Gillespie <daveg@csvax.cs.caltech.edu> gives an explanation of why |
| 2436 | Emacs uses 24 bit integers and pointers: | ||
| 1666 | 2437 | ||
| 1667 | Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed | 2438 | Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed |
| 1668 | language in the sense that you can put any value of any type into any | 2439 | language in the sense that you can put any value of any type into any |
| 1669 | variable, or return it from a function, and so on. So each value must | 2440 | variable, or return it from a function, and so on. So each value must |
| 1670 | carry a "tag" along with it identifying what kind of thing it is, e.g., | 2441 | carry a "tag" along with it identifying what kind of thing it is, e.g., |
| 1671 | integer, pointer to a list, pointer to an editing buffer, and so on. | 2442 | integer, pointer to a list, pointer to an editing buffer, and so on. |
| 1672 | Emacs uses standard 32-bit integers for data objects, taking the top 8 | 2443 | Emacs uses standard 32-bit integers for data objects, taking the top 8 |
| 1673 | bits for the tag and the bottom 24 bits for the value. So integers (and | 2444 | bits for the tag and the bottom 24 bits for the value. So integers (and |
| 1674 | pointers) are somewhat restricted compared to true C integers and | 2445 | pointers) are somewhat restricted compared to true C integers and |
| 1675 | pointers. | 2446 | pointers. |
| 1676 | 2447 | ||
| 1677 | Emacs uses 8-bit tags because that's a little faster on byte-oriented | 2448 | Emacs uses 8-bit tags because that's a little faster on byte-oriented |
| 1678 | machines, but there are only really enough tags to require 6 bits. See | 2449 | machines, but there are only really enough tags to require 6 bits. - |
| 1679 | question 53 to find how to recompile Emacs with 6-bit tags and | ||
| 1680 | 26-bit integers and pointers if space is at a premium for you. | ||
| 1681 | 2450 | ||
| 1682 | 55: Why does Emacs start up using the wrong directory? | 2451 | 76: Why does Emacs start up using the wrong directory? |
| 1683 | 2452 | ||
| 1684 | Most likely, you have an environment variable named PWD that is set to a | 2453 | Most likely, you have an environment variable named PWD that is set to a |
| 1685 | value other than the name of your current directory. This is most | 2454 | value other than the name of your current directory. This is most |
| @@ -1687,132 +2456,118 @@ Weird/Confusing Problems: | |||
| 1687 | versions of) "csh" set and maintain the value of the PWD environment | 2456 | versions of) "csh" set and maintain the value of the PWD environment |
| 1688 | variable, but "sh" doesn't. If you start sh from ksh, change your | 2457 | variable, but "sh" doesn't. If you start sh from ksh, change your |
| 1689 | current directory inside sh, and then start Emacs from inside sh, PWD | 2458 | current directory inside sh, and then start Emacs from inside sh, PWD |
| 1690 | will have the wrong value but Emacs will use this value. See question | 2459 | will have the wrong value but Emacs will use this value. See the |
| 1691 | 72. | 2460 | etc/OPTIONS file for more details. |
| 1692 | 2461 | ||
| 1693 | 56: How do I edit a file with a "$" in its name? | 2462 | Perhaps an easier solution is not to use two shells. The "chsh" program |
| 2463 | can often be used to change one's default login shell. | ||
| 2464 | |||
| 2465 | 77: How do I edit a file with a "$" in its name? | ||
| 1694 | 2466 | ||
| 1695 | When entering a filename in the minibuffer, Emacs will attempt to expand | 2467 | When entering a filename in the minibuffer, Emacs will attempt to expand |
| 1696 | a "$" followed by a word as an environment variable. To suppress this | 2468 | a "$" followed by a word as an environment variable. To suppress this |
| 1697 | behavior, type "$$" instead. | 2469 | behavior, type "$$" instead. |
| 1698 | 2470 | ||
| 1699 | 57: Why does Shell Mode lose track of the shell's current directory? | 2471 | 78: Why does Shell mode lose track of the shell's current directory? |
| 2472 | |||
| 2473 | Emacs has no way of knowing when the shell actually changes its directory. | ||
| 2474 | This is an intrinsic limitation of Unix. So it tries to guess by | ||
| 2475 | recognizing "cd" commands. If you type "cd" followed by a directory name | ||
| 2476 | with a variable reference ("cd $HOME/bin") or with a shell metacharacter | ||
| 2477 | ("cd ../lib*"), Emacs will fail to correctly guess the shell's new current | ||
| 2478 | directory. A huge variety of fixes and enhancements to Shell mode for ! | ||
| 2479 | this problem have been written to handle this problem. Check the Lisp | ||
| 2480 | Code Directory (see question 17). | ||
| 1700 | 2481 | ||
| 1701 | Emacs has no way of knowing when the shell actually changes its | 2482 | 79: Why doesn't Emacs expand my aliases when sending mail? |
| 1702 | directory. So it tries to guess by recognizing cd commands. A number | ||
| 1703 | of fixes and enhancements to Shell Mode have been written, check the | ||
| 1704 | Emacs Lisp Archive (question 14). | ||
| 1705 | 2483 | ||
| 1706 | 58: Why doesn't Emacs expand my aliases when sending mail? | 2484 | * You must separate multiple addresses in the headers of the mail buffer + |
| 2485 | with commas. This is because Emacs supports RFC822 standard addresses | ||
| 2486 | like this one: | ||
| 1707 | 2487 | ||
| 1708 | First, you must separate multiple addresses with commas. | 2488 | To: Willy Smith <wks@xpnsv.lwyrs.com> + |
| 1709 | 2489 | ||
| 1710 | Emacs normally only reads the ".mailrc" file once per session, when you | 2490 | However, you do not need to separate addresses with commas in your + |
| 1711 | start to compose your first mail message. If you edit .mailrc, you can | 2491 | .mailrc file. + |
| 1712 | type "M-ESC (build-mail-aliases) RET" to make Emacs reread .mailrc. | 2492 | + |
| 2493 | WARNING: Emacs breaks up aliases in the .mailrc file into multiple + | ||
| 2494 | addresses both on commas and on whitespace, regardless of any use of + | ||
| 2495 | quotes. This is probably a bug. You can get around this by directly + | ||
| 2496 | setting the value of mail-aliases. + | ||
| 1713 | 2497 | ||
| 1714 | 59: Why doesn't setting default-directory always work? | 2498 | * Emacs normally only reads the ".mailrc" file once per session, when you |
| 2499 | start to compose your first mail message. If you edit .mailrc, you can | ||
| 2500 | type "M-ESC (build-mail-aliases) RET" to make Emacs reread .mailrc. | ||
| 2501 | (You have to include the parentheses where they are shown!) | ||
| 1715 | 2502 | ||
| 1716 | There is a separate value of default-directory for each Emacs buffer. | 2503 | * Emacs does not interpret vendor-specific additions to the format of the |
| 1717 | The value in the current buffer is the one that is used. | 2504 | .mailrc file such as the `source' command. It also ignores any `set' + |
| 2505 | commands. The only commands it looks at are `alias' and `group' + | ||
| 2506 | commands. + | ||
| 1718 | 2507 | ||
| 1719 | 60: Why does my change to load-path not work? | 2508 | 80: Why doesn't my change to load-path work? |
| 1720 | 2509 | ||
| 1721 | If you added file names with tildes (~) in them to your load-path, | 2510 | If you added a directory name containing a tilde (~) to your load-path, |
| 1722 | you'll need to do something like this: | 2511 | expecting the tilde to be interpreted as your home directory, then you |
| 2512 | need to do something like this: | ||
| 1723 | 2513 | ||
| 1724 | (setq-default load-path (mapcar 'expand-file-name load-path)) | 2514 | (setq load-path (mapcar 'expand-file-name load-path)) |
| 1725 | 2515 | ||
| 1726 | 61: Why does the cursor always go to the wrong column when I move up or | 2516 | 81: Why does the cursor always go to the wrong column when I move up or |
| 1727 | down one line? | 2517 | down one line? |
| 1728 | 2518 | ||
| 1729 | You have inadvertently typed "C-x C-n" (set-goal-column) which sets the | 2519 | You have inadvertently typed "C-x C-n" (set-goal-column) which sets the |
| 1730 | "goal-column" to the column where the cursor was. To undo this type | 2520 | "goal-column" to the column where the cursor was. To undo this type |
| 1731 | "C-u C-x C-n". | 2521 | "C-u C-x C-n". |
| 1732 | 2522 | ||
| 1733 | If you make this mistake frequently, you might want to unbind this | 2523 | If you make this mistake frequently, you might want to unbind or disable |
| 1734 | command by doing (define-key ctl-x-map "\C-n" nil). | 2524 | this command by doing one of these two: |
| 1735 | 2525 | ||
| 1736 | 62: Why don't the command line switches documented in the man page work? | 2526 | (define-key ctl-x-map "\C-n" nil) |
| 1737 | 2527 | (put 'set-goal-column 'disabled t) | |
| 1738 | The "man page", ie. the file etc/emacs.1, hasn't been updated in a | 2528 | |
| 1739 | while. The command line switches that it says work with X Windows are | 2529 | 82: Why does Emacs hang with message "Unknown XMenu error" with X11R4? + |
| 1740 | for X10. See question 72 for details on what switches are | ||
| 1741 | available using X11. {Would someone like to rewrite the man page? RMS | ||
| 1742 | asked me and I haven't had time yet.} | ||
| 1743 | |||
| 1744 | 63: Why does gnus-Subject-mail-reply chop off the last character of the | ||
| 1745 | article headers? | ||
| 1746 | |||
| 1747 | There is a bug in some rnews functions that GNUS uses. Here is a patch: | ||
| 1748 | |||
| 1749 | (Patch supplied by Karl Kleinpaste <karl_kleinpaste@cis.ohio-state.edu>.) | ||
| 1750 | |||
| 1751 | >*** rnewspost.el.orig Thu Oct 5 10:32:47 1989 | ||
| 1752 | >--- rnewspost.el Thu Oct 5 10:32:47 1989 | ||
| 1753 | >*************** | ||
| 1754 | >*** 252,258 **** | ||
| 1755 | > (save-restriction | ||
| 1756 | > (narrow-to-region (point-min) (progn (goto-line (point-min)) | ||
| 1757 | > (search-forward "\n\n") | ||
| 1758 | >! (- (point) 2))) | ||
| 1759 | > (setq from (mail-fetch-field "from") | ||
| 1760 | > subject (mail-fetch-field "subject") | ||
| 1761 | > reply-to (mail-fetch-field "reply-to") | ||
| 1762 | >--- 252,258 ---- | ||
| 1763 | > (save-restriction | ||
| 1764 | > (narrow-to-region (point-min) (progn (goto-line (point-min)) | ||
| 1765 | > (search-forward "\n\n") | ||
| 1766 | >! (- (point) 1))) | ||
| 1767 | > (setq from (mail-fetch-field "from") | ||
| 1768 | > subject (mail-fetch-field "subject") | ||
| 1769 | > reply-to (mail-fetch-field "reply-to") | ||
| 1770 | >*************** | ||
| 1771 | >*** 289,295 **** | ||
| 1772 | > ;@@ but rnews.el lacks support | ||
| 1773 | > (narrow-to-region (point-min) (progn (goto-char (point-min)) | ||
| 1774 | > (search-forward "\n\n") | ||
| 1775 | >! (- (point) 2))))) | ||
| 1776 | > (setq from (mail-fetch-field "from") | ||
| 1777 | > news-reply-yank-from from | ||
| 1778 | > ;; @@ not handling old Title: field | ||
| 1779 | >--- 289,295 ---- | ||
| 1780 | > ;@@ but rnews.el lacks support | ||
| 1781 | > (narrow-to-region (point-min) (progn (goto-char (point-min)) | ||
| 1782 | > (search-forward "\n\n") | ||
| 1783 | >! (- (point) 1))))) | ||
| 1784 | > (setq from (mail-fetch-field "from") | ||
| 1785 | > news-reply-yank-from from | ||
| 1786 | > ;; @@ not handling old Title: field | ||
| 1787 | >*************** | ||
| 1788 | >*** 365,371 **** | ||
| 1789 | > ;@@ but rnews.el lacks support | ||
| 1790 | > (narrow-to-region (point-min) (progn (goto-char (point-min)) | ||
| 1791 | > (search-forward "\n\n") | ||
| 1792 | >! (- (point) 2))))) | ||
| 1793 | > (setq news-reply-yank-from (mail-fetch-field "from") | ||
| 1794 | > ;; @@ not handling old Article-I.D.: field | ||
| 1795 | > news-reply-yank-message-id (mail-fetch-field "message-id"))) | ||
| 1796 | >--- 365,371 ---- | ||
| 1797 | > ;@@ but rnews.el lacks support | ||
| 1798 | > (narrow-to-region (point-min) (progn (goto-char (point-min)) | ||
| 1799 | > (search-forward "\n\n") | ||
| 1800 | >! (- (point) 1))))) | ||
| 1801 | > (setq news-reply-yank-from (mail-fetch-field "from") | ||
| 1802 | > ;; @@ not handling old Article-I.D.: field | ||
| 1803 | > news-reply-yank-message-id (mail-fetch-field "message-id"))) | ||
| 1804 | |||
| 1805 | 64: Why does Emacs hang with message "Unknown XMenu" with X11R4? | ||
| 1806 | 2530 | ||
| 1807 | Many different X errors can produce this message. Here is the solution | 2531 | Many different X errors can produce this message. Here is the solution |
| 1808 | to one problem: | 2532 | to one problem: |
| 1809 | 2533 | ||
| 1810 | X11 Release 4 now enforces some conditions in the X protocol that were | 2534 | X11 Release 4 (and later, including OpenWindows) enforces some conditions ! |
| 1811 | previously allowed to pass unnoticed. You need to put the X11R4 server | 2535 | in the X protocol that were previously allowed to pass unnoticed. You |
| 1812 | into X11R3 bug compatibility mode for Emacs's Xmenu code to work. You | 2536 | need to put the X11R4 server into X11R3 bug compatibility mode for Emacs's |
| 1813 | can do this with the command "xset bc". | 2537 | Xmenu code to work. You can do this with the command "xset bc". |
| 1814 | 2538 | ||
| 1815 | 65: Why isn't the load average displayed by display-time? | 2539 | 83: Why doesn't display-time show the load average in the mode line |
| 2540 | anymore? | ||
| 2541 | |||
| 2542 | In GNU Emacs 18.56, a change was made in the display-time code. | ||
| 2543 | Formerly, in version 18.55, Emacs used a program named "loadst" to | ||
| 2544 | notify Emacs of the change in time every minute. loadst also sent Emacs | ||
| 2545 | the system load average if it was installed with sufficient privilege to | ||
| 2546 | get that information (or was on a system where no such privilege was | ||
| 2547 | needed). Emacs then displayed this information in the mode line. | ||
| 2548 | |||
| 2549 | In version 18.56, this code was changed to use a program named "wakeup". | ||
| 2550 | wakeup doesn't send Emacs any information, it's only purpose is to send | ||
| 2551 | Emacs *something* every minute, thus invoking the filter function in | ||
| 2552 | Emacs once a minute. The filter function in Emacs does all the work of | ||
| 2553 | finding the time, date, and load average. However, getting the load | ||
| 2554 | average requires the privilege to read kernel memory on most systems. | ||
| 2555 | Since giving Emacs this privilege would destroy any security a system | ||
| 2556 | might have, for almost everyone this is not an option. In addition, | ||
| 2557 | Emacs does not have the code built into it to get this information on | ||
| 2558 | the systems which have special system calls for this purpose, even | ||
| 2559 | though loadst had code for this. | ||
| 2560 | |||
| 2561 | The solution I use is to get the files lisp/display-time.el and | ||
| 2562 | etc/loadst.c from version 18.55 and use those with 18.58. (I have heard ! | ||
| 2563 | a rumor that loadst disappeared because of the legal action Unipress | ||
| 2564 | threatened against IBM.) | ||
| 2565 | |||
| 2566 | WARNING: Do not install Emacs setgid kmem unless you wish to destroy | ||
| 2567 | any security your system might have!!!!!!!!!! | ||
| 2568 | |||
| 2569 | If you are using Emacs 18.55 or earlier, or already using the solution I | ||
| 2570 | describe above, read further: | ||
| 1816 | 2571 | ||
| 1817 | The most likely cause of the problem is that "loadst" can't read the | 2572 | The most likely cause of the problem is that "loadst" can't read the |
| 1818 | special file /dev/kmem. To properly install loadst, it should be either | 2573 | special file /dev/kmem. To properly install loadst, it should be either |
| @@ -1823,355 +2578,318 @@ Weird/Confusing Problems: | |||
| 1823 | Another possibility is that your version of Unix doesn't have the load | 2578 | Another possibility is that your version of Unix doesn't have the load |
| 1824 | average data available in /dev/kmem. Your version of Unix might have a | 2579 | average data available in /dev/kmem. Your version of Unix might have a |
| 1825 | special system call to retrieve this information (eg., inq_stats under | 2580 | special system call to retrieve this information (eg., inq_stats under |
| 1826 | UMAX). | 2581 | UMAX), and loadst might not have been enhanced to cope with this. |
| 1827 | 2582 | ||
| 1828 | 66: Why doesn't GNUS work anymore via NNTP? | 2583 | 84: Why doesn't GNUS work anymore via NNTP? |
| 1829 | 2584 | ||
| 1830 | There is a bug in NNTP version 1.5.10, such that when multiple requests | 2585 | There is a bug in NNTP version 1.5.10, such that when multiple requests |
| 1831 | are sent to the NNTP server, the server only handles the first one before | 2586 | are sent to the NNTP server, the server only handles the first one before |
| 1832 | blocking waiting for more input which never comes. | 2587 | blocking waiting for more input which never comes. NNTP version 1.5.11 |
| 2588 | claims to fix this. | ||
| 1833 | 2589 | ||
| 1834 | You can work around the bug inside Emacs like this: | 2590 | You can work around the bug inside Emacs like this: |
| 1835 | 2591 | ||
| 1836 | (setq nntp-maximum-request 1) | 2592 | (setq nntp-maximum-request 1) |
| 1837 | (setq nntp-buggy-select t) | ||
| 1838 | 2593 | ||
| 1839 | Or you could fix the NNTP server in one of these ways: | 2594 | I also have a patch for NNTP 1.5.10 by Mike Pelletier |
| 2595 | <stealth@engin.umich.edu> that is based on the timeout code that was in | ||
| 2596 | 1.5.9. However, please try to upgrade to 1.5.11 first. | ||
| 1840 | 2597 | ||
| 1841 | 1. Test whether there is data in stdin's stdio buffer before calling | 2598 | You can find out what version of NNTP your news server is running by |
| 1842 | "select" using something like "((fileptr)->_cnt > 0)". Best choice. | 2599 | telnetting to the NNTP port (usually 119) on the news server machine (ie., |
| 1843 | 2. Remove call to select by not defining "TIMEOUT" in "common/conf.h". | 2600 | `telnet server-machine 119'). The server should give its version number |
| 1844 | 3. Put "setbuf (stdin, NULL)" in the NNTP server in the right spot. | 2601 | in the welcome message. Type `quit' to get out. |
| 1845 | This would be very inefficient. | ||
| 1846 | 4. Rewrite the server to use an alarm instead of "select". | ||
| 1847 | 2602 | ||
| 1848 | 67: Why can't I paste a selection I made in Emacs into my xterm window? | 2603 | 85: Why does ispell sometimes ignore the local dictionary? |
| 1849 | 2604 | ||
| 1850 | A person whose name I lost writes: | 2605 | You need to update the version of ispell to 2.0.02. (Or you can switch to |
| 2606 | version 3.0 which is still in beta-testing.) A patch is available via | ||
| 2607 | anonymous FTP (archive.cis.ohio-state.edu: /pub/gnu/ispell/patch2.Z). | ||
| 1851 | 2608 | ||
| 1852 | The strange interaction between Emacs, xterm, and the cut buffers is | 2609 | You also need to change a line in ispell.el from: |
| 1853 | because most xterm clients use selections instead of (well, superceding) | ||
| 1854 | cut buffers. If there is a selection around, xterms will use that | ||
| 1855 | instead of the cut buffer. Emacs doesn't know about selections, but you | ||
| 1856 | can convince xterm to always use the cut buffer instead of selections by | ||
| 1857 | adding this to your .Xdefaults: | ||
| 1858 | 2610 | ||
| 1859 | ! Solution by Thomas Narten, should work under X11R3 and later | 2611 | (defconst ispell-version "2.0.01") ; Check against output of "ispell -v". |
| 1860 | ! GNU Emacs only copies to CUT_BUFFER0. xterm by default wants to paste | ||
| 1861 | ! from the PRIMARY selection. | ||
| 1862 | XTerm*VT100.Translations: #override \ | ||
| 1863 | ~Meta <Btn2Up>: insert-selection(CUT_BUFFER0) | ||
| 1864 | 2612 | ||
| 1865 | 2613 | to: | |
| 1866 | 68: Why does ispell sometimes ignore the local dictionary? | ||
| 1867 | 2614 | ||
| 1868 | You need to update the version of ispell to 2.0.02. A patch is | 2615 | (defconst ispell-version "2.0.02") ; Check against output of "ispell -v". |
| 1869 | available via: | ||
| 1870 | 2616 | ||
| 1871 | Anonymous FTP: | 2617 | 86: How do I get rid of the ^M junk in my Shell buffer? |
| 1872 | site: tut.cis.ohio-state.edu | ||
| 1873 | file: /pub/gnu/ispell/patch2.Z | ||
| 1874 | 2618 | ||
| 1875 | You also need to change a line in ispell.el from: | 2619 | For tcsh, put this in your ".cshrc" (or ".tcshrc") file: |
| 1876 | 2620 | ||
| 1877 | (defconst ispell-version "2.0.01") ;; Check against output of "ispell -v". | 2621 | if ($?EMACS) then |
| 2622 | if ("$EMACS" == t) then | ||
| 2623 | if ($?tcsh) unset edit | ||
| 2624 | stty nl | ||
| 2625 | endif | ||
| 2626 | endif | ||
| 1878 | 2627 | ||
| 1879 | to: | 2628 | Or put this in your .emacs_tcsh file: |
| 1880 | 2629 | ||
| 1881 | (defconst ispell-version "2.0.02") ;; Check against output of "ispell -v". | 2630 | unset edit |
| 2631 | stty nl | ||
| 1882 | 2632 | ||
| 1883 | 2633 | Alternatively, use csh in your Shell buffers instead of tcsh. One way | |
| 1884 | 2634 | is: | |
| 1885 | Configuring Emacs for yourself: | ||
| 1886 | |||
| 1887 | 69: How do I set up a .emacs file properly? | ||
| 1888 | 2635 | ||
| 1889 | I'm going to be sending out a sample .emacs file in a separate message | 2636 | (setq explicit-shell-file-name "/bin/csh") |
| 1890 | later this month. It will be based largely on AT&T's sample .emacs | ||
| 1891 | file, which was sent to me by Dan Jacobson. In fact it might be | ||
| 1892 | identical. | ||
| 1893 | 2637 | ||
| 1894 | 70: How do you debug a .emacs file? | 2638 | and another is to do this in your .cshrc (or .tcshrc) file: |
| 1895 | 2639 | ||
| 1896 | First start Emacs with the "-q" command line option. Then, in the | 2640 | setenv ESHELL /bin/csh |
| 1897 | *scratch* buffer, type the following: | ||
| 1898 | 2641 | ||
| 1899 | (setq debug-on-error t) C-j | 2642 | (You must start Emacs over again with the environment variable properly |
| 1900 | (load-file "~/.emacs") C-j | 2643 | set for this to take effect.) |
| 1901 | 2644 | ||
| 1902 | (C-j stands for Control-J, ie., hold the control key and press J.) | 2645 | 87: Are there any security risks in GNU Emacs? |
| 1903 | 2646 | ||
| 1904 | If you have an error in your .emacs file, this will invoke the debugger | 2647 | 1. the `movemail' incident (No, this is not a risk.) |
| 1905 | when the error occurs. If you don't know how to use the debugger do | ||
| 1906 | (setq stack-trace-on-error t) instead. | ||
| 1907 | 2648 | ||
| 1908 | WARNING: this will not discover errors caused by trying to do something | 2649 | Cliff Stoll in his book "The Cuckoo's Egg" describes this in chapter 4. |
| 1909 | that requires the terminal/window-system initialization code to have | 2650 | The site at LBL had installed the `etc/movemail' program setuid root. |
| 1910 | been loaded. See question 34. | 2651 | Since `movemail' had not been designed for this situation, a security |
| 2652 | hole was created and users could get root priveleges. | ||
| 1911 | 2653 | ||
| 1912 | 71: How do I turn on abbrevs by default just in mode XXX? | 2654 | `movemail' has since been changed so that even if it is installed |
| 2655 | setuid root this security hole will not be a result. | ||
| 1913 | 2656 | ||
| 1914 | Put this in your .emacs file: | 2657 | I have heard reports that the Internet worm took advantage of this |
| 2658 | configuration problem. | ||
| 1915 | 2659 | ||
| 1916 | (condition-case () | 2660 | 2. the file-local-variable feature (Yes, a risk, but easy to change.) |
| 1917 | (read-abbrev-file nil t) | ||
| 1918 | (file-error nil)) | ||
| 1919 | 2661 | ||
| 1920 | (setq XXX-mode-hook | 2662 | There is an Emacs feature that allows the setting of local values for |
| 1921 | (function | 2663 | variables when editing a file by including specially formatted text |
| 1922 | (lambda () | 2664 | near the end of the file. This feature also includes the ability to |
| 1923 | (setq abbrev-mode t)))) | 2665 | have arbitrary Emacs Lisp code evaluated when the file is visited. |
| 2666 | Obviously, there is a potential for Trojan horses to exploit this | ||
| 2667 | feature. | ||
| 1924 | 2668 | ||
| 1925 | 72: What does Emacs do every time it starts up? | 2669 | However, if you set the variable inhibit-local-variables to a non-nil |
| 2670 | value, Emacs will display the special local variable settings of a file | ||
| 2671 | that you visit and ask you if you really want them. It is reasonable | ||
| 2672 | to do this in lisp/site-init.el before building Emacs: | ||
| 1926 | 2673 | ||
| 1927 | This question is not itself frequently asked, but helps to answer other | 2674 | (setq inhibit-local-variables t) |
| 1928 | questions. | 2675 | |
| 2676 | If Emacs has already been built, the expression can be put in | ||
| 2677 | lisp/default.el instead, or an individual can put it in their own | ||
| 2678 | .emacs file. | ||
| 2679 | |||
| 2680 | The ability to exploit this feature by sending e-mail to an RMAIL user | ||
| 2681 | was fixed sometime after Emacs 18.52. However, any new package that | ||
| 2682 | uses find-file or find-file-noselect has to be careful about this. | ||
| 1929 | 2683 | ||
| 1930 | Here is a complete explanation of the order in which things are done | 2684 | 88: How do I recover my mail files after RMAIL munges their format? |
| 1931 | during startup. | ||
| 1932 | 2685 | ||
| 1933 | 1. These command line switches are handled, only if they appear before | 2686 | Users who just want to try RMAIL out to see how it works end up trapped |
| 1934 | all other command line arguments, and only if they appear in this | 2687 | using it because saved mail in their `mbox' file has been converted into ! |
| 1935 | order: | 2688 | an incompatible format (BABYL) that only RMAIL understands. RMAIL |
| 2689 | provides no obvious way to reverse this transformation. To convert a mail | ||
| 2690 | file back to standard Unix format, there are several methods: | ||
| 1936 | 2691 | ||
| 1937 | "-map". Only under VMS. Instead of "undumping", under VMS the | 2692 | * Use the rmail-output ("C-o") command within RMAIL on each message in the |
| 1938 | contents of a dump file are mapped over a section of memory (very | 2693 | file. First use M-x rmail or M-x rmail-input to visit the RMAIL file in |
| 1939 | quickly initializing lots of variables). | 2694 | Rmail mode. Type "1 j" to go to the first message. Use the C-o command |
| 2695 | to output the message to a Unix format file. Type "n" to go to the next | ||
| 2696 | message. Repeat. | ||
| 1940 | 2697 | ||
| 1941 | "-t". The next argument is treated as the name of a terminal to use | 2698 | * If the file contains hundreds of messages, you may not want to repeat |
| 1942 | instead of whatever is connected to the stdin, stdout, and stderr | 2699 | this for all of them. Instead of the above, after getting to the first |
| 1943 | FILE pointers. | 2700 | message type this (where "mbox" is the file you want to put the messages |
| 2701 | in): | ||
| 1944 | 2702 | ||
| 1945 | "-display" (synonym: "-d"). The next argument is treated as the | 2703 | C-x ( C-o mbox RET M-s ^From: RET M-0 C-x ) |
| 1946 | name of an X Window System server with which to connect. This | ||
| 1947 | overrides the DISPLAY environment variable. | ||
| 1948 | 2704 | ||
| 1949 | "-nw". This means don't connect to an X Window server even if the | 2705 | (The rmail-search command ("M-s") is used instead of just "n" because it |
| 1950 | DISPLAY environment variable was set or the "-display" switch was | 2706 | is the only command which will cause an error when it reaches the last |
| 1951 | specified. Instead, Emacs talks to a regular dumb terminal. | 2707 | message in the file, which is necessary to terminate the keyboard macro. |
| 2708 | This will fail if there are messages in the file that don't have a | ||
| 2709 | `From:' header. This assumes rmail-delete-after-output is nil.) | ||
| 1952 | 2710 | ||
| 1953 | "-batch". Emacs is noninteractive. The variable "noninteractive" | 2711 | It is wise to save a copy of the RMAIL file first, in case you make a |
| 1954 | is t. This disables any full screen interaction either with a | 2712 | mistake. |
| 1955 | dumb terminal or with a window system. In addition, Emacs will | ||
| 1956 | die after processing all command line arguments. | ||
| 1957 | 2713 | ||
| 1958 | All of Emacs's internal data structures are initialized between steps 2 | 2714 | * There are software packages available for converting files or even |
| 1959 | and 5. | 2715 | entire directories of BABYL files to standard Unix format. These are |
| 2716 | helpful in this situation, but are intended mainly for people who have | ||
| 2717 | used RMAIL for a long time and are converting to some other mail reader. | ||
| 2718 | Lookup `rmail', `vm', and `babyl' in the Emacs Lisp Archive (see | ||
| 2719 | question 18). | ||
| 1960 | 2720 | ||
| 1961 | 2. The "*scratch*" buffer is created and its value of default-directory | 2721 | You may wish to disable RMAIL to avoid accidentally destroying your mbox |
| 1962 | is set from the result of calling the "getwd" library routine. | 2722 | file (I have this in my .emacs): |
| 1963 | (getwd does what the "pwd" program does.) | ||
| 1964 | 2723 | ||
| 1965 | 3. If X11 is being used, Emacs determines the name under which it looks | 2724 | (put 'rmail 'disabled t) ; avoid mbox destruction |
| 1966 | for X resource values. (I haven't checked how it does this under | ||
| 1967 | X10.) | ||
| 1968 | 2725 | ||
| 1969 | 1. If there is a "-rn" command line switch, it is handled now, no | 2726 | 89: Why do I get "Process shell exited abnormally with code 1"? |
| 1970 | matter where it is on the command line. (Later it will be | ||
| 1971 | processed again and ignored.) The next argument is used as | ||
| 1972 | Emacs's resource name. | ||
| 1973 | 2727 | ||
| 1974 | 2. If the "-rn" switch was missing, Emacs looks for the WM_RES_NAME | 2728 | The most likely reason for this message is that the "env" program is not |
| 1975 | environment variable. | 2729 | properly installed. This program should be compiled and installed with |
| 2730 | execute permission for everyone in Emacs's program directory, which is | ||
| 2731 | normally /usr/local/emacs/etc. You can find what this directory is at | ||
| 2732 | your site by inspecting the value of the variable exec-directory by typing | ||
| 2733 | "C-h v exec-directory RET". | ||
| 1976 | 2734 | ||
| 1977 | 3. If neither of the previous two steps succeed, Emacs uses the | 2735 | See also etc/PROBLEMS for other possible causes of this message. + |
| 1978 | filename with which it was invoked as its resource name. | ||
| 1979 | 2736 | ||
| 1980 | 4. If X11 is being used, these command line switches are handled now, | 2737 | |
| 1981 | no matter where they appear in the command line. (Under X10, they | 2738 | |
| 1982 | are not handled until step 13.) WARNING: this can cause strange | 2739 | Configuring Emacs for Yourself - |
| 1983 | interactions with the processing of the remaining command line | 2740 | |
| 1984 | arguments in step 13. | 2741 | 90: How do I set up a .emacs file properly? |
| 2742 | |||
| 2743 | See the section of the manual on the .emacs file, inside the section on | ||
| 2744 | customization. To reach this section of the online Info manual, type | ||
| 2745 | this: | ||
| 2746 | |||
| 2747 | C-h i m emacs RET g init SPC file RET | ||
| 1985 | 2748 | ||
| 1986 | In addition, under both X11 and X10, X resources (ie. the stuff in | 2749 | WARNING: In general, new Emacs users should not have .emacs files, |
| 1987 | an .Xdefaults file) are handled now. Command line switches take | 2750 | because it causes confusing non-standard behavior. Then they send |
| 1988 | precedence over resources. | 2751 | questions to help-gnu-emacs asking why Emacs isn't behaving as |
| 2752 | documented. :-) | ||
| 1989 | 2753 | ||
| 1990 | After each command line switch are given the equivalent resource | 2754 | 91: How do you debug a .emacs file? |
| 1991 | names in this format: (X10 name / X11 instance name / X11 class name). | ||
| 1992 | 2755 | ||
| 1993 | "-r". Reverse video. (ReverseVideo/reverseVideo/ReverseVideo) | 2756 | First start Emacs with the "-q" command line option. Then, in the |
| 1994 | "-font" (synonym: "-fn"). Font. (BodyFont/font/Font) | 2757 | *scratch* buffer, type the following: |
| 1995 | "-wn". Window name (X11 only). (/title/Title) | 2758 | |
| 1996 | "-in". Icon name (X11 only). (/iconName/Title) | 2759 | (setq debug-on-error t) LFD |
| 1997 | "-i". Use built-in icon bitmap. (BitMapIcon//) | 2760 | (load-file "~/.emacs") LFD |
| 1998 | 2761 | ||
| 1999 | "-b". Border width (in pixels). | 2762 | (Type LFD by pressing C-j.) |
| 2000 | (BorderWidth/borderWidth/BorderWidth) | ||
| 2001 | |||
| 2002 | "-ib". Internal border width (in pixels) (default: 1). | ||
| 2003 | (/internalBorder/BorderWidth) | ||
| 2004 | |||
| 2005 | "-geometry" (synonym: "-w"). Window shape and size. "-geometry" is | ||
| 2006 | X11 only, but its synonym "-w" was available under X10. | ||
| 2007 | (/geometry/Geometry) | ||
| 2008 | |||
| 2009 | Color options only: | ||
| 2010 | |||
| 2011 | "-fg". Foreground color. (Foreground/foreground/Foreground) | ||
| 2012 | "-bg". Background color. (Background/background/Background) | ||
| 2013 | "-bd". Border color. (Border/borderColor/BorderColor) | ||
| 2014 | "-cr". Cursor color. (Cursor/cursorColor/Foreground) | ||
| 2015 | "-ms". Mouse pointer color. (Mouse/pointerColor/Foreground) | ||
| 2016 | 2763 | ||
| 2017 | In addition, under X10, the resource "Keymap" was handled now. | 2764 | If you have an error in your .emacs file, this will invoke the debugger |
| 2765 | when the error occurs. If you don't know how to use the debugger do | ||
| 2766 | (setq stack-trace-on-error t) instead. | ||
| 2018 | 2767 | ||
| 2019 | 5. If your Emacs isn't "dumped", the default Lisp libraries are | 2768 | WARNING: this will not discover errors caused by trying to do something |
| 2020 | "loaded" now. | 2769 | that requires the terminal/window-system initialization code to have |
| 2770 | been loaded. See question 50. | ||
| 2021 | 2771 | ||
| 2022 | 6. Emacs enters a "recursive edit". The first time Emacs does a | 2772 | 92: How do I turn on abbrevs by default just in mode XXX? |
| 2023 | recursive edit, steps 7 through 15 are followed, and then Emacs | ||
| 2024 | enters its normal editing mode. | ||
| 2025 | 2773 | ||
| 2026 | 7. If the environment variable PWD exists, the value of | 2774 | Put this in your .emacs file: |
| 2027 | default-directory in the *scratch* buffer is set to the value of | ||
| 2028 | PWD. This often causes problems and confusion when the value of PWD | ||
| 2029 | doesn't actually contain the pathname of the current directory. | ||
| 2030 | 2775 | ||
| 2031 | 8. Now the "-no-init-file" (synonym: "-q") and "-user" (synonym: "-u") | 2776 | (condition-case () |
| 2032 | command line switches are handled. They must follow the switches | 2777 | (read-abbrev-file nil t) |
| 2033 | mentioned in step 1, and must precede any other command line | 2778 | (file-error nil)) |
| 2034 | arguments. Actually, both of these options can be specified; | ||
| 2035 | whichever is last on the command line wins. | ||
| 2036 | 2779 | ||
| 2037 | 9. The user's ".emacs" file is loaded now, if the -no-init-file option | 2780 | (setq XXX-mode-hook |
| 2038 | was not specified. If the -user option was specified, that user's | 2781 | (function |
| 2039 | .emacs file is loaded instead. A user's .emacs file is a file named | 2782 | (lambda () |
| 2040 | ".emacs" in the user's "home" directory. If no such file exists, | 2783 | (setq abbrev-mode t)))) |
| 2041 | this step has no effect. | ||
| 2042 | 2784 | ||
| 2043 | 10. The system wide "default" file is loaded now, if the variable | 2785 | 93: How do I turn on Auto-Fill mode by default? |
| 2044 | inhibit-default-init is nil. The user can set this variable in the | ||
| 2045 | .emacs file to skip this step. | ||
| 2046 | 2786 | ||
| 2047 | 11. If the *scratch* buffer still exists now, the value of | 2787 | To turn on Auto-Fill mode just once for one buffer, you type "M-x |
| 2048 | initial-major-mode is called as a function in this buffer. | 2788 | auto-fill-mode". To turn it on for every buffer in, for example, Text |
| 2049 | Normally, this puts this buffer in Lisp Interaction mode. | 2789 | mode, do this: |
| 2050 | 2790 | ||
| 2051 | 12. Now the terminal/window-system setup file is loaded. The name of | 2791 | (setq text-mode-hook 'turn-on-auto-fill) |
| 2052 | this file is determined as follows: | ||
| 2053 | 2792 | ||
| 2054 | 1. It starts with the value of term-file-prefix. Normally this is | 2793 | If you want Auto-Fill mode on in all major modes, do this: |
| 2055 | "term/", but the user can set it to another value. If this | ||
| 2056 | variable is nil, this entire step is skipped. | ||
| 2057 | 2794 | ||
| 2058 | 2. For a window system, the prefix is followed by the name of the | 2795 | (setq-default auto-fill-hook 'do-auto-fill) |
| 2059 | value of the variable window-system, followed by "-win". For X | ||
| 2060 | Windows, this means the name is "term/x-win". | ||
| 2061 | 2796 | ||
| 2062 | 3. For a terminal, the prefix is followed by the value of the | 2797 | 94: How do I make Emacs use a certain major mode for certain files? |
| 2063 | environment variable TERM, for example, "term/vt200". If Emacs | ||
| 2064 | cannot find such a file to load, it retries by stripping off | ||
| 2065 | suffixes that begin with a hyphen. For example, if TERM is | ||
| 2066 | "vt200-40", first Emacs will try "term/vt200-40", and if that | ||
| 2067 | fails it will try "term/vt200". | ||
| 2068 | 2798 | ||
| 2069 | 13. The rest of the command line arguments are handled at this point, in | 2799 | If you want to use XXX mode for all files which end with the extension |
| 2070 | the order they appear: | 2800 | ".YYY", this will do it for you: |
| 2071 | 2801 | ||
| 2072 | "-funcall" (synonyms: "-f", "-e"). The next argument is treated as | 2802 | (setq auto-mode-alist (cons '("\\.YYY\\'" . XXX-mode) auto-mode-alist)) |
| 2073 | the name of a function, which is called with no arguments. | ||
| 2074 | 2803 | ||
| 2075 | "-load" (synonym: "-l"). The next argument is treated as the name | 2804 | Otherwise put this somewhere in the first line of any file you want to |
| 2076 | of a file to load. NOTE: the value of the variable load-path | 2805 | edit in XXX mode: |
| 2077 | will be restored after this file is done loading. Thus, trying | ||
| 2078 | to change load-path in such a file will fail!! | ||
| 2079 | 2806 | ||
| 2080 | "-kill". When this argument is handled, Emacs kills itself. | 2807 | -*-XXX-*- |
| 2081 | 2808 | ||
| 2082 | "+DDD", where D is a digit. DDD is used as a line number to go to. | 2809 | 95: What are the valid X resource settings (ie., stuff in .Xdefaults file)? |
| 2083 | When the next ordinary file argument on the command line is | ||
| 2084 | handled, Emacs positions point in that file on line DDD. | ||
| 2085 | 2810 | ||
| 2086 | An ordinary filename. Emacs edits this file using the function | 2811 | See the Emacs man page, or the etc/OPTIONS file. Ignore the information |
| 2087 | find-file. If the filename is not an "absolute" filename, it is | 2812 | in etc/XDOC which is way out of date. |
| 2088 | expanded relative to the value that default-directory in the | ||
| 2089 | *scratch* buffer had at the beginning of step 11. The buffer | ||
| 2090 | visiting this file becomes the current buffer. | ||
| 2091 | 2813 | ||
| 2092 | "-insert" (synonym: "-i"). The next argument is treated as the name | 2814 | 96: How do I stop Emacs from beeping on a terminal? |
| 2093 | of a file. This file is inserted in the current buffer. | ||
| 2094 | Initially, this is the *scratch* buffer. Otherwise it is the | ||
| 2095 | buffer visiting the file most recently specified on the command | ||
| 2096 | line. WARNING: the synonym "-i" doesn't work under X11. | ||
| 2097 | 2815 | ||
| 2098 | Other command line switches may have been created by modifying the | 2816 | Martin R. Frank <martin@cc.gatech.edu> writes: |
| 2099 | value of the variable command-switch-alist. If X Windows is being | ||
| 2100 | used, all X-specific switches mentioned above in steps 3 and 4 will | ||
| 2101 | be processed. Under X11, they will have already been handled, and | ||
| 2102 | will be ignored now. Under X10, they are being handled for the | ||
| 2103 | first time. | ||
| 2104 | 2817 | ||
| 2105 | 14. The values of the variables term-setup-hook and window-setup-hook | 2818 | Tell Emacs to use the 'visible bell' instead of the audible bell, and |
| 2106 | are called as functions with no arguments, in the order listed. | 2819 | set the visible bell to nothing. |
| 2107 | 2820 | ||
| 2108 | 15. If the user did not specify any of the command line options handled | 2821 | Put this in your TERMCAP environment variable: |
| 2109 | in step 13, and the variable inhibit-startup-message is still nil, | ||
| 2110 | the familiar Emacs startup message is displayed. | ||
| 2111 | 2822 | ||
| 2112 | 73: What are the valid X resource settings (ie., stuff in .Xdefaults file)? | 2823 | ... :vb=: ... |
| 2113 | 2824 | ||
| 2114 | See question 72. | 2825 | And evaluate this: |
| 2115 | 2826 | ||
| 2116 | WARNING: Don't pay any attention to the documentation in etc/XDOC or | 2827 | (setq visible-bell t) |
| 2117 | etc/emacs.1. It's way out of date. {Would someone like to rewrite it? | ||
| 2118 | RMS asked me and I haven't had time yet.} | ||
| 2119 | 2828 | ||
| 2120 | 74: How do I turn down the bell volume in Emacs running under X Windows? | 2829 | 97: How do I turn down the bell volume in Emacs running under X Windows? |
| 2121 | 2830 | ||
| 2122 | Under Epoch you can do: | 2831 | Under Epoch you can do: |
| 2123 | 2832 | ||
| 2124 | (setq epoch::bell-volume 20) | 2833 | (setq epoch::bell-volume 20) |
| 2125 | 2834 | ||
| 2126 | Under normal GNU Emacs you must modify the XTfeep function in | 2835 | Under normal GNU Emacs you must modify the XTfeep function in |
| 2127 | src/x11term.c, and change the number 50 to some other number: | 2836 | src/x11term.c. This simplest fix is to change the number 50 to -50 in the ! |
| 2837 | call the XBell. Then "xset b 0" will turn off Emacs's beeping. ! | ||
| 2128 | 2838 | ||
| 2129 | XTfeep () | 2839 | Explanation: After "xset b BASE": + |
| 2130 | { | ||
| 2131 | BLOCK_INPUT_DECLARE (); | ||
| 2132 | #ifdef XDEBUG | ||
| 2133 | fprintf (stderr, "XTfeep\n"); | ||
| 2134 | #endif | ||
| 2135 | BLOCK_INPUT (); | ||
| 2136 | XBell (XXdisplay,50); /* change this 50 */ | ||
| 2137 | UNBLOCK_INPUT (); | ||
| 2138 | } | ||
| 2139 | 2840 | ||
| 2140 | 75: How do I make Emacs send 8-bit characters to my terminal? | 2841 | XBell (disp, VAL) beeps with volume BASE - (BASE*VAL)/100 + VAL, |
| 2842 | XBell (disp, -VAL) beeps with volume BASE - (BASE*VAL)/100. | ||
| 2141 | 2843 | ||
| 2142 | Johan Widen <jw@sics.se> writes: | 2844 | Stu Grossman <grossman@sunburn.stanford.edu> wrote a patch that allows the + |
| 2845 | bell volume to be adjusted from inside Emacs. + | ||
| 2143 | 2846 | ||
| 2144 | A patch for emacs-18.55 is available by ftp and mail-server from | 2847 | 98: How do I change load-path? |
| 2145 | sics.se. | ||
| 2146 | 2848 | ||
| 2147 | Anonymous FTP: | 2849 | In general, you should only *add* to the load-path. You can add |
| 2148 | site: sics.se [192.16.123.90] | 2850 | directory /XXX/YYY to the load path like this: |
| 2149 | file: archive/emacs-18.55-8bit-diff | 2851 | |
| 2852 | (setq load-path (append load-path '("/XXX/YYY/"))) | ||
| 2853 | |||
| 2854 | To do this relative to your home directory: | ||
| 2855 | |||
| 2856 | (setq load-path (append load-path (list (expand-file-name "~/YYY/")))) | ||
| 2150 | 2857 | ||
| 2151 | E-mail: | 2858 | 99: How do I change the included text prefix in mail/news followups? |
| 2152 | To: mail-server@sics.se | 2859 | |
| 2153 | body: send emacs-18.55-8bit-diff | 2860 | Many people want Emacs to prefix included text with something like " > " ! |
| 2861 | instead of with three spaces. One way is to change the code of the ! | ||
| 2862 | function `mail-yank-original' in lisp/sendmail.el that prefixes with ! | ||
| 2863 | spaces. A more flexible solution is to use SuperCite, which provides wide ! | ||
| 2864 | configurability in how you format included text in replies. See question | ||
| 2865 | 21. Both of these solutions work for Rmail and GNUS. ! | ||
| 2866 | ! | ||
| 2867 | A related problem is how to prevent Emacs from including various headers ! | ||
| 2868 | of the replied-to message. For this, you should set the value of ! | ||
| 2869 | mail-yank-ignored-headers, which takes a regexp value. ! | ||
| 2154 | 2870 | ||
| 2155 | 2871 | ||
| 2156 | 2872 | ||
| 2157 | Emacs Lisp programming: | 2873 | Emacs Lisp Programming - |
| 2158 | 2874 | ||
| 2159 | 76: What dialect of Lisp is Emacs Lisp? | 2875 | 100: What dialect of Lisp is Emacs Lisp? |
| 2160 | 2876 | ||
| 2161 | It's the dialect of Lisp called Emacs Lisp. (No joke!) People also | 2877 | Quite simply, it is the dialect of Lisp called GNU Emacs Lisp. People ! |
| 2162 | call it elisp or e-lisp. (NOTE: The term "Elisp" is trademarked by | 2878 | also call it elisp or e-lisp. (NOTE: The term "Elisp" is trademarked by |
| 2163 | someone else.) | 2879 | someone else. {I believe it is by Uniworks Inc., the sellers of CCA ! |
| 2880 | Emacs.}) ! | ||
| 2164 | 2881 | ||
| 2165 | 77: How close is Emacs Lisp to Common Lisp? | 2882 | 101: How close is Emacs Lisp to Common Lisp? |
| 2166 | 2883 | ||
| 2167 | Pretty far. GNU Emacs Lisp is case-sensitive, uses dynamic scoping, | 2884 | They are not close. GNU Emacs Lisp is case-sensitive, uses dynamic |
| 2168 | doesn't have packages, doesn't have multiple return values, doesn't have | 2885 | scoping, doesn't have packages, doesn't have multiple return values, |
| 2169 | reader macros, etc. For people used to Common Lisp, some of the | 2886 | doesn't have reader macros, doesn't have rational, floating point, or |
| 2887 | arbitrary size numbers, etc. For people used to Common Lisp, some of the | ||
| 2170 | functions in Common Lisp that are not in Emacs Lisp by default are | 2888 | functions in Common Lisp that are not in Emacs Lisp by default are |
| 2171 | provided in the file lisp/cl.el. There is a Texinfo manual describing | 2889 | provided in the file lisp/cl.el. There is a Texinfo manual describing |
| 2172 | these functions in man/cl.texinfo. | 2890 | these functions in man/cl.texinfo. |
| 2173 | 2891 | ||
| 2174 | 78: How do I execute a piece of Emacs Lisp code? | 2892 | 102: How do I execute a piece of Emacs Lisp code? |
| 2175 | 2893 | ||
| 2176 | There are a number of ways to execute (called "evaluate") an Emacs Lisp | 2894 | There are a number of ways to execute (called "evaluate") an Emacs Lisp |
| 2177 | "form": | 2895 | "form": |
| @@ -2179,9 +2897,9 @@ Emacs Lisp programming: | |||
| 2179 | * If you want it evaluated every time you run Emacs, put it in a file | 2897 | * If you want it evaluated every time you run Emacs, put it in a file |
| 2180 | named ".emacs" in your home directory. | 2898 | named ".emacs" in your home directory. |
| 2181 | 2899 | ||
| 2182 | * You can type the form in the "*scratch*" buffer, and then type C-j | 2900 | * You can type the form in the "*scratch*" buffer, and then type LFD (or |
| 2183 | after it. The result of evaluating the form will be inserted in the | 2901 | C-j) after it. The result of evaluating the form will be inserted in |
| 2184 | buffer. | 2902 | the buffer. |
| 2185 | 2903 | ||
| 2186 | * In in Emacs-Lisp mode, typing M-C-x evaluates a top-level form before | 2904 | * In in Emacs-Lisp mode, typing M-C-x evaluates a top-level form before |
| 2187 | or around point. | 2905 | or around point. |
| @@ -2195,94 +2913,167 @@ Emacs Lisp programming: | |||
| 2195 | * You can use M-x load-file to have Emacs evaluate all the Lisp forms in | 2913 | * You can use M-x load-file to have Emacs evaluate all the Lisp forms in |
| 2196 | a file. (To do this from Lisp use the function "load" instead.) | 2914 | a file. (To do this from Lisp use the function "load" instead.) |
| 2197 | 2915 | ||
| 2198 | 79: How do I make a set of operations fully local to a region? | 2916 | These functions are also used for evaluating Lisp forms: |
| 2199 | 2917 | ||
| 2200 | Use narrow-to-region inside of save-restriction. | 2918 | load-library, eval-region, eval-current-buffer, require, autoload |
| 2201 | 2919 | ||
| 2202 | 80: How can I highlight a region? | 2920 | 103: How do I make a set of operations work only within a region? ! |
| 2203 | 2921 | ||
| 2204 | There are ways to get highlighting in GNU Emacs 18.55, but they all | 2922 | Use narrow-to-region inside of save-restriction. |
| 2205 | require patching the C code of Emacs and rebuilding. They are also slow | ||
| 2206 | and the highlighting disappears if you scroll or redraw the screen. One | ||
| 2207 | patch is by Kenichi Handa <handa@etl.go.jp>. | ||
| 2208 | 2923 | ||
| 2209 | You can hightlight regions in a variety of ways in Epoch. GNU Emacs 19 | 2924 | 104: How can I highlight text in Emacs? |
| 2210 | will have everything you need, but won't be out soon. | ||
| 2211 | 2925 | ||
| 2212 | 81: How do I change Emacs's idea of the tab character's length? | 2926 | There are ways to get highlighting (reverse video) in GNU Emacs 18.58, but ! |
| 2927 | either they require patching the C code of Emacs and rebuilding, or they | ||
| 2928 | are slow and the highlighting disappears if you scroll or redraw the | ||
| 2929 | screen and it can not follow the point. Howard Gayle's patches for 8-bit ! | ||
| 2930 | output appear to allow highlighting (see question 43). Another ! | ||
| 2931 | patch for highlighting is by Kenichi Handa <handa@etl.go.jp>. There is a ! | ||
| 2932 | patch for use with X by Andy Norman <ange@hplb.hpl.hp.com> (and modified + | ||
| 2933 | for 18.57 by Matthieu Herrb <matthieu@laas.fr>), which is available for + | ||
| 2934 | FTP (laas.laas.fr:pub/emacs/patch-X11-18.5{5,7}). + | ||
| 2213 | 2935 | ||
| 2214 | Example: (setq default-tab-width 10). | 2936 | You can highlight regions in a variety of ways in Epoch. GNU Emacs 19 |
| 2937 | will have everything you need, but won't be out soon. | ||
| 2215 | 2938 | ||
| 2216 | 82: What is the difference between (interactive "P") and (interactive "p")? | 2939 | Similar comments apply to displaying text in different fonts, except that + |
| 2940 | it is even harder. + | ||
| 2217 | 2941 | ||
| 2218 | The value that is a result of "P" can be a list, a symbol, or an | 2942 | 105: How do I change Emacs's idea of the tab character's length? |
| 2219 | integer; the value that is a result of "p" is always an integer: | ||
| 2220 | 2943 | ||
| 2221 | Prefix keys typed result of: "P" "p" | 2944 | Example: (setq default-tab-width 10). |
| 2222 | nothing nil 1 | ||
| 2223 | "M-1" 1 1 | ||
| 2224 | "C-u 1" 1 1 | ||
| 2225 | "M--" '- -1 | ||
| 2226 | "C-u -" '- -1 | ||
| 2227 | "C-u" (4) 4 | ||
| 2228 | "C-u C-u" (16) 16 | ||
| 2229 | 2945 | ||
| 2230 | 2946 | ||
| 2231 | 2947 | ||
| 2232 | Carrying Out Common Tasks: | 2948 | Carrying Out Common Tasks - |
| 2233 | 2949 | ||
| 2234 | 83: How do I insert ">"'s in the beginning of every line in a buffer? | 2950 | 106: How do I insert ">"'s in the beginning of every line in a buffer? |
| 2235 | 2951 | ||
| 2236 | Type "M-x replace-regexp RET ^ RET > RET". ("replace-regexp" can be | 2952 | Type "M-x replace-regexp RET ^ RET > RET". ("replace-regexp" can be |
| 2237 | shortened to "repl TAB r".) | 2953 | shortened to "repl TAB r".) |
| 2238 | 2954 | ||
| 2239 | To do this only in the region, type "C-x n M-x replace-regexp RET ^ RET | 2955 | To do this only in the region, type "C-x n M-x replace-regexp RET ^ RET |
| 2240 | > RET C-x w". (You're going to remember that, right?) | 2956 | > RET C-x w". - |
| 2957 | |||
| 2958 | WARNING: The command narrow-to-region (C-x n) is disabled by default | ||
| 2959 | because it can be very confusing (ie., "Oh no! Where did my file go?"). | ||
| 2241 | 2960 | ||
| 2242 | 84: How do I insert "_^H" characters before each character in a | 2961 | 107: How do I insert "_^H" characters before each character in a paragraph |
| 2243 | paragraph to get an underlined paragraph? | 2962 | to get an underlined paragraph? |
| 2244 | 2963 | ||
| 2245 | M-x underline-region. | 2964 | M-x underline-region. |
| 2246 | 2965 | ||
| 2247 | 85: How do I repeat a command as many times as possible? | 2966 | 108: How do I repeat a command as many times as possible? |
| 2248 | 2967 | ||
| 2249 | Make a keyboard macro that invokes the command and then type "M-0 C-x | 2968 | Use "C-x (" and "C-x )" to make a keyboard macro that invokes the command |
| 2250 | e". WARNING: any messages your command prints in the echo area will be | 2969 | and then type "M-0 C-x e". |
| 2970 | |||
| 2971 | WARNING: any messages your command prints in the echo area will be | ||
| 2251 | suppressed. | 2972 | suppressed. |
| 2252 | 2973 | ||
| 2253 | 86: How do I search for an unprintable (8-bit) character that appears | 2974 | 109: How do I search for or delete unprintable (8-bit or control) |
| 2254 | in a buffer as \237? | 2975 | characters? |
| 2976 | |||
| 2977 | To search for a single character that appears in the buffer as, for | ||
| 2978 | example, \237, you can type "C-s C-q 2 3 7". (This assumes the value of | ||
| 2979 | search-quote-char is 17 (C-q).) | ||
| 2980 | |||
| 2981 | Searching for ALL unprintable characters is best done with a "regexp" | ||
| 2982 | search. The easiest regexp to use for the unprintable chars is the | ||
| 2983 | complement of the regexp for the printable chars. | ||
| 2984 | |||
| 2985 | Regexp for the printable chars: [\t\n\r\f -~] | ||
| 2986 | |||
| 2987 | Regexp for the unprintable chars: [^\t\n\r\f -~] | ||
| 2988 | |||
| 2989 | To type some of these special characters (\t, \n, \r, \f) as an | ||
| 2990 | interactive argument to isearch-forward-regexp or re-search-forward, you | ||
| 2991 | need to use C-q. | ||
| 2992 | |||
| 2993 | So, to search for unprintable characters using re-search-forward: | ||
| 2994 | |||
| 2995 | M-x re-search-forward RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET | ||
| 2996 | |||
| 2997 | Using isearch-forward-regexp: | ||
| 2998 | |||
| 2999 | M-C-s [^ TAB RET C-q RET C-q C-l SPC -~] | ||
| 3000 | |||
| 3001 | To delete all unprintable characters, simply use a replace-regexp: | ||
| 3002 | |||
| 3003 | M-x replace-regexp RET [^ TAB C-q LFD C-q RET C-q C-l SPC -~] RET RET | ||
| 3004 | |||
| 3005 | Notes: | ||
| 3006 | |||
| 3007 | * With isearch, you can type RET to get a quoted LFD (not a quoted RET). | ||
| 3008 | |||
| 3009 | * You don't need to quote TAB with either isearch or typing something in | ||
| 3010 | the minibuffer. | ||
| 3011 | |||
| 3012 | Here are the Emacs Lisp forms of the above regexps: | ||
| 3013 | |||
| 3014 | ;; regexp matching all printable characters: | ||
| 3015 | "[\t\n\r\f -~]" | ||
| 2255 | 3016 | ||
| 2256 | C-s C-q 2 3 7 | 3017 | ;; regexp matching all unprintable characters: |
| 3018 | "[^\t\n\r\f -~]" | ||
| 2257 | 3019 | ||
| 2258 | (This assumes the value of search-quote-char is 17 (C-q).) | 3020 | ;; alternative regexps for all unprintable characters: |
| 3021 | "[\C-@-\C-h\C-k\C-n-\C-_\C-?-\377]" | ||
| 3022 | "[\000-\010\013\016-\037\177-\377]" | ||
| 2259 | 3023 | ||
| 2260 | 87: How do I tell Emacs to automatically indent a new line to the | 3024 | (To use "[\000-\010\013\016-\037\177-\377]" interactively, type: |
| 3025 | |||
| 3026 | [ C-q 000 - C-q 010 C-q 013 C-q 016 - C-q 037 C-q 177 - C-q 377 ] | ||
| 3027 | |||
| 3028 | ) | ||
| 3029 | |||
| 3030 | 110: How do I control Emacs's case-sensitivity when searching/replacing? + | ||
| 3031 | |||
| 3032 | For searching, the value of the variable case-fold-search determines | ||
| 3033 | whether they are case sensitive: | ||
| 3034 | |||
| 3035 | (setq case-fold-search nil) ; make searches case sensitive | ||
| 3036 | (setq case-fold-search t) ; make searches case insensitive | ||
| 3037 | |||
| 3038 | Similarly, for replacing the variable case-replace determines whether | ||
| 3039 | replacements preserve case. | ||
| 3040 | |||
| 3041 | To change the case sensitivity just for one major mode, use the major + | ||
| 3042 | mode's hook. For example: + | ||
| 3043 | + | ||
| 3044 | (setq XXX-mode-hook + | ||
| 3045 | (function + | ||
| 3046 | (lambda () + | ||
| 3047 | (setq case-fold-search nil)))) + | ||
| 3048 | |||
| 3049 | 111: How do I tell Emacs to automatically indent a new line to the | ||
| 2261 | indentation of the previous line? | 3050 | indentation of the previous line? |
| 2262 | 3051 | ||
| 2263 | M-x indented-text-mode. (This is a major mode.) | 3052 | One solution is the major mode Indented Text Mode (M-x indented-tex-mode). |
| 2264 | 3053 | ||
| 2265 | If you have auto-fill mode on (minor mode), you can tell Emacs to prefix | 3054 | If you have Auto-Fill mode on (a minor mode, see question 93), |
| 2266 | every line with a certain character sequence, the "fill prefix". Type | 3055 | you can tell Emacs to prefix every line with a certain character |
| 2267 | the prefix at the beginning of a line, position point after it, and then | 3056 | sequence, the "fill prefix". Type the prefix at the beginning of a |
| 2268 | type "C-x ." (set-fill-prefix) to set the fill prefix. Thereafter, | 3057 | line, position point after it, and then type "C-x ." (set-fill-prefix) |
| 2269 | auto-filling will automatically put the fill prefix at the beginning of | 3058 | to set the fill prefix. Thereafter, auto-filling will automatically put |
| 2270 | new lines, and M-q (fill-paragraph) will maintain any fill prefix when | 3059 | the fill prefix at the beginning of new lines, and M-q (fill-paragraph) |
| 2271 | refilling the paragraph. | 3060 | will maintain any fill prefix when refilling the paragraph. |
| 2272 | 3061 | ||
| 2273 | 88: How do I make Emacs "typeover" or "overwrite" when I type instead of | 3062 | NOTE: If you have paragraphs with different levels of indentation, you |
| 2274 | always inserting? | 3063 | will have to set the fill prefix to the correct value each time you move |
| 3064 | to a new paragraph. To avoid this hassle, try one of the many packages | ||
| 3065 | available from the Emacs Lisp Archive. Look up "fill" and "indent" in the | ||
| 3066 | Lisp Code Directory for guidance. | ||
| 2275 | 3067 | ||
| 2276 | M-x overwrite-mode (minor mode). | 3068 | 112: How do I make Emacs "typeover" or "overwrite" instead of inserting? - |
| 2277 | 3069 | ||
| 2278 | WARNING: delete-backward-char (usually the delete key) doesn't work | 3070 | M-x overwrite-mode (a minor mode). |
| 2279 | properly in overwrite mode. It deletes the character to the left, | ||
| 2280 | rather than replacing it with a space. | ||
| 2281 | 3071 | ||
| 2282 | 89: How do I show which parenthesis matches the one I'm looking at? | 3072 | 113: How do I show which parenthesis matches the one I'm looking at? |
| 2283 | 3073 | ||
| 2284 | If you're looking at a right parenthesis (or brace or bracket) you can | 3074 | If you're looking at a right parenthesis (or brace or bracket) you can |
| 2285 | delete it and reinsert it. | 3075 | delete it and reinsert it. Emacs will blink the cursor on the matching |
| 3076 | parenthesis. | ||
| 2286 | 3077 | ||
| 2287 | M-C-f (forward-sexp) and M-C-b (backward-sexp) will skip over balanced | 3078 | M-C-f (forward-sexp) and M-C-b (backward-sexp) will skip over balanced |
| 2288 | parentheses, so you can see which parentheses match. (You can train it | 3079 | parentheses, so you can see which parentheses match. (You can train it |
| @@ -2293,48 +3084,47 @@ Carrying Out Common Tasks: | |||
| 2293 | parenthese, like in vi. In addition, if the cursor isn't over a | 3084 | parenthese, like in vi. In addition, if the cursor isn't over a |
| 2294 | parenthese, it simply inserts a % like normal. | 3085 | parenthese, it simply inserts a % like normal. |
| 2295 | 3086 | ||
| 2296 | (By an unknown contributor.) | 3087 | ;; By an unknown contributor ! |
| 2297 | 3088 | ||
| 2298 | (global-set-key "%" 'match-paren) | 3089 | (global-set-key "%" 'match-paren) |
| 2299 | 3090 | ||
| 2300 | (defun match-paren (arg) | 3091 | (defun match-paren (arg) |
| 2301 | "Go to the matching parenthesis if on parenthesis otherwise insert %." | 3092 | "Go to the matching parenthesis if on parenthesis otherwise insert %." |
| 2302 | (interactive "p") | 3093 | (interactive "p") |
| 2303 | (cond ((looking-at "[([{]") (forward-sexp 1) (backward-char)) | 3094 | (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1)) |
| 2304 | ((looking-at "[])}]") (forward-char) (backward-sexp 1)) | 3095 | ((looking-at "\\s\)") (forward-char 1) (backward-list 1)) |
| 2305 | (t (self-insert-command (or arg 1))))) | 3096 | (t (self-insert-command (or arg 1))))) |
| 2306 | 3097 | ||
| 2307 | 90: How do I make Emacs behave like this: when I go up or down, the cursor | 3098 | 114: How do I make Emacs behave like this: when I go up or down, the cursor |
| 2308 | should stay in the same column even if the line is too short? | 3099 | should stay in the same column even if the line is too short? |
| 2309 | 3100 | ||
| 2310 | M-x picture-mode. (This is a minor mode, in theory anyway ...) | 3101 | M-x picture-mode. (This is a minor mode, in theory anyway ...) |
| 2311 | 3102 | ||
| 2312 | 91: How do I read news under Emacs? | 3103 | 115: How do I read news under Emacs? |
| 2313 | 3104 | ||
| 2314 | There are at least three news reading packages that operate inside | 3105 | There are at least three news reading packages that operate inside Emacs. |
| 2315 | Emacs. "rnews" comes with Emacs. "GNUS" and "Gnews" come separately. | 3106 | "rnews" comes with Emacs. "GNUS" and "Gnews" come separately. rnews will |
| 3107 | be replaced by GNUS in Emacs 19. | ||
| 2316 | 3108 | ||
| 2317 | {I've never used rnews; could someone write a description? BTW, rnews | 3109 | rnews works only with a local news spool directory. Both GNUS and Gnews |
| 2318 | will be replaced with GNUS in Emacs 19.} | 3110 | handle reading news remotely via NNTP in addition to reading from a local |
| 3111 | news spool. GNUS supports reading mail stored in MH folders or articles | ||
| 3112 | saved by GNUS. | ||
| 2319 | 3113 | ||
| 2320 | Both GNUS and Gnews handle reading news over NNTP. I think both can | 3114 | Gnews is styled after `rn' and seems to work like Rmail. GNUS feels more |
| 2321 | also read from a local news spool. GNUS also supports reading mail | 3115 | like VM. People have complained that GNUS uses a lot of CPU time (it |
| 2322 | stored in MH folders or articles saved by GNUS. | 3116 | does). Some people have complained that Gnews is slower than GNUS. |
| 2323 | 3117 | ||
| 2324 | GNUS is written (mostly) by Masanobu Umeda. His (?) latest e-mail | 3118 | For more information about GNUS, see question 21. |
| 2325 | address was umerin@tc.nagasaki.go.jp, but I don't think he has an e-mail | ||
| 2326 | address right now. The latest version is GNUS 3.13. There is a | ||
| 2327 | newsgroup for discussion of GNUS called gnu.emacs.gnus. This newsgroup | ||
| 2328 | is gatewayed with the mailing list info-gnus-english to subscribe send | ||
| 2329 | mail to info-gnus-english-request@cis.ohio-state.edu. There is also a | ||
| 2330 | mailing list called info-gnus, which includes discussion in Japanese. | ||
| 2331 | 3119 | ||
| 2332 | Gnews was written by Matthew Wiener <e-mail address?>. {Could someone | 3120 | Gnews was written by Matthew P. Wiener <weemba@libra.wistar.upenn.edu>. |
| 2333 | tell me the # of the latest version, and how long it has been since | 3121 | The latest version seems to be 2.0, posted October 3, 1988. Matthew |
| 2334 | anyone has heard from Matthew?}. There is a newsgroup for Gnews called | 3122 | posted some fixes on October 26, 1988. Gnews does not appear to have been |
| 3123 | supported after this date. In particular, it has been reported that Gnews | ||
| 3124 | does not work with Emacs 18.57. There is a newsgroup for Gnews called | ||
| 2335 | gnu.emacs.gnews. | 3125 | gnu.emacs.gnews. |
| 2336 | 3126 | ||
| 2337 | 92: In C mode, can I show just the lines that will be left after #ifdef | 3127 | 116: In C mode, can I show just the lines that will be left after #ifdef |
| 2338 | commands are handled by the compiler? | 3128 | commands are handled by the compiler? |
| 2339 | 3129 | ||
| 2340 | M-x hide-ifdef-mode. (This is a minor mode.) | 3130 | M-x hide-ifdef-mode. (This is a minor mode.) |
| @@ -2344,7 +3134,9 @@ Carrying Out Common Tasks: | |||
| 2344 | 3134 | ||
| 2345 | (autoload 'hide-ifdef-mode "hideif" nil t) | 3135 | (autoload 'hide-ifdef-mode "hideif" nil t) |
| 2346 | 3136 | ||
| 2347 | 93: Is there an equivalent to the "." (dot) command of vi? | 3137 | {Yes, I know, this should be in lisp/loaddefs.el already.} |
| 3138 | |||
| 3139 | 117: Is there an equivalent to the "." (dot) command of vi? | ||
| 2348 | 3140 | ||
| 2349 | ("." is the redo command in vi. It redoes the last insertion/deletion.) | 3141 | ("." is the redo command in vi. It redoes the last insertion/deletion.) |
| 2350 | 3142 | ||
| @@ -2357,44 +3149,136 @@ Carrying Out Common Tasks: | |||
| 2357 | 3149 | ||
| 2358 | To repeat something on each line I recommend using keyboard macros. | 3150 | To repeat something on each line I recommend using keyboard macros. |
| 2359 | 3151 | ||
| 2360 | 94: How do I use emacstool under SunView? | 3152 | 118: How do I make Emacs display the current line (or column) number? ! |
| 2361 | |||
| 2362 | The file etc/SUN-SUPPORT includes the document "Using Emacstool with GNU | ||
| 2363 | Emacs". Also read the man page for emacstool (etc/emacstool.1). | ||
| 2364 | |||
| 2365 | 95: How do I get Emacs to display the current line number on the mode line? | ||
| 2366 | |||
| 2367 | There is no "correct" way to constantly display the current line number | ||
| 2368 | on the mode line in Emacs 18. Emacs is not a line-oriented editor, and | ||
| 2369 | really has no idea what "lines" of the buffer are displayed in the | ||
| 2370 | window. It would require a lot of work at the C code level to make | ||
| 2371 | Emacs keep track of this. | ||
| 2372 | |||
| 2373 | Emacs 19 will probably be able to do this, but probably not with great | ||
| 2374 | efficiency. | ||
| 2375 | 3153 | ||
| 2376 | To find out what line of the buffer you are on right now, do "M-x | 3154 | To find out what line of the buffer you are on right now, do "M-x |
| 2377 | what-line". Typing "C-x l" will also tell you what line you are on, | 3155 | what-line". Use "M-x goto-line" to go to a specific line. To find the + |
| 2378 | provided the buffer isn't separated into "pages" with C-l characters. | 3156 | current column number, type "M-ESC (current-column)". + |
| 2379 | In that case, it will only tell you what line of the current "page" you | 3157 | |
| 2380 | are on. WARNING: "C-x l" gives the wrong value when point is at the | 3158 | Typing "C-x l" will also tell you what line you are on, provided the |
| 2381 | beginning of a line. | 3159 | buffer isn't separated into "pages" with C-l characters. In that case, it |
| 2382 | 3160 | will only tell you what line of the current "page" you are on. WARNING: | |
| 2383 | People have written various kludges to display the current line number | 3161 | "C-x l" gives the wrong value when point is at the beginning of a line. |
| 2384 | on the mode line. Look in the Lisp Code Directory. (See question 13.) | 3162 | |
| 2385 | 3163 | There is no "correct" way to constantly display the current line (or ! | |
| 2386 | 96: How do I tell Emacs to iconify itself? | 3164 | column) number on the mode line in Emacs 18, or to display the line + |
| 3165 | numbers next to the lines. Emacs is not a line-oriented editor, and + | ||
| 3166 | really has no idea what "lines" of the buffer are displayed in the window. + | ||
| 3167 | It would require a lot of work at the C code level to make Emacs keep + | ||
| 3168 | track of this. It would not be that hard to get the column number, but it + | ||
| 3169 | would still require changes at the C code level. + | ||
| 3170 | + | ||
| 3171 | vi emulation mode does not emulate this capability of vi (as far as I + | ||
| 3172 | know). + | ||
| 3173 | + | ||
| 3174 | Emacs 19 will probably be able to show the line number on the mode-line, + | ||
| 3175 | but probably very inefficiently. + | ||
| 3176 | + | ||
| 3177 | People have written various kludges to display line numbers. Look in the + | ||
| 3178 | Lisp Code Directory. (See question 17.) | ||
| 3179 | |||
| 3180 | 119: How do I tell Emacs to iconify itself? | ||
| 2387 | 3181 | ||
| 2388 | You need to modify C source and recompile. Either that or get Epoch | 3182 | You need to modify C source and recompile. Either that or get Epoch |
| 2389 | instead. For the interested I have a patch to allow Emacs to iconify | 3183 | instead. For the interested I have a patch by Robert Forsman |
| 2390 | itself. | 3184 | <thoth@reef.cis.ufl.edu> to allow Emacs to iconify itself and a patch by |
| 3185 | Matt Wette <mwette@mr-ed.jpl.nasa.gov> to allow Emacs to start up | ||
| 3186 | iconified. I don't know whether these two patches work together. | ||
| 3187 | |||
| 3188 | {Are either of these two patches available via anonymous FTP anywhere?} | ||
| 2391 | 3189 | ||
| 2392 | 97: How do I use regexps (regular expressions) in Emacs? | 3190 | 120: How do I use regexps (regular expressions) in Emacs? |
| 2393 | 3191 | ||
| 2394 | This is documented in the Emacs manual. To read the manual section | 3192 | This is documented in the Emacs manual. To read the manual section |
| 2395 | online, type "C-h i m emacs RET m regexps RET". | 3193 | online, type "C-h i m emacs RET m regexps RET". |
| 2396 | 3194 | ||
| 3195 | WARNING: The `or' operator is `\|', not `|', and the grouping operators | ||
| 3196 | are `\(' and `\)'. Also, the string syntax for a backslash is "\\". | ||
| 3197 | Thus, the string syntax for a regular expression like xxx\(foo\|bar\) is | ||
| 3198 | "xxx\\(foo\\|bar\\)". Notice the duplicated backslashes! | ||
| 3199 | |||
| 2397 | WARNING: Unlike in Unix grep, sed, etc., a complement character set | 3200 | WARNING: Unlike in Unix grep, sed, etc., a complement character set |
| 2398 | ([^...]) can match a Newline, unless Newline is mentioned as one of the | 3201 | ([^...]) can match a newline character (LFD aka C-j aka \n), unless |
| 2399 | characters not to match. | 3202 | newline is mentioned as one of the characters not to match. |
| 3203 | |||
| 3204 | WARNING: The character syntax regexps (eg. `\sw') are not meaningful + | ||
| 3205 | inside character set regexps (eg. `[aeiou]'). (This is typical for regexp + | ||
| 3206 | syntax.) + | ||
| 3207 | |||
| 3208 | 121: How do I perform a replace operation across more than one file? | ||
| 3209 | |||
| 3210 | The "tags" feature of Emacs includes the command tags-query-replace | ||
| 3211 | which performs a query-replace across all the files mentioned in the | ||
| 3212 | TAGS file. To read the relevant online manual section, type "C-h i m | ||
| 3213 | emacs RET m tags RET m tags search RET". | ||
| 3214 | |||
| 3215 | In addition, Martin Boyer has written a package named global-replace | ||
| 3216 | which will perform a query-replace across all the files mentioned in the | ||
| 3217 | *compilation* buffer (usually done after a "grep"), which is available | ||
| 3218 | via anonymous FTP (ireq-robot.hydro.qc.ca: | ||
| 3219 | /pub/emacs/lisp/{compile,global-replace,query}.el.Z). | ||
| 3220 | |||
| 3221 | 122: How do I make Emacs wrap words for me? | ||
| 3222 | |||
| 3223 | M-x auto-fill-mode. The default maximum line width is 74, determined by | ||
| 3224 | the variable fill-column. To find how to turn this on automatically see | ||
| 3225 | question 93. | ||
| 3226 | |||
| 3227 | 123: Where can I get a better spelling checker for Emacs? | ||
| 3228 | |||
| 3229 | Use Ispell. See question 21. | ||
| 3230 | |||
| 3231 | 124: How can I spell-check TeX or *roff documents? | ||
| 3232 | |||
| 3233 | If you want to spell-check TeX or *roff documents with Ispell, you need to ! | ||
| 3234 | arrange for a filter program that understands how to strip TeX or *roff ! | ||
| 3235 | formatting commands to be run. In the TeX distribution, there are several ! | ||
| 3236 | different programs named `detex', all with incompatible options, and a ! | ||
| 3237 | very old pair of programs named `detex' and `delatex', which should ! | ||
| 3238 | probably be avoided. The most useful one for Ispell is `detex' by Daniel ! | ||
| 3239 | Trinkle. A more recent version is available via FTP + | ||
| 3240 | (arthur.cs.purdue.edu: pub/trinkle/detex-2.3.tar.Z). Raphael Cerf ! | ||
| 3241 | <cerf@clipper.ens.fr> recently released a program named `xetal' ! | ||
| 3242 | (spi.ens.fr:pub/unix/tex/???). There is a program that comes with Unix ! | ||
| 3243 | named `deroff' for stripping formatting commands from *roff files. ! | ||
| 3244 | ! | ||
| 3245 | Here is an example of code you can put in a .emacs file to use these ! | ||
| 3246 | programs: ! | ||
| 3247 | ! | ||
| 3248 | ;; Based on suggestions by David G. Grubbs <dgg@ksr.com> and Paul Palmer ! | ||
| 3249 | ;; <palmerp@math.orst.edu>. ! | ||
| 3250 | ! | ||
| 3251 | ;; Assuming the use of detex 2.3 by Daniel Trinkle: ! | ||
| 3252 | ;; -w means one word per line. ! | ||
| 3253 | ;; -n means don't expand \input or \include commands. ! | ||
| 3254 | ;; -l means force LaTeX mode. ! | ||
| 3255 | ! | ||
| 3256 | (require 'ispell) ; for the make-variable-buffer-local statements ! | ||
| 3257 | (setq plain-TeX-mode-hook ! | ||
| 3258 | (function ! | ||
| 3259 | (lambda () ! | ||
| 3260 | (setq ispell-filter-hook "detex") + | ||
| 3261 | (setq ispell-filter-hook-args '("-nw"))))) ! | ||
| 3262 | (setq LaTeX-mode-hook ! | ||
| 3263 | (function | ||
| 3264 | (lambda () | ||
| 3265 | (setq ispell-filter-hook "detex") ! | ||
| 3266 | (setq ispell-filter-hook-args '("-lnw"))))) ! | ||
| 3267 | (setq nroff-mode-hook | ||
| 3268 | (function | ||
| 3269 | (lambda () | ||
| 3270 | (setq ispell-filter-hook "deroff") | ||
| 3271 | (setq ispell-filter-hook-args '("-w"))))) + | ||
| 3272 | + | ||
| 3273 | You will have to adjust the arguments for programs other than Trinkle's + | ||
| 3274 | detex or for other versions of deroff. Experiment running the command + | ||
| 3275 | from the shell to find the correct options. If you don't have a filter + | ||
| 3276 | that knows how to output one word per line, you must pipe its output + | ||
| 3277 | through another filter to break up the output. + | ||
| 3278 | |||
| 3279 | 125: How can I make Emacs automatically scroll horizontally? | ||
| 3280 | |||
| 3281 | Sorry, you can't. The best you can do is rewrite a large number of | ||
| 3282 | commands and make them check if the point is still on the screen after | ||
| 3283 | they are done. {Has someone done this already?} | ||
| 2400 | 3284 | ||