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