0
|
1 \input texinfo.tex @c -*-texinfo-*-
|
|
2 @c %**start of header
|
70
|
3 @setfilename ../info/xemacs-faq.info
|
0
|
4 @settitle Frequently asked questions about XEmacs
|
|
5 @setchapternewpage off
|
|
6 @c %**end of header
|
|
7
|
|
8 @titlepage
|
|
9 @title XEmacs FAQ
|
|
10 @subtitle Frequently asked questions about XEmacs
|
70
|
11 @subtitle Last Modified: 1995/08/29
|
0
|
12 @sp 1
|
70
|
13 @author Anthony Rossini <arossini@@biostats.hmc.psu.edu>
|
|
14 @author Ben Wing <wing@@netcom.com>
|
0
|
15 @author Chuck Thompson <cthomp@@cs.uiuc.edu>
|
|
16 @page
|
|
17 @end titlepage
|
|
18
|
70
|
19 @c Some of this stuff needs to go in the HTML version which means it
|
|
20 @c needs to be put outside of the ifinfo statement.
|
|
21
|
|
22 @ifinfo
|
|
23 @node top, 1. Introductory Questions, (dir), (dir)
|
|
24 @unnumbered XEmacs FAQ
|
|
25
|
|
26 Version: 1995/08/29
|
|
27
|
|
28 Current-Editor: Chuck Thompson <cthomp@@cs.uiuc.edu>
|
|
29
|
|
30 Copying Status: Freely Redistributable. I take no liability for the
|
|
31 correctness and safety of any procedures or advice given
|
|
32 here. This FAQ is distributed in the hope that it will
|
|
33 be useful, but WITHOUT ANY WARRANTY; without even the
|
|
34 implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
35 PARTICULAR PURPOSE.
|
|
36
|
|
37 This is a list of frequently asked questions for XEmacs users and
|
|
38 maintainers.
|
|
39
|
|
40 You can obtain the latest version of this file by anonymous FTP from
|
|
41 site @file{ftp.cs.uiuc.edu:/pub/xemacs/faq/xemacs-faq.FORMAT} where FORMAT
|
|
42 is text, texinfo (the master copy), postscript, dvi, html, info. Note that
|
|
43 the html version has 2 files.
|
|
44
|
|
45 Thanks to the many who contributed, especially to JWZ <jwz@@netscape.com> for
|
|
46 starting this whole wonderful mess... Special thanks to Tim Geisler
|
|
47 <tmgeisle@@faui80.informatik.uni-erlangen.de> for the initial texinfo
|
|
48 version and to Giacomo Boffi <sboff@@hp735.stru.polimi.it> for the initial
|
|
49 HTML version. Other contributors (many left out, unfortunately, due to an
|
|
50 old mail-purge) include:
|
|
51 @itemize @bullet
|
|
52 @item
|
|
53 Juergen Nickelsen <nickel@@prz.tu-berlin.de>
|
|
54 @item
|
|
55 Evelyn Ginsparg <ginsparg@@adra.com>
|
|
56 @item
|
|
57 d3h554@@foghorn.pnl.gov
|
|
58 @item
|
|
59 Marty Hall <hall@@aplcenmp.apl.jhu.edu>
|
|
60 @item
|
|
61 Richard Caley <rjc@@cogsci.ed.ac.uk>
|
|
62 @item
|
|
63 fcg@@philabs.Philips.COM
|
|
64 @item
|
|
65 Stig <stig@@hackvan.com>
|
|
66 @item
|
|
67 Arup Mukherjee <arup+@@cmu.edu>
|
|
68 @item
|
|
69 Kevin R. Powell <powell@@csl.ncsa.uiuc.edu>
|
|
70 @item
|
|
71 Eric Eide <eeide@@cs.utah.edu>
|
|
72 @item
|
|
73 William G. Dubuque <wgd@@martigny.ai.mit.edu>
|
|
74 @item
|
|
75 Chris Flatters <cflatter@@nrao.edu>
|
|
76 @item
|
|
77 John A. Turner <turner@@lanl.gov>
|
|
78 @end itemize
|
|
79
|
|
80 @end ifinfo
|
0
|
81
|
|
82 @menu
|
70
|
83 * top:: XEmacs FAQ
|
|
84 * 1. Introductory Questions::.
|
|
85 * 2. Compiling XEmacs::.
|
|
86 * 3. Problems running XEmacs / weird messages::.
|
|
87 * 4. Customization -- Emacs Lisp and the .emacs file::.
|
|
88 * 5. Customization -- X resources::.
|
|
89 * 6. Changing textual fonts and colors::.
|
|
90 * 7. The modeline::.
|
|
91 * 8. The keyboard::.
|
|
92 * 9. The cursor::.
|
|
93 * 10. The mouse; cutting and pasting::.
|
|
94 * 11. Highlighting::.
|
|
95 * 12. The menubar and toolbar::.
|
|
96 * 13. Scrollbars::.
|
|
97 * 14. Frame Geometry::.
|
|
98 * 15. Window/icon title; window manager problems::.
|
|
99 * 16. Editing source code (C mode; Lisp mode; etc.)::.
|
|
100 * 17. Text mode::.
|
|
101 * 18. Shell mode::.
|
|
102 * 19. Mail; VM; GNUS; BBDB; and related::.
|
|
103 * 20. Printing::.
|
|
104 * 21. Gnuserv::.
|
|
105 * 22. Miscellaneous::.
|
|
106 @end menu
|
|
107
|
|
108
|
|
109
|
|
110 @node 1. Introductory Questions, 2. Compiling XEmacs, top, top
|
|
111 @chapter 1. Introductory Questions
|
|
112
|
|
113 @menu
|
|
114 * 1.1.:: 1.1. Preface
|
|
115 * 1.2.:: 1.2. What is XEmacs?
|
|
116 * 1.3.:: 1.3. What is the current version of XEmacs?
|
|
117 * 1.4.:: 1.4. Where can I find it?
|
|
118 * 1.5.:: 1.5. Why another version of Emacs?
|
|
119 * 1.6.:: 1.6. What do @kbd{M-x}, GNU, etc. mean?
|
|
120 * 1.7.:: 1.7. Where can I get help for using XEmacs?
|
|
121 * 1.8.:: 1.8. Where is the mailing list archived?
|
|
122 * 1.9.:: 1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?
|
0
|
123 @end menu
|
|
124
|
70
|
125
|
|
126 @node 1.1.
|
|
127 @section 1.1. Preface
|
|
128
|
|
129 This is the introduction to a list of frequently asked questions (FAQ's)
|
|
130 about XEmacs with answers. This article contains a listing of the
|
|
131 questions; subsequent articles contain the questions and answers.
|
|
132
|
|
133 This is not a substitute for general Emacs questions, and actually
|
|
134 includes nothing that might help a novice learn to use Emacs or XEmacs.
|
|
135 For that, check out the regular Emacs lists, the tutorial inside of
|
|
136 XEmacs (look on the Help menu), or the O'Reilly book @cite{Learning GNU
|
|
137 Emacs}. This FAQ focuses on specific issues regarding XEmacs. If you
|
|
138 don't find the answer here, perhaps it really is a more general
|
|
139 question, and check the GNU Emacs FAQ for more information, as well.
|
|
140
|
|
141 The FAQ list is posted to reduce the noise level in the
|
|
142 @samp{comp.emacs.xemacs} newsgroup which results from the repetition of
|
|
143 frequently asked questions, wrong answers to these questions,
|
|
144 corrections to the wrong answers, corrections to the corrections,
|
|
145 debate, name calling, etc. Also, it serves as a repository of the
|
|
146 canonical ``best'' answers to these questions. However, if you know a
|
|
147 better answer or even a slight change that improves an answer, please
|
|
148 tell me!
|
|
149
|
|
150 If you know the answer of a question is in the FAQ list, please reply to
|
|
151 the question by e-mail instead of posting. Help reduce noise!
|
|
152
|
|
153 Please suggest new questions, answers, wording changes, deletions, etc.
|
|
154 The most helpful form for suggestions is a context diff (i.e. the output
|
|
155 of @samp{diff -c}). Include @samp{FAQ} in the subject of messages sent
|
|
156 to us about the FAQ list.
|
|
157
|
|
158 Please do not send questions to us just because you do not want to
|
|
159 disturb a lot of people and you think we would know the answer. We do
|
|
160 not have time to answer questions individually and keep up with
|
|
161 everything else we have to get done.
|
|
162
|
|
163 Many thanks need to go to all contributors on the old alt.lucid-emacs.*
|
|
164 and current comp.emacs.xemacs groups. This would never have been
|
|
165 collected without you.
|
|
166
|
|
167 Any directories given are usually in reference to the base directory
|
|
168 formed by unpacking XEmacs.
|
|
169
|
|
170
|
|
171 @node 1.2.
|
|
172 @section 1.2. What is XEmacs?
|
0
|
173
|
|
174 An alternative to GNU Emacs, originally based on an early alpha version
|
70
|
175 of FSF's version 19. XEmacs was known as Lucid Emacs through version
|
|
176 19.10. Almost all features of GNU Emacs are supported in XEmacs (the
|
|
177 ones that aren't supported are generally implemented in a better way in
|
|
178 XEmacs). The maintainers of XEmacs actively track changes to GNU Emacs
|
|
179 while also working to add new features never before seen in Emacs.
|
|
180
|
|
181
|
|
182 @node 1.3.
|
|
183 @section 1.3. What is the current version of XEmacs?
|
|
184
|
|
185 The current version is 19.13, released on September 1, 1995.
|
|
186
|
|
187
|
|
188 @node 1.4.
|
|
189 @section 1.4. Where can I find it?
|
|
190
|
|
191 The canonical source and binaries is found via anonymous FTP at
|
|
192 @ifinfo
|
|
193 @file{ftp.cs.uiuc.edu:/pub/xemacs}.
|
|
194 @end ifinfo
|
|
195 @ifhtml
|
|
196 <A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/">ftp.cs.uiuc.edu:/pub/xemacs/</A>
|
|
197 @end ifhtml
|
|
198
|
|
199 @node 1.5.
|
|
200 @section 1.5. Why Another Version of Emacs?
|
|
201
|
|
202 @ifinfo
|
|
203 For a detailed description of the differences between GNU Emacs and
|
|
204 XEmacs, and a detailed history of XEmacs, see the file @file{etc/NEWS}
|
|
205 in the source distribution. However, here is a list of some of the
|
|
206 reasons why we think you might consider using it:
|
|
207 @end ifinfo
|
|
208 @ifhtml
|
0
|
209 For a detailed description of the differences between GNU Emacs and
|
|
210 XEmacs and a detailed history of XEmacs, check out the
|
70
|
211 <A HREF="http://xemacs.cs.uiuc.edu/NEWS.html/">NEWS</A> file. However,
|
|
212 here is a list of some of the reasons why we think you might consider
|
|
213 using it:
|
|
214 @end ifhtml
|
0
|
215
|
|
216 @itemize @bullet
|
|
217 @item
|
70
|
218 It looks nicer
|
0
|
219 @item
|
|
220 The XEmacs maintainers are generally more receptive to suggestions than
|
70
|
221 the GNU Emacs maintainers
|
0
|
222 @item
|
70
|
223 Many more bundled packages than GNU Emacs, all properly integrated with
|
|
224 XEmacs
|
0
|
225 @item
|
70
|
226 Binaries are available for many common operating systems
|
0
|
227 @item
|
70
|
228 Face support on TTY's
|
0
|
229 @item
|
70
|
230 A built-in toolbar
|
0
|
231 @item
|
70
|
232 Better Motif compliance
|
0
|
233 @item
|
70
|
234 Some internationalization support for European languages. Full MULE
|
|
235 (Multi-Lingual EMacs) support is being actively worked on.
|
16
|
236 @item
|
70
|
237 Variable-width fonts
|
0
|
238 @item
|
70
|
239 Variable-height lines
|
0
|
240 @item
|
70
|
241 Marginal annotations
|
0
|
242 @item
|
70
|
243 ToolTalk support
|
0
|
244 @item
|
|
245 XEmacs can be used as an Xt widget, and can be embedded within another
|
70
|
246 application
|
0
|
247 @item
|
70
|
248 Horizontal and vertical scrollbars (using real toolkit scrollbars)
|
0
|
249 @item
|
|
250 Better APIs (and performance) for attaching fonts, colors, and other
|
70
|
251 properties to text
|
0
|
252 @item
|
70
|
253 The ability to embed arbitrary graphics in a buffer
|
0
|
254 @item
|
70
|
255 Completely compatible (at the C level) with the Xt-based toolkits
|
0
|
256 @end itemize
|
|
257
|
70
|
258
|
|
259 @node 1.6.
|
|
260 @section 1.6. What do @kbd{M-x}, GNU, etc. mean?
|
|
261
|
|
262 This is really a general Emacs question, but a table of some common
|
|
263 terms/acronyms is provided here for your convenience.
|
|
264 @ifinfo
|
|
265 See the @cite{GNU Emacs FAQ} for a more complete list.
|
|
266 @end ifinfo
|
|
267 @ifhtml
|
|
268 See the <A HREF="http://www.eecs.nwu.edu/emacs/faq">GNU Emacs FAQ</A>
|
|
269 for a more complete list.
|
|
270 @end ifhtml
|
|
271
|
|
272 @table @samp
|
|
273 @item BLAT FOOP
|
|
274 Historical XEmacs error message
|
|
275 @item C-x
|
|
276 @dfn{C-x} means that the @key{Control} key and the @key{X} key should be
|
|
277 pressed together, like when you use the @key{Shift} key.
|
|
278 @item E-Lisp
|
|
279 Same as @dfn{Emacs-Lisp}.
|
|
280 @item Emacs-Lisp
|
|
281 The dialect of Lisp supported by Emacs and XEmacs. You use this to
|
|
282 customize XEmacs.
|
|
283 @item FAQ
|
|
284 Frequently asked question(s).
|
|
285 @item FSF
|
|
286 The Free Software Foundation.
|
|
287 @item GNU
|
|
288 @dfn{GNU} refers to products written by the Free Software Foundation.
|
|
289 @item JWZ
|
|
290 Jamie Zawinski <jwz@@netscape.com>, the former maintainer of Lucid Emacs
|
|
291 (which XEmacs evolved from).
|
|
292 @item M-x
|
|
293 @dfn{M-x} means that the @key{Meta} key and the @key{X} key should be
|
|
294 pressed together, like when you use the @key{Shift} key. Sometimes
|
|
295 the @key{Meta} key is labelled @samp{Alt} or with a diamond. Some
|
|
296 keyboards don't have a @key{Meta} key at all; then you can get the
|
|
297 equivalent by typing the @key{Esc} key followed by the @key{X} key.
|
|
298 @item RMS
|
|
299 Richard Stallman <rms@@gnu.ai.mit.edu>, the author of GNU Emacs.
|
|
300 @item VI
|
|
301 An editor used by those heretics that don't subscribe to the Emacs religion.
|
|
302 @end table
|
|
303
|
|
304
|
|
305 @node 1.7.
|
|
306 @section 1.7. Where can I get help for using XEmacs?
|
0
|
307
|
|
308 Probably the easiest way, if everything is installed, is to use info, by
|
70
|
309 pressing @kbd{C-h i}, or selecting @samp{Emacs Info} from the Help Menu.
|
0
|
310 Also, @kbd{M-x apropos} will look for commands for you.
|
|
311
|
|
312 Try reading this FAQ, examining the regular GNU Emacs FAQ (which can be
|
|
313 found with the Emacs 19 distribution) as well as at
|
70
|
314 @ifinfo
|
|
315 @file{http://www.eecs.nwu.edu/emacs/faq/} and reading the Usenet group
|
|
316 @end ifinfo
|
|
317 @ifhtml
|
|
318 <A HREF="http://www.eecs.nwu.edu/emacs/faq/">http://www.eecs.nwu.edu/emacs/faq/</A>
|
|
319 and reading the Usenet group
|
|
320 @end ifhtml
|
|
321 @samp{comp.emacs.xemacs}. If that does not help, try posting your
|
|
322 question to @samp{comp.emacs.xemacs}. If you cannot post or read
|
|
323 Usenet news, there is a corresponding mailing list which is available.
|
|
324 It can be subscribed to by sending mail to
|
16
|
325
|
|
326 @example
|
70
|
327 xemacs-request@@cs.uiuc.edu
|
16
|
328 @end example
|
|
329
|
70
|
330 for subscription information and
|
54
|
331
|
|
332 @example
|
70
|
333 xemacs@@cs.uiuc.edu
|
16
|
334 @end example
|
|
335
|
70
|
336 to send messages to the list.
|
|
337
|
|
338 To cancel a subscription, YOU MUST use the xemacs-request address.
|
|
339
|
|
340 Bug reports should be sent to the same locations.
|
|
341
|
|
342
|
|
343 @node 1.8.
|
|
344 @section 1.8. Where is the mailing list archived?
|
|
345
|
|
346 The mailing list is archived in the directory
|
|
347 @ifinfo
|
|
348 @file{ftp.cs.uiuc.edu:/pub/xemacs/mlists/}.
|
|
349 @end ifinfo
|
|
350 @ifhtml
|
|
351 <A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/mlists/">ftp.cs.uiuc.edu:/pub/xemacs/mlists/</A>
|
|
352 @end ifhtml
|
|
353
|
|
354
|
|
355 @node 1.9.
|
|
356 @section 1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?
|
0
|
357
|
|
358 InfoDock is an integrated productivity toolset, mainly aimed at
|
70
|
359 technical people. It is built atop the XEmacs variant of GNU Emacs and
|
|
360 so has all of the power of Emacs, but with an easier to use and more
|
|
361 comprehensive menu-based user interface. The next section describes how
|
|
362 it differs from XEmacs and GNU Emacs from the Free Software Foundation.
|
|
363
|
|
364 The quickest way to get a feel for InfoDock is to browse the InfoDock
|
|
365 Manual, especially the section on tools. This will help you decide
|
|
366 whether or not to download InfoDock for local use. This manual is
|
|
367 available in gzipped Postscript form, alongside the InfoDock
|
|
368 distribution. (See below for FTP retrieval instructions.)
|
0
|
369
|
|
370 InfoDock is aimed at people who want a free, turn-key productivity
|
|
371 environment. Although InfoDock is customizable, it is not intended for
|
|
372 people who like basic versions of Emacs which need to be customized
|
|
373 extensively for local use; standard Emacs distributions are better for
|
|
374 such uses. InfoDock is for those people who want a complete,
|
|
375 pre-customized environment in one package, which they need not touch
|
|
376 more than once or twice a year to update to new revisions.
|
|
377
|
70
|
378 InfoDock is pre-built for SPARCstations running SunOS V4 or V5
|
|
379 (Solaris). It is intended for use on a color display, although most
|
|
380 features will work on monochrome monitors. Simply unpack InfoDock
|
|
381 according to the instructions in the ID-INSTALL file and you are ready
|
|
382 to run.
|
0
|
383
|
|
384 The InfoDock Manual is concise, yet sufficient as a user guide for users
|
|
385 who have never used an Emacs-type editor before. For users who are
|
|
386 already familiar with Emacs, it supplements the information in the GNU
|
|
387 Emacs Manual.
|
|
388
|
|
389 InfoDock menus are much more extensive and more mature than standard
|
|
390 Emacs menus. Each menu offers a @samp{Manual} item which displays
|
|
391 documentation associated with the menu's functions.
|
|
392
|
70
|
393 Three types of menubars are provided:
|
0
|
394 @enumerate
|
|
395 @item
|
|
396 An extensive menubar providing access to global InfoDock commands.
|
|
397 @item
|
|
398 Mode-specific menubars tailored to the current major mode.
|
|
399 @item
|
|
400 A simple menubar for basic editing to help novices get started with InfoDock.
|
|
401 @end enumerate
|
|
402
|
|
403 Most modes also include mode-specific popup menus. Additionally, region and
|
|
404 rectangle popup menus are included.
|
70
|
405 @itemize @bullet
|
|
406 @item
|
0
|
407 @samp{Hyperbole}, the everyday information manager, is a core part of
|
|
408 InfoDock. This provides context-sensitive mouse keys, a rolodex-type
|
|
409 contact manager, programmable hypertext buttons, and an autonumbered
|
|
410 outliner with embedded hyperlink anchors.
|
70
|
411 @item
|
|
412 @samp{PIEmail}, the prototype Personalized Information Environment Mail
|
|
413 Tool, is included.
|
|
414 @item
|
0
|
415 The @samp{OO-Browser}, a multi-language object-oriented code browser, is a
|
|
416 standard part of InfoDock.
|
70
|
417 @end itemize
|
0
|
418
|
|
419 InfoDock saves a more extensive set of user options than other Emacs
|
|
420 versions.
|
|
421
|
|
422 InfoDock inserts a useful file header in many file types, showing the
|
|
423 author, summary, and last modification time of each file. A summary
|
|
424 program can then be used to summarize all of the files in a directory,
|
|
425 for easy MANIFEST file creation.
|
|
426
|
|
427 Your working set of buffers is automatically saved and restored (if you
|
|
428 answer yes to a prompt) between InfoDock sessions.
|
|
429
|
|
430 Refined color choices for code highlighting are provided for both dark and
|
|
431 light background display frames.
|
|
432
|
|
433 The @kbd{C-z} key prefix performs frame-based commands which parallel the
|
|
434 @kbd{C-x} key prefix for window-based commands.
|
|
435
|
|
436 The Smart Menu system is included for producing command menus on dumb
|
70
|
437 terminals. (InfoDock does not yet run on dumb terminals but will in 1995.)
|
0
|
438
|
|
439 Lisp libraries are better categorized according to function.
|
|
440
|
|
441 Extensions and improvements to many areas of Emacs are included, such as:
|
|
442 paragraph filling, mail reading with Rmail, shell handling, outlining, code
|
|
443 highlighting and browsing, and man page browsing.
|
|
444
|
|
445 InfoDock questions, answers and discussion should go to the mail list
|
70
|
446 @samp{infodock@@hub.ucsb.edu}. Use
|
|
447 @samp{infodock-request@@hub.ucsb.edu} to be added or removed from the
|
0
|
448 list. Always include your InfoDock version number when sending help
|
|
449 requests.
|
|
450
|
|
451 InfoDock is available across the Internet via anonymous FTP. To get
|
|
452 it, first move to a directory into which you want the InfoDock archive
|
|
453 files placed. We will call this <DIST-DIR>.
|
|
454
|
|
455 @example
|
|
456 cd <DIST-DIR>
|
|
457 @end example
|
|
458
|
70
|
459 FTP to ftp.cs.uiuc.edu (Internet Host ID = 128.174.252.1):
|
0
|
460
|
|
461 @example
|
70
|
462 prompt> ftp ftp.cs.uiuc.edu
|
0
|
463 @end example
|
|
464
|
|
465 Login as @samp{anonymous} with your own <user-id>@@<site-name> as a password.
|
|
466
|
|
467 @example
|
70
|
468 Name (ftp.cs.uiuc.edu): anonymous
|
0
|
469 331 Guest login ok, send your complete e-mail address as password.
|
|
470 Password: -<your-user-id@@your-domain>
|
|
471 230 Guest login ok, access restrictions apply.
|
|
472 @end example
|
|
473
|
|
474 Move to the location of the InfoDock archives:
|
|
475
|
|
476 @example
|
70
|
477 ftp> cd pub/xemacs/infodock
|
0
|
478 @end example
|
|
479
|
|
480 Set your transfer mode to binary:
|
|
481
|
|
482 @example
|
|
483 ftp> bin
|
|
484 200 Type set to I.
|
|
485 @end example
|
|
486
|
|
487 Turn off prompting:
|
|
488
|
|
489 @example
|
|
490 ftp> prompt
|
|
491 Interactive mode off.
|
|
492 @end example
|
|
493
|
|
494 Retrieve the InfoDock archives that you want, either by using a
|
|
495 @samp{get <file>} for each file you want or by using the following to
|
|
496 get a complete distribution, including all binaries:
|
|
497
|
|
498 @example
|
|
499 ftp> mget ID-INSTALL
|
|
500 ftp> mget id-*
|
|
501 @end example
|
|
502
|
|
503 Close the FTP connection:
|
|
504
|
|
505 @example
|
|
506 ftp> quit
|
|
507 221 Goodbye.
|
|
508 @end example
|
|
509
|
|
510 Read the @file{ID-INSTALL} file which you just retrieved for
|
|
511 step-by-step installation instructions.
|
|
512
|
70
|
513
|
|
514
|
|
515 @node 2. Compiling XEmacs, 3. Problems running XEmacs / weird messages, 1. Introductory Questions, top
|
|
516 @chapter 2. Compiling XEmacs
|
|
517
|
|
518 @menu
|
|
519 * 2.1.:: 2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root. Also in the READMEs it does not say anything about compiling with the audioserver?
|
|
520 @end menu
|
|
521
|
|
522
|
|
523 @node 2.1.
|
|
524 @section 2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root. Also in the READMEs it does not say anything about compiling with the audioserver?
|
|
525
|
|
526 You should only need to add some stuff to the configure command line. To tell
|
|
527 it to compile in netaudio support:
|
|
528
|
|
529 @example
|
|
530 --with-sound=both
|
|
531 @end example
|
|
532
|
|
533 (Or @samp{--with-sound=nas} if you don't want native sound support for
|
|
534 some reason.) To tell it where to find the netaudio includes and
|
|
535 libraries:
|
|
536
|
|
537 @example
|
|
538 --site-libraries=WHATEVER
|
|
539 --site-includes=WHATEVER
|
|
540 @end example
|
|
541
|
|
542 Then (fingers crossed) it should compile and it will use netaudio if you
|
|
543 have a server running corresponding to the X server. The netaudio server
|
|
544 has to be there when XEmacs starts. If the netaudio server goes away and
|
|
545 another is run, XEmacs should cope (fingers crossed, error handling in
|
|
546 netaudio isn't perfect).
|
|
547
|
|
548 BTW, netaudio has been renamed as it has a name clash with something
|
|
549 else, so if you see references to NAS or Network Audio System, it's the
|
|
550 @ifinfo
|
|
551 same thing. It also might be found at
|
|
552
|
|
553 @example
|
|
554 ftp.x.org:/contrib/audio/nas/
|
|
555 ftp.ncd.com:/pub/ncd/technology/src/nas/
|
|
556 @end example
|
|
557 @end ifinfo
|
|
558 @ifhtml
|
|
559 same thing. It also might be found at
|
|
560 <A HREF="ftp://ftp.x.org/contrib/audio/nas/">ftp.x.org:/contrib/audio/nas/</A>
|
|
561 <A HREF="ftp://ftp.ncd.com:/pub/ncd/technology/src/nas/">ftp.ncd.com:/pub/ncd/technology/src/nas/</A>
|
|
562 @end ifhtml
|
|
563
|
|
564 @node 3. Problems running XEmacs / weird messages, 4. Customization -- Emacs Lisp and the .emacs file, 2. Compiling XEmacs, top
|
|
565 @chapter 3. Problems running XEmacs / weird messages
|
|
566
|
|
567 @menu
|
|
568 * 3.1.:: 3.1. Help! XEmacs just crashed on me!
|
|
569 * 3.2.:: 3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.
|
|
570 * 3.3.:: 3.3. I get tons of translation table syntax error messages during startup. How do I get rid of them?
|
|
571 * 3.4.:: 3.4. How can I avoid the startup warnings about deducing proper fonts?
|
|
572 * 3.5.:: 3.5. Help! I can not get XEmacs to display on my Envizex X-terminal!
|
|
573 * 3.6.:: 3.6. Why do I get weird messages about giftoppm and ppmdither not being found?
|
|
574 * 3.7.:: 3.7. How can I avoid those messages about deleting excess backup files?
|
|
575 * 3.8.:: 3.8. Help! XEmacs just locked up my X server on my Linux box!
|
|
576 @end menu
|
|
577
|
|
578
|
|
579 @node 3.1.
|
|
580 @section 3.1. Help! XEmacs just crashed on me!
|
|
581
|
|
582 First of all, don't panic. Whenever XEmacs crashes, it tries extremely
|
|
583 hard to auto-save all of your files before dying. (The main time that
|
|
584 this will not happen is if the machine physically lost power or if you
|
|
585 killed the XEmacs process using @samp{kill -9}.) The next time you
|
|
586 try to edit those files, you will be informed that a more recent
|
|
587 auto-save file exists. You can use @kbd{M-x recover-file} to retrieve
|
|
588 the auto-saved version of the file.
|
|
589
|
|
590 Now, XEmacs is not perfect, and there may occasionally be times, or
|
|
591 particular sequences of actions, that cause it to crash. If you can
|
|
592 come up with a reproducible way of doing this (or even if you have a
|
|
593 pretty good memory of exactly what you were doing at the time), the
|
|
594 maintainers would be very interested in knowing about it. Post a
|
|
595 message to @samp{comp.emacs.xemacs} or send mail to
|
|
596 @samp{xemacs@@cs.uiuc.edu}.
|
|
597
|
|
598 If at all possible, include a stack backtrace of the core dump that was
|
|
599 produced. This shows where exactly things went wrong, and makes it much
|
|
600 easier to diagnose problems. To do this, you need to locate the core
|
|
601 file (it's called @samp{core}, and is usually sitting in the directory
|
|
602 that you started XEmacs from, or your home directory if that other
|
|
603 directory was not writable). Then, go to that directory and execute a
|
|
604 command like
|
|
605
|
|
606 @example
|
|
607 gdb `which xemacs` core
|
|
608 @end example
|
|
609
|
|
610 and then issue the command @samp{where} to get the stack backtrace.
|
|
611 (You might have to use @samp{dbx} or some similar debugger in place
|
|
612 of @samp{gdb}. If you don't have any such debugger available,
|
|
613 complain to your system administrator.)
|
|
614
|
|
615 It's possible that a core file didn't get produced, in which case
|
|
616 you're out of luck. Go complain to your system administrator and
|
|
617 tell him not to disable core files by default. (If you explicitly
|
|
618 disabled core files, then double shame on you!)
|
|
619
|
|
620
|
|
621 @node 3.2.
|
|
622 @section 3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.
|
|
623
|
|
624 If you can't figure out what's going on, try typing @kbd{ESC ESC} and
|
|
625 issuing the command
|
|
626
|
|
627 @example
|
|
628 (setq debug-on-error t)
|
|
629 @end example
|
|
630
|
|
631 and then try and make the error happen again. This will give you a
|
|
632 backtrace that may be enlightening. If not, try reading farther down in
|
|
633 this FAQ; if that fails, you could try posting to
|
|
634 @samp{comp.emacs.xemacs} (making sure to include the backtrace) and
|
|
635 someone may be able to help.
|
|
636
|
|
637
|
|
638 @node 3.3.
|
|
639 @section 3.3. I get tons of translation table syntax error messages during startup. How do I get rid of them?
|
|
640
|
|
641 There are two causes of this problem. The first usually only strikes
|
|
642 people using the prebuilt binaries. The culprit in both cases is the
|
|
643 file @file{XKeysymDB}.
|
|
644 @itemize @bullet
|
|
645 @item
|
|
646 The binary cannot find the XKeysymDB file. The location is hardcoded at
|
|
647 compile time so if the system the binary was built on puts it a
|
|
648 different place than your system does, you have problems. To fix, set
|
|
649 the environment variable @samp{XKEYSYMDB} to the location of the
|
|
650 XKeysymDB file on your system or to the location of the one included
|
|
651 with XEmacs which should be at:
|
|
652
|
|
653 @example
|
|
654 <xemacs_root_directory>/lib/xemacs-19.13/etc/XKeysymDB
|
|
655 @end example
|
|
656
|
|
657 @item
|
|
658 The binary is finding the XKeysymDB but it is out-of-date on your system
|
|
659 and does not contain the necessary lines. Either ask your system
|
|
660 administrator to replace it with the one which comes with XEmacs (which
|
|
661 is the stock R6 version and is backwards compatible) or set your
|
|
662 @samp{XKEYSYMDB} variable to the location of XEmacs's described above.
|
|
663 @end itemize
|
|
664
|
|
665
|
|
666 @node 3.4.
|
|
667 @section 3.4. How can I avoid the startup warnings about deducing proper fonts?
|
|
668
|
|
669 This is highly dependent on your installation, but try with the
|
|
670 following font as your base font for XEmacs and see what it does:
|
|
671
|
|
672 @example
|
|
673 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
|
|
674 @end example
|
|
675
|
|
676 More precisely, do the following in your resource file:
|
|
677
|
|
678 @example
|
|
679 Emacs.default.attributeFont: -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
|
|
680 @end example
|
|
681
|
|
682
|
|
683 @node 3.5.
|
|
684 @section 3.5. Help! I can not get XEmacs to display on my Envizex X-terminal!
|
|
685
|
|
686 Try setting the DISPLAY variable using the numeric IP address of the
|
|
687 host you are running XEmacs from.
|
|
688
|
|
689
|
|
690 @node 3.6.
|
|
691 @section 3.6. Why do I get weird messages about giftoppm and ppmdither not being found?
|
|
692
|
|
693 Because they are not. You are probably trying to read some HTML files,
|
|
694 or using W3-mode as your Web client. To display inline pictures, this
|
|
695 requires the above programs (which can be found in the netpbm package or
|
|
696 its older version, pbmplus). The netpbm package can be found at
|
|
697 @ifinfo
|
|
698 @samp{ftp.x.org}, or any of its mirror sites. It can also be found at
|
|
699 @samp{ftp.cs.uiuc.edu:/pub/xemacs/aux}.
|
|
700 @end ifinfo
|
|
701 @ifhtml
|
|
702 <A HREF="ftp://ftp.x.org/contrib/utilities/">ftp.x.org:/contrib/utilities/</A>
|
|
703 . It can also be found at
|
|
704 <A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/aux/">ftp.cs.uiuc.edu:/pub/xemacs/aux/</A>
|
|
705 @end ifhtml
|
|
706
|
|
707
|
|
708 @node 3.7.
|
|
709 @section 3.7. How can I avoid those messages about deleting excess backup files?
|
|
710
|
|
711
|
|
712 Try the following Emacs-Lisp:
|
0
|
713
|
|
714 @example
|
70
|
715 (setq version-control t)
|
|
716 (setq kept-old-versions 0)
|
|
717 (setq kept-new-versions 8)
|
|
718 (if (string-match "XEmacs\\|Lucid" emacs-version)
|
|
719 (setq trim-versions-without-asking t)
|
|
720 (setq delete-old-versions t))
|
|
721 @end example
|
|
722
|
|
723 @node 3.8.
|
|
724 @section 3.8. Help! XEmacs just locked up my X server on my Linux box!
|
|
725
|
|
726 There have been several reports of the X server locking up under Linux.
|
|
727 In all reported cases removing speedo and scaled fonts from the font
|
|
728 path corrected the problem. This can be done with the command 'xset'.
|
|
729
|
|
730 It is possible that using a font server may also solve the problem.
|
|
731
|
|
732
|
|
733
|
|
734 @node 4. Customization -- Emacs Lisp and the .emacs file, 5. Customization -- X resources, 3. Problems running XEmacs / weird messages, top
|
|
735 @chapter 4. Customization -- Emacs Lisp and the .emacs file
|
|
736
|
|
737 @menu
|
|
738 * 4.1.:: 4.1. How can @file{.emacs} determine which of the family of emacsen I am using?
|
|
739 * 4.2.:: 4.2. How can I detect a color display?
|
|
740 * 4.3.:: 4.3. How can I evaluate emacs-lisp expressions without switching to the *scratch* buffer?
|
|
741 * 4.4.:: 4.4. If you put (setq tab-width 6) in your @file{.emacs} file it does not work! Is there a reason for this. If you do it at the EVAL prompt it works fine!! How strange.
|
|
742 * 4.5.:: 4.5. How can I add directories to the load-path?
|
|
743 * 4.6.:: 4.6. How to check if a lisp function is defined or not?
|
|
744 * 4.7.:: 4.7. Can I force the output of (list-faces) to a buffer other than the minibuffer since it is too wide to fit?
|
|
745 @end menu
|
|
746
|
|
747
|
|
748 @node 4.1.
|
|
749 @section 4.1. How can @file{.emacs} determine which of the family of Emacsen I am using?
|
|
750
|
|
751 To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
|
|
752 XEmacs 19, or Epoch, and use appropriate code, check out the example
|
|
753 given in @file{etc/sample.emacs}. There are other nifty things in there
|
|
754 as well! Alternatively, there is a package, @file{emacs-vers.el},
|
|
755 available at an Emacs-Lisp archive near you; try searching
|
|
756
|
|
757 @example
|
|
758 archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/misc/
|
|
759 @end example
|
|
760
|
|
761
|
|
762 @node 4.2.
|
|
763 @section 4.2. How can I detect a color display?
|
|
764
|
|
765 You can test the return value of the function
|
|
766 @code{(device-class)}, as in:
|
|
767
|
|
768 @example
|
|
769 (if (eq (device-class) 'color)
|
|
770 (progn
|
|
771 (set-face-foreground 'font-lock-comment-face "Grey")
|
|
772 (set-face-foreground 'font-lock-string-face "Red")
|
|
773 ....
|
|
774 ))
|
|
775 @end example
|
|
776
|
|
777
|
|
778 @node 4.3.
|
|
779 @section 4.3. How can I evaluate Emacs-Lisp expressions without switching to the *scratch* buffer?
|
|
780
|
|
781 @example
|
|
782 (put 'eval-expression 'disabled nil)
|
|
783 @end example
|
|
784
|
|
785 This sets it so that hitting @kbd{ESC ESC} lets you type a single
|
|
786 expression to be evaluated. This line can also be put into your
|
|
787 @file{.emacs}.
|
|
788
|
|
789
|
|
790 @node 4.4.
|
|
791 @section 4.4. If you put (setq tab-width 6) in your @file{.emacs} file it does not work! Is there a reason for this. If you do it at the EVAL prompt it works fine!! How strange.
|
|
792
|
|
793 Use setq-default, since tab-width is all-buffer-local.
|
|
794
|
|
795
|
|
796 @node 4.5.
|
|
797 @section 4.5. How can I add directories to the load-path?
|
|
798
|
|
799 Here are two ways to do that, one that puts your directories at the front of
|
|
800 the load-path, the other at the end:
|
|
801
|
|
802 @example
|
|
803 ;;; Add things at the beginning of the load-path
|
|
804 (setq load-path (cons "bar" load-path))
|
|
805 (setq load-path (cons "foo" load-path))
|
|
806
|
|
807 ;;; Add things at the end
|
|
808 (setq load-path (append load-path '("foo" "bar")))
|
|
809 @end example
|
|
810
|
|
811
|
|
812 @node 4.6.
|
|
813 @section 4.6. How to check if a lisp function is defined or not?
|
|
814
|
|
815 Use the following elisp:
|
|
816
|
|
817 @example
|
|
818 (fboundp 'foo)
|
0
|
819 @end example
|
70
|
820
|
|
821 It's always a mistake, under all circumstances, to test `emacs-version' or
|
|
822 any similar variables, in case they are not bound, unless you do the above.
|
|
823
|
|
824 Instead, use feature-tests, such as featurep or boundp or fboundp, or
|
|
825 even simple behavioural tests, eg
|
|
826 (defvar foo-old-losing-code? (condition-case nil (progn (losing-code t) nil)
|
|
827 (wrong-number-of-arguments t)))
|
|
828
|
|
829 There is an incredible amount of broken code out there which could
|
|
830 work much better more often in more places if it did the above instead
|
|
831 of trying to divine its environment from the value of one variable.
|
|
832
|
|
833
|
|
834 @node 4.7.
|
|
835 @section 4.7. Can I force the output of (face-list) to a buffer other than the minibuffer since it is too wide to fit?
|
|
836
|
|
837 Evaluate the expression in the "*scratch*" buffer with point on the rightmost
|
|
838 paren and typing @kbd{C-j}.
|
|
839
|
|
840
|
|
841
|
|
842 @node 5. Customization -- X resources, 6. Changing textual fonts and colors, 4. Customization -- Emacs Lisp and the .emacs file, top
|
|
843 @chapter 5. Customization -- X resources
|
|
844
|
|
845 @menu
|
|
846 * 5.1.:: 5.1. Where is a list of X resources?
|
|
847 @end menu
|
|
848
|
|
849
|
|
850 @node 5.1.
|
|
851 @section 5.1. Where is a list of X resources?
|
|
852
|
|
853 Search through the NEWS file for ``X Resources''. A fairly comprehensive list
|
|
854 is given after it.
|
|
855
|
|
856 In addition, an app-defaults file is supplied, @file{etc/Emacs.ad},
|
|
857 listing the defaults. The file @file{etc/sample.Xdefaults} gives a set
|
|
858 of defaults that you might consider. It is essentially the same as
|
|
859 @file{etc/Emacs.ad} but some entries are slightly altered. Be careful
|
|
860 about installing the contents of this file into your @file{.Xdefaults}
|
|
861 (.Xresources) file if you use FSF GNU Emacs under X11 as well.
|
|
862
|
|
863
|
|
864
|
|
865 @node 6. Changing textual fonts and colors, 7. The modeline, 5. Customization -- X resources, top
|
|
866 @chapter 6. Changing textual fonts and colors
|
|
867
|
|
868 @menu
|
|
869 * 6.1.:: 6.1. How do I set the text, menu and modeline fonts?
|
|
870 * 6.2.:: 6.2. How can I set the background/foreground colors when highlighting a region?
|
|
871 * 6.3.:: 6.3. How can I set the most commonly used color options from my @file{.emacs} instead of from my @file{.Xdefaults}?
|
|
872 @end menu
|
|
873
|
|
874
|
|
875 @node 6.1.
|
|
876 @section 6.1. How do I set the text, menu and modeline fonts?
|
|
877
|
|
878 Note that you should use @samp{Emacs.} and not @samp{Emacs*} when
|
|
879 setting face values.
|
|
880
|
|
881 In @file{.Xdefaults}:
|
|
882
|
|
883 @example
|
|
884 Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
|
|
885 Emacs*menubar*font: fixed
|
|
886 Emacs.modeline.attributeFont: fixed
|
|
887 @end example
|
|
888
|
|
889 This is confusing because modeline is a face, and can be found listed
|
|
890 with all faces in the current mode by using M-x set-face-font (enter) ?.
|
|
891 It uses the face specification of "attributeFont", while menubar is a
|
|
892 normal X thing that uses the specification "font". With Motif it may be
|
|
893 necessary to use "fontList" instead of "font". (Please rewrite this if
|
|
894 you understand this better than me ... A general description of faces
|
|
895 would be very useful. I am just saying that menubar is a FAQ because
|
|
896 it's not a face and not listed.)
|
|
897
|
|
898
|
|
899 @node 6.2.
|
|
900 @section 6.2. How can I set the background/foreground colors when highlighting a region?
|
|
901
|
|
902 You can change the face `zmacs-region' either in your @file{.Xdefaults}:
|
|
903
|
|
904 @example
|
|
905 Emacs.zmacs-region.attributeForeground: firebrick
|
|
906 Emacs.zmacs-region.attributeBackground: lightseagreen
|
|
907 @end example
|
|
908
|
|
909 or in your @file{.emacs}:
|
|
910
|
|
911 @example
|
|
912 (set-face-background 'zmacs-region "red")
|
|
913 (set-face-foreground 'zmacs-region "yellow")
|
|
914 @end example
|
|
915
|
|
916
|
|
917 @node 6.3.
|
|
918 @section 6.3. How can I set the most commonly used color options from my @file{.emacs} instead of from my @file{.Xdefaults}?
|
|
919
|
|
920 @example
|
|
921 (set-face-background 'default "bisque") ; frame background
|
|
922 (set-face-foreground 'default "black") ; normal text
|
|
923 (set-face-background 'zmacs-region "red") ; When selecting w/
|
|
924 ; mouse
|
|
925 (set-face-foreground 'zmacs-region "yellow")
|
|
926 (set-face-font 'default "*courier-bold-r*120-100-100*")
|
|
927 (set-face-background 'highlight "blue") ; Ie when selecting buffers
|
|
928 (set-face-foreground 'highlight "yellow")
|
|
929 (set-face-background 'modeline "blue") ; Line at bottom of buffer
|
|
930 (set-face-foreground 'modeline "white")
|
|
931 (set-face-font 'modeline "*bold-r-normal*140-100-100*")
|
|
932 (set-face-background 'isearch "yellow") ; When highlighting while
|
|
933 ; searching
|
|
934 (set-face-foreground 'isearch "red")
|
|
935 (setq x-pointer-foreground-color "black") ; Adds to bg color,
|
|
936 ; so keep black
|
|
937 (setq x-pointer-background-color "blue") ; This is color you really
|
|
938 @end example
|
|
939 ; want ptr/crsr
|
|
940
|
|
941
|
|
942 @node 7. The modeline, 8. The keyboard, 6. Changing textual fonts and colors, top
|
|
943 @chapter 7. The modeline
|
|
944
|
|
945 @menu
|
|
946 * 7.1.:: 7.1. How can I make the modeline go away?
|
|
947 * 7.2.:: 7.2. How do you have XEmacs display the line number in the modeline?
|
|
948 * 7.3.:: 7.3. How do I get XEmacs to put the time of day on the modeline?
|
|
949 * 7.4.:: 7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?
|
|
950 @end menu
|
|
951
|
|
952
|
|
953 @node 7.1.
|
|
954 @section 7.1. How can I make the modeline go away?
|
|
955
|
|
956 (set-specifier has-modeline-p nil)
|
|
957
|
|
958
|
|
959 @node 7.2.
|
|
960 @section 7.2. How do you have XEmacs display the line number in the modeline?
|
|
961
|
|
962 Add the following line to your @file{.emacs} file:
|
|
963
|
|
964 @example
|
|
965 (setq line-number-mode t)
|
|
966 @end example
|
|
967
|
|
968
|
|
969 @node 7.3.
|
|
970 @section 7.3. How do I get XEmacs to put the time of day on the modeline?
|
|
971
|
|
972 @example
|
|
973 (display-time)
|
|
974 @end example
|
|
975
|
|
976
|
|
977 @node 7.4.
|
|
978 @section 7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?
|
|
979
|
|
980 You can use something like the following:
|
|
981
|
|
982 @example
|
|
983 (add-hook 'lisp-mode-hook
|
|
984 '(lambda () (set-face-background 'modeline "red" (current-buffer))
|
|
985 (set-face-foreground 'modeline "yellow" (current-buffer))))
|
|
986 @end example
|
|
987
|
|
988 Then, when editing a Lisp file (ie went into Lisp mode), the modeline
|
|
989 colors change from the default set in your @file{.emacs}. The change
|
|
990 will only be made in the buffer you just entered (which contains the
|
|
991 Lisp file you are editing) and will not affect the modeline colors
|
|
992 anywhere else.
|
|
993
|
|
994 Notes:
|
0
|
995
|
|
996 @itemize @bullet
|
|
997 @item
|
70
|
998 The hook is the mode name plus "-hook". Ie c-mode-hook, c++-mode-hook,
|
|
999 emacs-lisp-mode-hook (ie your @file{.emacs} or a xx.el file),
|
|
1000 lisp-interaction-mode-hook (the *scratch* buffer), text-mode-hook, etc.
|
0
|
1001 @item
|
70
|
1002 Be sure to use add-hook, not (setq c-mode-hook xxxx), otherwise you will
|
|
1003 erase anything that anybody has already put on the hook.
|
54
|
1004 @item
|
70
|
1005 You can also do (set-face-font 'modeline @code{font}), eg (set-face-font
|
|
1006 'modeline "*bold-r-normal*140-100-100*" (current-buffer)) if you wish
|
|
1007 the modeline font to vary based on the current mode.
|
|
1008 @end itemize
|
|
1009
|
|
1010
|
|
1011 @node 8. The keyboard, 9. The cursor, 7. The modeline, top
|
|
1012 @chapter 8. The keyboard
|
|
1013
|
|
1014 @menu
|
|
1015 * 8.1.:: 8.1. What is the difference in key sequences between XEmacs and GNU Emacs?
|
|
1016 * 8.2.:: 8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?
|
|
1017 * 8.3.:: 8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?
|
|
1018 * 8.4.:: 8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
|
|
1019 * 8.5.:: 8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...
|
|
1020 * 8.6.:: 8.6. I cannot manage to globally bind my @key{Delete} key to something other than the default. How does one do this?
|
|
1021 * 8.7.:: 8.7. How can I bind complex functions (or macros) to keys?
|
|
1022 * 8.8.:: 8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump? I tend it to find it disorienting.
|
|
1023 * 8.9.:: 8.9. How to map "Help" key alone on Sun type4 keyboard?
|
|
1024 * 8.10.:: 8.10. How can you type in special characters in XEmacs?
|
|
1025 @end menu
|
|
1026
|
|
1027
|
|
1028 @node 8.1.
|
|
1029 @section 8.1. What is the difference in in key sequences between XEmacs and GNU Emacs?
|
|
1030
|
|
1031 The real question might be rephrased as "When should one use the quoted list,
|
|
1032 vector, or escaped string representations of key sequences?" Is there any
|
|
1033 particular advantage to one representation over another?
|
|
1034
|
|
1035 From Richard Mlynarik <mly@@adoc.xerox.com>:
|
|
1036
|
|
1037 @table @asis
|
|
1038 @item (meta a)
|
|
1039 is a convenience shorthand for the sequence @code{[(meta a)]}.
|
|
1040 @code{(global-set-key 'a 'foo)} means the same thing as
|
|
1041 @code{(global-set-key '[a] 'foo)}. It could be argued that allowing
|
|
1042 such a shorthand just leads to sloppiness and bugs, but it's there, and
|
|
1043 it isn't likely to go away.
|
|
1044
|
|
1045 @item [(meta a)]
|
|
1046 is The Right Thing. It corresponds in a one-to-one way with the
|
|
1047 internal representation of key-sequences in keymaps.
|
|
1048
|
|
1049 @item [Meta-a]
|
|
1050 is typical FSF Emacs 19 brain damage. As is usual, an existing,
|
|
1051 functional design is ignored (XEmacs) and an incompatible and
|
|
1052 technically worse kludge is used.
|
|
1053
|
|
1054 @item "\ea"
|
|
1055 is compatible with Emacs 18, but suffers from ASCII Seven-Bit Brain
|
|
1056 Damage. I also find it harder to read. Use this if you're trying to
|
|
1057 write code which works in every Emacs, but be aware that you can not
|
|
1058 express all Possible key-sequences (@kbd{control-9}, @kbd{f1}, etc.)
|
|
1059 using this.
|
|
1060
|
|
1061 @end table
|
|
1062
|
|
1063
|
|
1064 @node 8.2.
|
|
1065 @section 8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?
|
|
1066
|
|
1067 Put the following line into a file and load it with xmodmap(1) before
|
|
1068 starting XEmacs:
|
|
1069
|
|
1070 @example
|
|
1071 remove Mod1 = Mode_switch
|
|
1072 @end example
|
|
1073
|
|
1074
|
|
1075 @node 8.3.
|
|
1076 @section 8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?
|
|
1077
|
|
1078 Add the following line to your @file{.emacs} file:
|
|
1079
|
|
1080 @example
|
|
1081 (setq next-line-add-newlines nil)
|
|
1082 @end example
|
|
1083
|
|
1084
|
|
1085 @node 8.4.
|
|
1086 @section 8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
|
|
1087
|
|
1088 This seems to work:
|
|
1089 @example
|
|
1090 (defun cg--generate-char-event (ch)
|
|
1091 "Generate an event, as if ch has been typed"
|
|
1092 (dispatch-event (character-to-event ch)))
|
|
1093
|
|
1094 ;; Backspace and Delete stuff
|
|
1095 (global-set-key '(backspace)
|
|
1096 '(lambda () (interactive) (cg--generate-char-event 127)))
|
|
1097 (global-set-key '(unknown_keysym_0x4)
|
|
1098 '(lambda () (interactive) (cg--generate-char-event 4)))
|
|
1099 @end example
|
|
1100
|
|
1101
|
|
1102 @node 8.5.
|
|
1103 @section 8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...
|
|
1104
|
|
1105 Add the following (Thanks to Richard Mlynarik <mly@@adoc.xerox.com> and
|
|
1106 Wayne Newberry <wayne@@zen.cac.stratus.com>) to @file{.emacs}:
|
|
1107
|
|
1108 @example
|
|
1109 (defun scroll-up-one-line ()
|
|
1110 (interactive)
|
|
1111 (scroll-up 1))
|
|
1112
|
|
1113 (defun scroll-down-one-line ()
|
|
1114 (interactive)
|
|
1115 (scroll-down 1))
|
|
1116
|
|
1117 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
|
|
1118 (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
|
|
1119 @end example
|
|
1120
|
|
1121 The key point is that you can only bind simple functions to keys; you can not
|
|
1122 bind a key to a function that you're also passing arguments to. (See <A
|
|
1123 HREF="#ss8.7">8.7 How can I bind complex functions</A> for a better answer.)
|
|
1124
|
|
1125 @c Fix the above HTML specifier reference
|
|
1126
|
|
1127 @node 8.6.
|
|
1128 @section 8.6. I cannot manage to globally bind my @key{Delete} key to something other than the default. How does one do this?
|
|
1129
|
|
1130 @example
|
|
1131 (defun Foo ()
|
|
1132 (interactive)
|
|
1133 (message "You hit DELETE"))
|
|
1134
|
|
1135 (global-set-key "\C-?" 'Foo)
|
|
1136 @end example
|
|
1137
|
|
1138 However, some modes explicitly bind @key{Delete}, so you would need to
|
|
1139 add a hook that does @code{local-set-key} for them.
|
|
1140
|
|
1141
|
|
1142 @node 8.7.
|
|
1143 @section 8.7. How can I bind complex functions (or macros) to keys?
|
|
1144
|
|
1145 As an example, say you want the PASTE key on a Sun keyboard to insert the
|
|
1146 current Primary X selection at point. You can accomplish this with:
|
|
1147
|
|
1148 @example
|
|
1149 (define-key global-map 'f18 'x-insert-selection)
|
|
1150 @end example
|
|
1151
|
|
1152 However, this only works if there is a current X selection (the
|
|
1153 selection will be highlighted). The functionality I like is for the
|
|
1154 PASTE key to insert the current X selection if there is one, otherwise
|
|
1155 insert the contents of the clipboard. To do this you need to pass
|
|
1156 arguments to x-insert-selection. This is done by wrapping the call in a
|
|
1157 'lambda form:
|
|
1158
|
|
1159 @example
|
|
1160 (define-key global-map 'f18
|
|
1161 (function (lambda () (interactive) (x-insert-selection t nil))))
|
|
1162 @end example
|
|
1163
|
|
1164 This binds the 'f18 key to a "generic" functional object. The interactive
|
|
1165 spec is required because only interactive functions can be bound to keys.
|
|
1166 Also take a look at the doc for "function".
|
|
1167
|
|
1168 For the FAQ example you could use:
|
|
1169
|
|
1170 @example
|
|
1171 (global-set-key [(control ?.)]
|
|
1172 (function (lambda () (interactive) (scroll-up 1))))
|
|
1173 (global-set-key [(control ?;)]
|
|
1174 (function (lambda () (interactive) (scroll-up -1))))
|
|
1175 @end example
|
|
1176
|
|
1177 This is fine if you only need a few functions within the lambda body. If
|
|
1178 you're doing more it's cleaner to define a separate function as in the
|
|
1179 original FAQ example (<A HREF="#ss11.3">question 11.3</A>).
|
|
1180
|
|
1181 @c Fix the above HTML specifier reference
|
|
1182
|
|
1183 @node 8.8.
|
|
1184 @section 8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump? I tend it to find it disorienting.
|
|
1185
|
|
1186 Try this:
|
|
1187
|
|
1188 @example
|
|
1189 (defun scroll-one-line-up (&optional arg)
|
|
1190 "Scroll the selected window up (forward in the text) one line (or N lines)."
|
|
1191 (interactive "p")
|
|
1192 (scroll-up (or arg 1)))
|
|
1193
|
|
1194 (defun scroll-one-line-down (&optional arg)
|
|
1195 "Scroll the selected window down (backward in the text) one line (or N)."
|
|
1196 (interactive "p")
|
|
1197 (scroll-down (or arg 1)))
|
|
1198
|
|
1199 (global-set-key 'up 'scroll-one-line-up)
|
|
1200 (global-set-key 'down 'scroll-one-line-down)
|
|
1201 @end example
|
|
1202
|
|
1203 The following will also work but will affect more than just the cursor
|
|
1204 keys (i.e. C-n and C-p):
|
|
1205
|
|
1206 @example
|
|
1207 (setq scroll-step 1)
|
|
1208 @end example
|
|
1209
|
|
1210 @node 8.9.
|
|
1211 @section 8.9. How to map "Help" key alone on Sun type4 keyboard?
|
|
1212
|
|
1213 The following works in GNU Emacs 19:
|
|
1214
|
|
1215 @example
|
|
1216 (global-set-key [help] 'help-command) ;; Help
|
|
1217 @end example
|
|
1218
|
|
1219 The following works in XEmacs 19.13 with the addition of shift:
|
|
1220
|
|
1221 @example
|
|
1222 (global-set-key [(shift help)] 'help-command) ;; Help
|
|
1223 @end example
|
|
1224
|
|
1225 But it doesn't work alone. This is in the file @file{PROBLEMS} which
|
|
1226 should have come with your XEmacs installation:
|
|
1227
|
|
1228 @emph{Emacs ignores the @key{help} key when running OLWM}.
|
|
1229
|
|
1230 OLWM grabs the @key{help} key, and retransmits it to the appropriate
|
|
1231 client using XSendEvent. Allowing Emacs to react to synthetic events is
|
|
1232 a security hole, so this is turned off by default. You can enable it by
|
|
1233 setting the variable x-allow-sendevents to t. You can also cause fix
|
|
1234 this by telling OLWM to not grab the help key, with the null binding
|
|
1235 @samp{OpenWindows.KeyboardCommand.Help:}.
|
|
1236
|
|
1237
|
|
1238 @node 8.10.
|
|
1239 @section 8.10. How can you type in special characters in XEmacs?
|
|
1240
|
|
1241 One way is to use the package @file{x-compose}. Then you can use sequences
|
|
1242 like @kbd{Compose " a} to get d (a-umlaut), etc.
|
|
1243
|
|
1244
|
|
1245
|
|
1246 @node 9. The cursor, 10. The mouse; cutting and pasting, 8. The keyboard, top
|
|
1247 @chapter 9. The cursor
|
|
1248
|
|
1249 @menu
|
|
1250 * 9.1.:: 9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?
|
|
1251 * 9.2.:: 9.2. On the same subject -- is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?
|
|
1252 @end menu
|
|
1253
|
|
1254
|
|
1255 @node 9.1.
|
|
1256 @section 9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?
|
|
1257
|
|
1258 For a 1 pixel bar cursor, use:
|
|
1259
|
|
1260 @example
|
|
1261 (setq bar-cursor t)
|
|
1262 @end example
|
|
1263
|
|
1264 For a 2 pixel bar cursor, use:
|
|
1265
|
|
1266 @example
|
|
1267 (setq bar-cursor 'anything-else)
|
|
1268 @end example
|
|
1269
|
|
1270 You can use a color to make it stand out better:
|
|
1271
|
|
1272 @example
|
|
1273 Emacs*cursorColor: Red
|
|
1274 @end example
|
|
1275
|
|
1276
|
|
1277 @node 9.2.
|
|
1278 @section 9.2. On the same subject -- is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?
|
|
1279
|
|
1280 @example
|
|
1281 (setq bar-cursor nil)
|
|
1282 @end example
|
|
1283
|
|
1284
|
|
1285
|
|
1286 @node 10. The mouse; cutting and pasting, 11. Highlighting, 9. The cursor, top
|
|
1287 @chapter 10. The mouse; cutting and pasting
|
0
|
1288
|
|
1289 @menu
|
70
|
1290 * 10.1.:: 10.1. I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?
|
|
1291 * 10.2.:: 10.2. How do I set control/meta/etc modifiers on mouse buttons?
|
|
1292 * 10.3.:: 10.3. I do "^x ^b" to get a list of buffers and the entries get highlighted when I move the mouse over them but clicking the left mouse does not do anything.
|
|
1293 * 10.4.:: 10.4. How can I get a list of buffers to popup when I hit button 3 on the mouse?
|
|
1294 * 10.5.:: 10.5. Why does cut-and-paste not work between XEmacs and a cmdtool?
|
|
1295 * 10.6.:: 10.6. How I can set XEmacs up so that it pastes where the cursor is _not_ where the pointer lies?
|
|
1296 * 10.7.:: 10.7. How do I select a rectangular region?
|
|
1297 * 10.8.:: 10.8. Why does M-w take so long?
|
|
1298 @end menu
|
|
1299
|
|
1300
|
|
1301 @node 10.1.
|
|
1302 @section 10.1. I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?
|
|
1303
|
|
1304 Here is an alternative binding, whereby the middle mouse button selects (but
|
|
1305 does not cut) the expression under the mouse. Clicking middle on a left or
|
|
1306 right paren will select to the matching one. Note that you can use
|
|
1307 @code{define-key} or @code{global-set-key}.
|
|
1308
|
|
1309 @example
|
|
1310 (defun Mouse-Set-Point-and-Select (event)
|
|
1311 "Sets the point at the mouse location, then marks following form"
|
|
1312 (interactive "@@e")
|
|
1313 (mouse-set-point event)
|
|
1314 (mark-sexp 1)
|
|
1315 )
|
|
1316 (define-key global-map 'button2 'Mouse-Set-Point-and-Select)
|
|
1317 @end example
|
|
1318
|
|
1319 @c Get this fixed
|
|
1320 (Editor's Note -- there is a problem with texinfo/text/html conversion, so
|
|
1321 the double at-sign should only be a single, above. I'll fix it one of these
|
|
1322 days -- AJR)
|
|
1323
|
|
1324
|
|
1325 @node 10.2.
|
|
1326 @section 10.2. How do I set control/meta/etc modifiers on mouse buttons?
|
|
1327
|
|
1328 Use, for instance, @code{[(meta button1)]}. For example, here is a
|
|
1329 common setting for Common Lisp programmers who use the bundled ilisp
|
|
1330 package, whereby meta-button1 on a function name will find the file
|
|
1331 where the function name was defined, and put you at that location in
|
|
1332 the source file.
|
|
1333
|
|
1334 [Inside a function that gets called by the lisp-mode-hook and ilisp-mode-hook]
|
|
1335 @example
|
|
1336 (local-set-key [(meta button1)] 'edit-definitions-lisp)
|
|
1337 @end example
|
|
1338
|
|
1339
|
|
1340 @node 10.3.
|
|
1341 @section 10.3. I do "^x ^b" to get a list of buffers and the entries get highlighted when I move the mouse over them but clicking the left mouse does not do anything.
|
|
1342
|
|
1343 Use the middle mouse button.
|
|
1344
|
|
1345
|
|
1346 @node 10.4.
|
|
1347 @section 10.4. How can I get a list of buffers to popup when I hit button 3 on the mouse?
|
|
1348
|
|
1349 The following code will actually replace the default popup on button3:
|
|
1350
|
|
1351 @example
|
|
1352 (defun cw-build-buffers ()
|
|
1353 "Popup buffer menu."
|
|
1354 (interactive "@@")
|
|
1355 (run-hooks 'activate-menubar-hook)
|
|
1356 (popup-menu (car (find-menu-item current-menubar '("Buffers")))))
|
|
1357
|
|
1358 (define-key global-map [(button3)] 'cw-build-buffers)
|
|
1359 @end example
|
|
1360
|
|
1361 @c Get this fixed
|
|
1362
|
|
1363 (Editor's Note -- there is a problem with texinfo/text/html conversion, so
|
|
1364 the double at-sign should only be a single, above. I'll fix it one of these
|
|
1365 days -- AJR)
|
|
1366
|
|
1367
|
|
1368 @node 10.5.
|
|
1369 @section 10.5. Why does cut-and-paste not work between XEmacs and a cmdtool?
|
|
1370
|
|
1371 We don't know. It's a bug. There does seem to be a work-around,
|
|
1372 however. Try running xclipboard first. It appears to fix the problem
|
|
1373 even if you exit it. (This should be mostly fixed in 19.13, but we
|
|
1374 haven't yet verified that).
|
|
1375
|
|
1376
|
|
1377 @node 10.6.
|
|
1378 @section 10.6. How I can set XEmacs up so that it pastes where the cursor is _not_ where the pointer lies?
|
|
1379
|
|
1380
|
|
1381 Try adding the following to your @file{.emacs}:
|
|
1382
|
|
1383 @example
|
|
1384 (define-key global-map 'button2 'x-insert-selection)
|
|
1385 @end example
|
|
1386
|
|
1387 This comes from the @file{sample.emacs} file in @file{etc/}, which has
|
|
1388 lots of goodies.
|
|
1389
|
|
1390
|
|
1391 @node 10.7.
|
|
1392 @section 10.7. How do I select a rectangular region?
|
|
1393
|
|
1394
|
|
1395 Just select the region normally, then use the rectangle commands (e.g.
|
|
1396 @code{kill-rectangle}) on it. The region does not highlight as a
|
|
1397 rectangle, but the commands work just fine.
|
|
1398
|
|
1399 To actually sweep out rectangular regions with the mouse do the
|
|
1400 following:
|
|
1401
|
|
1402 @example
|
|
1403 (setq mouse-track-rectangle-p t)
|
|
1404 @end example
|
|
1405
|
|
1406
|
|
1407 @node 10.8.
|
|
1408 @section 10.8. Why does M-w take so long?
|
|
1409
|
|
1410 It actually doesn't. It leaves the region visible for a second so that
|
|
1411 you can see what area is being yanked. If you start working, though, it
|
|
1412 will immediately complete its operation. In other words, it will only
|
|
1413 delay for a second if you let it.
|
|
1414
|
|
1415
|
|
1416 @node 11. Highlighting, 12. The menubar and toolbar, 10. The mouse; cutting and pasting, top
|
|
1417 @chapter 11. Highlighting
|
|
1418
|
|
1419 @menu
|
|
1420 * 11.1.:: 11.1. How can I highlight selections?
|
|
1421 * 11.2.:: 11.2. How do I get a pending-delete type of behavior?
|
|
1422 * 11.3.:: 11.3. I do not like my text highlighted while I am doing isearch as I am not able to see whats underneath. How do I turn it off?
|
|
1423 * 11.4.:: 11.4. The text gets highlighted when I do C-x C-p (mark-page). Is there a way to turn this feature off?
|
|
1424 @end menu
|
|
1425
|
|
1426
|
|
1427 @node 11.1.
|
|
1428 @section 11.1. How can I highlight selections?
|
|
1429
|
|
1430 Use zmacs mode. This mode allows for what some might call gratuitous
|
|
1431 highlighting for selected regions (either by setting mark or by using the
|
|
1432 mouse). To use, add the following line to your @file{.emacs} file:
|
|
1433
|
|
1434 @example
|
|
1435 (setq zmacs-regions t)
|
|
1436 @end example
|
|
1437
|
|
1438 This is the default behavior.
|
|
1439
|
|
1440
|
|
1441 @node 11.2.
|
|
1442 @section 11.2. How do I get a pending-delete type of behavior?
|
|
1443
|
|
1444 @dfn{Pending delete} is what happens when you select a region (with the
|
|
1445 mouse or keyboard) and you press a key to replace the selected region by
|
|
1446 the key you typed. Usually backspace kills the selected region.
|
|
1447
|
|
1448 To get this behavior, add the following line to your @file{.emacs} file:
|
|
1449
|
|
1450 @example
|
|
1451 (require 'pending-del)
|
|
1452 @end example
|
|
1453
|
|
1454
|
|
1455 @node 11.3.
|
|
1456 @section 11.3. I do not like my text highlighted while I am doing isearch as I am not able to see whats underneath. How do I turn it off?
|
|
1457
|
|
1458 @example
|
|
1459 (setq isearch-highlight nil)
|
|
1460 @end example
|
|
1461
|
|
1462 Note also that isearch-highlight affects query-replace and ispell. Instead
|
|
1463 of disabling isearch-highlight you may find that a better solution consists
|
|
1464 of customizing the 'isearch' face.
|
|
1465
|
|
1466
|
|
1467 @node 11.4.
|
|
1468 @section 11.4. The text gets highlighted when I do C-x C-p (mark-page). Is there a way to turn this feature off?
|
|
1469
|
|
1470 @example
|
|
1471 (setq zmacs-regions nil)
|
|
1472 @end example
|
|
1473
|
|
1474
|
|
1475
|
|
1476 @node 12. The menubar and toolbar, 13. Scrollbars, 11. Highlighting, top
|
|
1477 @chapter 12. The menubar and toolbar
|
|
1478
|
|
1479 @menu
|
|
1480 * 12.1.:: 12.1. How do I get rid of the menu (or menubar) ?
|
|
1481 * 12.2.:: 12.2. Can I customize the basic menubar?
|
|
1482 * 12.3.:: 12.3. What controls how many buffers are listed in the menu "Buffers" list?
|
|
1483 * 12.4.:: 12.4. I am trying to use a resource like @code{Emacs*menubar*font} to set the font of the menubar but it's not working.
|
|
1484
|
0
|
1485 @end menu
|
|
1486
|
70
|
1487
|
|
1488 @node 12.1.
|
|
1489 @section 12.1. How do I get rid of the menu (or menubar) ?
|
|
1490
|
|
1491 Answer: To get rid of the menubar, add to @file{.emacs}:
|
|
1492
|
|
1493 @example
|
|
1494 (set-menubar nil)
|
|
1495 @end example
|
|
1496
|
|
1497
|
|
1498 @node 12.2.
|
|
1499 @section 12.2. Can I customize the basic menubar?
|
|
1500
|
|
1501 For an extensive menubar, add the line
|
|
1502
|
|
1503 @example
|
|
1504 (load "big-menubar")
|
|
1505 @end example
|
|
1506
|
|
1507 to your @file{.emacs} file. If you'd like to write your own, this file
|
|
1508 provides a good set of examples to start from:
|
|
1509
|
|
1510 @example
|
|
1511 lisp/packages/big-menubar.el
|
|
1512 @end example
|
|
1513
|
|
1514 (starting from your system XEmacs installation directory).
|
|
1515
|
|
1516
|
|
1517 @node 12.3.
|
|
1518 @section 12.3. What controls how many buffers are listed in the menu "Buffers" list?
|
|
1519
|
|
1520 Add the following to your @file{.emacs}, modified as needed:
|
|
1521
|
|
1522 @example
|
|
1523 (setq buffers-menu-max-size 20)
|
|
1524 @end example
|
|
1525
|
|
1526 If you do not want a limit, try
|
|
1527
|
|
1528 @example
|
|
1529 (setq buffers-menu-max-size nil)
|
|
1530 @end example
|
|
1531
|
|
1532
|
|
1533 @node 12.4.
|
|
1534 @section 12.4. I am trying to use a resource like @code{Emacs*menubar*font} to set the font of the menubar but it's not working.
|
|
1535
|
|
1536 If you are using the real Motif menubar, this resource is not recognized;
|
|
1537 you have to say
|
|
1538
|
|
1539 @example
|
|
1540 Emacs*menubar*fontList: FONT
|
|
1541 @end example
|
|
1542
|
|
1543 If you are using the Lucid menubar, the former resource will be recognized
|
|
1544 only if the latter resource is unset. This means that the resource
|
|
1545
|
|
1546 @example
|
|
1547 *fontList: FONT
|
|
1548 @end example
|
|
1549
|
|
1550 will override
|
|
1551
|
|
1552 @example
|
|
1553 Emacs*menubar*font: FONT
|
|
1554 @end example
|
|
1555
|
|
1556 even though the latter is more specific.
|
|
1557
|
|
1558
|
|
1559 @node 13. Scrollbars, 14. Frame Geometry, 12. The menubar and toolbar, top
|
|
1560 @chapter 13. Scrollbars
|
|
1561
|
|
1562 @menu
|
|
1563 * 13.1.:: 13.1. How can I disable the scrollbar?
|
|
1564 * 13.2.:: 13.2. How can one use resources to change scrollbar colors?
|
|
1565 * 13.3.:: 13.3. When I move the scrollbar in an XEmacs window, it moves the point as well, which should not be the default behavior. Is this a bug or a feature? Can I disable it?
|
|
1566 @end menu
|
|
1567
|
|
1568
|
|
1569 @node 13.1.
|
|
1570 @section 13.1. How can I disable the scrollbar?
|
|
1571
|
|
1572 To turn disable them for all frames, add the following line to
|
|
1573 your @file{.Xdefaults}:
|
|
1574
|
|
1575 @example
|
|
1576 Emacs.scrollBarWidth: 0
|
|
1577 @end example
|
|
1578
|
|
1579 To turn the scrollbar off on a per-frame basis, use the following function:
|
|
1580
|
|
1581 @example
|
|
1582 (set-specifier scrollbar-width (cons (selected-frame) 0))
|
|
1583 @end example
|
|
1584
|
|
1585 You can actually turn the scrollbars on at any level you want by
|
|
1586 substituting for (selected-frame) in the above command. For example, to
|
|
1587 turn the scrollbars off only in a single buffer:
|
|
1588
|
|
1589 @example
|
|
1590 (set-specifier scrollbar-width (cons (current-buffer) 0))
|
|
1591 @end example
|
|
1592
|
|
1593
|
|
1594 @node 13.2.
|
|
1595 @section 13.2. How can one use resources to change scrollbar colors?
|
|
1596
|
|
1597 Here's a recap of how to use resources to change your scrollbar colors:
|
|
1598
|
|
1599 @example
|
|
1600 ! Motif scrollbars
|
|
1601
|
|
1602 Emacs*XmScrollBar.Background: skyblue
|
|
1603 Emacs*XmScrollBar.troughColor: lightgray
|
|
1604
|
|
1605 ! Athena scrollbars
|
|
1606
|
|
1607 Emacs*Scrollbar.Foreground: skyblue
|
|
1608 Emacs*Scrollbar.Background: lightgray
|
|
1609 @end example
|
|
1610
|
|
1611 Note the capitalization of @samp{Scrollbar} for the Athena widget.
|
|
1612
|
|
1613
|
|
1614 @node 13.3.
|
|
1615 @section 13.3. When I move the scrollbar in an XEmacs window, it moves the point as well, which should not be the default behavior. Is this a bug or a feature? Can I disable it?
|
|
1616
|
|
1617 The current behavior is a feature, not a bug. Point remains at the same
|
|
1618 buffer position as long as that position does not scroll off the screen. In
|
|
1619 that event, point will end up in either the upper-left or lower-left hand
|
|
1620 corner.
|
|
1621
|
|
1622
|
|
1623
|
|
1624 @node 14. Frame Geometry, 15. Window/icon title; window manager problems, 13. Scrollbars, top
|
|
1625 @chapter 14. Frame Geometry
|
|
1626
|
|
1627 @menu
|
|
1628 * 14.1.:: 14.1. In Lucid Emacs 19.6 I did @code{(set-screen-width @var{characters})} and @code{(set-screen-height @var{lines})} in my @file{.emacs} instead of specifying @samp{Emacs*EmacsScreen.geometry} in my @file{.Xdefaults} but this does not work in XEmacs 19.13.
|
|
1629 * 14.2.:: 14.2. In XEmacs 19.11 I specified @samp{Emacs*EmacsScreen.geometry} in my @file{.emacs} but this does not work in XEmacs 19.13.
|
|
1630 @end menu
|
|
1631
|
|
1632
|
|
1633 @node 14.1.
|
|
1634 @section 14.1. In Lucid Emacs 19.6 I did @code{(set-screen-width @var{characters})} and @code{(set-screen-height @var{lines})} in my @file{.emacs} instead of specifying @samp{Emacs*EmacsScreen.geometry} in my @file{.Xdefaults} but this does not work in XEmacs 19.13.
|
|
1635
|
|
1636 These two functions now take frame arguments:
|
|
1637
|
|
1638 @example
|
|
1639 (set-frame-width (selected-frame) @var{characters})
|
|
1640 (set-frame-height (selected-frame) @var{lines})
|
|
1641 @end example
|
|
1642
|
|
1643 @node 14.2.
|
|
1644 @section 14.2. In XEmacs 19.11 I specified @samp{Emacs*EmacsScreen.geometry} in my @file{.emacs} but this does not work in XEmacs 19.13.
|
|
1645
|
|
1646 We have switched from using the term 'screen' to using the term 'frame'.
|
|
1647 The correct entry for your @file{.Xdefaults} is now:
|
|
1648
|
|
1649 @example
|
|
1650 Emacs*EmacsFrame.geometry
|
|
1651 @end example
|
|
1652
|
|
1653
|
|
1654 @node 15. Window/icon title; window manager problems, 16. Editing source code (C mode; Lisp mode; etc.), 14. Frame Geometry, top
|
|
1655 @chapter 15. Window/icon title; window manager problems
|
|
1656
|
|
1657 @menu
|
|
1658 * 15.1.:: 15.1. How can I get the icon to just say @samp{XEmacs} and not include the name of the current file in it?
|
|
1659 * 15.2.:: 15.2. How can I have the window title area display the full directory/name of the current buffer file and not just the name?
|
|
1660 * 15.3.:: 15.3. When I run @samp{xterm -name junk} I get an xterm whose class name according to xprop, is @samp{junk}. This is the way it's supposed to work, I think. When I run @samp{xemacs -name junk} the class name is not set to @samp{junk}. It's still @samp{emacs}. What does @samp{xemacs -name} really do? The reason I ask is that my window manager (fvwm) will make a window sticky and I use XEmacs to read my mail. I want that XEmacs window to be sticky, without having to use the window manager's function to set the window sticky. What gives?
|
|
1661 @end menu
|
|
1662
|
|
1663
|
|
1664 @node 15.1.
|
|
1665 @section 15.1. How can I get the icon to just say @samp{XEmacs} and not include the name of the current file in it?
|
|
1666
|
|
1667 Add the following line to your @file{.emacs} file:
|
|
1668
|
|
1669 @example
|
|
1670 (setq frame-icon-title-format "XEmacs")
|
|
1671 @end example
|
|
1672
|
|
1673
|
|
1674 @node 15.2.
|
|
1675 @section 15.2. How can I have the window title area display the full directory/name of the current buffer file and not just the name?
|
|
1676
|
|
1677 Add the following line to your @file{.emacs} file:
|
|
1678
|
|
1679 @example
|
|
1680 (setq frame-title-format "%S: %f")
|
|
1681 @end example
|
|
1682 A more sophisticated title might be:
|
|
1683
|
|
1684 @example
|
|
1685 (setq frame-title-format
|
|
1686 '("%S: " (buffer-file-name "%f" (dired-directory dired-directory "%b"))))
|
|
1687 @end example
|
|
1688
|
|
1689 That is, use the file name, or the dired-directory, or the buffer name.
|
|
1690
|
|
1691
|
|
1692 @node 15.3.
|
|
1693 @section 15.3. When I run @samp{xterm -name junk} I get an xterm whose class name according to xprop, is @samp{junk}. This is the way it's supposed to work, I think. When I run @samp{xemacs -name junk} the class name is not set to @samp{junk}. It's still @samp{emacs}. What does @samp{xemacs -name} really do? The reason I ask is that my window manager (fvwm) will make a window sticky and I use XEmacs to read my mail. I want that XEmacs window to be sticky, without having to use the window manager's function to set the window sticky. What gives?
|
|
1694
|
|
1695 @samp{xemacs -name} sets the application-name for the program (that is,
|
|
1696 the thing which normally comes from @code{argv[0]}.) Using @samp{-name}
|
|
1697 is the same as making a copy of the executable with that new name. The
|
|
1698 WM_CLASS property on each frame is set to the frame-name, and the
|
|
1699 application-class. So, if you did @samp{xemacs -name FOO} and then
|
|
1700 created a frame named @samp{BAR}, you'd get an X window with WM_CLASS =
|
|
1701 @samp{( "BAR", "Emacs")}. However, the resource hierarchy for this
|
|
1702 widget would be
|
|
1703
|
|
1704 @example
|
|
1705 Name: FOO .shell. .pane .BAR
|
|
1706 Class: Emacs.TopLevelShell.XmMainWindow.EmacsFrame
|
|
1707 @end example
|
|
1708
|
|
1709 instead of the default
|
|
1710
|
|
1711 @example
|
|
1712 Name: xemacs.shell. .pane .emacs
|
|
1713 Class: Emacs .TopLevelShell.XmMainWindow.EmacsFrame
|
|
1714 @end example
|
|
1715
|
|
1716 It is arguable that the first element of WM_CLASS should be set to the
|
|
1717 application-name instead of the frame-name, but I think that's less
|
|
1718 flexible, since it does not give you the ability to have multiple
|
|
1719 frames with different WM_CLASS properties. Another possibility would
|
|
1720 be for the default frame name to come from the application name instead
|
|
1721 of simply being @samp{emacs}. However, at this point, making that
|
|
1722 change would be troublesome: it would mean that many users would have to
|
|
1723 make yet another change to their resource files (since the default
|
|
1724 frame name would suddenly change from @samp{emacs} to @samp{xemacs}, or
|
|
1725 whatever the executable happened to be named), so we'd rather avoid it.
|
|
1726
|
|
1727 To make a frame with a particular name use:
|
|
1728
|
|
1729 @example
|
|
1730 (make-frame '((name . "the-name")))
|
|
1731 @end example
|
|
1732
|
|
1733
|
|
1734
|
|
1735 @node 16. Editing source code (C mode; Lisp mode; etc.), 17. Text mode, 15. Window/icon title; window manager problems, top
|
|
1736 @chapter 16. Editing source code (C mode; Lisp mode; etc.)
|
|
1737
|
|
1738 @menu
|
|
1739 * 16.1.:: 16.1. How can I do source code highlighting using font-lock?
|
|
1740 * 16.2.:: 16.2. How do you arrange it so that XEmacs indents all the clauses of a Common Lisp @code{if} the same amount instead of indenting the 3rd clause differently from the first two?
|
|
1741 * 16.3.:: 16.3. I do not like cc-mode. How do I use the old c-mode?
|
|
1742 * 16.4.:: 16.4. When I try to edit a postscript file it gets stuck saying: fontifying 'filename' (regexps....) and it just sits there. If I press ctrl-c in the window where XEmacs was started, it suddenly becomes alive again.
|
|
1743 * 16.5.:: 16.5. Does anyone know how to get the "More" Syntax Highlighting on by default?
|
|
1744 @end menu
|
|
1745
|
|
1746
|
|
1747 @node 16.1.
|
|
1748 @section 16.1. How can I do source code highlighting using font-lock?
|
16
|
1749
|
|
1750 For most modes, font-lock is already set up and just needs to be turned
|
70
|
1751 on. This can be done by
|
|
1752
|
|
1753 @example
|
|
1754 M-x font-lock-mode
|
|
1755 @end example
|
|
1756
|
|
1757 or by having XEmacs automatically start it by adding lines like
|
|
1758
|
|
1759 @example
|
16
|
1760 (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
|
|
1761 (add-hook 'dired-mode-hook 'turn-on-font-lock)
|
70
|
1762 @end example
|
|
1763
|
|
1764 to your @file{.emacs}. See the file @code{etc/sample.emacs} for more
|
16
|
1765 examples.
|
|
1766
|
70
|
1767
|
|
1768 @node 16.2.
|
|
1769 @section 16.2. How do you arrange it so that XEmacs indents all the clauses of a Common Lisp @code{if} the same amount instead of indenting the 3rd clause differently from the first two?
|
|
1770
|
|
1771 One way is to add, to @file{.emacs}:
|
|
1772
|
|
1773 @example
|
|
1774 (put 'if 'lisp-indent-function nil)
|
|
1775 @end example
|
|
1776
|
|
1777 However, note that the package @file{cl-indent.el} that comes with
|
|
1778 XEmacs sets up this kind of indentation by default. @file{cl-indent} also
|
|
1779 knows about many other CL-specific forms. To use @file{cl-indent}, one can
|
|
1780 do this:
|
|
1781
|
|
1782 @example
|
|
1783 (load "cl-indent")
|
|
1784 (setq lisp-indent-function (function common-lisp-indent-function))
|
|
1785 @end example
|
|
1786
|
|
1787 One can also customize @file{cl-indent.el} so it mimics the default @samp{if}
|
|
1788 indentation (@samp{then} indented more than the @samp{else}). Here's
|
|
1789 how:
|
|
1790
|
|
1791 @example
|
|
1792 (put 'if 'common-lisp-indent-function '(nil nil &body))
|
|
1793 @end example
|
|
1794
|
|
1795 Also, a new version (1.2) of @file{cl-indent.el} was posted to
|
|
1796 @samp{comp.emacs.xemacs} on 12/9/94. This version includes more
|
|
1797 documentation than previous versions. This may prove useful if you
|
|
1798 need to customize any indent-functions. The post can be retrieved by
|
|
1799 searching the XEmacs mail archives.
|
|
1800
|
|
1801
|
|
1802 @node 16.3.
|
|
1803 @section 16.3. I do not like cc-mode. How do I use the old c-mode?
|
16
|
1804
|
|
1805 Well, first off, consider if you really want to do this. cc-mode is
|
70
|
1806 much more powerful than the old c-mode. But if you still insist, add
|
|
1807 the following lines to your @file{.emacs}:
|
|
1808
|
|
1809 @example
|
16
|
1810 (fmakunbound 'c-mode)
|
|
1811 (makunbound 'c-mode-map)
|
|
1812 (fmakunbound 'c++-mode)
|
|
1813 (makunbound 'c++-mode-map)
|
|
1814 (makunbound 'c-style-alist)
|
|
1815 (load-library "old-c-mode")
|
|
1816 (load-library "old-c++-mode")
|
70
|
1817 @end example
|
|
1818
|
|
1819 This must be done before any other reference is made to either c-mode
|
|
1820 or c++-mode.
|
|
1821
|
|
1822
|
|
1823 @node 16.4.
|
|
1824 @section 16.4. When I try to edit a postscript file it gets stuck saying: fontifying 'filename' (regexps....) and it just sits there. If I press ctrl-c in the window where XEmacs was started, it suddenly becomes alive again.
|
|
1825
|
|
1826 This was caused by a bug in the Postscript font-lock regular
|
|
1827 expressions. It should be fixed in 19.13. For earlier versions of
|
|
1828 XEmacs, have a look at your @file{.emacs} file. You will probably have
|
|
1829 a line like:
|
|
1830
|
|
1831 @example
|
|
1832 (add-hook 'postscript-mode-hook 'turn-on-font-lock)
|
|
1833 @end example
|
|
1834
|
|
1835 Take it out, restart XEmacs, and it won't try to fontify your
|
|
1836 postscript files anymore.
|
|
1837
|
|
1838
|
|
1839 @node 16.5.
|
|
1840 @section 16.5. Does anyone know how to get the "More" Syntax Highlighting on by default?
|
|
1841
|
|
1842 For C, C++, and Lisp, you can try adding the following to your @file{.emacs} file:
|
|
1843
|
|
1844 @example
|
|
1845 (setq c-font-lock-keywords c-font-lock-keywords-2)
|
|
1846 (setq c++-font-lock-keywords c++-font-lock-keywords-2)
|
|
1847 (setq lisp-font-lock-keywords lisp-font-lock-keywords-2)
|
|
1848 @end example
|
|
1849
|
|
1850
|
|
1851
|
|
1852 @node 17. Text mode, 18. Shell mode, 16. Editing source code (C mode; Lisp mode; etc.), top
|
|
1853 @chapter 17. Text mode
|
|
1854
|
|
1855 @menu
|
|
1856 * 17.1.:: 17.1. How can I enable auto-indent?
|
|
1857 * 17.2.:: 17.2. How can I get XEmacs to come up in text mode (auto-fill) by default?
|
|
1858 @end menu
|
|
1859
|
|
1860
|
|
1861 @node 17.1.
|
|
1862 @section 17.1. How can I enable auto-indent?
|
|
1863
|
|
1864 Put the following line in your @file{.emacs}.
|
|
1865
|
|
1866 @example
|
16
|
1867 (setq indent-line-function 'indent-relative-maybe)
|
70
|
1868 @end example
|
|
1869
|
|
1870 If you want to get fancy, try @file{filladapt} and @file{fa-extras},
|
|
1871 available from the Emacs Lisp Archive at Ohio State University.
|
|
1872 @ifinfo
|
|
1873 Get them at URL:
|
|
1874
|
|
1875 @example
|
|
1876 ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages
|
|
1877 @end example
|
|
1878 @end ifinfo
|
|
1879 @ifhtml
|
|
1880 Get them at
|
|
1881 <A HREF="ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/">ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/</A>
|
|
1882 @end ifhtml
|
|
1883
|
|
1884
|
|
1885 @node 17.2.
|
|
1886 @section 17.2. How can I get XEmacs to come up in text mode (auto-fill) by default?
|
|
1887
|
|
1888 Try the following lisp in your @file{.emacs} file
|
|
1889
|
|
1890 @example
|
16
|
1891 (setq default-major-mode 'text-mode)
|
|
1892 (setq text-mode-hook 'turn-on-auto-fill)
|
70
|
1893 @end example
|
|
1894
|
|
1895 WARNING: note that changing default-major-mode from fundamental-mode can
|
|
1896 break a large amount of built-in code that expects newly created buffers to
|
|
1897 be in fundamental-mode. (Changing from fundamental-mode to auto-fill
|
|
1898 text-mode might not wreak too much havoc, but changing to something more
|
|
1899 exotic like a lisp-mode would break many Emacs packages.
|
|
1900
|
|
1901 Note that Emacs defaultly starts up in buffer *scratch* in
|
|
1902 initial-major-mode, which defaults to lisp-interaction-mode. Thus
|
|
1903 adding the following form to your Emacs init file will cause the
|
|
1904 initial *scratch* buffer to be put into auto-fill'ed text-mode.
|
|
1905
|
|
1906 @example
|
16
|
1907 (setq initial-major-mode
|
70
|
1908 (function (lambda ()
|
16
|
1909 (text-mode)
|
70
|
1910 (turn-on-auto-fill))))
|
|
1911 @end example
|
|
1912
|
|
1913 Note that after your init file is loaded, if inhibit-startup-message
|
|
1914 is null (the default) and the startup buffer is *scratch* then the
|
|
1915 startup message will be inserted into *scratch*; it will be removed
|
|
1916 after a timeout by erasing the entire *scratch* buffer. Keep in mind
|
|
1917 this default usage of *scratch* if you desire any prior manipulation
|
|
1918 of *scratch* from within your Emacs init file. In particular, anything
|
|
1919 you insert into *scratch* from your init file will be later erased.
|
|
1920 Also, if you change the mode of *scratch* be sure that this will
|
|
1921 not interfere with possible later insertion of the startup message
|
|
1922 (e.g. if you put *scratch* into a nonstandard mode that has automatic
|
|
1923 font lock rules, then the startup message might get fontified in
|
|
1924 a strange foreign manner, e.g. as code in some programming language).
|
|
1925
|
|
1926
|
|
1927
|
|
1928 @node 18. Shell mode, 19. Mail; VM; GNUS; BBDB; and related, 17. Text mode, top
|
|
1929 @chapter 18. Shell mode
|
|
1930
|
|
1931 @menu
|
|
1932 * 18.1.:: 18.1. How do I start up a second shell buffer?
|
|
1933 * 18.2.:: 18.2. I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke and use a telnet session within it. Everything works fine except that now all ^M's are filtered out by Emacs. Fixes?
|
|
1934 * 18.3.:: 18.3. If I type a very long command line (like a compile command) into a shell buffer, the output seems to be messed up.
|
|
1935 @end menu
|
|
1936
|
|
1937
|
|
1938 @node 18.1.
|
|
1939 @section 18.1. How do I start up a second shell buffer?
|
|
1940
|
|
1941 In the *shell* buffer:
|
|
1942
|
|
1943 @example
|
16
|
1944 M-x rename-buffer RET *shell-1* RET
|
|
1945 M-x shell RET
|
70
|
1946 @end example
|
16
|
1947
|
|
1948 This will then start a second shell. The key is that no buffer named
|
70
|
1949 *shell* can exist. It might be preferable to use @kbd{M-x
|
|
1950 rename-uniquely} to rename the *shell* buffer instead of @kbd{M-x
|
16
|
1951 rename-buffer}.
|
|
1952
|
70
|
1953
|
|
1954 @node 18.2.
|
|
1955 @section 18.2. I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke and use a telnet session within it. Everything works fine except that now all ^M's are filtered out by Emacs. Fixes?
|
16
|
1956
|
|
1957 Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather
|
|
1958 than doing rsh or telnet within the local shell buffer.
|
|
1959
|
70
|
1960
|
|
1961 @node 18.3.
|
|
1962 @section 18.3. If I type a very long command line (like a compile command) into a shell buffer, the output seems to be messed up.
|
|
1963
|
|
1964 If you see lots of ^G's in the buffer, you're using an old version of
|
|
1965 XEmacs. If the command line seems to be delayed or split into pieces,
|
|
1966 you are probably using csh with the @samp{filec} variable set. To fix
|
|
1967 this, add the following line to your @file{.cshrc}, after @samp{filec} is set:
|
|
1968
|
|
1969 @example
|
|
1970 if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
|
|
1971 @end example
|
|
1972
|
|
1973 @node 19. Mail; VM; GNUS; BBDB; and related, 20. Printing, 18. Shell mode, top
|
|
1974 @chapter 19. Mail; VM; GNUS; BBDB; and related
|
|
1975
|
|
1976 @menu
|
|
1977 * 19.1.:: 19.1. How and where I am suppose to set the face attributes for customizing the appearance of messages (i.e. for VM)?
|
|
1978 * 19.2.:: 19.2. I seem to have heard that there's a package distributed with XEmacs which will use the echo area to notify you of incoming mail in a rather configurable way (multiple spool files, different actions for different files). What and where is it?
|
|
1979 * 19.3.:: 19.3. Is there any way to add more faces and regexps to GNUS without hacking gnus.el?
|
|
1980 * 19.4.:: 19.4. What is BBDB?
|
|
1981 * 19.5.:: 19.5. I noticed that BBDB evokes an XEmacs bug; is there a fix?
|
|
1982 * 19.6.:: 19.6. I'm getting the error 'Wrong type argument: listp :-pos' when I try to start BBDB. What do I do?
|
|
1983 * 19.7.:: 19.7. I'm getting the error 'movemail: Permission denied' when I try and start VM. What do I do?
|
|
1984 @end menu
|
|
1985
|
|
1986
|
|
1987 @node 19.1.
|
|
1988 @section 19.1. How and where I am suppose to set the face attributes for customizing the appearance of messages (i.e. for VM)?
|
|
1989
|
|
1990 Suppose you want to use:
|
|
1991
|
|
1992 @example
|
|
1993 (set-face-font 'message-highlighted-header-contents
|
|
1994 "-adobe-courier-bold-r-normal--12*")
|
|
1995 (set-face-foreground 'message-headers "darkslateblue")
|
|
1996 (set-face-foreground 'message-header-contents "brown")
|
|
1997 (set-face-foreground 'message-highlighted-header-contents "black")
|
|
1998 (set-face-foreground 'message-cited-text "darkgreen")
|
|
1999 @end example
|
|
2000
|
|
2001 Well, this should work, provided that @code{(require
|
|
2002 'highlight-headers)} is executed first. Also, highlight-headers is
|
|
2003 self-contained and you don't need to turn on font-lock mode.
|
|
2004
|
|
2005
|
|
2006 @node 19.2.
|
|
2007 @section 19.2. I seem to have heard that there's a package distributed with XEmacs which will use the echo area to notify you of incoming mail in a rather configurable way (multiple spool files, different actions for different files). What and where is it?
|
|
2008
|
|
2009 It's called reportmail. Add the following to your @file{.emacs}:
|
|
2010
|
|
2011 @example
|
|
2012 (load-library "reportmail")
|
|
2013 @end example
|
|
2014
|
|
2015
|
|
2016 @node 19.3.
|
|
2017 @section 19.3. Is there any way to add more faces and regexps to GNUS without hacking gnus.el?
|
|
2018
|
|
2019 You can try the folowing elisp:
|
|
2020
|
|
2021 @example
|
|
2022 (add-hook 'gnus-startup-hook
|
|
2023 '(lambda ()
|
|
2024 (font-lock-mode)
|
|
2025 (set-face-foreground 'message-headers "red")
|
|
2026 (set-face-foreground 'message-header-contents "orange")
|
|
2027 (set-face-foreground 'message-cited-text "blue")))
|
|
2028 @end example
|
|
2029
|
|
2030
|
|
2031 @node 19.4.
|
|
2032 @section 19.4. What is BBDB?
|
|
2033
|
|
2034 BBDB is the Big Brother Database, written by Jamie Zawinski
|
|
2035 <jwz@@netscape.com>. It interfaces to VM, mh-e, and GNUS and
|
|
2036 conveniently snarfs information about people and other things from
|
|
2037 articles and messages that go by.
|
|
2038
|
|
2039 BBDB is available from the elisp archive
|
|
2040
|
|
2041 @ifinfo
|
|
2042 @example
|
|
2043 archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive
|
|
2044 @end example
|
|
2045 @end ifinfo
|
|
2046 @ifhtml
|
|
2047 <A HREF="ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/">ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/</A>
|
|
2048 @end ifhtml
|
|
2049
|
|
2050 BBDB has a mailing list devoted to it:
|
|
2051
|
|
2052 @example
|
|
2053 info-bbdb@@cs.uiuc.edu
|
|
2054 @end example
|
|
2055
|
|
2056 This mailing list is archived at
|
|
2057
|
|
2058 @ifinfo
|
|
2059 @example
|
|
2060 ftp.cs.uiuc.edu:/pub/bbdb
|
|
2061 @end example
|
|
2062 @end ifinfo
|
|
2063 @ifhtml
|
|
2064 <A
|
|
2065 HREF="ftp://ftp.cs.uiuc.edu:/pub/bbdb/">ftp.cs.uiuc.edu:/pub/bbdb/</A>
|
|
2066 @end ifhtml
|
|
2067
|
|
2068
|
|
2069 @node 19.5.
|
|
2070 @section 19.5. I noticed that BBDB evokes an XEmacs bug; is there a fix?
|
|
2071
|
|
2072 This worked for me:
|
|
2073
|
|
2074 @example
|
|
2075 (setq bbdb-electric-p nil)
|
|
2076 @end example
|
|
2077
|
|
2078 @node 19.6.
|
|
2079 @section 19.6. I'm getting the error 'Wrong type argument: listp :-pos' when I try to start BBDB. What do I do?
|
|
2080
|
|
2081 Discard the copy of mail-extr.el that came with bbdb.
|
|
2082
|
|
2083 XEmacs 19.12 made the change that you cannot change the value of
|
|
2084 interned symbols whose names begin with a colon. The mail-extr.el
|
|
2085 that's distributed with 19.12+ is fixed to live with this restriction,
|
|
2086 but old copies of mail-extr.el will bomb.
|
|
2087
|
|
2088
|
|
2089 @node 19.7.
|
|
2090 @section 19.7. I'm getting the error 'movemail: Permission denied' when I try and start VM. What do I do?
|
|
2091
|
|
2092 Execute the following two commands. movemail is normally located in the
|
|
2093 XEmacs install tree at @file{.../lib/xemacs-19.13/$@{arch@}/movemail}.
|
|
2094
|
|
2095 @example
|
|
2096 chgrp mail movemail
|
|
2097 chmod 2555 movemail
|
|
2098 @end example
|
|
2099
|
|
2100
|
|
2101 @node 20. Printing, 21. Gnuserv, 19. Mail; VM; GNUS; BBDB; and related, top
|
|
2102 @chapter 20. Printing
|
|
2103
|
|
2104 @menu
|
|
2105 * 20.1.:: 20.1. Font-lock looks nice. How can I print (WYSIWYG) the highlighted document?
|
|
2106 * 20.2.:: 20.2. My printer is a Postscript printer and @code{lpr} only works for Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x lpr-buffer} to work?
|
|
2107 @end menu
|
|
2108
|
|
2109
|
|
2110 @node 20.1.
|
|
2111 @section 20.1. Font-lock looks nice. How can I print (WYSIWYG) the highlighted document?
|
|
2112
|
|
2113 The package ps-print.el, which is now included with XEmacs, provides the
|
|
2114 ability to do this. It contains complete instructions on its use:
|
|
2115
|
|
2116 @example
|
|
2117 <xemacs_src_root>/lisp/packages/ps-print.el
|
|
2118 @end example
|
|
2119
|
|
2120
|
|
2121 @node 20.2.
|
|
2122 @section 20.2. My printer is a Postscript printer and @code{lpr} only works for Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x lpr-buffer} to work?
|
|
2123
|
|
2124 @example
|
|
2125 (setq lpr-command "@var{Command to print text files}")
|
|
2126 @end example
|
|
2127
|
|
2128 Please don't forget to replace @var{Command to print text files} with the
|
|
2129 actual command (@samp{enscript}, @samp{nenscript}, etc.)!
|
|
2130
|
|
2131
|
|
2132
|
|
2133 @node 21. Gnuserv, 22. Miscellaneous, 20. Printing, top
|
|
2134 @chapter 21. Gnuserv
|
|
2135
|
|
2136 @menu
|
|
2137 * 21.1.:: 21.1. How do I disable gnuserv from opening a new frame?
|
|
2138 * 21.2.:: 21.2. What do I do to start the gnuserv server so that each subseqeuent XEmacs is a client?
|
|
2139 @end menu
|
|
2140
|
|
2141
|
|
2142 @node 21.1.
|
|
2143 @section 21.1. How do I disable gnuserv from opening a new frame?
|
|
2144
|
|
2145 If you set the gnuserv-screen variable to the frame that should be
|
16
|
2146 used to display buffers that are pulled up, a new frame will not be
|
|
2147 created. For example, you could put
|
|
2148
|
70
|
2149 @example
|
|
2150 (setq gnuserv-screen (selected-frame))
|
|
2151 @end example
|
|
2152
|
|
2153 early on in your @file{.emacs}, to ensure that the first frame created is
|
|
2154 the one used for your gnuserv buffers.
|
|
2155
|
|
2156
|
|
2157 @node 21.2.
|
|
2158 @section 21.2. What do I do to start the gnuserv server so that each subseqeuent XEmacs is a client?
|
16
|
2159
|
|
2160 Put the following in your @file{.emacs} file to start the server:
|
|
2161
|
70
|
2162 @example
|
16
|
2163 (gnuserv-start)
|
70
|
2164 @end example
|
|
2165
|
|
2166 Start your first XEmacs as usual. After that, you can do
|
0
|
2167
|
|
2168 @example
|
16
|
2169 gnuclient randomfilename
|
0
|
2170 @end example
|
|
2171
|
16
|
2172 from the command line to get your existing XEmacs process to open a new
|
|
2173 frame and visit randomfilename in that window. When you're done editing
|
|
2174 randomfilename, hit @kbd{C-x #} to kill the buffer and get rid of the
|
|
2175 frame.
|
|
2176
|
70
|
2177
|
|
2178
|
|
2179 @node 22. Miscellaneous,, 21. Gnuserv, top
|
|
2180 @chapter 22. Miscellaneous
|
|
2181
|
|
2182 @menu
|
|
2183 * 22.1.:: 22.1. How do I specify the paths that XEmacs uses for finding files?
|
|
2184 * 22.2.:: 22.2. Why does edt emulation not work?
|
|
2185 * 22.3.:: 22.3. How can I emulate VI and use it as my default mode?
|
|
2186 * 22.4.:: 22.4. Is there some way to get the behavior so that if the current buffer has a file associated with it, the current buffer will use that files name else use the buffer name?
|
|
2187 * 22.5.:: 22.5. I have no idea where this is coming from, but ever since I moved from 19.9 to 19.13 I have started seeing that all of my buffers will get a minor mode called @samp{Omit}. I have no idea how it got there nor do I know what it does. What is it?
|
|
2188 * 22.6.:: 22.6. How do I turn off the sound?
|
|
2189 * 22.7.:: 22.7. Can I have the end of the buffer delimited in some way? Say, with: [END] ?
|
|
2190 * 22.8.:: 22.8. Can I insert today's date into buffer?
|
|
2191 * 22.9.:: 22.9. Are only certain syntactic character classes available for abbrevs? I didn't see any restrictions in the info.
|
|
2192 * 22.10.:: 22.10. Filladapt used to work after I loaded it. Now in 19.13 it doesn't. What gives?
|
|
2193 @end menu
|
|
2194
|
|
2195
|
|
2196 @node 22.1.
|
|
2197 @section 22.1. How do I specify the paths that XEmacs uses for finding files?
|
0
|
2198
|
|
2199 You can specify what paths to use by using a number of different flags
|
|
2200 when running configure. See the section MAKE VARIABLES in the top-level
|
|
2201 file INSTALL in the XEmacs distribution for a listing of those flags.
|
|
2202
|
70
|
2203 Most of the time, however, the simplest fix is: DO NOT specify paths as
|
|
2204 you might for FSF GNU Emacs. XEmacs can generally determine the
|
0
|
2205 necessary paths dynamically at run time. The only path that generally
|
|
2206 needs to be specified is the root directory to install into. That can
|
|
2207 be specified by passing the @code{--prefix} flag to configure. For a
|
70
|
2208 description of the XEmacs install tree, please consult the NEWS file.
|
|
2209
|
|
2210
|
|
2211 @node 22.2.
|
|
2212 @section 22.2. Why does edt emulation not work?
|
|
2213
|
|
2214 We don't know, but you can use tpu-edt emulation instead, which works fine
|
|
2215 and is a little fancier than the standard edt emulation. To do this, add
|
|
2216 the following line to your @file{.emacs}:
|
|
2217
|
0
|
2218 @example
|
70
|
2219 (load "tpu-edt")
|
0
|
2220 @end example
|
|
2221
|
70
|
2222 If you don't want it to replace Ctrl-h with edt-style help menu add this as
|
|
2223 well:
|
|
2224
|
|
2225 @example
|
|
2226 (global-set-key '(control h) 'help-for-help)
|
|
2227 @end example
|
|
2228
|
|
2229
|
|
2230 @node 22.3.
|
|
2231 @section 22.3. How can I emulate VI and use it as my default mode?
|
|
2232
|
|
2233 Our recommended VI emulator is viper. To put the current buffer into
|
|
2234 viper-mode, use the command:
|
0
|
2235
|
|
2236 @example
|
70
|
2237 M-x viper
|
|
2238 @end example
|
|
2239
|
|
2240 To make viper-mode the default, add the following lines to your @file{.emacs}:
|
|
2241
|
|
2242 @example
|
|
2243 (load-library "viper")
|
|
2244 (setq term-setup-hook 'viper)
|
|
2245 (setq find-file-hooks 'viper)
|
|
2246 (setq find-file-not-found-hooks 'viper)
|
0
|
2247 @end example
|
|
2248
|
70
|
2249
|
|
2250 @node 22.4.
|
|
2251 @section 22.4. Is there some way to get the behavior so that if the current buffer has a file associated with it, the current buffer will use that files name else use the buffer name?
|
|
2252
|
|
2253 Just set frame-title-format from find-file-hooks. Alternatively, look at
|
|
2254 the answer to question 15.2.
|
|
2255
|
|
2256 In addition, one could set modeline-format.
|
|
2257
|
|
2258
|
|
2259 @node 22.5.
|
|
2260 @section 22.5. I have no idea where this is coming from, but ever since I moved from 19.9 to 19.13 I have started seeing that all of my buffers will get a minor mode called @samp{Omit}. I have no idea how it got there nor do I know what it does. What is it?
|
|
2261
|
|
2262 It's part of dired. In dired, you can type M-o to get Omit mode and that will
|
|
2263 ignore uninteresting files (checkpoint files and backups, for example). You
|
|
2264 get Omit in the modeline everywhere because the variable `dired-omit-files-p'
|
|
2265 is globally set to some non-nil value. If you want this functionality, it's
|
|
2266 probably best to use a hook:
|
|
2267
|
|
2268 @example
|
|
2269 (add-hook 'dired-after-readin-hook '(lambda () (dired-omit-toggle)))
|
|
2270 @end example
|
|
2271
|
|
2272 Alternatively, since it seems odd to toggle the omit
|
|
2273 state with every readin, since readin can happen many times in a Dired
|
|
2274 buffer, you can try this hook to correct the "Omit" problem:
|
0
|
2275
|
|
2276 @example
|
70
|
2277 (add-hook 'dired-mode-hook
|
|
2278 (function (lambda ()
|
|
2279 ;; `dired-omit-files-p' is made buffer-local by "dired-x.el", but
|
|
2280 ;; maybe not soon enough.
|
|
2281 (make-local-variable 'dired-omit-files-p)
|
|
2282 (setq dired-omit-files-p t))))
|
|
2283 @end example
|
|
2284
|
|
2285 This is only run once, when the Dired buffer is created.
|
|
2286
|
|
2287
|
|
2288 @node 22.6.
|
|
2289 @section 22.6. How do I turn off the sound?
|
|
2290
|
|
2291 Add the following line to your @file{.emacs} file:
|
|
2292
|
|
2293 @example
|
|
2294 (setq bell-volume 0)
|
|
2295 (setq sound-alist nil)
|
|
2296 @end example
|
|
2297
|
|
2298
|
|
2299 @node 22.7.
|
|
2300 @section 22.7. Can I have the end of the buffer delimited in some way? Say, with: [END] ?
|
|
2301
|
|
2302 @example
|
|
2303 (make-annotation "[END]" (point-max) 'text (current-buffer))
|
|
2304 @end example
|
|
2305
|
|
2306 Note that you might want to put this in a hook.
|
|
2307
|
|
2308 You might also need:
|
|
2309
|
|
2310 @example
|
|
2311 (require 'annotations)
|
0
|
2312 @end example
|
|
2313
|
70
|
2314 since @code{make-annotation} is not defined by default.
|
|
2315
|
|
2316
|
|
2317 @node 22.8.
|
|
2318 @section 22.8. Can I insert today's date into buffer?
|
|
2319
|
|
2320 Use this lisp in a function:
|
|
2321
|
|
2322 @example
|
|
2323 (insert (current-time-string))
|
|
2324 @end example
|
|
2325
|
|
2326
|
|
2327 @node 22.9.
|
|
2328 @section 22.9. Are only certain syntactic character classes available for abbrevs? I didn't see any restrictions in the info.
|
|
2329
|
|
2330 Yes, abbrevs only expand word-syntax strings. So, in c-mode if you
|
|
2331 wanted to expand something to @samp{define }, you would be able to
|
|
2332 expand @samp{xd} but not @samp{#d}.
|
|
2333
|
|
2334
|
|
2335 @node 22.10.
|
|
2336 @section 22.10. Filladapt used to work after I loaded it. Now in 19.13 it doesn't. What gives?
|
|
2337
|
|
2338 Filladapt 2.x is included in 19.13+. In it filladapt is now a minor
|
|
2339 mode and minor modes are traditionally off by default. The following
|
|
2340 added to your .emacs will turn it on for all buffers:
|
|
2341
|
|
2342 @example
|
|
2343 (setq-default filladapt-mode t)
|
|
2344 @end example
|
|
2345
|
|
2346 Use @code{turn-on-filladapt-mode} to turn Filladapt on in particular
|
|
2347 major modes, like this:
|
|
2348
|
|
2349 @example
|
|
2350 (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
|
|
2351 @end example
|
|
2352
|
|
2353
|
|
2354 @page
|
|
2355 @contents
|
0
|
2356 @bye
|