1 \input texinfo.tex @c -*- mode: texinfo; coding: iso-2022-8 -*-
3 @setfilename sxemacs-faq.info
4 @settitle Frequently asked questions about SXEmacs
10 @subtitle Frequently Asked Questions about SXEmacs @hfill Edition 22.1.4
12 @author Sebastian Freundt <hroptatyr@@sxemacs.org
13 @author Tony Rossini <rossini@@u.washington.edu>
14 @author Ben Wing <ben@@xemacs.org>
15 @author Chuck Thompson <cthomp@@xemacs.org>
16 @author Steve Baur <steve@@xemacs.org>
17 @author Andreas Kaempf <andreas@@sccon.com>
18 @author Christian Nybø <chr@@mediascience.no>
19 @author Sandra Wambold <wambold@@xemacs.org>
24 @dircategory SXEmacs Editor
26 * FAQ: (sxemacs-faq). SXEmacs FAQ.
30 @node Top, Introduction, (dir), (dir)
33 This is the guide to the SXEmacs Frequently Asked Questions list---a
34 compendium of questions and answers pertaining to one of the finest
35 programs ever written. SXEmacs is much more than just a Text Editor.
37 SXEmacs Note: Currently, this is the FAQ from XEmacs. It will be
38 overhauled and updated in the very near future. If you are reading this
39 note, @emph{please} remind us to do so.
41 This FAQ is freely redistributable. This FAQ is distributed in the hope
42 that it will be useful, but WITHOUT ANY WARRANTY; without even the
43 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
45 In the near future this assortment of questions will be automatically
46 generated from a database. We are currently evaluating the design
47 specifications, a general classification and technical necessities.
49 @c If you have a Web browser, the official hypertext version is at
53 @c @uref{http://www.xemacs.org/FAQ/xemacs-faq.html}
57 @c This document is available in several different formats:
60 @c @uref{xemacs-faq.txt, As a single ASCII file}, produced by
61 @c @code{makeinfo --no-headers}
63 @c @uref{xemacs-faq.dvi, As a .dvi file}, as used with
64 @c @uref{http://www.tug.org, TeX.}
66 @c As a PostScript file @uref{xemacs-faq-a4.ps, in A4 format},
67 @c as well as in @uref{xemacs-faq-letter.ps, letter format}
69 @c In html format, @uref{xemacs-faq_1.html, split by chapter}, or in
70 @c @uref{xemacs-faq.html, one monolithic} document.
72 @c The canonical version of the FAQ is the texinfo document
73 @c @uref{xemacs-faq.texi, man/xemacs-faq.texi}.
75 @c If you do not have makeinfo installed, you may @uref{xemacs-faq.info,
76 @c download the faq} in info format, and install it in @file{<XEmacs
77 @c library directory>/info/}. For example in
78 @c @file{/usr/local/lib/xemacs-21.4/info/}.
86 @c end ifset points to CANONICAL
89 * Introduction:: Introduction, Policy, Credits.
90 * Installation:: Installation and Trouble Shooting.
91 * Customisation:: Customisation and Options.
92 * Subsystems:: Major Subsystems.
93 * Miscellaneous:: The Miscellaneous Stuff.
94 * MS Windows:: SXEmacs on Microsoft Windows.
95 * Current Events:: What the Future Holds.
99 --- The Detailed Node Listing ---
101 Introduction, Policy, Credits
103 * Q1.0.1:: What is SXEmacs?
104 * Q1.0.2:: What is the current version of SXEmacs?
105 * Q1.0.3:: Where can I find it?
106 * Q1.0.4:: Why another version of Emacs?
107 * Q1.0.5:: Why haven't XEmacs/SXEmacs and GNU Emacs merged?
108 * Q1.0.6:: Where can I get help?
109 * Q1.0.7:: Where are the mailing lists archived?
110 * Q1.0.8:: How do you pronounce SXEmacs?
111 * Q1.0.9:: What does SXEmacs look like?
112 * Q1.0.10:: Is there a port of SXEmacs to Microsoft ('95 or NT)?
113 * Q1.0.11:: Is there a port of SXEmacs to the Macintosh?
114 * Q1.0.12:: Is there a port of SXEmacs to NextStep?
115 * Q1.0.13:: Is there a port of SXEmacs to OS/2?
116 * Q1.0.14:: Where can I get a printed copy of the SXEmacs users manual?
119 * Q1.1.1:: What is the FAQ editorial policy?
120 * Q1.1.2:: How do I become a beta tester?
121 * Q1.1.3:: How do I contribute to SXEmacs itself?
124 * Q1.2.1:: Who wrote XEmacs? Who wrote SXEmacs?
125 * Q1.2.2:: Who contributed to this version of the FAQ?
126 * Q1.2.3:: Who contributed to the FAQ in the past?
128 Internationalisation:
129 * Q1.3.1:: What is the status of internationalisation support aka MULE (including Asian language support?
130 * Q1.3.2:: How can I help with internationalisation?
131 * Q1.3.3:: How do I type non-ASCII characters?
132 * Q1.3.4:: Can SXEmacs messages come out in a different language?
133 * Q1.3.5:: Please explain the various input methods in MULE/SXEmacs
134 * Q1.3.6:: How do I portably code for MULE/XEmacs/SXEmacs?
135 * Q1.3.7:: How about Cyrillic Modes?
136 * Q1.3.8:: Does SXEmacs support Unicode?
137 * Q1.3.9:: How does SXEmacs display Unicode?
140 * Q1.4.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one?
141 * Q1.4.2:: Can I use the same @file{init.el}/@file{.emacs} with other Emacsen?
142 * Q1.4.3:: Any good SXEmacs tutorials around?
143 * Q1.4.4:: May I see an example of a useful SXEmacs Lisp function?
144 * Q1.4.5:: And how do I bind it to a key?
145 * Q1.4.6:: What's the difference between a macro and a function?
147 Installation and Trouble Shooting
149 * Q2.0.1:: Running SXEmacs without installing.
150 * Q2.0.2:: SXEmacs is too big.
151 * Q2.0.3:: Compiling SXEmacs with Netaudio. @c what?!
152 * Q2.0.4:: Problems with Linux and ncurses.
153 * Q2.0.5:: Do I need X11 to run SXEmacs?
154 * Q2.0.6:: I'm having strange crashes. What do I do?
155 * Q2.0.7:: Libraries in non-standard locations.
156 * Q2.0.8:: can't resolve symbol _h_errno
157 * Q2.0.9:: Where do I find external libraries?
158 * Q2.0.10:: After I run configure I find a coredump, is something wrong?
159 * Q2.0.11:: SXEmacs can't resolve host names.
160 * Q2.0.12:: Why can't I strip SXEmacs?
161 * Q2.0.13:: I don't need no steenkin' packages. Do I?
162 * Q2.0.14:: How do I figure out which packages to install?
163 * Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW)
166 * Q2.1.1:: SXEmacs just crashed on me!
167 * Q2.1.2:: Cryptic Minibuffer messages.
168 * Q2.1.3:: Translation Table Syntax messages at Startup.
169 * Q2.1.4:: Startup warnings about deducing proper fonts?
170 * Q2.1.5:: SXEmacs cannot connect to my X Terminal.
171 * Q2.1.6:: SXEmacs just locked up my Linux X server.
172 * Q2.1.7:: HP Alt key as Meta.
173 * Q2.1.8:: got (wrong-type-argument color-instance-p nil)!
174 * Q2.1.9:: SXEmacs causes my OpenWindows 3.0 server to crash.
175 * Q2.1.10:: Warnings from incorrect key modifiers.
176 * Q2.1.11:: Can't instantiate image error... in toolbar
177 * Q2.1.12:: Regular Expression Problems on DEC OSF1.
178 * Q2.1.13:: HP/UX 10.10 and @code{create_process} failure
179 * Q2.1.14:: @kbd{C-g} doesn't work for me. Is it broken?
180 * Q2.1.15:: How to debug a SXEmacs problem with a debugger.
181 * Q2.1.16:: SXEmacs crashes in @code{strcat} on HP/UX 10.
182 * Q2.1.17:: @samp{Marker does not point anywhere}.
183 * Q2.1.18:: SXEmacs is outputting lots of X errors.
184 * Q2.1.19:: SXEmacs does not follow the local timezone.
185 * Q2.1.20:: @samp{Symbol's function definition is void: hkey-help-show.}
186 * Q2.1.21:: [This question intentionally left blank]
187 * Q2.1.22:: SXEmacs seems to take a really long time to do some things.
188 * Q2.1.23:: Movemail on Linux does not work for SXEmacs.
189 * Q2.1.24:: SXEmacs won't start without network.
190 * Q2.1.25:: After upgrading, SXEmacs won't do `foo' any more!
192 Customisation and Options
194 * Q3.0.1:: What version of Emacs am I running?
195 * Q3.0.2:: How do I evaluate Elisp expressions?
196 * Q3.0.3:: @code{(setq tab-width 6)} behaves oddly.
197 * Q3.0.4:: How can I add directories to the @code{load-path}?
198 * Q3.0.5:: How to check if a lisp function is defined?
199 * Q3.0.6:: Can I force the output of @code{(face-list)} to a buffer?
200 * Q3.0.7:: Font selections don't get saved after @code{Save Options}.
201 * Q3.0.8:: How do I make a single minibuffer frame?
202 * Q3.0.9:: What is @code{Customize}?
204 X Window System & Resources:
205 * Q3.1.1:: Where is a list of X resources?
206 * Q3.1.2:: How can I detect a color display?
207 * Q3.1.3:: [This question intentionally left blank]
208 * Q3.1.4:: [This question intentionally left blank]
209 * Q3.1.5:: How can I get the icon to just say @samp{SXEmacs}?
210 * Q3.1.6:: How can I have the window title area display the full path?
211 * Q3.1.7:: @samp{sxemacs -name junk} doesn't work?
212 * Q3.1.8:: @samp{-iconic} doesn't work.
214 Textual Fonts & Colors:
215 * Q3.2.1:: How can I set color options from @file{init.el}?
216 * Q3.2.2:: How do I set the text, menu and modeline fonts?
217 * Q3.2.3:: How can I set the colors when highlighting a region?
218 * Q3.2.4:: How can I limit color map usage?
219 * Q3.2.5:: My tty supports color, but SXEmacs doesn't use them.
220 * Q3.2.6:: Can I have pixmap backgrounds in SXEmacs?
221 * Q3.2.7:: How do I display non-ASCII characters?
224 * Q3.3.1:: How can I make the modeline go away?
225 * Q3.3.2:: How do you have SXEmacs display the line number in the modeline?
226 * Q3.3.3:: How do I get SXEmacs to put the time of day on the modeline?
227 * Q3.3.4:: How do I turn off current chapter from AUC TeX modeline?
228 * Q3.3.5:: How can one change the modeline color based on the mode used?
230 Multiple Device Support:
231 * Q3.4.1:: How do I open a frame on another screen of my multi-headed display?
232 * Q3.4.2:: Can I really connect to a running SXEmacs after calling up over a modem? How?
235 * Q3.5.1:: How can I bind complex functions (or macros) to keys?
236 * Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
237 * Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down?
238 * Q3.5.4:: Globally binding @kbd{Delete}?
239 * Q3.5.5:: Scrolling one line at a time.
240 * Q3.5.6:: How to map @kbd{Help} key alone on Sun type4 keyboard?
241 * Q3.5.7:: How can you type in special characters in SXEmacs?
242 * Q3.5.8:: [This question intentionally left blank]
243 * Q3.5.9:: How do I make the Delete key delete forward?
244 * Q3.5.10:: Can I turn on @dfn{sticky} modifier keys?
245 * Q3.5.11:: How do I map the arrow keys?
248 * Q3.6.1:: Is there a way to make the bar cursor thicker?
249 * Q3.6.2:: Is there a way to get back the old block cursor where the cursor covers the character in front of the point?
250 * Q3.6.3:: Can I make the cursor blink?
252 The Mouse and Highlighting:
253 * Q3.7.1:: How can I turn off Mouse pasting?
254 * Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons?
255 * Q3.7.3:: Clicking the left button does not do anything in buffer list.
256 * Q3.7.4:: How can I get a list of buffers when I hit mouse button 3?
257 * Q3.7.5:: Why does cut-and-paste not work between SXEmacs and a cmdtool?
258 * Q3.7.6:: How I can set SXEmacs up so that it pastes where the text cursor is?
259 * Q3.7.7:: How do I select a rectangular region?
260 * Q3.7.8:: Why does @kbd{M-w} take so long?
262 The Menubar and Toolbar:
263 * Q3.8.1:: How do I get rid of the menu (or menubar)?
264 * Q3.8.2:: Can I customise the basic menubar?
265 * Q3.8.3:: How do I control how many buffers are listed in the menu @code{Buffers} list?
266 * Q3.8.4:: Resources like @code{Emacs*menubar*font} are not working?
267 * Q3.8.5:: How can I bind a key to a function to toggle the toolbar?
270 * Q3.9.1:: How can I disable the scrollbar?
271 * Q3.9.2:: How can one use resources to change scrollbar colors?
272 * Q3.9.3:: Moving the scrollbar can move the point; can I disable this?
273 * Q3.9.4:: How can I turn off automatic horizontal scrolling in specific modes?
276 * Q3.10.1:: How can I turn off or change highlighted selections?
277 * Q3.10.2:: How do I get that typing on an active region removes it?
278 * Q3.10.3:: Can I turn off the highlight during isearch?
279 * Q3.10.4:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)?
280 * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.
281 * Q3.10.6:: Why is killing so slow?
285 * Q4.0.1:: How do I set up VM to retrieve remote mail using POP?
286 * Q4.0.2:: How do I get VM to filter mail for me?
287 * Q4.0.3:: How can I get VM to automatically check for new mail?
288 * Q4.0.4:: [This question intentionally left blank]
289 * Q4.0.5:: How do I get my outgoing mail archived?
290 * Q4.0.6:: I have various addresses at which I receive mail. How can I
291 tell VM to ignore them when doing a "reply-all"?
292 * Q4.0.7:: Is there a mailing list or FAQ for VM?
293 * Q4.0.8:: Remote mail reading with VM.
294 * Q4.0.9:: rmail or VM gets an error incorporating new mail.
295 * Q4.0.10:: How do I make VM stay in a single frame?
296 * Q4.0.11:: How do I make VM or mh-e display graphical smilies?
297 * Q4.0.12:: Customisation of VM not covered in the manual or here.
299 Web browsing with W3:
300 * Q4.1.1:: What is W3?
301 * Q4.1.2:: How do I run W3 from behind a firewall?
302 * Q4.1.3:: Is it true that W3 supports style sheets and tables?
304 Reading Netnews and Mail with Gnus:
305 * Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,
306 Quassia Gnus, Pterodactyl Gnus, Oort Gnus, argh!
307 * Q4.2.2:: [This question intentionally left blank]
308 * Q4.2.3:: How do I make Gnus stay within a single frame?
309 * Q4.2.4:: How do I customize the From: line?
312 * Q4.3.1:: How can I read and/or compose MIME messages?
313 * Q4.3.2:: What is TM and where do I get it?
314 * Q4.3.3:: Why isn't this @code{movemail} program working?
315 * Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems?
316 * Q4.3.5:: Where do I find pstogif (required by tm)?
318 Sparcworks, EOS, and WorkShop:
319 * Q4.4.1:: What is SPARCworks, EOS, and WorkShop
320 * Q4.4.2:: How do I start the Sun Workshop support in SXEmacs?
323 * Q4.5.1:: What is/was Energize?
326 * Q4.6.1:: What is Infodock?
328 Other Unbundled Packages:
329 * Q4.7.1:: What is AUC TeX? Where do you get it?
330 * Q4.7.2:: Are there any Emacs Lisp Spreadsheets?
331 * Q4.7.3:: [This question intentionally left blank]
332 * Q4.7.4:: Problems installing AUC TeX
333 * Q4.7.5:: Is there a reason for an Emacs package not to be included in SXEmacs?
334 * Q4.7.6:: Is there a MatLab mode?
335 * Q4.7.7:: Can I edit files on other hosts?
337 The Miscellaneous Stuff
339 * Q5.0.1:: How can I do source code highlighting using font-lock?
340 * Q5.0.2:: I do not like cc-mode. How do I use the old c-mode?
341 * Q5.0.3:: How do I get @samp{More} Syntax Highlighting on by default?
342 * Q5.0.4:: How can I enable auto-indent and/or Filladapt?
343 * Q5.0.5:: How can I get SXEmacs to come up in text/auto-fill mode by default?
344 * Q5.0.6:: How do I start up a second shell buffer?
345 * Q5.0.7:: Telnet from shell filters too much.
346 * Q5.0.8:: Why does edt emulation not work?
347 * Q5.0.9:: How can I emulate VI and use it as my default mode?
348 * Q5.0.10:: [This question intentionally left blank]
349 * Q5.0.11:: [This question intentionally left blank]
350 * Q5.0.12:: How do I disable gnuserv from opening a new frame?
351 * Q5.0.13:: How do I start gnuserv so that each subsequent SXEmacs is a client?
352 * Q5.0.14:: Strange things are happening in Shell Mode.
353 * Q5.0.15:: Where do I get the latest CC Mode?
354 * Q5.0.16:: I find auto-show-mode disconcerting. How do I turn it off?
355 * Q5.0.17:: How can I get two instances of info?
356 * Q5.0.18:: [This question intentionally left blank]
357 * Q5.0.19:: Is there something better than LaTeX mode?
358 * Q5.0.20:: Is there a way to start a new SXEmacs if there's no
359 gnuserv running, and otherwise use gnuclient?
361 Emacs Lisp Programming Techniques:
362 * Q5.1.1:: The difference in key sequences between XEmacs/SXEmacs and GNU Emacs?
363 * Q5.1.2:: Can I generate "fake" keyboard events?
364 * Q5.1.3:: Could you explain @code{read-kbd-macro} in more detail?
365 * Q5.1.4:: What is the performance hit of @code{let}?
366 * Q5.1.5:: What is the recommended use of @code{setq}?
367 * Q5.1.6:: What is the typical misuse of @code{setq} ?
368 * Q5.1.7:: I like the @code{do} form of cl, does it slow things down?
369 * Q5.1.8:: I like recursion, does it slow things down?
370 * Q5.1.9:: How do I put a glyph as annotation in a buffer?
371 * Q5.1.10:: @code{map-extents} won't traverse all of my extents!
372 * Q5.1.11:: My elisp program is horribly slow. Is there an easy way to
373 find out where it spends time?
376 * Q5.2.1:: How do I turn off the sound?
377 * Q5.2.2:: How do I get funky sounds instead of a boring beep?
378 * Q5.2.3:: What's NAS, how do I get it?
379 * Q5.2.4:: Sunsite sounds don't play.
383 * Q5.3.1:: How do you make SXEmacs indent CL if-clauses correctly?
384 * Q5.3.2:: [This question intentionally left blank]
385 * Q5.3.3:: How can I print WYSIWYG a font-locked buffer?
386 * Q5.3.4:: Getting @kbd{M-x lpr} to work with postscript printer.
387 * Q5.3.5:: How do I specify the paths that SXEmacs uses for finding files?
388 * Q5.3.6:: [This question intentionally left blank]
389 * Q5.3.7:: Can I have the end of the buffer delimited in some way?
390 * Q5.3.8:: How do I insert today's date into a buffer?
391 * Q5.3.9:: Are only certain syntactic character classes available for abbrevs?
392 * Q5.3.10:: How can I get those oh-so-neat X-Face lines?
393 * Q5.3.11:: How do I add new Info directories?
394 * Q5.3.12:: What do I need to change to make printing work?
396 SXEmacs on MS Windows
399 * Q6.0.1:: Why did SXEmacs cut all support for Windows?
401 What the Future Holds
403 * Q7.0.1:: What new features will be in SXEmacs soon?
404 * Q7.0.2:: What's new in SXEmacs 22.1.0?
405 * Q7.0.3:: What's new in SXEmacs 22.1.1?
406 * Q7.0.4:: What's new in SXEmacs 22.1.2?
407 * Q7.0.5:: What's new in SXEmacs 22.1.3?
408 * Q7.0.6:: What's new in SXEmacs 22.1.4?
414 @c - Where is the RedHat/Fedora/Slackware/Debian/SuSE/Mandrake/foobar
416 @c - What is this tla thingy?
419 @node Introduction, Installation, Top, Top
420 @unnumbered 1 Introduction, Policy, Credits
422 Learning SXEmacs is a lifelong activity. Even people who have used Emacs
423 for years keep discovering new features. Therefore this document cannot
424 be complete. Instead it is aimed at the person who is either
425 considering SXEmacs for their own use, or has just obtained it and is
426 wondering what to do next. It is also useful as a reference to
429 The origin of this FAQ is well beyond SXEmacs-times and stems from the
430 XEmacs crew. The initiator was @email{rossini@@biostat.washington.edu,
431 Anthony Rossini}. The tale goes he got tired of hearing JWZ complain
432 about repeatedly having to answer questions. @email{ben@@xemacs.org,
433 Ben Wing} and @email{cthomp@@xemacs.org, Chuck Thompson}, the principal
434 authors of XEmacs, then took over and Ben did a massive update
435 reorganising the whole thing.
437 The previous version was converted to hypertext format, and edited by
438 @email{steve@@xemacs.org, Steven L. Baur}. It was converted back to
439 texinfo by @email{hniksic@@xemacs.org, Hrvoje Niksic}. The FAQ was then
440 maintained by @email{andreas@@sccon.com, Andreas Kaempf}, who passed it
441 on to Christian Nybø.
443 If you notice any errors or items which should be added or amended to
444 this FAQ please send email to @email{sxemacs-devel@@sxemacs.org}.
445 Include @samp{SXEmacs FAQ} on the Subject: line.
449 * Q1.0.1:: What is SXEmacs?
450 * Q1.0.2:: What is the current version of SXEmacs?
451 * Q1.0.3:: Where can I find it?
452 * Q1.0.4:: Why another version of Emacs?
453 * Q1.0.5:: Why haven't XEmacs/SXEmacs and GNU Emacs merged?
454 * Q1.0.6:: Where can I get help?
455 * Q1.0.7:: Where are the mailing lists archived?
456 * Q1.0.8:: How do you pronounce SXEmacs?
457 * Q1.0.9:: What does SXEmacs look like?
458 * Q1.0.10:: Is there a port of SXEmacs to Microsoft ('95 or NT)?
459 * Q1.0.11:: Is there a port of SXEmacs to the Macintosh?
460 * Q1.0.12:: Is there a port of SXEmacs to NextStep?
461 * Q1.0.13:: Is there a port of SXEmacs to OS/2?
462 * Q1.0.14:: Where can I get a printed copy of the SXEmacs users manual?
465 * Q1.1.1:: What is the FAQ editorial policy?
466 * Q1.1.2:: How do I become a beta tester?
467 * Q1.1.3:: How do I contribute to SXEmacs itself?
470 * Q1.2.1:: Who wrote XEmacs? Who wrote SXEmacs?
471 * Q1.2.2:: Who contributed to this version of the FAQ?
472 * Q1.2.3:: Who contributed to the FAQ in the past?
474 Internationalisation:
475 * Q1.3.1:: What is the status of internationalisation support aka MULE (including Asian language support?
476 * Q1.3.2:: How can I help with internationalisation?
477 * Q1.3.3:: How do I type non-ASCII characters?
478 * Q1.3.4:: Can SXEmacs messages come out in a different language?
479 * Q1.3.5:: Please explain the various input methods in MULE/SXEmacs
480 * Q1.3.6:: How do I portably code for MULE/XEmacs/SXEmacs?
481 * Q1.3.7:: How about Cyrillic Modes?
482 * Q1.3.8:: Does SXEmacs support Unicode?
483 * Q1.3.9:: How does SXEmacs display Unicode?
486 * Q1.4.1:: What is an @file{init.el} or @file{.emacs} and is there a sample one?
487 * Q1.4.2:: Can I use the same @file{init.el}/@file{.emacs} with other Emacsen?
488 * Q1.4.3:: Any good SXEmacs tutorials around?
489 * Q1.4.4:: May I see an example of a useful SXEmacs Lisp function?
490 * Q1.4.5:: And how do I bind it to a key?
491 * Q1.4.6:: What's the difference between a macro and a function?
494 @unnumberedsec 1.0: Introduction
497 @unnumberedsec Q1.0.1: What is SXEmacs?
499 SXEmacs is a powerful, highly customisable open source text editor and
500 application development system, with full GUI support. It is protected
501 under the GNU Public License and related to other versions of Emacs, in
502 particular XEmacs and GNU Emacs. Its emphasis is on modern graphical
503 user interface support and an open software development model, similar
506 SXEmacs is a recent fork of the popular XEmacs and runs on nearly all
507 versions of Unix in existence.
511 @unnumberedsec Q1.0.2: What is the current version of SXEmacs?
513 SXEmacs 22.1.4 is the latest released version.
514 The current development line will become 22.1.5.
518 @unnumberedsec Q1.0.3: Where can I find it?
520 The canonical source can be found via anonymous FTP at:
523 @uref{ftp://ftp.sxemacs.org/sxemacs/}
526 There are also snapshots of the current development line available.
527 However, the preferred method to obtain such ``snapshots'' is via tla
531 tla register-archive http://arch.sxemacs.org/2006
532 tla get steve@@sxemacs.org--2006/sxemacs--main--22.1.5 sxemacs
537 @unnumberedsec Q1.0.4: Why another version of Emacs?
539 First of all, the situation got a little complicated. With SXEmacs
540 regarded as a featurised, cleaned-up XEmacs, there are only two major
541 Emacs flavours. Disregarding that, we have three. Thus let us compare
542 GNU Emacs to SXEmacs/XEmacs in the first place, and afterwards do the
543 comparison SXEmacs vs. XEmacs.
546 @unnumberedsubsec Q1.0.4.1 GNU Emacs vs. SXEmacs/XEmacs
548 Here is a list of some of the reasons why we think you might
556 The XEmacs and SXEmacs maintainers, especially the SXEmacs
557 maintainers, are generally more receptive to suggestions than the GNU
561 Many, many more bundled packages than GNU Emacs.
566 @c @c does not apply anymore
568 @c Face support on TTY's.
570 @c @c does not apply anymore
572 @c A built-in toolbar.
574 @c @c does not apply anymore
576 @c Some internationalisation support (including full MULE support, if
577 @c compiled with it).
579 @c @c does not apply anymore
581 @c Variable-width fonts.
583 @c @c does not apply anymore
585 @c Variable-height lines.
588 Marginal annotations.
594 XEmacs can be used as an Xt widget, and can be embedded within another
597 @c @c does not apply anymore
599 @c Horizontal and vertical scrollbars (using real toolkit scrollbars).
602 Better APIs (and performance) for attaching fonts, colors, and other
605 @c @c does not apply anymore
607 @c The ability to embed arbitrary graphics in a buffer.
610 Completely compatible (at the C level) with the Xt-based toolkits.
613 Native support for PostgreSQL databases, LDAP servers and Berkeley DB.
616 Support for GMP numbers (multi-precision integers, quotients and
620 Support for multiple tty connections.
622 @c the FSF guys' implementation is a disease!
629 @unnumberedsubsec Q1.0.4.2 SXEmacs vs. XEmacs
631 SXEmacs' strengths are clearly its feature list and its performance.
632 Also, these were the main reasons to fork. XEmacs maintainers became
633 more and more uninterested in useful additions, reductions and
634 optimisations on the C-level.
638 Foreign Function Interface (FFI).
641 PostgreSQL notify support.
644 Native OpenSSL support.
647 Support for mpfr floats, Gaussian and complex numbers, quaternions and
651 Support for raw strings.
654 Much faster hashing functions.
657 Support for internal URL access via cURL.
660 Support for various image formats: Any format that ImageMagick is able
664 Support for modern sound libraries and sound servers: ESD, Polyp,
665 aRts, Jack, ALSA, and ao
668 Support for various media formats (provided by external libraries):
669 Any format that FFmpeg, sndfile, SoX, MAD and gstreamer can handle.
672 Support for the implementation network services through the use of
673 network server stream.
680 @unnumberedsec Q1.0.5: Why haven't XEmacs/SXEmacs and GNU Emacs Merged?
682 There are currently irreconcilable differences in the views about
683 technical, programming, design and organisational matters between RMS
684 and the SXEmacs/XEmacs development team which provide little hope for a
685 merge to take place in the short-term future.
689 @unnumberedsec Q1.0.6: Where can I get help?
691 Probably the easiest way, if everything is installed, is to use Info, by
692 pressing @kbd{C-h i}, or looking for an Info item on the
693 Help Menu. @kbd{M-x apropos} can be used to look for particular commands.
695 For items not found in the manual, try reading this FAQ and reading the
696 Usenet group comp.emacs.xemacs.
698 If you choose to post to a newsgroup, @strong{please use
699 comp.emacs.xemacs}. Please do not post SXEmacs/XEmacs related questions
702 SXEmacs is an official group at the Freenode IRC network (formerly
703 OPN). Join us at @uref{irc://irc.freenode.net/sxemacs}.
705 If you cannot post, nor read Usenet news, nor want to join us at IRC,
706 there is a mailing at @email{sxemacs-devel@@sxemacs.org} for general
707 and developing issues.
711 @unnumberedsec Q1.0.7: Where are the mailing lists archived?
713 The archives can be found at
714 @uref{http://www.sxemacs.org/list-archives/html/sxemacs-devel/}.
716 Subscription can be done via
717 @uref{http://www.sxemacs.org/mailman/listinfo}
721 @unnumberedsec Q1.0.8: How do you pronounce SXEmacs?
723 The most common pronounciation is @samp{sexy macs}.
727 @unnumberedsec Q1.0.9: What does SXEmacs look like?
729 Look at the screenshot section at @uref{http://www.sxemacs.org}.
733 @unnumberedsec Q1.0.10: Is there a port of SXEmacs to Microsoft ('95 or NT)?
735 Of course not! The SXEmacs developers have so much fun stripping all of
736 the erroneous code and workaround-hacks related to Microsoft Windows.
740 @unnumberedsec Q1.0.11: Is there a port of SXEmacs to the Macintosh?
742 Good question. Is there?
746 @unnumberedsec Q1.0.12: Is there a port of SXEmacs to NextStep?
748 @c Carl Edman, apparently no longer at @email{cedman@@princeton.edu}, did
749 @c the port of GNU Emacs to NeXTstep and expressed interest in doing the
750 @c XEmacs port, but never went any farther.
756 @unnumberedsec Q1.0.13: Is there a port of SXEmacs to OS/2?
758 @c No, but Alexander Nikolaev <avn_1251@@mail.ru> is working on it.
760 Aaaaargh. You could have also asked: Is there a port of SXEmacs to my
765 @unnumberedsec Q1.0.14: Where can I obtain a printed copy of the SXEmacs User's Manual?
767 Pre-printed manuals are not available. If you are familiar with
768 TeX, you can generate your own manual from the SXEmacs sources.
770 HTML and Postscript versions of SXEmacs manuals are available from the
771 SXEmacs web site at @uref{http://www.sxemacs.org}.
776 @unnumberedsec 1.1: Policies
777 @unnumberedsec Q1.1.1: What is the FAQ editorial policy?
779 The FAQ is actively maintained and modified regularly. All links should
782 If you think you have a better way of answering a question, or think a
783 question should be included, we'd like to hear about it.
784 Please make sure that @samp{SXEmacs FAQ} appears on the Subject: line
785 if you prefer to send us a mail. If you would like to use IRC
786 instead, please make sure that someone actively responds to your
787 request. We usually stay in the channel while we are asleep, but
788 if you join, post the request and leave again, we have no means to
789 get into contact with you again.
791 Questions and answers included into the FAQ will be edited for
792 spelling and grammar and will be attributed.
796 @unnumberedsec Q1.1.2: How do I become a beta tester?
798 We have no formal way. Also there are no presumptions. Just
799 subscribe to the mailing list @email{sxemacs-devel@@sxemacs.org} and
800 say hello or join us at IRC.
802 Be prepared to get your hands dirty, as beta testers are expected to
803 identify problems as best they can.
807 @unnumberedsec Q1.1.3: How do I contribute to SXEmacs itself?
809 Quoting a famous developer:
811 I know the answer exactly.
816 @unnumberedsec 1.2: Credits
817 @unnumberedsec Q1.2.1: Who wrote SXEmacs?
819 SXEmacs is the result of the time and effort of many people. The
820 developers responsible for recent releases can be viewed by
821 @kbd{M-x about-sxemacs} or the @samp{About SXEmacs} item in the Help
825 @c @item @email{martin@@xemacs.org, Martin Buchholz}
827 @c <br><img src="mrb.jpeg" alt="Portrait of Martin Buchholz"><br>
831 @c @item @email{stephen@@xemacs.org, Stephen Turnbull}
834 @c @item @email{ben@@xemacs.org, Ben Wing}
836 @c <br><img src="wing.gif" alt="Portrait of Ben Wing"><br>
840 @c @item @email{hniksic@@xemacs.org, Hrvoje Niksic}
843 @c <br><img src="hniksic.jpeg" alt="Portrait of Hrvoje Niksic"><br>
848 @c The developers responsible for older releases were:
851 @c @item @email{steve@@xemacs.org, Steve Baur}
854 @c <br><img src="steve.gif" alt="Portrait of Steve Baur"><br>
857 @c @item @email{cthomp@@xemacs.org, Chuck Thompson}
859 @c <br><img src="cthomp.jpeg" alt="Portrait of Chuck Thompson"><br>
862 @c @item @email{jwz@@jwz.org, Jamie Zawinski}
864 @c <br><img src="jwz.gif" alt="Portrait of Jamie Zawinski"><br>
867 @c @item @email{mly@@adoc.xerox.com, Richard Mlynarik}
869 @c Steve Baur was the primary maintainer for 19.15 through 21.0.
871 @c Chuck Thompson and Ben Wing were the maintainers for 19.11 through 19.14
872 @c and heavy code contributors for 19.8 through 19.10.
874 @c Jamie Zawinski was the maintainer for 19.0 through 19.10 (the entire
875 @c history of Lucid Emacs). Richard Mlynarik was a heavy code contributor
876 @c to 19.6 through 19.8.
880 @c Along with many other contributors, partially enumerated in the
881 @c @samp{About XEmacs} option in the Help menu.
885 @unnumberedsec Q1.2.2: Who contributed to this version of the FAQ?
887 The following people contributed valuable suggestions to building this
888 version of the FAQ (listed in alphabetical order):
891 @item @email{steve@@xemacs.org, SL Baur}
893 @item @email{hroptatyr@@sxemacs.org, Sebastian Freundt}
895 @item @email{hniksic@@xemacs.org, Hrvoje Niksic}
897 @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari}
903 @unnumberedsec Q1.2.3: Who contributed to the FAQ in the past?
905 This is only a partial list, as many names were lost in a hard disk
909 @item @email{binge@@aloft.att.com, Curtis.N.Bingham}
911 @item @email{bruncott@@dormeur.inria.fr, Georges Brun-Cottan}
913 @item @email{rjc@@cogsci.ed.ac.uk, Richard Caley}
915 @item @email{cognot@@ensg.u-nancy.fr, Richard Cognot}
917 @item @email{daku@@nortel.ca, Mark Daku}
919 @item @email{wgd@@martigny.ai.mit.edu, William G. Dubuque}
921 @item @email{eeide@@cs.utah.edu, Eric Eide}
923 @item @email{af@@biomath.jussieu.fr, Alain Fauconnet}
925 @item @email{cflatter@@nrao.edu, Chris Flatters}
927 @item @email{ginsparg@@adra.com, Evelyn Ginsparg}
929 @item @email{hall@@aplcenmp.apl.jhu.edu, Marty Hall}
931 @item @email{dkindred@@cmu.edu, Darrell Kindred}
933 @item @email{dmoore@@ucsd.edu, David Moore}
935 @item @email{arup+@@cmu.edu, Arup Mukherjee}
937 @item @email{nickel@@prz.tu-berlin.de, Juergen Nickelsen}
939 @item @email{powell@@csl.ncsa.uiuc.edu, Kevin R. Powell}
941 @item @email{dworkin@@ccs.neu.edu, Justin Sheehy}
943 @item @email{stig@@hackvan.com, Stig}
945 @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari}
950 @unnumberedsec 1.3: Internationalisation
951 @unnumberedsec Q1.3.1: What is the status of internationalisation support aka MULE (including Asian language support?
953 Both the stable and development versions of SXEmacs include
954 internationalisation support (aka MULE). MULE currently works on
955 Unix and Linux systems. Binaries compiled without MULE support run
956 faster than MULE capable SXEmacsen.
960 @unnumberedsec Q1.3.2: How can I help with internationalisation?
962 If you would like to help, you can use the usual ways to get into
963 contact with us, that is join the mailing list
964 @email{sxemacs-devel@@sxemacs.org} or join us at
965 @uref{irc://irc.freenode.net/sxemacs}.
967 Especially needed are people who speak/write languages other than
968 English, who are willing to use SXEmacs/MULE regularly, and have some
969 experience with Elisp.
971 Translations of the TUTORIAL and man page are welcome, and SXEmacs
972 does support multilingual menus, but we have few current translations.
978 @unnumberedsec Q1.3.3: How do I type non-ASCII characters?
980 See question 3.5.7 (@pxref{Q3.5.7}) in part 3 of this FAQ for some
981 simple methods that also work in non-MULE builds of SXEmacs (but only for
982 one-octet coded character sets, and mostly for ISO 8859/1). Many of the
983 methods available for Cyrillic (@pxref{Q1.3.7}) work without MULE.
984 MULE has more general capabilities. @xref{Q1.3.5}.
986 @xref{Q3.2.7}, which covers display of non-ASCII characters.
989 @unnumberedsec Q1.3.4: Can SXEmacs messages come out in a different language?
991 The message-catalog support was written but is badly bit-rotted.
992 SXEmacs 22.2 may do so, but it is not of high priority currently.
993 Again, if you are willing to help, contact us.
995 However, menubar localisation @emph{does} work. To enable it, add to
996 your @file{Emacs} file entries like this:
999 Emacs*XlwMenu.resourceLabels: True
1000 Emacs*XlwMenu.file.labelString: Fichier
1001 Emacs*XlwMenu.openInOtherWindow.labelString: In anderem Fenster oeffnen
1004 The name of the resource is derived from the non-localised entry by
1005 removing punctuation and capitalizing as above.
1009 @unnumberedsec Q1.3.5: Please explain the various input methods in MULE/SXEmacs
1011 Mule supports a wide variety of input methods. There are three basic
1012 classes: Lisp implementations, generic platform support, and library
1015 @emph{Lisp implementations} include Quail, which provides table-driven
1016 input methods for almost all the character sets that Mule supports
1017 (including all of the ISO 8859 family, the Indic languages, Thai, and
1018 so on), and SKK, for Japanese. (SKK also supports an interface to an
1019 external "dictionary server" process.) Quail supports both typical
1020 "dead-key" methods (eg, in the "latin-1-prefix" method, @kbd{" a}
1021 produces ä, LATIN SMALL LETTER A WITH DIAERESIS), and the complex
1022 dictionary-based phonetic methods used for Asian ideographic languages
1025 Lisp implementations can be less powerful (but they are not perceptibly
1026 inefficient), and of course are not portable to non-Emacs applications.
1027 The incompatibility can be very annoying. On the other hand, they
1028 require no special platform support or external libraries, so if you can
1029 display the characters, Mule can input them for you and you can edit,
1032 @emph{Generic platform support} is currently limited to the X Input
1033 Method (XIM) framework, but IIIMF (Sun's Internet-Intranet Input
1034 Method Framework) support is extremely desirable. XIM is enabled at
1035 build time by use of the @samp{--with-xim} flag to @code{configure}.
1036 For use of XIM, see your platform documentation. However, normally
1037 the input method you use is specified via the @samp{LANG} and
1038 @samp{XMODIFIERS} environment variables.
1040 Of course, input skills are portable across most applications. However,
1041 especially in modern GUI systems the habit of using bucky bits has
1042 fallen into sad disuse, and many XIM systems are poorly configured for
1043 use with Emacs. For example, the kinput2 input manager (a separate
1044 process providing an interface between Japanese dictionary servers such
1045 as Canna and Wnn, and the application) tends to gobble up keystrokes
1046 generating Meta characters. This means that to edit while using an XIM
1047 input method, you must toggle the input method off every time you want
1048 to use @kbd{M-f}. Your mileage may vary.
1050 @emph{Library interfaces} are most common for Japanese, although Wnn
1051 supports Chinese (traditional and simplified) and Korean. There are
1052 Chinese and Korean input servers available, but we do not know of any
1053 patches for SXEmacs to use them directly. You can use them via
1054 IM-enabled terminals, by manipulating the terminal coding systems. We
1055 describe only the Japanese-oriented systems here. The advantage of
1056 these systems is that they are very powerful, and on platforms where
1057 they are available there is typically a wide range of applications that
1058 support them. Thus your input skills are portable across applications.
1060 Mule provides built-in interfaces to the following input methods: Wnn4,
1061 Wnn6, Canna, and SJ3. These can be configured at build time. There are
1062 patches available (no URL, sorry) to support the SKK server, as well.
1063 Wnn and SJ3 use the @code{egg} user interface. The interface for Canna
1064 is specialized to Canna.
1066 Wnn supports Japanese, Chinese and Korean. It is made by OMRON and Kyôto
1067 University. It is a powerful and complex system. Wnn4 is free and Wnn6
1068 is not. Wnn uses grammatical hints and probability of word association,
1069 so in principle Wnn can be cleverer than other methods.
1071 Canna, made by NEC, supports only Japanese. It is a simple and powerful
1072 system. Canna uses only grammar, but its grammar and dictionary are
1073 quite sophisticated. So for standard modern Japanese, Canna seems
1074 cleverer than Wnn4. In addition, the UNIX version of Canna is free.
1076 SJ3, by Sony, supports only Japanese.
1078 Egg consists of following parts:
1082 Input character Translation System (ITS) layer.
1083 It translates ASCII inputs to Kana/PinYin/Hangul characters.
1086 Kana/PinYin/Hangul to Kanji transfer layer.
1087 The interface layer to network Kana-Kanji server (Wnn and Sj3).
1090 These input methods are modal. They have a raw (alphabet) mode, a
1091 phonetic input mode, and Kana-Kanji transfer mode. However there are
1092 mode-less input methods for Egg and Canna. @samp{boiled-egg} is a
1093 mode-less input method running on Egg. For Canna, @samp{canna.el} has a
1094 tiny boiled-egg-like command, @code{(canna-boil)}, and there are some
1095 boiled-egg-like utilities.
1097 Much of this information was provided by @email{morioka@@jaist.ac.jp,
1101 @unnumberedsec Q1.3.6: How do I portably code for MULE/SXEmacs?
1103 MULE has evolved rapidly over the last few years, and the original third
1104 party patch (for GNU Emacs 19), GNU Emacs 20+, and XEmacs 20+ have quite
1105 different implementations. The APIs also vary although recent versions
1106 of XEmacs have tended to converge to the GNU Emacs standard.
1108 MULE implementations are going to continue to evolve. Both GNU Emacs
1109 and XEmacs are working hard on Unicode support, which will involve new
1110 APIs and probably variations on old ones. For XEmacs 22, the old ISO
1111 2022-based system for recognizing encodings will be replaced by a much
1112 more flexible system, which should improve accuracy of automatic coding
1113 detections, but will also involve new APIs.
1115 @email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes:
1118 The application implementor must write separate code for these mule
1119 variants. [Please don't hesitate to report these variants to us; they
1120 are not, strictly speaking, bugs, but they give third-party developers
1121 the same kind of creepy-crawly feeling. We'll do what we can. -- Ed.]
1123 MULE and the next version of Emacs are similar but the symbols are very
1124 different---requiring separate code as well.
1126 Namely we must support 3 kinds of mule variants and 4 or 5 or 6 kinds of
1127 emacs variants... (;_;) I'm shocked, so I wrote a wrapper package called
1128 @code{emu} to provide a common interface. [There is an XEmacs package
1129 of APEL which provides much more comprehensive coverage. Be careful,
1130 however; APEL has problems of its own. -- Ed.]
1132 I have the following suggestions about dealing with mule variants:
1136 @code{(featurep 'mule)} @code{t} on all mule variants
1139 @code{(boundp 'MULE)} is @code{t} on only MULE. Maybe the next version
1140 of Emacs will not have this symbol.
1143 MULE has a variable @code{mule-version}. Perhaps the next version of
1144 Emacs will have this variable as well.
1147 Following is a sample to distinguish mule variants:
1150 (if (featurep 'mule)
1151 (cond ((boundp 'MULE)
1152 ;; for original Mule
1154 ((string-match "XEmacs" emacs-version)
1155 ;; for XEmacs with Mule
1158 ;; for next version of Emacs
1160 ;; for old emacs variants
1167 @unnumberedsec Q1.3.7: How about Cyrillic Modes?
1169 @email{ilya@@math.ohio-state.edu, Ilya Zakharevich} writes:
1172 There is a cyrillic mode in the file @file{mysetup.zip} in
1176 @uref{ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/}. This is a
1177 modification to @email{ava@@math.jhu.ed, Valery Alexeev's} @file{russian.el}
1178 which can be obtained from
1181 @uref{http://www.math.uga.edu/~valery/russian.el}.
1183 @email{d.barsky@@ee.surrey.ac.uk, Dima Barsky} writes:
1186 There is another cyrillic mode for both GNU Emacs and XEmacs by
1187 @email{manin@@camelot.mssm.edu, Dmitrii
1192 @uref{http://kulichki-lat.rambler.ru/centrolit/manin/cyr.el}.
1193 @c Link above, <URL:http://camelot.mssm.edu/~manin/cyr.el> was dead.
1194 @c Changed to russian host instead
1197 @email{rebecca.ore@@op.net, Rebecca Ore} writes:
1200 The fullest resource I found on Russian language use (in and out of
1201 SXEmacs) is @uref{http://www.ibiblio.org/sergei/Software/Software.html}
1206 @unnumberedsec Q1.3.8: Does SXEmacs support Unicode?
1208 Partially, as an external encoding for files, processes, and terminals.
1209 It does not yet support Unicode fonts @ref{Q1.3.9, Does SXEmacs support
1212 To get Unicode support, you need a Mule-enabled SXEmacs. Install
1213 Mule-UCS from packages in the usual way. Put
1216 (require 'un-define)
1217 (set-coding-priority-list '(utf-8))
1218 (set-coding-category-system 'utf-8 'utf-8)
1221 in your init file to enable the UTF-8 coding system. You may wish to
1222 view the documentation of @code{set-coding-priority-list} if you find
1223 that files that are not UTF-8 are being mis-recognised as UTF-8.
1225 Install standard national fonts (not Unicode fonts) for all
1226 character sets you use. See @ref{Q1.3.9}.
1228 Mule-UCS also supports 16-bit forms of Unicode (UTF-16). It does not
1229 support 31-bit forms of Unicode (UTF-32 or UCS-4).
1233 @unnumberedsec Q1.3.9: How does SXEmacs display Unicode?
1235 Mule doesn't have a Unicode charset internally, so there's nothing to
1236 bind a Unicode registry to. It would not be straightforward to create,
1237 either, because Unicode is not ISO 2022-compatible. You'd have to
1238 translate it to multiple 96x96 pages.
1240 This means that Mule-UCS uses ordinary national fonts for display. This
1241 is not really a problem, except for those languages that use the Unified
1242 Han characters. The problem here is that Mule-UCS maps from Unicode
1243 code points to national character sets in a deterministic way. By
1244 default, this means that Japanese fonts are tried first, then Chinese,
1245 then Korean. To change the priority ordering, use the command
1246 `un-define-change-charset-order'.
1248 It also means you can't use Unicode fonts directly, at least not without
1249 extreme hackery. You can run -nw with (set-terminal-coding-system
1250 'utf-8) if you really want a Unicode font for some reason.
1252 Real Unicode support will be introduced in SXEmacs 22.2.
1257 @unnumberedsec 1.4: Getting Started, Backing up & Recovery
1258 @unnumberedsec Q1.4.1: What is an @file{init.el} or @file{.emacs} and is there a sample one?
1260 The @file{init.el} or @file{.emacs} file is used to customise SXEmacs
1261 to your tastes. The preferred location for the init
1262 file is @file{~/.sxemacs/init.el}. We still accept the older location
1263 @file{~/.emacs}, but the first time you run it, it will ask to migrate
1264 your file to the new location.
1265 If you answer yes, the file will be moved, and a "compatibility"
1266 @file{.emacs} file will be placed in the old location so that you can
1267 still run older versions of XEmacs, or versions of GNU Emacs, which
1268 expect the old location. The @file{.emacs} file present is just a
1269 stub that loads the real file in @file{~/.sxemacs/init.el}.
1271 No two init files are alike, nor are they expected to be alike, but
1272 that's the point. The SXEmacs distribution contains an excellent
1273 starter example in the @file{etc/} directory called
1274 @file{sample.init.el}. Copy this file from there to
1275 @file{~/.sxemacs/init.el}, where @samp{~} means your home directory,
1276 of course. Then edit it to suit.
1278 You may bring the @file{sample.init.el} file into a SXEmacs buffer
1279 from the menubar. The menu entry is always under the @samp{Samples}
1280 submenu in the @samp{Help} menu. To determine the location of the
1281 @file{etc/} directory type the command @kbd{C-h v data-directory
1286 @unnumberedsec Q1.4.2: Can I use the same @file{init.el}/@file{.emacs} with XEmacs or GNU Emacs?
1288 Yes. The sample @file{init.el} included in the SXEmacs
1289 distribution will show you how to handle different versions and flavours
1294 @unnumberedsec Q1.4.3: Any good tutorials around?
1296 There's the SXEmacs tutorial available from the Help Menu under
1297 @samp{Basics->Tutorials}, or by typing @kbd{C-h t}. To check whether
1298 it's available in a non-english language, type @kbd{C-u C-h t TAB}, type
1299 the first letters of your preferred language, then type @key{RET}.
1303 @unnumberedsec Q1.4.4: May I see an example of a useful SXEmacs Lisp function?
1305 The following function does a little bit of everything useful. It does
1306 something with the prefix argument, it examines the text around the
1307 cursor, and it's interactive so it may be bound to a key. It inserts
1308 copies of the current word the cursor is sitting on at the cursor. If
1309 you give it a prefix argument: @kbd{C-u 3 M-x double-word} then it will
1313 (defun double-word (count)
1314 "Insert a copy of the current word underneath the cursor"
1316 (let (here there string)
1321 (setq there (point))
1322 (setq string (buffer-substring here there)))
1328 The best way to see what is going on here is to let SXEmacs tell you.
1329 Put the code into an SXEmacs buffer, and do a @kbd{C-h f} with the cursor
1330 sitting just to the right of the function you want explained. Eg. move
1331 the cursor to the SPACE between @code{interactive} and @samp{"*p"} and
1332 hit @kbd{C-h f} to see what the function @code{interactive} does. Doing
1333 this will tell you that the @code{*} requires a writable buffer, and
1334 @code{p} converts the prefix argument to a number, and
1335 @code{interactive} allows you to execute the command with @kbd{M-x}.
1339 @unnumberedsec Q1.4.5: And how do I bind it to a key?
1341 To bind to a key do:
1344 (global-set-key "\C-cd" 'double-word)
1347 Or interactively, @kbd{M-x global-set-key} and follow the prompts.
1351 @unnumberedsec Q1.4.6: What's the difference between a macro and a function?
1353 Quoting from the Lisp Reference (a.k.a @dfn{Lispref}) Manual:
1355 @dfn{Macros} enable you to define new control constructs and other
1356 language features. A macro is defined much like a function, but instead
1357 of telling how to compute a value, it tells how to compute another Lisp
1358 expression which will in turn compute the value. We call this
1359 expression the @dfn{expansion} of the macro.
1361 Macros can do this because they operate on the unevaluated expressions
1362 for the arguments, not on the argument values as functions do. They can
1363 therefore construct an expansion containing these argument expressions
1366 Do not confuse the two terms with @dfn{keyboard macros}, which are
1367 another matter, entirely. A keyboard macro is a key bound to several
1368 other keys. Refer to manual for details.
1372 @node Installation, Customisation, Introduction, Top
1373 @unnumbered 2 Installation and Trouble Shooting
1375 This is part 2 of the SXEmacs Frequently Asked Questions list. This
1376 section is devoted to Installation, Maintenance and Trouble Shooting.
1380 * Q2.0.1:: Running SXEmacs without installing.
1381 * Q2.0.2:: SXEmacs is too big.
1382 * Q2.0.3:: Compiling SXEmacs with Netaudio. @c what?!
1383 * Q2.0.4:: Problems with Linux and ncurses.
1384 * Q2.0.5:: Do I need X11 to run SXEmacs?
1385 * Q2.0.6:: I'm having strange crashes. What do I do?
1386 * Q2.0.7:: Libraries in non-standard locations.
1387 * Q2.0.8:: can't resolve symbol _h_errno
1388 * Q2.0.9:: Where do I find external libraries?
1389 * Q2.0.10:: After I run configure I find a coredump, is something wrong?
1390 * Q2.0.11:: SXEmacs can't resolve host names.
1391 * Q2.0.12:: Why can't I strip SXEmacs?
1392 * Q2.0.13:: I don't need no steenkin' packages. Do I?
1393 * Q2.0.14:: How do I figure out which packages to install?
1394 * Q2.0.15:: EFS fails with "500 AUTH not understood" (NEW)
1397 * Q2.1.1:: SXEmacs just crashed on me!
1398 * Q2.1.2:: Cryptic Minibuffer messages.
1399 * Q2.1.3:: Translation Table Syntax messages at Startup.
1400 * Q2.1.4:: Startup warnings about deducing proper fonts?
1401 * Q2.1.5:: SXEmacs cannot connect to my X Terminal.
1402 * Q2.1.6:: SXEmacs just locked up my Linux X server.
1403 * Q2.1.7:: HP Alt key as Meta.
1404 * Q2.1.8:: got (wrong-type-argument color-instance-p nil)!
1405 * Q2.1.9:: SXEmacs causes my OpenWindows 3.0 server to crash.
1406 * Q2.1.10:: Warnings from incorrect key modifiers.
1407 * Q2.1.11:: Can't instantiate image error... in toolbar
1408 * Q2.1.12:: Regular Expression Problems on DEC OSF1.
1409 * Q2.1.13:: HP/UX 10.10 and @code{create_process} failure
1410 * Q2.1.14:: @kbd{C-g} doesn't work for me. Is it broken?
1411 * Q2.1.15:: How to debug a SXEmacs problem with a debugger.
1412 * Q2.1.16:: SXEmacs crashes in @code{strcat} on HP/UX 10.
1413 * Q2.1.17:: @samp{Marker does not point anywhere}.
1414 * Q2.1.18:: SXEmacs is outputting lots of X errors.
1415 * Q2.1.19:: SXEmacs does not follow the local timezone.
1416 * Q2.1.20:: @samp{Symbol's function definition is void: hkey-help-show.}
1417 * Q2.1.21:: [This question intentionally left blank]
1418 * Q2.1.22:: SXEmacs seems to take a really long time to do some things.
1419 * Q2.1.23:: Movemail on Linux does not work for SXEmacs.
1420 * Q2.1.24:: SXEmacs won't start without network.
1421 * Q2.1.25:: After upgrading, SXEmacs won't do `foo' any more!
1426 @unnumberedsec 2.0: Installation
1427 @unnumberedsec Q2.0.1: Running SXEmacs without installing
1429 How can I just try SXEmacs without installing it?
1431 SXEmacs will run in place without requiring installation and copying of
1432 the Lisp directories, and without having to specify a special build-time
1433 flag. It's the copying of the Lisp directories that requires so much
1434 space. SXEmacs is largely written in Lisp.
1438 @unnumberedsec Q2.0.2: SXEmacs is too big
1440 The space required by the installation directories can be
1441 reduced dramatically if desired. Gzip all the .el files. Remove all
1442 the packages you'll never want to use. Remove the TexInfo manuals.
1443 Remove the Info (and use just hardcopy versions of the manual). Remove
1444 most of the stuff in etc. Remove or gzip all the source code. Gzip or
1445 remove the C source code. Configure it so that copies are not made of
1448 These are all Emacs Lisp source code and bytecompiled object code.
1449 You may safely gzip everything named *.el here. You may remove any
1450 package you don't use. @emph{Nothing bad will happen if you delete a
1451 package that you do not use}. You must be sure you do not use it
1452 though, so be conservative at first.
1454 Any package with the possible exceptions of xemacs-base, and EFS are
1455 candidates for removal. Ask yourself, @emph{Do I ever want to use this
1456 package?} If the answer is no, then it is a candidate for removal.
1458 First, gzip all the .el files. Then go about package by package and
1459 start gzipping the .elc files. Then run SXEmacs and do whatever it is
1460 you normally do. If nothing bad happens, then remove the package.
1461 You can remove a package via the PUI interface (@kbd{M-x
1462 pui-list-packages}, then press @kbd{d} to mark the packages you wish
1463 to delete, and then @kbd{x} to delete them.
1465 Another method is to do @kbd{M-x package-get-delete-package}.
1468 @unnumberedsec Q2.0.3: Compiling SXEmacs with Netaudio.
1470 What is the best way to compile SXEmacs with the netaudio system,
1471 since I have got the netaudio system compiled but installed at a weird
1472 place, I am not root. Also in the READMEs it does not say anything
1473 about compiling with the audioserver?
1475 You should only need to add some stuff to the configure command line.
1476 @c To tell it to compile in netaudio support: @samp{--with-sound=both}, or
1477 @c @samp{--with-sound=nas} if you don't want native sound support for some
1478 @c reason.) To tell it where to find the netaudio includes and libraries:
1481 --site-libraries=WHATEVER
1482 --site-includes=WHATEVER
1485 Then (fingers crossed) it should compile and it will use netaudio if
1486 you have a server running corresponding to the X server. The netaudio
1487 server has to be there when SXEmacs starts. If the netaudio server
1488 goes away and another is run, SXEmacs should cope (fingers crossed,
1489 error handling in netaudio isn't perfect).
1491 BTW, netaudio has been renamed as it has a name clash with something
1492 else, so if you see references to NAS or Network Audio System, it's the
1493 same thing. It also might be found at
1494 @uref{ftp://ftp.x.org/contrib/audio/nas/}.
1498 @unnumberedsec Q2.0.4: Problems with Linux and ncurses.
1500 @c On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with libc
1501 @c 5.2.18, XEmacs 20.0b20 is unable to open a tty device:
1505 @c src/xemacs -nw -q
1506 @c Initialisation error:
1510 @c Terminal type `xterm' undefined (or can't access database?)
1513 @c @email{ben@@xemacs.org, Ben Wing} writes:
1516 @c Your ncurses configuration is messed up. Your /usr/lib/terminfo is a
1517 @c bad pointer, perhaps to a CD-ROM that is not inserted.
1524 @unnumberedsec Q2.0.5: Do I need X11 to run SXEmacs?
1530 @unnumberedsec Q2.0.6: I'm having strange crashes. What do I do?
1532 There have been a variety of reports of crashes due to compilers with
1533 buggy optimisers. Please see the @file{PROBLEMS} file that comes with
1534 SXEmacs to read what it says about your platform.
1538 @unnumberedsec Q2.0.7: Libraries in non-standard locations
1540 I have x-faces, jpeg, xpm etc. all in different places. I've tried
1541 space-separated, comma-separated, several --site-libraries, all to no
1545 --with-site-prefixes=/path/to/site1::/path/to/site2::/path/to/site3
1550 @unnumberedsec Q2.0.8: can't resolve symbol _h_errno
1552 Does not apply anymore.
1556 @unnumberedsec Q2.0.9: Where do I find external libraries?
1558 Oh well ... we support far too many external libraries to list them
1559 here. Have a glance at INSTALL to check if there are special
1560 instructions for some of the libraries you intend to use.
1564 @unnumberedsec Q2.0.10: After I run configure I find a core dump, is something wrong?
1566 @c @c WHOOOOOOOAT?!?!
1567 @c Not necessarily. If you have GNU sed 3.0 you should downgrade it to
1568 @c 2.05. From the @file{README} at prep.ai.mit.edu:
1571 @c sed 3.0 has been withdrawn from distribution. It has major revisions,
1572 @c which mostly seem to be improvements; but it turns out to have bugs too
1573 @c which cause trouble in some common cases.
1575 @c Tom Lord won't be able to work fixing the bugs until May. So in the
1576 @c mean time, we've decided to withdraw sed 3.0 from distribution and make
1577 @c version 2.05 once again the recommended version.
1580 @c It has also been observed that the vfork test on Solaris will leave a
1583 Send a build report.
1587 @unnumberedsec Q2.0.11: SXEmacs doesn't resolve hostnames.
1589 This is the result of a long-standing problem with SunOS and the fact
1590 that stock SunOS systems do not ship with DNS resolver code in libc.
1592 @email{ckd@@loiosh.kei.com, Christopher Davis} writes:
1595 That's correct [The SunOS 4.1.3 precompiled binaries don't do name
1596 lookup]. Since Sun figured that everyone used NIS to do name lookups
1597 (that DNS thing was apparently only a passing fad, right?), the stock
1598 SunOS 4.x systems don't have DNS-based name lookups in libc.
1600 This is also why Netscape ships two binaries for SunOS 4.1.x.
1602 The best solution is to compile it yourself; the configure script will
1603 check to see if you've put DNS in the shared libc and will then proceed
1604 to link against the DNS resolver library code.
1609 @unnumberedsec Q2.0.12: Why can't I strip SXEmacs?
1611 @email{cognot@@fronsac.ensg.u-nancy.fr, Richard Cognot} writes:
1614 Because of the way SXEmacs (and every other Emacsen, AFAIK) is
1615 built. The link gives you a bare-boned emacs (called temacs). temacs
1616 is then run, preloading some of the lisp files. The result is then
1617 dumped into a new executable, named xemacs, which will contain all of
1618 the preloaded lisp functions and data.
1620 Now, during the dump itself, the executable (code+data+symbols) is
1621 written on disk using a special unexec() function. This function is
1622 obviously heavily system dependent. And on some systems, it leads to an
1623 executable which, although valid, cannot be stripped without damage. If
1624 memory serves, this is especially the case for AIX binaries. On other
1625 architectures it might work OK.
1627 The Right Way to strip the emacs binary is to strip temacs prior to
1628 dumping xemacs. This will always work, although you can do that only if
1629 you install from sources (as temacs is @file{not} part of the binary
1633 @email{nat@@nataa.fr.eu.org, Nat Makarevitch} writes:
1640 [ ./configure; make ]
1652 cp src/sxemacs /usr/local/bin/sxemacs
1659 @unnumberedsec Q2.0.13: I don't need no steenkin' packages. Do I?
1661 Strictly speaking, no. SXEmacs will build and install just fine
1662 without any packages installed. However, only the most basic editing
1663 functions will be available with no packages installed, so installing
1664 packages is an essential part of making your installed SXEmacs
1669 @unnumberedsec Q2.0.14: How do I figure out which packages to install?
1671 Many people really liked the old way that packages were bundled and do
1672 not want to mess with packages at all. You can grab all the packages at
1673 once like you used to with old SXEmacs versions. Download the file
1675 @file{xemacs-sumo.tar.gz}
1677 For a SXEmacs compiled with Mule you also need
1679 @file{xemacs-mule-sumo.tar.gz}
1681 from the @file{packages} directory on your XEmacs mirror archive.
1682 N.B. They are called 'Sumo Tarballs' for good reason. They are
1683 currently about 15MB and 2.3MB (gzipped) respectively.
1684 @c mwhahahahaha, that'd load within a second here I think :P
1688 @code{cd $prefix/lib/sxemacs ; gunzip -c <tarballname> | tar xf -}
1690 See README.packages for more detailed installation instructions.
1692 As the Sumo tarballs are not regenerated as often as the individual
1693 packages, it is recommended that you use the automatic package tools
1694 afterwards to pick up any recent updates.
1698 @unnumberedsec Q2.0.15: EFS fails with "500 AUTH not understood"
1700 A typical error: FTP Error: USER request failed; 500 AUTH not understood.
1702 Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends
1703 on comp.emacs.xemacs:
1705 tell your ftp client to not attempt AUTH authentication (or do not
1706 use FTP servers that don't understand AUTH)
1708 and notes that you need to add an element (often "-u") to
1709 @code{efs-ftp-program-args}. Use @kbd{M-x customize-variable}, and
1710 verify the needed flag with @code{man ftp} or other local
1715 @unnumberedsec 2.1: Trouble Shooting
1716 @unnumberedsec Q2.1.1: Help! SXEmacs just crashed on me!
1718 First of all, don't panic. Whenever SXEmacs crashes, it tries
1719 extremely hard to auto-save all of your files before dying. The main
1720 time that this will not happen is if the machine physically lost power
1721 or if you killed the SXEmacs process using @code{kill -9}. The next
1722 time you try to edit those files, you will be informed that a more
1723 recent auto-save file exists. You can use @kbd{M-x recover-file} to
1724 retrieve the auto-saved version of the file.
1726 You can use the command @kbd{M-x recover-session} after a crash to pick
1727 up where you left off.
1729 Now, SXEmacs is not perfect, and there may occasionally be times, or
1730 particular sequences of actions, that cause it to crash. If you can
1731 come up with a reproducible way of doing this (or even if you have a
1732 pretty good memory of exactly what you were doing at the time), the
1733 maintainers would be very interested in knowing about it. The best
1734 way to report a bug is using @kbd{M-x report-sxemacs-bug} (or by
1735 selecting @samp{Send Bug Report...} from the Help menu). If that
1736 won't work (e.g. you can't get SXEmacs working at all), send ordinary
1737 mail to @email{sxemacs-devel@@sxemacs.org}. @emph{MAKE SURE} to
1738 include the output from the crash, especially including the Lisp
1739 backtrace, as well as the SXEmacs configuration from @kbd{M-x
1740 describe-installation} (or equivalently, the file @file{Installation}
1741 in the top of the build tree).
1743 If at all possible, include a C stack backtrace of the core dump that
1744 was produced. This shows where exactly things went wrong, and makes it
1745 much easier to diagnose problems. To do this under Unix, you need to
1746 locate the core file (it's called @file{core}, and is usually sitting in
1747 the directory that you started SXEmacs from, or your home directory if
1748 that other directory was not writable). Then, go to that directory and
1749 execute a command like:
1752 gdb `which sxemacs` core
1755 and then issue the command @samp{where} to get the stack backtrace. You
1756 might have to use @code{dbx} or some similar debugger in place of
1757 @code{gdb}. If you don't have any such debugger available, complain to
1758 your system administrator.
1760 It's possible that a core file didn't get produced, in which case you're
1761 out of luck. Go complain to your system administrator and tell him not
1762 to disable core files by default. Also see @ref{Q2.1.15}, for tips and
1763 techniques for dealing with a debugger.
1765 When making a problem report make sure that:
1769 Report @strong{all} of the information output by SXEmacs during the
1773 You mention what OS & Hardware you are running SXEmacs on.
1776 What version of SXEmacs you are running. Equivalently, if you are
1777 using your own tla-branch of SXEmacs either tell where it is
1778 available or include to which degree your version resembles the
1782 What build options you are using.
1785 What are the versions of your libc and external libraries you use.
1788 If the problem is related to graphics and you are running Unix, we will
1789 also need to know what version of the X Window System you are running,
1790 and what window manager you are using.
1793 If the problem happened on a TTY, please include the terminal type.
1796 Much of the information above is automatically generated by @kbd{M-x
1797 report-sxemacs-bug}. Even more, and often useful, information can be
1798 generated by redirecting the output of @code{make} and @code{make check}
1799 to a file (@file{,,make-all.out} and @file{,,make-check.out} are the
1800 default used by @code{build-report}), and executing @kbd{M-x
1805 @unnumberedsec Q2.1.2: Cryptic Minibuffer messages.
1807 When I try to use some particular option of some particular package, I
1808 get a cryptic error in the minibuffer.
1810 If you can't figure out what's going on, select Options/General
1811 Options/Debug on Error from the Menubar and then try and make the error
1812 happen again. This will give you a backtrace that may be enlightening.
1813 If not, try reading through this FAQ; if that fails, you could try
1814 posting to comp.emacs.xemacs (making sure to include the backtrace) and
1815 someone may be able to help. If you can identify which Emacs lisp
1816 source file the error is coming from you can get a more detailed stack
1817 backtrace by doing the following:
1821 Visit the .el file in a SXEmacs buffer.
1824 Issue the command @kbd{M-x eval-current-buffer}.
1827 Reproduce the error.
1830 Depending on the version of SXEmacs, you may either select View->Show
1831 Message Log (recent versions)from the menubar to see the most recent
1832 messages. This command is bound to @kbd{C-h l} by default.
1836 @unnumberedsec Q2.1.3: Translation Table Syntax messages at Startup
1838 I get tons of translation table syntax error messages during startup.
1839 How do I get rid of them?
1841 There are two causes of this problem. The first usually only strikes
1842 people using the prebuilt binaries. The culprit in both cases is the
1843 file @file{XKeysymDB}.
1847 The binary cannot find the @file{XKeysymDB} file. The location is
1848 hardcoded at compile time so if the system the binary was built on
1849 another machin and puts it a different place than your system does,
1850 you have problems. To fix, set the environment variable
1851 @code{XKEYSYMDB} to the location of the @file{XKeysymDB} file on your
1852 system or to the location of the one included with SXEmacs which
1857 @file{<sxemacs_prefix>/lib/sxemacs-22.1.<x>/etc/XKeysymDB}.
1860 The binary is finding the XKeysymDB but it is out-of-date on your
1861 system and does not contain the necessary lines. Either ask your
1862 system administrator to replace it with the one which comes with
1863 SXEmacs (which is the stock R6 version and is backwards compatible) or
1864 set your @code{XKEYSYMDB} variable to the location of SXEmacs's
1870 @unnumberedsec Q2.1.4: Startup warnings about deducing proper fonts?
1872 How can I avoid the startup warnings about deducing proper fonts?
1874 This is highly dependent on your installation, but try with the
1875 following font as your base font for SXEmacs and see what it does:
1878 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
1881 More precisely, do the following in your resource file:
1884 Emacs.default.attributeFont: \
1885 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
1888 If you just don't want to see the @samp{*Warnings*} buffer at startup
1889 time, you can set this:
1892 (setq display-warning-minimum-level 'error)
1895 The buffer still exists; it just isn't in your face.
1899 @unnumberedsec Q2.1.5: SXEmacs cannot connect to my X Terminal!
1901 Help! I can not get SXEmacs to display on my Envizex X-terminal!
1903 Try setting the @code{DISPLAY} variable using the numeric IP address of
1904 the host you are running SXEmacs from.
1908 @unnumberedsec Q2.1.6: SXEmacs just locked up my Linux X server!
1910 There have been several reports of the X server locking up under
1911 Linux. In all reported cases removing speedo and scaled fonts from
1912 the font path corrected the problem. This can be done with the
1913 command @code{xset}.
1915 It is possible that using a font server may also solve the problem.
1919 @unnumberedsec Q2.1.7: HP Alt key as Meta.
1921 How can I make SXEmacs recognize the Alt key of my HP workstation as a
1924 Put the following line into a file and load it with xmodmap(1) before
1928 remove Mod1 = Mode_switch
1933 @unnumberedsec Q2.1.8: got (wrong-type-argument color-instance-p nil)
1935 @email{nataliek@@rd.scitec.com.au, Natalie Kershaw} writes:
1938 I am trying to run xemacs 19.13 under X11R4. Whenever I move the mouse I
1939 get the following error. Has anyone seen anything like this? This
1940 doesn't occur on X11R5.
1944 (error "got (wrong-type-argument color-instance-p nil)
1945 and I don't know why!")
1949 @email{map01kd@@gold.ac.uk, dinos} writes:
1952 I think this is due to undefined resources; You need to define color
1953 backgrounds and foregrounds into your @file{.../app-defaults/Emacs}
1957 *Foreground: Black ;everything will be of black on grey95,
1958 *Background: Grey95 ;unless otherwise specified.
1959 *cursorColor: Red3 ;red3 cursor with grey95 border.
1960 *pointerColor: Red3 ;red3 pointer with grey95 border.
1964 Natalie Kershaw adds:
1967 What fixed the problem was adding some more colors to the X color
1968 database (copying the X11R5 colors over), and also defining the
1969 following resources:
1972 xemacs*cursorColor: black
1973 xemacs*pointerColor: black
1976 With the new colors installed the problem still occurs if the above
1977 resources are not defined.
1979 If the new colors are not present then an additional error occurs on
1980 SXEmacs startup, which says @samp{Color Red3} not defined.
1985 @unnumberedsec Q2.1.9: SXEmacs causes my OpenWindows 3.0 server to crash.
1987 The OpenWindows 3.0 server is incredibly buggy. Your best bet is to
1988 replace it with one from the generic MIT X11 release. You might also
1989 try disabling parts of your @file{init.el}, like those that enable
1994 @unnumberedsec Q2.1.10: Warnings from incorrect key modifiers.
1996 The following information comes from the @file{PROBLEMS} file that comes
1999 If you're having troubles with HP/UX it is because HP/UX defines the
2000 modifiers wrong in X. Here is a shell script to fix the problem; be
2001 sure that it is run after VUE configures the X server.
2005 xmodmap 2> /dev/null - << EOF
2006 keysym Alt_L = Meta_L
2007 keysym Alt_R = Meta_R
2012 keysym Mode_switch = NoSymbol
2014 keysym Meta_R = Mode_switch
2015 add mod2 = Mode_switch
2021 @unnumberedsec Q2.1.11: @samp{Can't instantiate image error...} in toolbar
2024 @email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes:
2026 I just installed the XEmacs (20.4-2) RPMS that I downloaded from
2027 @uref{http://www.xemacs.org/}. Everything works fine, except that when
2028 I place my mouse over the toolbar, it beeps and gives me this message:
2031 Can't instantiate image (probably cached):
2032 [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
2033 (16 16 <strange control characters> ...
2036 @email{kyle_jones@@wonderworks.com, Kyle Jones} writes:
2038 This is problem specific to some Chips and Technologies video
2039 chips, when running XFree86. Putting
2041 @code{Option "sw_cursor"}
2043 in @file{XF86Config} gets rid of the problem.
2048 @unnumberedsec Q2.1.12: Problems with Regular Expressions on DEC OSF1.
2050 @c I have xemacs 19.13 running on an alpha running OSF1 V3.2 148 and ispell
2051 @c would not run because it claimed the version number was incorrect
2052 @c although it was indeed OK. I traced the problem to the regular
2053 @c expression handler.
2055 @c @email{douglask@@dstc.edu.au, Douglas Kosovic} writes:
2058 @c Actually it's a DEC cc optimisation bug that screws up the regexp
2059 @c handling in XEmacs.
2061 @c Rebuilding using the @samp{-migrate} switch for DEC cc (which uses a
2062 @c different sort of optimisation) works fine.
2065 @c See @file{xemacs-19_13-dunix-3_2c.patch} at the following URL on how to
2066 @c build with the @samp{-migrate} flag:
2069 @c @uref{http://www-digital.cern.ch/carney/emacs/emacs.html}
2070 @c @c Link above, <URL:http://www-digital.cern.ch/carney/emacs/emacs.html> is
2071 @c @c dead. And the directory `carney' is empty.
2077 @c NOTE: There have been a variety of other problems reported that are
2078 @c fixed in this fashion.
2080 Does not apply anymore.
2084 @unnumberedsec Q2.1.13: HP/UX 10.10 and @code{create_process} failure.
2086 @c @email{Dave.Carrigan@@ipl.ca, Dave Carrigan} writes:
2089 @c With XEmacs 19.13 and HP/UX 10.10, anything that relies on the
2090 @c @code{create_process} function fails. This breaks a lot of things
2091 @c (shell-mode, compile, ange-ftp, to name a few).
2094 @c @email{johnson@@dtc.hp.com, Phil Johnson} writes:
2097 @c This is a problem specific to HP-UX 10.10. It only occurs when XEmacs
2098 @c is compiled for shared libraries (the default), so you can work around
2099 @c it by compiling a statically-linked binary (run configure with
2100 @c @samp{--dynamic=no}).
2102 @c I'm not sure whether the problem is with a particular shared library or
2103 @c if it's a kernel problem which crept into 10.10.
2106 @c @email{cognot@@ensg.u-nancy.fr, Richard Cognot} writes:
2109 @c I had a few problems with 10.10. Apparently, some of them were solved by
2110 @c forcing a static link of libc (manually).
2113 Does not apply anymore.
2117 @unnumberedsec Q2.1.14: @kbd{C-g} doesn't work for me. Is it broken?
2119 @email{ben@@xemacs.org, Ben Wing} writes:
2122 @kbd{C-g} does work for most people in most circumstances. If it
2123 doesn't, there are only two explanations:
2127 The code is wrapped with a binding of @code{inhibit-quit} to
2128 @code{t}. @kbd{Ctrl-Shift-G} should still work, I think.
2131 SIGIO is broken on your system, but BROKEN_SIGIO isn't defined.
2134 To test #2, try executing @code{(while t)} from the @samp{*scratch*}
2135 buffer. If @kbd{C-g} doesn't interrupt, then you're seeing #2.
2138 @email{terra@@diku.dk, Morten Welinder} writes:
2141 On some (but @emph{not} all) machines a hung SXEmacsen can be revived
2142 by @code{kill -FPE <pid>}. This is a hack, of course, not a solution.
2143 This technique works on a Sun4 running 4.1.3_U1. To see if it works
2144 for you, start another SXEmacs and test with that first. If you get a
2145 core dump the method doesn't work and if you get @samp{Arithmetic
2146 error} then it does.
2151 @unnumberedsec Q2.1.15: How to debug a SXEmacs problem with a debugger
2153 If SXEmacs does crash on you, one of the most productive things you
2154 can do to help get the bug fixed is to poke around a bit with the
2155 debugger. Here are some hints:
2159 First of all, if the crash is at all reproducible, consider very
2160 strongly recompiling your SXEmacs with debugging symbols and with no
2161 optimisation (e.g. with GCC use the compiler flags @samp{-g -O0} --
2162 that's an "oh" followed by a zero), and with the configure options
2163 @samp{--debug=yes} and @samp{--error-checking=all}. This will make
2164 your SXEmacs run somewhat slower, but you are a lot more likely to
2165 catch the problem earlier (closer to its source). It makes it a lot
2166 easier to determine what's going on with a debugger.
2169 If it's not a true crash (@emph{i.e.}, SXEmacs is hung, or a zombie
2170 process), or it's inconvenient to run SXEmacs again because SXEmacs is
2171 already running or is running in batch mode as part of a bunch of
2172 scripts, you may be able to attach to the existing process with your
2173 debugger. Most debuggers let you do this by substituting the process ID
2174 for the core file when you invoke the debugger from the command line, or
2175 by using the @code{attach} command or something similar.
2178 If you're able to run SXEmacs under a debugger and reproduce the crash,
2179 here are some things you can do:
2182 If SXEmacs is hitting an assertion failure, put a breakpoint on
2183 @code{assert_failed()}.
2186 If SXEmacs is hitting some weird Lisp error that's causing it to crash
2187 (e.g. during startup), put a breakpoint on @code{signal_1()}---this is
2188 declared static in eval.c.
2191 If SXEmacs is outputting lots of X errors, put a breakpoint on
2192 @code{x_error_handler()}; that will tell you which call is causing them.
2195 Internally, you will probably see lots of variables that hold objects of
2196 type @code{Lisp_Object}. These are references to Lisp objects.
2197 Printing them out with the debugger probably won't be too
2198 useful---you'll likely just see a number. To decode them, do this:
2204 where @var{OBJECT} is whatever you want to decode (it can be a variable,
2205 a function call, etc.). This uses the Lisp printing routines to out a
2206 readable representation on the TTY from which the sxemacs process was
2210 If you want to get a Lisp backtrace showing the Lisp call
2218 Using @code{dp} and @code{db} has two disadvantages - they can only be
2219 used with a running (including hung or zombie) sxemacs process, and they
2220 do not display the internal C structure of a Lisp Object. Even if all
2221 you've got is a core dump, all is not lost.
2223 If you're using GDB, there are some macros in the file
2224 @file{src/.gdbinit} in the SXEmacs source distribution that should
2225 make it easier for you to decode Lisp objects. This file is
2226 automatically read by gdb if gdb is run in the directory where sxemacs
2227 was built, and contains these useful macros to inspect the state of
2232 Usage: pobj lisp_object @*
2233 Print the internal C representation of a lisp object.
2236 Usage: xtype lisp_object @*
2237 Print the Lisp type of a lisp object.
2241 Print the current Lisp stack trace.
2242 Requires a running sxemacs process. (It works by calling the db
2243 routine described above.)
2246 Usage: ldp lisp_object @*
2247 Print a Lisp Object value using the Lisp printer.
2248 Requires a running sxemacs process. (It works by calling the dp
2249 routine described above.)
2252 Usage: run-temacs @*
2253 Run temacs interactively, like sxemacs.
2254 Use this with debugging tools (like purify) that cannot deal with
2255 dumping, or when temacs builds successfully, but sxemacs does not.
2258 Usage: dump-temacs @*
2259 Run the dumping part of the build procedure.
2260 Use when debugging temacs, not sxemacs!
2261 Use this when temacs builds successfully, but sxemacs does not.
2264 Usage: check-sxemacs @*
2265 Run the test suite. Equivalent to 'make check'.
2268 Usage: check-temacs @*
2269 Run the test suite on temacs. Equivalent to 'make check-temacs'.
2270 Use this with debugging tools (like purify) that cannot deal with dumping,
2271 or when temacs builds successfully, but sxemacs does not.
2274 If you are using Sun's @file{dbx} debugger, there is an equivalent file
2275 @file{src/.dbxrc}, which defines the same commands for dbx.
2278 If you're using a debugger to get a C stack backtrace and you're seeing
2279 stack traces with some of the innermost frames mangled, it may be due to
2280 dynamic linking. (This happens especially under Linux.) Consider
2281 reconfiguring with @samp{--dynamic=no}. Also, sometimes (again under
2282 Linux), stack backtraces of core dumps will have the frame where the
2283 fatal signal occurred mangled; if you can obtain a stack trace while
2284 running the SXEmacs process under a debugger, the stack trace should
2287 @c @email{1CMC3466@@ibm.mtsac.edu, Curtiss} suggests upgrading to ld.so
2288 @c version 1.8 if dynamic linking and debugging is a problem on Linux.
2291 If you're using a debugger to get a C stack backtrace and you're
2292 getting a completely mangled and bogus stack trace, it's probably due to
2293 one of the following:
2297 Your executable has been stripped. Bad news. Tell your sysadmin not to
2298 do this---it doesn't accomplish anything except to save a bit of disk
2299 space, and makes debugging much much harder.
2302 Your stack is getting trashed. Debugging this is hard; you have to do a
2303 binary-search type of narrowing down where the crash occurs, until you
2304 figure out exactly which line is causing the problem. Of course, this
2305 only works if the bug is highly reproducible. Also, in many cases if
2306 you run SXEmacs from the debugger, the debugger can protect the stack
2307 somewhat. However, if the stack is being smashed, it is typically the
2308 case that there is a wild pointer somewhere in the program, often
2309 quite far from where the crash occurs.
2312 If your stack trace has exactly one frame in it, with address 0x0, this
2313 could simply mean that SXEmacs attempted to execute code at that
2314 address, e.g. through jumping to a null function pointer.
2315 Unfortunately, under those circumstances, GDB under Linux doesn't know
2316 how to get a stack trace.
2317 Yes, this is the fourth Linux-related problem I've mentioned. I
2318 have no idea why GDB under Linux is so bogus. Complain to the GDB
2319 authors, or to comp.os.linux.development.system. Again, you'll have
2320 to use the narrowing-down process described above.
2323 You will get a Lisp backtrace output when SXEmacs crashes, so you'll have
2331 @unnumberedsec Q2.1.16: SXEmacs crashes in @code{strcat} on HP/UX 10
2333 From the problems database (through
2334 the former address http://support.mayfield.hp.com/):
2337 Problem Report: 5003302299
2340 System/Model: 9000/700
2341 Product Name: HPUX S800 10.0X
2342 Product Vers: 9245XB.10.00
2344 Description: strcat(3C) may read beyond
2345 end of source string, can cause SIGSEGV
2348 *** PROBLEM TEXT ***
2349 strcat(3C) may read beyond the source string onto an unmapped page,
2350 causing a segmentation violation.
2355 @unnumberedsec Q2.1.17: @samp{Marker does not point anywhere}
2357 As with other errors, set @code{debug-on-error} to @code{t} to get the
2358 backtrace when the error occurs.
2362 @unnumberedsec Q2.1.18: SXEmacs is outputting lots of X errors.
2364 If this is happening, we would very much like to know what's causing
2365 them. To find this out, see @ref{Q2.1.15}. Try to get both a C and Lisp
2366 backtrace, and send them to @email{sxemacs-devel@@sxemacs.org}.
2370 @unnumberedsec Q2.1.19: SXEmacs does not follow the local timezone.
2372 When using one of the prebuilt binaries many users have observed that
2373 SXEmacs uses the timezone under which it was built, but not the
2374 timezone under which it is running. The solution is to add:
2377 (set-time-zone-rule "MET")
2380 to your @file{init.el} or the @file{site-start.el} file if you can.
2381 Replace @code{MET} with your local timezone.
2385 @unnumberedsec Q2.1.20: @samp{Symbol's function definition is void: hkey-help-show.}
2387 This is a problem with a partially loaded hyperbole. Try adding:
2390 (require 'hmouse-drv)
2393 where you load hyperbole and the problem should go away.
2397 @unnumberedsec Q2.1.21: [This question intentionally left blank]
2401 @unnumberedsec Q2.1.22: SXEmacs seems to take a really long time to do some things
2403 @email{dmoore@@ucsd.edu, David Moore} writes:
2406 Two things you can do:
2410 When you see it going mad like this, you might want to use gdb from an
2411 'xterm' to attach to the running process and get a stack trace. To do
2415 gdb /path/to/sxemacs/sxemacs ####
2418 Where @code{####} is the process id of your sxemacs, instead of
2419 specifying the core. When gdb attaches, the sxemacs will stop [1] and
2420 you can type `where' in gdb to get a stack trace as usual. To get
2421 things moving again, you can just type `quit' in gdb. It'll tell you
2422 the program is running and ask if you want to quit anyways. Say 'y' and
2423 it'll quit and have your emacs continue from where it was at.
2427 Turn on debug-on-quit early on. When you think things are going slow
2428 hit C-g and it may pop you in the debugger so you can see what routine
2429 is running. Press `c' to get going again.
2431 debug-on-quit doesn't work if something's turned on inhibit-quit or in
2432 some other strange cases.
2437 @unnumberedsec Q2.1.23: Movemail on Linux does not work for SXEmacs
2439 @email{steve@@xemacs.org, SL Baur} writes:
2442 Movemail on Linux used to default to using flock file locking. It now
2443 defaults to using @code{.lock} file locking. If this is not
2444 appropriate for your system, edit src/s/linux.h and uncomment the line
2448 #define MAIL_USE_FLOCK
2454 @unnumberedsec Q2.1.24: SXEmacs won't start without network.
2456 If SXEmacs starts when you're on the network, but fails when you're not
2457 on the network, you may be missing a "localhost" entry in your
2458 @file{/etc/hosts} file. The file should contain an entry like:
2464 Add that line, and SXEmacs will be happy.
2468 @unnumberedsec Q2.1.25:: After upgrading, SXEmacs won't do `foo' any more!
2470 You have been used to doing `foo', but now when you invoke it (or click
2471 the toolbar button or select the menu item), nothing (or an error)
2472 happens. The simplest explanation is that you are missing a package
2473 that is essential to you. You can either track it down and install it
2474 (there is a list of packages and brief descriptions of their contents in
2475 @file{etc/PACKAGES}), or install the `Sumo Tarball' (@pxref{Q2.0.14}).
2477 @c #### should xref to XEmacs manual here
2480 @node Customisation, Subsystems, Installation, Top
2481 @unnumbered 3 Customisation and Options
2483 This is part 3 of the SXEmacs Frequently Asked Questions list. This
2484 section is devoted to Customisation and screen settings.
2487 Customisation---Emacs Lisp and @file{init.el}/@file{.emacs}:
2488 * Q3.0.1:: What version of Emacs am I running?
2489 * Q3.0.2:: How do I evaluate Elisp expressions?
2490 * Q3.0.3:: @code{(setq tab-width 6)} behaves oddly.
2491 * Q3.0.4:: How can I add directories to the @code{load-path}?
2492 * Q3.0.5:: How to check if a lisp function is defined?
2493 * Q3.0.6:: Can I force the output of @code{(face-list)} to a buffer?
2494 * Q3.0.7:: Font selections don't get saved after @code{Save Options}.
2495 * Q3.0.8:: How do I make a single minibuffer frame?
2496 * Q3.0.9:: What is @code{Customize}?
2498 X Window System & Resources:
2499 * Q3.1.1:: Where is a list of X resources?
2500 * Q3.1.2:: How can I detect a color display?
2501 * Q3.1.3:: [This question intentionally left blank]
2502 * Q3.1.4:: [This question intentionally left blank]
2503 * Q3.1.5:: How can I get the icon to just say @samp{SXEmacs}?
2504 * Q3.1.6:: How can I have the window title area display the full path?
2505 * Q3.1.7:: @samp{sxemacs -name junk} doesn't work?
2506 * Q3.1.8:: @samp{-iconic} doesn't work.
2508 Textual Fonts & Colors:
2509 * Q3.2.1:: How can I set color options from @file{init.el}?
2510 * Q3.2.2:: How do I set the text, menu and modeline fonts?
2511 * Q3.2.3:: How can I set the colors when highlighting a region?
2512 * Q3.2.4:: How can I limit color map usage?
2513 * Q3.2.5:: My tty supports color, but SXEmacs doesn't use them.
2514 * Q3.2.6:: Can I have pixmap backgrounds in SXEmacs?
2515 * Q3.2.7:: How do I display non-ASCII characters?
2518 * Q3.3.1:: How can I make the modeline go away?
2519 * Q3.3.2:: How do you have SXEmacs display the line number in the modeline?
2520 * Q3.3.3:: How do I get SXEmacs to put the time of day on the modeline?
2521 * Q3.3.4:: How do I turn off current chapter from AUC TeX modeline?
2522 * Q3.3.5:: How can one change the modeline color based on the mode used?
2524 Multiple Device Support:
2525 * Q3.4.1:: How do I open a frame on another screen of my multi-headed display?
2526 * Q3.4.2:: Can I really connect to a running SXEmacs after calling up over a modem? How?
2529 * Q3.5.1:: How can I bind complex functions (or macros) to keys?
2530 * Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
2531 * Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down?
2532 * Q3.5.4:: Globally binding @kbd{Delete}?
2533 * Q3.5.5:: Scrolling one line at a time.
2534 * Q3.5.6:: How to map @kbd{Help} key alone on Sun type4 keyboard?
2535 * Q3.5.7:: How can you type in special characters in SXEmacs?
2536 * Q3.5.8:: [This question intentionally left blank]
2537 * Q3.5.9:: How do I make the Delete key delete forward?
2538 * Q3.5.10:: Can I turn on @dfn{sticky} modifier keys?
2539 * Q3.5.11:: How do I map the arrow keys?
2542 * Q3.6.1:: Is there a way to make the bar cursor thicker?
2543 * Q3.6.2:: Is there a way to get back the old block cursor where the cursor covers the character in front of the point?
2544 * Q3.6.3:: Can I make the cursor blink?
2546 The Mouse and Highlighting:
2547 * Q3.7.1:: How can I turn off Mouse pasting?
2548 * Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons?
2549 * Q3.7.3:: Clicking the left button does not do anything in buffer list.
2550 * Q3.7.4:: How can I get a list of buffers when I hit mouse button 3?
2551 * Q3.7.5:: Why does cut-and-paste not work between SXEmacs and a cmdtool?
2552 * Q3.7.6:: How I can set SXEmacs up so that it pastes where the text cursor is?
2553 * Q3.7.7:: How do I select a rectangular region?
2554 * Q3.7.8:: Why does @kbd{M-w} take so long?
2556 The Menubar and Toolbar:
2557 * Q3.8.1:: How do I get rid of the menu (or menubar)?
2558 * Q3.8.2:: Can I customise the basic menubar?
2559 * Q3.8.3:: How do I control how many buffers are listed in the menu @code{Buffers} list?
2560 * Q3.8.4:: Resources like @code{Emacs*menubar*font} are not working?
2561 * Q3.8.5:: How can I bind a key to a function to toggle the toolbar?
2564 * Q3.9.1:: How can I disable the scrollbar?
2565 * Q3.9.2:: How can one use resources to change scrollbar colors?
2566 * Q3.9.3:: Moving the scrollbar can move the point; can I disable this?
2567 * Q3.9.4:: How can I turn off automatic horizontal scrolling in specific modes?
2570 * Q3.10.1:: How can I turn off or change highlighted selections?
2571 * Q3.10.2:: How do I get that typing on an active region removes it?
2572 * Q3.10.3:: Can I turn off the highlight during isearch?
2573 * Q3.10.4:: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)?
2574 * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.
2575 * Q3.10.6:: Why is killing so slow?
2579 @unnumberedsec 3.0: Customisation -- Emacs Lisp and @file{init.el}
2580 @unnumberedsec Q3.0.1: What version of Emacs am I running?
2582 How can @file{init.el} determine which of the family of
2585 To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
2586 XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
2587 example given in @file{etc/sample.init.el}. There are other nifty
2588 things in there as well!
2590 For all new code, you can use the variables @code{running-xemacs} and
2591 @code{running-sxemacs} or something like
2594 (when (featurep 'sxemacs)
2596 (when (featurep 'xemacs)
2602 Please note, that you should double check these values, if you intend
2603 to use xemacs-exclusive features. Both, the variable
2604 @code{running-xemacs} and the form @code{(featurep 'xemacs)} evaluate
2605 to @code{t} within SXEmacs. This is due to compatibility reasons.
2609 @unnumberedsec Q3.0.2: How can I evaluate Emacs-Lisp expressions?
2611 I know I can evaluate Elisp expressions from @code{*scratch*} buffer
2612 with @kbd{C-j} after the expression. How do I do it from another
2615 Press @kbd{M-:} (the default binding of @code{eval-expression}), and
2616 enter the expression to the minibuffer.
2620 @unnumberedsec Q3.0.3: @code{(setq tab-width 6)} behaves oddly.
2622 If you put @code{(setq tab-width 6)} in your @file{init.el} file it
2623 does not work! Is there a reason for this? If you do it at the EVAL
2624 prompt it works fine!! How strange.
2626 Use @code{setq-default} instead, since @code{tab-width} is
2631 @unnumberedsec Q3.0.4: How can I add directories to the @code{load-path}?
2633 Here are two ways to do that, one that puts your directories at the
2634 front of the load-path, the other at the end:
2637 ;;; Add things at the beginning of the load-path, do not add
2638 ;;; duplicate directories:
2639 (pushnew "bar" load-path :test 'equal)
2641 (pushnew "foo" load-path :test 'equal)
2643 ;;; Add things at the end, unconditionally
2644 (setq load-path (nconc load-path '("foo" "bar")))
2647 @email{keithh@@nortel.ca, keith (k.p.) hanlan} writes:
2650 To add directories using Unix shell metacharacters use
2651 @file{expand-file-name} like this:
2654 (push (expand-file-name "~keithh/.emacsdir") load-path)
2660 @unnumberedsec Q3.0.5: How to check if a lisp function is defined?
2662 Use the following elisp:
2668 It's almost always a mistake to test @code{emacs-version} or any similar
2671 Instead, use feature-tests, such as @code{featurep}, @code{boundp},
2672 @code{fboundp}, or even simple behavioral tests, eg.:
2675 (defvar foo-old-losing-code-p
2676 (condition-case nil (progn (losing-code t) nil)
2677 (wrong-number-of-arguments t)))
2680 There is an incredible amount of broken code out there which could work
2681 much better more often in more places if it did the above instead of
2682 trying to divine its environment from the value of one variable.
2686 @unnumberedsec Q3.0.6: Can I force the output of @code{(face-list)} to a buffer?
2688 It would be good having it in a buffer, as the output of
2689 @code{(face-list)} is too wide to fit to a minibuffer.
2691 Evaluate the expression in the @samp{*scratch*} buffer with point after
2692 the rightmost paren and typing @kbd{C-j}.
2694 If the minibuffer smallness is the only problem you encounter, you can
2695 simply press @kbd{C-h l} to get the former minibuffer contents in a
2700 @unnumberedsec Q3.0.7: Font selections in don't get saved after @code{Save Options}.
2702 @email{mannj@@ll.mit.edu, John Mann} writes:
2705 You have to go to Options->Frame Appearance and unselect
2706 @samp{Frame-Local Font Menu}. If this option is selected, font changes
2707 are only applied to the @emph{current} frame and do @emph{not} get saved
2708 when you save options.
2711 Also, set the following in your @file{init.el}:
2714 (setq options-save-faces t)
2719 @unnumberedsec Q3.0.8: How do I get a single minibuffer frame?
2721 @email{acs@@acm.org, Vin Shelton} writes:
2724 (setq initial-frame-plist '(minibuffer nil))
2725 (setq default-frame-plist '(minibuffer nil))
2726 (setq default-minibuffer-frame
2731 menubar-visible-p nil
2732 default-toolbar-visible-p nil
2736 has-modeline-p nil)))
2737 (frame-notice-user-settings)
2740 @strong{Please note:} The single minibuffer frame may not be to everyone's
2741 taste, and there any number of other SXEmacs options settings that may
2742 make it difficult or inconvenient to use.
2746 @unnumberedsec Q3.0.9: What is @code{Customize}?
2748 Starting with XEmacs 20.2 there is new system 'Customize' for customising
2751 You can access @code{Customize} from the @code{Options} menu
2752 or invoking one of customize commands by typing eg.
2753 @kbd{M-x customize}, @kbd{M-x customize-face},
2754 @kbd{M-x customize-variable} or @kbd{M-x customize-apropos}.
2756 Also try out with @kbd{M-x customize-browse}
2760 @unnumberedsec 3.1: X Window System & Resources
2761 @unnumberedsec Q3.1.1: Where is a list of X resources?
2763 Search through the @file{NEWS} file for @samp{X Resources}. A fairly
2764 comprehensive list is given after it.
2766 In addition, an @file{app-defaults} file @file{etc/Emacs.ad} is
2767 supplied, listing the defaults. The file @file{etc/sample.Xresources}
2768 gives a different set of defaults that you might consider for
2769 installation in your @file{~/.Xresources} file. It is nearly the same
2770 as @file{etc/Emacs.ad}, but a few entries are altered. Be careful about
2771 installing the contents of this file into your @file{.Xresources} (or
2772 legacy @file{.Xdefaults}) file if you use GNU Emacs under X11 as well.
2776 @unnumberedsec Q3.1.2: How can I detect a color display?
2778 You can test the return value of the function @code{(device-class)}, as
2782 (when (eq (device-class) 'color)
2783 (set-face-foreground 'font-lock-comment-face "Grey")
2784 (set-face-foreground 'font-lock-string-face "Red")
2791 @unnumberedsec Q3.1.3: [This question intentionally left blank]
2794 @unnumberedsec Q3.1.4: [This question intentionally left blank]
2798 @unnumberedsec Q3.1.5: How can I get the icon to just say @samp{SXEmacs}?
2800 I'd like the icon to just say @samp{SXEmacs}, and not include the name of
2801 the current file in it.
2803 Add the following line to your @file{init.el}:
2806 (setq frame-icon-title-format "SXEmacs")
2811 @unnumberedsec Q3.1.6: How can I have the window title area display the full path?
2813 I'd like to have the window title area display the full directory/name
2814 of the current buffer file and not just the name.
2816 Add the following line to your @file{init.el}:
2819 (setq frame-title-format "%S: %f")
2822 A more sophisticated title might be:
2825 (setq frame-title-format
2826 '("%S: " (buffer-file-name "%f"
2827 (dired-directory dired-directory "%b"))))
2830 That is, use the file name, or the dired-directory, or the buffer name.
2834 @unnumberedsec Q3.1.7: @samp{sxemacs -name junk} doesn't work?
2836 When I run @samp{xterm -name junk}, I get an xterm whose class name
2837 according to xprop, is @samp{junk}. This is the way it's supposed to
2838 work, I think. When I run @samp{sxemacs -name junk} the class name is
2839 not set to @samp{junk}. It's still @samp{emacs}. What does
2840 @samp{sxemacs -name} really do? The reason I ask is that my window
2841 manager (fvwm) will make a window sticky and I use SXEmacs to read my
2842 mail. I want that SXEmacs window to be sticky, without having to use the
2843 window manager's function to set the window sticky. What gives?
2845 @samp{sxemacs -name} sets the application name for the program (that is,
2846 the thing which normally comes from @samp{argv[0]}). Using @samp{-name}
2847 is the same as making a copy of the executable with that new name. The
2848 @code{WM_CLASS} property on each frame is set to the frame-name, and the
2849 application-class. So, if you did @samp{sxemacs -name FOO} and then
2850 created a frame named @var{BAR}, you'd get an X window with WM_CLASS =
2851 @code{( "BAR", "Emacs")}. However, the resource hierarchy for this
2855 Name: FOO .shell .container .BAR
2856 Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
2859 instead of the default
2862 Name: sxemacs.shell .container .emacs
2863 Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
2867 It is arguable that the first element of WM_CLASS should be set to the
2868 application-name instead of the frame-name, but I think that's less
2869 flexible, since it does not give you the ability to have multiple frames
2870 with different WM_CLASS properties. Another possibility would be for
2871 the default frame name to come from the application name instead of
2872 simply being @samp{emacs}. However, at this point, making that change
2873 would be troublesome: it would mean that many users would have to make
2874 yet another change to their resource files (since the default frame name
2875 would suddenly change from @samp{emacs} to @samp{sxemacs}, or whatever
2876 the executable happened to be named), so we'd rather avoid it.
2878 To make a frame with a particular name use:
2881 (make-frame '((name . "the-name")))
2886 @unnumberedsec Q3.1.8: @samp{-iconic} doesn't work.
2888 When I start up SXEmacs using @samp{-iconic} it doesn't work right.
2889 Using @samp{-unmapped} on the command line, and setting the
2890 @code{initiallyUnmapped} X Resource don't seem to help much either...
2892 @email{ben@@xemacs.org, Ben Wing} writes:
2895 Ugh, this stuff is such an incredible mess that I've about given up
2896 getting it to work. The principal problem is numerous window-manager
2902 @unnumberedsec 3.2: Textual Fonts & Colors
2903 @unnumberedsec Q3.2.1: How can I set color options from @file{init.el}?
2905 How can I set the most commonly used color options from my
2906 @file{init.el} instead of from my @file{.Xresources}?
2911 (set-face-background 'default "bisque") ; frame background
2912 (set-face-foreground 'default "black") ; normal text
2913 (set-face-background 'zmacs-region "red") ; When selecting w/
2915 (set-face-foreground 'zmacs-region "yellow")
2916 (set-face-font 'default "*courier-bold-r*120-100-100*")
2917 (set-face-background 'highlight "blue") ; Ie when selecting
2919 (set-face-foreground 'highlight "yellow")
2920 (set-face-background 'modeline "blue") ; Line at bottom
2922 (set-face-foreground 'modeline "white")
2923 (set-face-font 'modeline "*bold-r-normal*140-100-100*")
2924 (set-face-background 'isearch "yellow") ; When highlighting
2926 (set-face-foreground 'isearch "red")
2927 (setq x-pointer-foreground-color "black") ; Adds to bg color,
2929 (setq x-pointer-background-color "blue") ; This is color
2936 @unnumberedsec Q3.2.2: How do I set the text, menu and modeline fonts?
2938 Note that you should use @samp{Emacs.} and not @samp{Emacs*} when
2939 setting face values.
2941 In @file{.Xresources}:
2944 Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
2945 Emacs*menubar*font: fixed
2946 Emacs.modeline.attributeFont: fixed
2949 This is confusing because @samp{default} and @samp{modeline} are face
2950 names, and can be found listed with all faces in the current mode by
2951 using @kbd{M-x set-face-font (enter) ?}. They use the face-specific
2952 resource @samp{attributeFont}.
2954 On the other hand, @samp{menubar} is a normal X thing that uses the
2955 resource @samp{font}. With Motif it @emph{may be} necessary to use
2956 @samp{fontList} @emph{instead of} @samp{font}. In @emph{non-Motif}
2957 configurations with Mule it @emph{is} necessary to use @samp{fontSet}
2958 instead of @samp{font}. (Sorry, there just is no simple recipe here.)
2962 @unnumberedsec Q3.2.3: How can I set the colors when highlighting a region?
2964 How can I set the background/foreground colors when highlighting a
2967 You can change the face @code{zmacs-region} either in your
2971 Emacs.zmacs-region.attributeForeground: firebrick
2972 Emacs.zmacs-region.attributeBackground: lightseagreen
2975 or in your @file{init.el}:
2978 (set-face-background 'zmacs-region "red")
2979 (set-face-foreground 'zmacs-region "yellow")
2984 @unnumberedsec Q3.2.4: How can I limit color map usage?
2986 I'm using Netscape (or another color grabber like SXEmacs);
2987 is there any way to limit the number of available colors in the color map?
2989 Answer: No, but you can start Netscape before SXEmacs, and it will use
2990 the closest available color if the colormap is full. You can also limit
2991 the number of colors Netscape uses, using the flags -mono, -ncols <#> or
2992 -install (for mono, limiting to <#> colors, or for using a private color
2995 If you have the money, another solution would be to use a truecolor or
3000 @unnumberedsec Q3.2.5: My tty supports color, but SXEmacs doesn't use them.
3002 SXEmacs tries to automatically determine whether your tty supports color,
3003 but sometimes guesses wrong. In that case, you can make SXEmacs Do The
3004 Right Thing using this Lisp code:
3007 (if (eq 'tty (device-type))
3008 (set-device-class nil 'color))
3013 @unnumberedsec Q3.2.6: Can I have pixmap backgrounds in SXEmacs?
3015 @email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes:
3018 There are several ways to do it. For example, you could specify a
3019 default pixmap image to use in your @file{~/.Xresources}, e.g.,
3023 Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
3027 and then reload ~/.Xresources and restart SXEmacs. Alternatively,
3028 since each face can have its own pixmap background, a better way
3029 would be to set a face's pixmap within your SXEmacs init file, e.g.,
3032 (set-face-background-pixmap 'default "/path/to/image.xpm")
3033 (set-face-background-pixmap 'bold "/path/to/another_image.xpm")
3036 and so on. You can also do this interactively via @kbd{M-x edit-faces}.
3042 @unnumberedsec Q3.2.7: How do I display non-ASCII characters?
3045 If you're using a Mule-enabled SXEmacs, then display is automatic. If
3046 you're not seeing the characters you expect, either (1) you don't have
3047 appropriate fonts available or (2) SXEmacs did not correctly detect the
3048 coding system (@pxref{Recognize Coding, , , sxemacs}). In case (1),
3049 install fonts as is customary for your platform. In case (2), you
3050 need to tell SXEmacs explicitly what coding systems you're using.
3051 @ref{Specify Coding, , , sxemacs}.
3053 If your SXEmacs is not Mule-enabled, and for some reason getting a
3054 Mule-enabled SXEmacs seems like the wrong thing to do, all is not lost.
3055 You can arrange it by brute force. In @file{event-Xt.c} (suppress the
3056 urge to look in this file---play Doom instead, because you'll survive
3057 longer), it is written:
3060 In a non-Mule world, a user can still have a multi-lingual editor, by
3061 doing @code{(set-face-font "-*-iso8859-2" (current-buffer))} for all
3062 their Latin-2 buffers, etc.
3065 For the related problem of @emph{inputting} non-ASCII characters in a
3066 non-Mule SXEmacs, @xref{Q3.5.7}.
3070 @unnumberedsec 3.3: The Modeline
3071 @unnumberedsec Q3.3.1: How can I make the modeline go away?
3074 (set-specifier has-modeline-p nil)
3079 @unnumberedsec Q3.3.2: How do you have SXEmacs display the line number in the modeline?
3081 Add the following line to your @file{init.el} file to
3082 display the line number:
3085 (line-number-mode 1)
3088 Use the following to display the column number:
3091 (column-number-mode 1)
3094 Or select from the @code{Options} menu
3098 @code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode}
3103 @code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode}
3105 Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}.
3109 @unnumberedsec Q3.3.3: How do I get SXEmacs to put the time of day on the modeline?
3111 Add the following line to your @file{init.el}/@file{.emacs} file to
3118 See @code{Customize} from the @code{Options} menu for customisation.
3122 @unnumberedsec Q3.3.4: How do I turn off current chapter from AUC TeX modeline?
3124 With AUC TeX, fast typing is hard because the current chapter, section
3125 etc. are given in the modeline. How can I turn this off?
3127 It's not AUC TeX, it comes from @code{func-menu} in @file{func-menu.el}.
3129 @c Add this code to your @file{init.el}/@file{.emacs} to turn it off:
3132 @c (setq fume-display-in-modeline-p nil)
3135 @c Or just add a hook to @code{TeX-mode-hook} to turn it off only for TeX
3139 @c (add-hook 'TeX-mode-hook
3140 @c '(lambda () (setq fume-display-in-modeline-p nil)))
3143 @email{dhughes@@origin-at.co.uk, David Hughes} writes:
3146 Try this; you'll still get the function name displayed in the modeline,
3147 but it won't attempt to keep track when you modify the file. To refresh
3148 when it gets out of synch, you simply need click on the @samp{Rescan
3149 Buffer} option in the function-menu.
3152 (setq-default fume-auto-rescan-buffer-p nil)
3158 @unnumberedsec Q3.3.5: How can one change the modeline color based on the mode used?
3160 You can use something like the following:
3163 (add-hook 'lisp-mode-hook
3165 (set-face-background 'modeline "red" (current-buffer))))
3168 Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
3169 colors change from the default set in your @file{init.el}.
3170 The change will only be made in the buffer you just entered (which
3171 contains the Lisp file you are editing) and will not affect the modeline
3172 colors anywhere else.
3178 @item The hook is the mode name plus @code{-hook}. eg. c-mode-hook,
3179 c++-mode-hook, emacs-lisp-mode-hook (used for your
3180 @file{init.el} or a @file{xx.el} file),
3181 lisp-interaction-mode-hook (the @samp{*scratch*} buffer),
3182 text-mode-hook, etc.
3185 Be sure to use @code{add-hook}, not @code{(setq c-mode-hook xxxx)},
3186 otherwise you will erase anything that anybody has already put on the
3190 You can also do @code{(set-face-font 'modeline @var{font})},
3191 eg. @code{(set-face-font 'modeline "*bold-r-normal*140-100-100*"
3192 (current-buffer))} if you wish the modeline font to vary based on the
3196 There are additional modeline faces, @code{modeline-buffer-id},
3197 @code{modeline-mousable}, and @code{modeline-mousable-minor-mode}, which
3198 you may want to customize.
3202 @unnumberedsec 3.4: Multiple Device Support
3203 @unnumberedsec Q3.4.1: How do I open a frame on another screen of my multi-headed display?
3205 Use the command @kbd{M-x make-frame-on-display}. This command is also
3206 on the File menu in the menubar.
3208 The command @code{make-frame-on-tty} also exists, which will establish a
3209 connection to any tty-like device. Opening the TTY devices should be
3210 left to @code{gnuclient}, though.
3214 @unnumberedsec Q3.4.2: Can I really connect to a running SXEmacs after calling up over a modem? How?
3216 Yes. Use @code{gnuclient -nw}.
3218 Also see @ref{Q5.0.12}.
3222 @unnumberedsec 3.5: The Keyboard
3223 @unnumberedsec Q3.5.1: How can I bind complex functions (or macros) to keys?
3225 As an example, say you want the @kbd{paste} key on a Sun keyboard to
3226 insert the current Primary X selection at point. You can accomplish this
3230 (define-key global-map [f18] 'x-insert-selection)
3233 However, this only works if there is a current X selection (the
3234 selection will be highlighted). The functionality I like is for the
3235 @kbd{paste} key to insert the current X selection if there is one,
3236 otherwise insert the contents of the clipboard. To do this you need to
3237 pass arguments to @code{x-insert-selection}. This is done by wrapping
3238 the call in a 'lambda form:
3241 (global-set-key [f18]
3242 (lambda () (interactive) (x-insert-selection t nil)))
3245 This binds the f18 key to a @dfn{generic} functional object. The
3246 interactive spec is required because only interactive functions can be
3249 For the FAQ example you could use:
3252 (global-set-key [(control ?.)]
3253 (lambda () (interactive) (scroll-up 1)))
3254 (global-set-key [(control ?;)]
3255 (lambda () (interactive) (scroll-up -1)))
3258 This is fine if you only need a few functions within the lambda body.
3259 If you're doing more it's cleaner to define a separate function as in
3260 question 3.5.3 (@pxref{Q3.5.3}).
3264 @unnumberedsec Q3.5.2: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
3266 Add the following line to your @file{init.el} file:
3269 (setq next-line-add-newlines nil)
3272 This has been the default setting in SXEmacs for some time.
3276 @unnumberedsec Q3.5.3: How do I bind C-. and C-; to scroll one line up and down?
3278 Add the following (Thanks to @email{mly@@adoc.xerox.com, Richard Mlynarik} and
3279 @email{wayne@@zen.cac.stratus.com, Wayne Newberry}) to @file{.emacs}:
3282 (defun scroll-up-one-line ()
3286 (defun scroll-down-one-line ()
3290 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
3291 (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
3294 The key point is that you can only bind simple functions to keys; you
3295 can not bind a key to a function that you're also passing arguments to.
3296 (@pxref{Q3.5.1} for a better answer).
3300 @unnumberedsec Q3.5.4: Globally binding @kbd{Delete}?
3302 I cannot manage to globally bind my @kbd{Delete} key to something other
3303 than the default. How does one do this?
3305 Answer: The problem is that many modes explicitly bind @kbd{Delete}. To
3306 get around this, try the following:
3311 (message "You hit DELETE"))
3313 (define-key key-translation-map 'delete 'redirected-delete)
3314 (global-set-key 'redirected-delete 'foo)
3317 Also see @ref{Q3.5.10}.
3321 @unnumberedsec Q3.5.5: Scrolling one line at a time.
3323 Can the cursor keys scroll the screen a line at a time, rather than the
3324 default half page jump? I tend it to find it disorienting.
3329 (defun scroll-one-line-up (&optional arg)
3330 "Scroll the selected window up (forward in the text) one line (or N lines)."
3332 (scroll-up (or arg 1)))
3334 (defun scroll-one-line-down (&optional arg)
3335 "Scroll the selected window down (backward in the text) one line (or N)."
3337 (scroll-down (or arg 1)))
3339 (global-set-key [up] 'scroll-one-line-up)
3340 (global-set-key [down] 'scroll-one-line-down)
3343 The following will also work but will affect more than just the cursor
3344 keys (i.e. @kbd{C-n} and @kbd{C-p}):
3347 (setq scroll-step 1)
3350 You can also change this with Customize.
3351 Select from the @code{Options} menu
3352 @code{Advanced (Customize)->Emacs->Environment->Windows->Scroll Step...} or type
3353 @kbd{M-x customize @key{RET} windows @key{RET}}.
3357 @unnumberedsec Q3.5.6: How to map @kbd{Help} key alone on Sun type4 keyboard?
3359 The following works in GNU Emacs 19:
3362 (global-set-key [help] 'help-command);; Help
3365 The following works in SXEmacs with the addition of shift:
3368 (global-set-key [(shift help)] 'help-command);; Help
3371 But it doesn't work alone. This is in the file @file{PROBLEMS} which
3372 should have come with your SXEmacs installation: @emph{Emacs ignores the
3373 @kbd{help} key when running OLWM}.
3375 OLWM grabs the @kbd{help} key, and retransmits it to the appropriate
3380 @code{XSendEvent}. Allowing Emacs to react to synthetic
3381 events is a security hole, so this is turned off by default. You can
3382 enable it by setting the variable @code{x-allow-sendevents} to t. You
3383 can also cause fix this by telling OLWM to not grab the help key, with
3384 the null binding @code{OpenWindows.KeyboardCommand.Help:}.
3388 @unnumberedsec Q3.5.7: How can you type in special characters in SXEmacs?
3390 One way is to use the package @code{x-compose}. Then you can use
3391 sequences like @kbd{Compose " a} to get ä, etc.
3393 Another way is to use the @code{iso-insert} package. Then you can use
3394 sequences like @kbd{C-x 8 " a} to get ä, etc.
3396 @email{glynn@@sensei.co.uk, Glynn Clements} writes:
3399 It depends upon your X server.
3401 Generally, the simplest way is to define a key as Multi_key with
3403 @c hey, show some respect, willya -- there's xkeycaps, isn't there? --
3406 xmodmap -e 'keycode 0xff20 = Multi_key'
3409 You will need to pick an appropriate keycode. Use xev to find out the
3410 keycodes for each key.
3412 [NB: On a `Windows' keyboard, recent versions of XFree86 automatically
3413 define the right `Windows' key as Multi_key'.]
3415 Once you have Multi_key defined, you can use e.g.
3424 Also, recent versions of XFree86 define various AltGr-<key>
3425 combinations as dead keys, i.e.
3427 AltGr [ => dead_diaeresis
3428 AltGr ] => dead_tilde
3429 AltGr ; => dead_acute
3433 Running @samp{xmodmap -pk} will list all of the defined keysyms.
3436 For the related problem of @emph{displaying} non-ASCII characters in a
3437 non-Mule SXEmacs, @xref{Q3.2.7}.
3441 @unnumberedsec Q3.5.8: [This question intentionally left blank]
3443 Obsolete question, left blank to avoid renumbering.
3447 @unnumberedsec Q3.5.9: How do I make the Delete key delete forward?
3449 A solution is to set variable @code{delete-key-deletes-forward} to t.
3450 You can also change this with Customize. Select from the
3451 @code{Options} menu @code{Advanced
3452 (Customize)->Emacs->Editing->Basics->Delete Key Deletes Forward} or
3453 type @kbd{M-x customize @key{RET} editing-basics @key{RET}}.
3455 Also see @ref{Q3.5.4}.
3459 @unnumberedsec Q3.5.10: Can I turn on @dfn{sticky} modifier keys?
3461 Yes, with @code{(setq modifier-keys-are-sticky t)}. This will give the
3462 effect of being able to press and release Shift and have the next
3463 character typed come out in upper case. This will affect all the other
3464 modifier keys like Control and Meta as well.
3466 @email{ben@@xemacs.org, Ben Wing} writes:
3469 One thing about the sticky modifiers is that if you move the mouse out
3470 of the frame and back in, it cancels all currently ``stuck'' modifiers.
3474 @unnumberedsec Q3.5.11: How do I map the arrow keys?
3476 Say you want to map @kbd{C-@key{right}} to forward-word:
3478 @email{sds@@usa.net, Sam Steingold} writes:
3482 ; both (S)XEmacs and Emacs
3483 (define-key global-map [(control right)] 'forward-word)
3488 (define-key global-map [C-right] 'forward-word)
3493 (define-key global-map (kbd "C-<right>") 'forward-word)
3500 @unnumberedsec 3.6: The Cursor
3501 @unnumberedsec Q3.6.1: Is there a way to make the bar cursor thicker?
3503 I'd like to have the bar cursor a little thicker, as I tend to "lose" it
3506 For a 1 pixel bar cursor, use:
3512 For a 2 pixel bar cursor, use:
3515 (setq bar-cursor 'anything-else)
3518 You can also change these with Customize. Select from the
3519 @code{Options} menu @code{Advanced
3520 (Customize)->Emacs->Environment->Display->Bar Cursor...} or type
3521 @kbd{M-x customize @key{RET} display @key{RET}}.
3523 You can use a color to make it stand out better:
3526 Emacs*cursorColor: Red
3531 @unnumberedsec Q3.6.2: Is there a way to get back the block cursor?
3534 (setq bar-cursor nil)
3537 You can also change this with Customize. Select from the
3538 @code{Options} menu @code{Advanced
3539 (Customize)->Emacs->Environment->Display->Bar Cursor...} or type
3540 @kbd{M-x customize @key{RET} display @key{RET}}.
3544 @unnumberedsec Q3.6.3: Can I make the cursor blink?
3552 This function toggles between a steady cursor and a blinking cursor.
3553 You may also set this mode from the menu bar by selecting @samp{Options
3554 => Frame Appearance => Blinking Cursor}. Remember to save options.
3558 @unnumberedsec 3.7: The Mouse and Highlighting
3559 @unnumberedsec Q3.7.1: How can I turn off Mouse pasting?
3561 I keep hitting the middle mouse button by accident and getting stuff
3562 pasted into my buffer so how can I turn this off?
3564 Here is an alternative binding, whereby the middle mouse button selects
3565 (but does not cut) the expression under the mouse. Clicking middle on a
3566 left or right paren will select to the matching one. Note that you can
3567 use @code{define-key} or @code{global-set-key}.
3570 (defun mouse-set-point-and-select (event)
3571 "Sets the point at the mouse location, then marks following form"
3573 (mouse-set-point event)
3575 (define-key global-map [button2] 'mouse-set-point-and-select)
3580 @unnumberedsec Q3.7.2: How do I set control/meta/etc modifiers on mouse buttons?
3582 Use, for instance, @code{[(meta button1)]}. For example, here is a common
3583 setting for Common Lisp programmers who use the bundled @code{ilisp}
3584 package, whereby meta-button1 on a function name will find the file where
3585 the function name was defined, and put you at that location in the source
3588 [Inside a function that gets called by the lisp-mode-hook and
3592 (local-set-key [(meta button1)] 'edit-definitions-lisp)
3597 @unnumberedsec Q3.7.3: Clicking the left button does not do anything in buffer list.
3599 I do @kbd{C-x C-b} to get a list of buffers and the entries get
3600 highlighted when I move the mouse over them but clicking the left mouse
3601 does not do anything.
3603 Use the middle mouse button.
3607 @unnumberedsec Q3.7.4: How can I get a list of buffers when I hit mouse button 3?
3609 The following code will replace the default popup on button3:
3612 (global-set-key [button3] 'popup-buffer-menu)
3617 @unnumberedsec Q3.7.5: Why does cut-and-paste not work between SXEmacs and a cmdtool?
3619 We don't know. It's a bug. There does seem to be a work-around,
3620 however. Try running xclipboard first. It appears to fix the problem
3621 even if you exit it..
3625 @unnumberedsec Q3.7.6: How I can set SXEmacs up so that it pastes where the text cursor is?
3627 By default SXEmacs pastes X selections where the mouse pointer is. How
3630 Examine the function @code{mouse-yank}, by typing @kbd{C-h f mouse-yank
3633 To get SXEmacs to paste at the text cursor, add this your @file{init.el}:
3636 (setq mouse-yank-at-point t)
3639 You can also change this with Customize. Select from the
3640 @code{Options} menu @code{Advanced
3641 (Customize)->Emacs->Editing->Mouse->Yank At Point...} or type @kbd{M-x
3642 customize @key{RET} mouse @key{RET}}.
3646 @unnumberedsec Q3.7.7: How do I select a rectangular region?
3648 Just select the region normally, then use the rectangle commands (e.g.
3649 @code{kill-rectangle} on it. The region does not highlight as a
3650 rectangle, but the commands work just fine.
3652 To actually sweep out rectangular regions with the mouse you can use
3653 @code{mouse-track-do-rectangle} which is assigned to @kbd{M-button1}.
3654 Then use rectangle commands.
3656 You can also do the following to change default behavior to sweep out
3657 rectangular regions:
3660 (setq mouse-track-rectangle-p t)
3663 You can also change this with Customize. Select from the
3664 @code{Options} menu @code{Advanced
3665 (Customize)->Emacs->Editing->Mouse->Track Rectangle...} or type
3666 @kbd{M-x customize @key{RET} mouse @key{RET}}.
3670 mouse-track-do-rectangle: (event)
3671 -- an interactive compiled Lisp function.
3672 Like `mouse-track' but selects rectangles instead of regions.
3677 @unnumberedsec Q3.7.8: Why does @kbd{M-w} take so long?
3679 It actually doesn't. It leaves the region visible for a second so that
3680 you can see what area is being yanked. If you start working, though, it
3681 will immediately complete its operation. In other words, it will only
3682 delay for a second if you let it.
3686 @unnumberedsec 3.8: The Menubar and Toolbar
3687 @unnumberedsec Q3.8.1: How do I get rid of the menu (or menubar)?
3689 @c If you are running XEmacs 19.13 or earlier, add this command to your
3690 @c @file{init.el}/@file{.emacs}.
3693 @c (set-menubar nil)
3696 @c Starting with XEmacs 19.14 the preferred method is:
3699 (set-specifier menubar-visible-p nil)
3704 @unnumberedsec Q3.8.2: Can I customise the basic menubar?
3706 For an extensive menubar, add this line to your @file{init.el}:
3709 (load "big-menubar")
3712 If you'd like to write your own, this file provides as good a set of
3713 examples as any to start from. The file is located in edit-utils
3718 @unnumberedsec Q3.8.3: How do I control how many buffers are listed in the menu @code{Buffers List}?
3720 Add the following to your @file{init.el} (suit to fit):
3723 (setq buffers-menu-max-size 20)
3726 For no limit, use an argument of @samp{nil}.
3728 You can also change this with Customize. Select from the
3729 @code{Options} menu @code{Advanced
3730 (Customize)->Emacs->Environment->Menu->Buffers Menu->Max Size...} or
3731 type @kbd{M-x customize @key{RET} buffers-menu @key{RET}}.
3735 @unnumberedsec Q3.8.4: Resources like @code{Emacs*menubar*font} are not working?
3737 I am trying to use a resource like @code{Emacs*menubar*font} to set the
3738 font of the menubar but it's not working.
3740 In Motif, the use of @samp{font} resources is obsoleted in order to
3741 support internationalisation. If you are using the real Motif menubar,
3742 this resource is not recognized at all; you have to say:
3745 Emacs*menubar*fontList: FONT
3748 If you are using the Lucid menubar, for backward compatibility with
3749 existing user configurations, the @samp{font} resource is recognized.
3750 Since this is not supported by Motif itself, the code is a kludge and
3751 the @samp{font} resource will be recognized only if the @samp{fontList}
3752 resource resource is unset. This means that the resource
3761 Emacs*menubar*font: FONT
3764 even though the latter is more specific.
3766 In non-Motif configurations using @samp{--with-mule} and
3767 @samp{--with-xfs} it @emph{is} necessary to use the @code{fontSet}
3768 resource @emph{instead of} the @code{font} resource. The backward
3769 compatibility kludge was never implemented for non-Motif builds.
3778 @unnumberedsec Q3.8.5: How can I bind a key to a function to toggle the toolbar?
3783 (defun my-toggle-toolbar ()
3785 (set-specifier default-toolbar-visible-p
3786 (not (specifier-instance default-toolbar-visible-p))))
3787 (global-set-key "\C-xT" 'my-toggle-toolbar)
3792 @unnumberedsec 3.9: Scrollbars
3793 @unnumberedsec Q3.9.1: How can I disable the scrollbar?
3795 To disable them for all frames, add the following line to
3796 your @file{.Xresources}:
3799 Emacs.scrollBarWidth: 0
3802 Or select from the @code{Options} menu @code{Frame Appearance->Scrollbars}.
3803 Remember to save options.
3805 To turn the scrollbar off on a per-frame basis, use the following
3809 (set-specifier scrollbar-width 0 (selected-frame))
3812 You can actually turn the scrollbars on at any level you want by
3813 substituting for (selected-frame) in the above command. For example, to
3814 turn the scrollbars off only in a single buffer:
3817 (set-specifier scrollbar-width 0 (current-buffer))
3822 @unnumberedsec Q3.9.2: How can one use resources to change scrollbar colors?
3824 Here's a recap of how to use resources to change your scrollbar colors:
3829 Emacs*XmScrollBar.Background: skyblue
3830 Emacs*XmScrollBar.troughColor: lightgray
3834 Emacs*Scrollbar.Foreground: skyblue
3835 Emacs*Scrollbar.Background: lightgray
3838 Note the capitalisation of @code{Scrollbar} for the Athena widget.
3842 @unnumberedsec Q3.9.3: Moving the scrollbar can move the point; can I disable this?
3844 When I move the scrollbar in a SXEmacs window, it moves the point as
3845 well, which should not be the default behavior. Is this a bug or a
3846 feature? Can I disable it?
3848 The current behavior is a feature, not a bug. Point remains at the same
3849 buffer position as long as that position does not scroll off the screen.
3850 In that event, point will end up in either the upper-left or lower-left
3853 This cannot be changed.
3857 @unnumberedsec Q3.9.4: How can I turn off automatic horizontal scrolling in specific modes?
3859 Do @code{(setq truncate-lines t)} in the mode-hooks for any modes
3860 in which you want lines truncated.
3862 More precisely: If @code{truncate-lines} is nil, horizontal scrollbars
3863 will never appear. Otherwise, they will appear only if the value of
3864 @code{scrollbar-height} for that buffer/window/etc. is non-zero. If you
3868 (set-specifier scrollbar-height 0)
3871 then horizontal scrollbars will not appear in truncated buffers unless
3872 the package specifically asked for them.
3876 @unnumberedsec 3.10: Text Selections
3877 @unnumberedsec Q3.10.1: How can I turn off or change highlighted selections?
3879 The @code{zmacs} mode allows for what some might call gratuitous
3880 highlighting for selected regions (either by setting mark or by using
3881 the mouse). This is the default behavior. To turn off, add the
3882 following line to your @file{init.el} file:
3885 (setq zmacs-regions nil)
3888 You can also change this with Customize. Select from the
3889 @code{Options} menu @code{Advanced
3890 (Customize)->Emacs->Editing->Basics->Zmacs Regions} or type @kbd{M-x
3891 customize @key{RET} editing-basics @key{RET}}.
3893 To change the face for selection, look at @code{Options->Customize} on
3898 @unnumberedsec Q3.10.2: How do I get that typing on an active region removes it?
3900 I want to change things so that if I select some text and start typing,
3901 the typed text replaces the selected text, similar to Motif.
3903 You want to use something called @dfn{pending delete}. Pending delete
3904 is what happens when you select a region (with the mouse or keyboard)
3905 and you press a key to replace the selected region by the key you typed.
3906 Usually backspace kills the selected region.
3908 To get this behavior, ensure that you have the @file{pc} package
3909 installed, and add the following lines to your
3910 @file{init.el}/@file{.emacs}:
3914 ((fboundp 'turn-on-pending-delete)
3915 (turn-on-pending-delete))
3916 ((fboundp 'pending-delete-on)
3917 (pending-delete-on t)))
3920 Note that this will work with both Backspace and Delete. This code is a
3921 tad more complicated than it has to be for SXEmacs in order to make it
3926 @unnumberedsec Q3.10.3: Can I turn off the highlight during isearch?
3928 I do not like my text highlighted while I am doing isearch as I am not
3929 able to see what's underneath. How do I turn it off?
3931 Put the following in your @file{init.el}:
3934 (setq isearch-highlight nil)
3937 You can also change this with Customize. Type @kbd{M-x
3938 customize-variable @key{RET} isearch-highlight @key{RET}}.
3940 Note also that isearch-highlight affects query-replace and ispell.
3941 Instead of disabling isearch-highlight you may find that a better
3942 solution consists of customizing the @code{isearch} face.
3946 @unnumberedsec Q3.10.4: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)?
3948 Put this in your @file{init.el}:
3951 (setq zmacs-regions nil)
3954 @strong{Warning: This command turns off all region highlighting.}
3956 Also see @ref{Q3.10.1}.
3960 @unnumberedsec Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
3962 Does not apply anymore.
3966 @unnumberedsec Q3.10.6: Why is killing so slow?
3968 This actually is an X Windows question, although you'll notice it with
3969 keyboard operations as well as while using the GUI. Basically, there
3970 are four ways to communicate interprogram via the X server:
3973 @item Primary selection
3974 a transient selection that gets replaced every time a new selection is made
3976 @item Secondary selection
3977 for "exchanging" with the primary selection
3980 a clipboard internal to the X server (deprecated)
3982 @item Clipboard selection
3983 a selection with a notification protocol that allows a separate app to
3984 manage the clipboard
3987 The cut buffers are deprecated because managing them is even more
3988 inefficient than the clipboard notification protocol. The primary
3989 selection works fine for many users and applications, but is not very
3990 robust under intensive or sophisticated use.
3992 In Motif, a clipboard has become the primary means for managing cut
3993 and paste. These means that "modern" applications tend to be oriented
3994 toward a true clipboard, rather than the primary selection. It's not
3995 that SXEmacs doesn't support the simple primary selection method, it's
3996 that more and more other applications don't.
3998 So the slowdown occurs because SXEmacs now engages in the clipboard
3999 notification protocol on @emph{every} kill. This is especially slow on
4002 With most people running most clients and server on the same host, and
4003 many of the rest working over very fast communication, you may expect
4004 that the situation is not going to improve.
4006 There are a number of workarounds. The most effective is to use a
4007 special command to do selection ownership only when you intend to paste
4008 to another application. Useful commands are @code{kill-primary-selection}
4009 and @code{copy-primary-selection}. These work only on text selected
4010 with the mouse (probably; experiment), and are bound by default to the
4011 @kbd{Cut} and @kbd{Copy}, respectively, buttons on the toolbar.
4012 @code{copy-primary-selection} is also bound to @kbd{C-Insert}. You can
4013 yank the clipboard contents with @code{yank-primary-selection}, bound to
4014 the @kbd{Paste} toolbar button and @kbd{Sh-Insert}.
4016 If you are communicating by cut and paste with applications that use the
4017 primary selection, then you can customize
4018 @code{interprogram-cut-function} to @code{nil}, restoring the XEmacs
4019 version 20 behavior. How can you tell if a program will support this?
4020 Motifly-correct programs require the clipboard; you lose. For others,
4021 only by trying it. You also need to customize the complementary
4022 @code{interprogram-paste-function} to @code{nil}. (Otherwise
4023 SXEmacs-to-SXEmacs pastes will not work correctly.)
4025 You may get some relief on Motif by setting
4026 @code{x-selection-strict-motif-ownership} to nil, but this means you will
4027 only intermittently be able to paste SXEmacs kills to Motif applications.
4029 Thanks to Jeff Mincy and Glynn Clements for corrections.
4032 @node Subsystems, Miscellaneous, Customisation, Top
4033 @unnumbered 4 Major Subsystems
4035 This is part 4 of the SXEmacs Frequently Asked Questions list. This
4036 section is devoted to major SXEmacs subsystems.
4039 Reading Mail with VM:
4040 * Q4.0.1:: How do I set up VM to retrieve remote mail using POP?
4041 * Q4.0.2:: How do I get VM to filter mail for me?
4042 * Q4.0.3:: How can I get VM to automatically check for new mail?
4043 * Q4.0.4:: [This question intentionally left blank]
4044 * Q4.0.5:: How do I get my outgoing mail archived?
4045 * Q4.0.6:: I have various addresses at which I receive mail. How
4046 can I tell VM to ignore them when doing a "reply-all"?
4047 * Q4.0.7:: Is there a mailing list or FAQ for VM?
4048 * Q4.0.8:: Remote mail reading with VM.
4049 * Q4.0.9:: rmail or VM gets an error incorporating new mail.
4050 * Q4.0.10:: How do I make VM stay in a single frame?
4051 * Q4.0.11:: How do I make VM or mh-e display graphical smilies?
4052 * Q4.0.12:: Customisation of VM not covered in the manual or here.
4054 Web browsing with W3:
4055 * Q4.1.1:: What is W3?
4056 * Q4.1.2:: How do I run W3 from behind a firewall?
4057 * Q4.1.3:: Is it true that W3 supports style sheets and tables?
4059 Reading Netnews and Mail with Gnus:
4060 * Q4.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,
4061 Quassia Gnus, Pterodactyl Gnus, Oort Gnus, argh!
4062 * Q4.2.2:: [This question intentionally left blank]
4063 * Q4.2.3:: How do I make Gnus stay within a single frame?
4064 * Q4.2.4:: How do I customize the From: line?
4067 * Q4.3.1:: How can I read and/or compose MIME messages?
4068 * Q4.3.2:: What is TM and where do I get it?
4069 * Q4.3.3:: Why isn't this @code{movemail} program working?
4070 * Q4.3.4:: Movemail is also distributed by Netscape? Can that cause problems?
4071 * Q4.3.5:: Where do I find pstogif (required by tm)?
4073 Sparcworks, EOS, and WorkShop:
4074 * Q4.4.1:: What is SPARCworks, EOS, and WorkShop
4075 * Q4.4.2:: How do I start the Sun Workshop support in SXEmacs?
4078 * Q4.5.1:: What is/was Energize?
4081 * Q4.6.1:: What is Infodock?
4083 Other Unbundled Packages:
4084 * Q4.7.1:: What is AUC TeX? Where do you get it?
4085 * Q4.7.2:: Are there any Emacs Lisp Spreadsheets?
4086 * Q4.7.3:: [This question intentionally left blank]
4087 * Q4.7.4:: Problems installing AUC TeX
4088 * Q4.7.5:: Is there a reason for an Emacs package not to be included in SXEmacs?
4089 * Q4.7.6:: Is there a MatLab mode?
4090 * Q4.7.7:: Can I edit files on other hosts?
4094 @unnumberedsec 4.0: Reading Mail with VM
4095 @unnumberedsec Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
4097 Use @code{vm-spool-files}, like this for example:
4100 (setq vm-spool-files '("/var/spool/mail/wing"
4101 "netcom23.netcom.com:110:pass:wing:MYPASS"))
4104 Of course substitute your actual password for MYPASS.
4108 @unnumberedsec Q4.0.2: How do I get VM to filter mail for me?
4110 One possibility is to use procmail to split your mail before it gets to
4111 VM. I prefer this personally, since there are many strange and
4112 wonderful things one can do with procmail. Procmail may be found at
4113 @uref{ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/}.
4115 Also see the Mail Filtering FAQ at:
4119 @uref{ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq}.
4121 @c <URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html>
4126 @unnumberedsec Q4.0.3: How can I get VM to automatically check for new mail?
4128 @email{turner@@lanl.gov, John Turner} writes:
4134 (setq vm-auto-get-new-mail 60)
4140 @unnumberedsec Q4.0.4: [This question intentionally left blank]
4142 Obsolete question, left blank to avoid renumbering.
4146 @unnumberedsec Q4.0.5: How do I get my outgoing mail archived?
4149 (setq mail-archive-file-name "~/outbox")
4154 @unnumberedsec Q4.0.6: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
4156 Set @code{vm-reply-ignored-addresses} to a list, like
4159 (setq vm-reply-ignored-addresses
4160 '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
4161 "wing@@netcom.com" "wing@@xemacs.org"))
4164 Note that each string is a regular expression.
4168 @unnumberedsec Q4.0.7: Is there a mailing list or FAQ for VM?
4170 A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}.
4172 VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
4176 @unnumberedsec Q4.0.8: Remote mail reading with VM.
4178 My mailbox lives at the office on a big honkin server. My regular INBOX
4179 lives on my honkin desktop machine. I now can PPP to the office from
4180 home which is far from honking... I'd like to be able to read mail at
4181 home without storing it here and I'd like to use sxemacs and VM at
4182 home... Is there a recommended setup?
4184 @email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes:
4187 There are several ways to do this.
4191 Set your display to your home machine and run dxpc or one of the other X
4195 NFS mount your desktop machine on your home machine and modify your pop
4196 command on your home machine to rsh to your desktop machine and actually
4200 Run a POP server on your desktop machine as well and do a sort of two
4205 @email{wmperry@@monolith.spry.com, William Perry} adds:
4208 Or you could run a pop script periodically on your desktop machine, and
4209 just use ange-ftp or NFS to get to your mailbox. I used to do this all
4210 the time back at IU.
4215 @unnumberedsec Q4.0.9: rmail or VM gets an error incorporating new mail.
4217 Quoting the SXEmacs PROBLEMS file:
4220 rmail and VM get new mail from @file{/var/spool/mail/$USER} using a
4221 program called @code{movemail}. This program interlocks with
4222 @code{/bin/mail} using the protocol defined by @code{/bin/mail}.
4224 There are two different protocols in general use. One of them uses the
4225 @code{flock} system call. The other involves creating a lock file;
4226 @code{movemail} must be able to write in @file{/var/spool/mail} in order
4227 to do this. You control which one is used by defining, or not defining,
4228 the macro @code{MAIL_USE_FLOCK} in @file{config.h} or the m- or s- file
4231 @strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
4232 SYSTEM, YOU CAN LOSE MAIL!}
4234 If your system uses the lock file protocol, and fascist restrictions
4235 prevent ordinary users from writing the lock files in
4236 @file{/var/spool/mail}, you may need to make @code{movemail} setgid to a
4237 suitable group such as @samp{mail}. You can use these commands (as
4245 Installation normally copies movemail from the build directory to an
4246 installation directory which is usually under @file{/usr/local/lib}.
4247 The installed copy of @code{movemail} is usually in the directory
4248 @file{/usr/local/lib/sxemacs-VERSION/TARGET}. You must change the group
4249 and mode of the installed copy; changing the group and mode of the build
4250 directory copy is ineffective.
4255 @unnumberedsec Q4.0.10: How do I make VM stay in a single frame?
4257 John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes:
4261 ; Don't use multiple frames
4262 (setq vm-frame-per-composition nil)
4263 (setq vm-frame-per-folder nil)
4264 (setq vm-frame-per-edit nil)
4265 (setq vm-frame-per-summary nil)
4271 @unnumberedsec Q4.0.11: How do I make VM or mh-e display graphical smilies?
4273 For mh-e use the following:
4276 (add-hook 'mh-show-mode-hook '(lambda ()
4277 (smiley-region (point-min)
4281 @email{bill@@carpenter.ORG, WJCarpenter} writes:
4282 For VM use the following:
4284 (autoload 'smiley-region "smiley" nil t)
4285 (add-hook 'vm-select-message-hook
4287 (smiley-region (point-min)
4291 For tm use the following:
4293 (autoload 'smiley-buffer "smiley" nil t)
4294 (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
4299 @unnumberedsec Q4.0.12: Customisation of VM not covered in the manual, or here.
4301 @email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes:
4304 The meta-answer is to look into the file @file{vm-vars.el}, in the vm
4305 directory of the lisp library.
4307 @file{vm-vars.el} contains, initializes and carefully describes, with
4308 examples of usage, the plethora of user options that @emph{fully}
4309 control VM's behavior.
4311 Enter vm-vars, @code{forward-search} for toolbar, find the variables
4312 that control the toolbar placement, appearance, existence, copy to
4313 your @file{init.el} or @file{.vm} and modify according to the detailed
4316 The above also applies to all the various features of VM: search for
4317 some keywords, maybe the first you conjure isn't appropriate, find the
4318 appropriate variables, copy and experiment.
4323 @unnumberedsec 4.1: Web browsing with W3
4324 @unnumberedsec Q4.1.1: What is W3?
4326 W3 is an advanced graphical browser written in Emacs lisp that runs on
4327 SXEmacs. It has full support for cascaded style sheets, and more...
4329 It has a home web page at
4330 @uref{http://www.cs.indiana.edu/elisp/w3/docs.html}.
4334 @unnumberedsec Q4.1.2: How do I run W3 from behind a firewall?
4336 There is a long, well-written, detailed section in the W3 manual that
4337 describes how to do this. Look in the section entitled "Firewalls".
4341 @unnumberedsec Q4.1.3: Is it true that W3 supports style sheets and tables?
4343 Yes, and much more. W3, as distributed with the latest SXEmacs is a
4344 full-featured web browser.
4348 @unnumberedsec 4.2: Reading Netnews and Mail with Gnus
4349 @unnumberedsec Q4.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, Pterodactyl Gnus, Oort Gnus, argh!
4351 The Gnus numbering issues are not meant for mere mortals to know them.
4352 @c If you feel you @emph{must} enter the muddy waters of Gnus, visit the
4353 @c excellent FAQ, maintained by Justin Sheehy, at:
4356 @c @uref{http://www.ccs.neu.edu/software/contrib/gnus/}
4359 See the Gnus home page
4361 @uref{http://www.gnus.org/}
4366 @unnumberedsec Q4.2.2: This question intentionally left blank.
4368 Obsolete question, left blank to avoid renumbering.
4372 @unnumberedsec Q4.2.3: How do I make Gnus stay within a single frame?
4374 The toolbar code to start Gnus opens the new frame---and it's a feature
4375 rather than a bug. If you don't like it, but would still like to click
4376 on the seemly icon, use the following code:
4379 (defun toolbar-news ()
4383 It will redefine the callback function of the icon to just call
4384 @code{gnus}, without all the fancy frame stuff.
4388 @unnumberedsec Q4.2.4: How do I customize the From: line?
4390 How do I change the @code{From:} line? I have set gnus-user-from-line
4393 Gail Gurman <gail.gurman@@sybase.com>
4395 @noindent , but SXEmacs Gnus doesn't use
4398 Gail Mara Gurman @email{gailg@@deall}
4400 @noindent and then complains
4401 that it's incorrect. Also, as you perhaps can see, my Message-ID is
4402 screwy. How can I change that?
4404 @email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes:
4407 Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or
4408 @code{mail-host-address} to @samp{sybase.com}.
4413 @unnumberedsec 4.3: Other Mail & News
4414 @unnumberedsec Q4.3.1: How can I read and/or compose MIME messages?
4417 VM supports MIME natively.
4419 You probably want to use the Tools for MIME (tm). @xref{Q4.3.2}, for
4422 @email{trey@@cs.berkeley.edu, Trey Jackson} has an Emacs & MIME web page at
4426 @uref{http://bmrc.berkeley.edu/~trey/emacs/mime.html}.
4429 Another possibility is RMIME. You may find RMIME at
4433 @uref{http://www.cinti.net/~rmoody/rmime/index.html}.
4437 @unnumberedsec Q4.3.2: What is TM and where do I get it?
4439 TM stands for @dfn{Tools for MIME} and not Tiny MIME. TM integrates
4440 with all major (S)XEmacs packages like Gnus (all flavours), VM, MH-E,
4441 and mailcrypt. It provides totally transparent and trouble-free MIME
4442 support. When appropriate a message will be decoded in place in an
4445 TM was written by @email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} and
4446 @email{shuhei-k@@jaist.ac.jp, KOBAYASHI Shuhei}.
4448 It is based on the work of @email{umerin@@mse.kyutech.ac.jp, UMEDA
4449 Masanobu}, the original writer of GNUS.
4451 The following information is from the @file{README}:
4453 @dfn{tm} is a MIME package for GNU Emacs.
4454 tm has following functions:
4457 @item MIME style multilingual header.
4458 @item MIME message viewer (mime/viewer-mode).
4459 @item MIME message composer (mime/editor-mode).
4460 @item MIME extenders for mh-e, GNUS, RMAIL and VM.
4463 tm is available from following anonymous ftp sites:
4465 @comment @item @uref{ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/} (Japan).
4466 @comment @item @uref{ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/} (Japan).
4467 @comment @c The host above is unknown.
4468 @comment @item @uref{ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/} (US).
4469 @comment @item @uref{ftp://ftp.miranova.com/pub/gnus/jaist.ac.jp/} (US).
4470 @item @uref{ftp://ftp.unicamp.br/pub/mail/mime/tm/} (Brasil).
4471 @item @uref{ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/} (Germany).
4472 @item @uref{ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/} (Germany).
4475 Don't let the installation procedure & instructions stop you from trying
4476 this package out---it's much simpler than it looks, and once installed,
4479 @email{youngs@@sxemacs.org, Steve Youngs} writes:
4482 All the major Emacs Lisp based MUAs (Gnus, MH-E, and VM) all do their
4483 own thing when it comes to MIME so you won't need TM to get MIME support
4489 @unnumberedsec Q4.3.3: Why isn't this @code{movemail} program working?
4491 Ben Wing @email{ben@@xemacs.org} writes:
4494 It wasn't chown'ed/chmod'd correctly.
4499 @unnumberedsec Q4.3.4: Movemail is also distributed by Netscape? Can that cause problems?
4501 @email{steve@@xemacs.org, Steve Baur} writes:
4504 Yes. Always use the movemail installed with your SXEmacs. Failure to do
4505 so can result in lost mail.
4508 Please refer to @email{jwz@@jwz.org, Jamie Zawinski's} notes at
4512 @uref{http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/movemail.html}.
4513 In particular, this document will show you how to make Netscape use the
4514 version of movemail configured for your system by the person who built
4519 @unnumberedsec Q4.3.5: Where do I find pstogif (required by tm)?
4521 pstogif is part of the latex2html package.
4523 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
4525 latex2html is best found at the CTAN hosts and their mirrors
4530 @file{tex-archive/support/latex2html}.
4535 @item @uref{ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/}.
4536 @item @uref{ftp://ftp.dante.de/tex-archive/support/latex2html/}.
4539 There is a good mirror at ftp.cdrom.com;
4543 @uref{ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/}.
4547 @unnumberedsec 4.4: Sparcworks, EOS, and WorkShop
4548 @unnumberedsec Q4.4.1: What is SPARCworks, EOS, and WorkShop?
4550 @email{turner@@lanl.gov, John Turner} writes:
4553 SPARCworks is SunSoft's development environment, comprising compilers
4554 (C, C++, FORTRAN 77, Fortran 90, Ada, and Pascal), a debugger, and other
4555 tools such as TeamWare (for configuration management), MakeTool, etc.
4558 See @uref{http://www.sun.com/software/Developer-products/}
4561 EOS stands for "Era on SPARCworks", but I don't know what Era stands
4564 EOS is the integration of SXEmacs with the SPARCworks debugger. It
4565 allows one to use a SXEmacs frame to view code (complete with
4566 fontification, etc.), set breakpoints, print variables, etc., while
4567 using the SPARCworks debugger. It works very well and I use it all the
4570 @email{cthomp@@xemacs.org, Chuck Thompson} writes:
4573 Era stood for "Emacs Rewritten Again". It was what we were calling the
4574 modified version of Lucid Emacs for Sun when I was dragged, er, allowed
4575 to work on this wonderful editor.
4578 @email{martin@@xemacs.org, Martin Buchholz} writes:
4581 EOS is being replaced with a new graphical development environment
4582 called Sun WorkShop. For more details, check out
4586 @uref{http://www.sun.com/software/Products/Developer-products}.
4591 @unnumberedsec Q4.4.2: How do I start the Sun Workshop support in SXEmacs?
4593 Add the switch ---with-workshop to the configure command when building
4594 SXEmacs and put the following in one of your startup files
4595 (e.g. site-start.el or init.el):
4598 (when (featurep 'tooltalk)
4599 (load "tooltalk-macros")
4600 (load "tooltalk-util")
4601 (load "tooltalk-init"))
4602 (when (featurep 'sparcworks)
4603 (load "sunpro-init")
4606 (load "annotations")
4612 @unnumberedsec 4.5: Energize
4613 @unnumberedsec Q4.5.1: What is/was Energize?
4615 @email{gray@@meteor.harlequin.com, David N Gray} writes:
4617 The files in @file{lisp/energize} are to enable Emacs to interface with
4618 the "Energize Programming System", a C and C++ development environment,
4619 which was a product of Lucid, Inc. Tragically, Lucid went out of
4620 business in 1994, so although Energize is still a great system, if you
4621 don't already have it, there isn't any way to get it now. (Unless you
4622 happen to be in Japan; INS Engineering may still be selling it there.
4623 Tartan bought the rights to sell it in the rest of the world, but never
4629 @unnumberedsec 4.6: Infodock
4630 @unnumberedsec Q4.6.1: What is Infodock?
4632 @uref{http://sourceforge.net/projects/infodock/, InfoDock} is an
4633 integrated productivity toolset, mainly aimed at technical people,
4634 hosted at SourceForge.
4636 InfoDock is built atop SXEmacs and so has all of the power of an
4637 Emacs, but with an easier to use and more comprehensive menu-based
4638 user interface. The bottom portion of this text describes how it
4639 differs from SXEmacs/XEmacs and GNU Emacs from the Free Software
4642 InfoDock is aimed at people who want a free, turn-key productivity
4643 environment. Although InfoDock is customizable, it is not intended for
4644 people who like basic versions of Emacs which need to be customized
4645 extensively for local use; standard Emacs distributions are better for
4646 such uses. InfoDock is for those people who want a complete,
4647 pre-customized environment in one package, which they need not touch
4648 more than once or twice a year to update to new revisions.
4650 InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX,
4651 and Intel Linux systems. It is intended for use on a color display,
4652 although most features will work on monochrome monitors. Simply unpack
4653 InfoDock according to the instructions in the ID-INSTALL file and you
4656 The InfoDock Manual is concise, yet sufficient as a user guide for users
4657 who have never used an Emacs-type editor before. For users who are
4658 already familiar with Emacs, it supplements the information in the GNU
4661 InfoDock menus are much more extensive and more mature than standard
4662 Emacs menus. Each menu offers a @samp{Manual} item which displays
4663 documentation associated with the menu's functions.
4666 Four types of menubars are provided:
4669 An extensive menubar providing access to global InfoDock commands.
4671 Mode-specific menubars tailored to the current major mode.
4673 A simple menubar for basic editing to help novices get started with InfoDock.
4675 The standard SXEmacs menubar.
4678 Most modes also include mode-specific popup menus. Additionally, region and
4679 rectangle popup menus are included.
4681 @samp{Hyperbole}, the everyday information manager, is a core part of
4682 InfoDock. This provides context-sensitive mouse keys, a rolodex-type
4683 contact manager, programmable hypertext buttons, and an autonumbered
4684 outliner with embedded hyperlink anchors.
4686 The @samp{OO-Browser}, a multi-language object-oriented code browser, is a
4687 standard part of InfoDock.
4689 InfoDock saves a more extensive set of user options than other Emacs
4692 InfoDock inserts a useful file header in many file types, showing the
4693 author, summary, and last modification time of each file. A summary
4694 program can then be used to summarize all of the files in a directory,
4695 for easy MANIFEST file creation.
4697 Your working set of buffers is automatically saved and restored (if you
4698 answer yes to a prompt) between InfoDock sessions.
4700 Refined color choices for code highlighting are provided for both dark and
4701 light background display frames.
4703 The @kbd{C-z} key prefix performs frame-based commands which parallel the
4704 @kbd{C-x} key prefix for window-based commands.
4706 The Smart Menu system is included for producing command menus on dumb
4709 Lisp libraries are better categorized according to function.
4711 Extensions and improvements to many areas of Emacs are included, such as:
4712 paragraph filling, mail reading with Rmail, shell handling, outlining, code
4713 highlighting and browsing, and man page browsing.
4715 InfoDock questions, answers and discussion should go to the mail list
4719 @email{infodock@@infodock.com}. Use
4720 @email{infodock-request@@infodock.com} to be added or removed from the
4721 list. Always include your InfoDock version number when sending help
4724 InfoDock is available across the Internet via anonymous FTP. To get
4725 it, first move to a directory into which you want the InfoDock archive
4726 files placed. We will call this <DIST-DIR>.
4732 Ftp to ftp.xemacs.org (Internet Host ID = 128.174.252.16):
4735 prompt> ftp ftp.xemacs.org
4738 Login as @samp{anonymous} with your own <user-id>@@<site-name> as a password.
4741 Name (ftp.xemacs.org): anonymous
4742 331 Guest login ok, send your complete e-mail address as password.
4743 Password: -<your-user-id>@@<your-domain>
4744 230 Guest login ok, access restrictions apply.
4747 Move to the location of the InfoDock archives:
4750 ftp> cd pub/infodock
4753 Set your transfer mode to binary:
4764 Interactive mode off.
4767 Retrieve the InfoDock archives that you want, either by using a
4768 @samp{get <file>} for each file you want or by using the following to
4769 get a complete distribution, including all binaries:
4772 ftp> mget ID-INSTALL
4776 Close the FTP connection:
4783 Read the @file{ID-INSTALL} file which you just retrieved for
4784 step-by-step installation instructions.
4788 @unnumberedsec 4.7: Other Unbundled Packages
4789 @unnumberedsec Q4.7.1: What is AUC TeX? Where do you get it?
4791 AUC TeX is an extensible package written by
4792 @email{abraham@@dina.kvl.dk, Per Abrahamsen} that supports writing and
4793 formatting TeX files for most Emacsen. Many different macro packages
4794 are supported, including AMS TeX, LaTeX, and TeXinfo.
4796 The most recent version is always available by ftp at
4800 @uref{ftp://sunsite.dk/packages/auctex/auctex.tar.gz}.
4802 In case you don't have access to anonymous ftp, you can get it by an
4803 email request to @email{ftpmail@@decwrl.dec.com}.
4805 WWW users may want to check out the AUC TeX page at
4809 @uref{http://sunsite.dk/auctex/}.
4813 @unnumberedsec Q4.7.2: Are there any Emacs Lisp Spreadsheets?
4815 Yes. Check out @dfn{dismal} (which stands for Dis' Mode Ain't Lotus) at
4819 @uref{ftp://cs.nyu.edu/pub/local/fox/dismal/}.
4823 @unnumberedsec Q4.7.3: [This question intentionally left blank]
4827 @unnumberedsec Q4.7.4: Problems installing AUC TeX.
4829 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
4832 AUC TeX works fine on both stock Emacs and (S)XEmacs has been doing so
4833 for a very very long time. This is mostly due to the work of
4834 @email{abraham@@dina.kvl.dk, Per Abrahamsen} (clap clap) in particular
4835 his @file{easymenu} package. Which leads to what is probably the
4839 Most problems with AUC TeX are one of two things:
4843 The TeX-lisp-directory in @file{tex-site.el} and the makefile don't
4846 Fix: make sure you configure AUC TeX properly @strong{before} installing.
4849 You have an old version of easymenu.el in your path.
4851 Fix: use @code{locate-library} and remove old versions to make sure it
4852 @strong{only} finds the one that came with SXEmacs.
4857 @unnumberedsec Q4.7.5: Is there a reason for an Emacs package not to be included in SXEmacs?
4859 The reason for an Emacs package not to be included in SXEmacs is
4860 usually one or more of the following:
4864 The package has not been ported to (S)XEmacs. This will typically happen
4865 when it uses GNU-Emacs-specific features, which make it fail under
4868 Porting a package to (S)XEmacs can range from a trivial amount of
4869 change to a partial or full rewrite. Fortunately, the authors of
4870 modern packages usually choose to support all Emacsen themselves.
4873 The package has been decided not to be appropriate for (S)XEmacs. It
4874 may have an equivalent or better replacement within (S)XEmacs, in
4875 which case the developers may choose not to burden themselves with
4876 supporting an additional package.
4878 Each package bundled with (S)XEmacs means more work for the
4879 maintainers, whether they want it or not. If you are ready to take
4880 over the maintenance responsibilities for the package you port, be
4881 sure to say so---we will more likely include it.
4884 The package simply hasn't been noted by the (S)XEmacs development. If
4885 that's the case, the messages like yours are very useful for attracting
4889 The package was noted by the developers, but they simply haven't yet
4890 gotten around to including/porting it. Wait for the next release or,
4891 even better, offer your help. It will be gladly accepted and
4897 @unnumberedsec Q4.7.5: Is there a MatLab mode?
4899 Yes, a matlab mode and other items are available at the
4900 @uref{ftp://ftp.mathworks.com/pub/contrib/emacs_add_ons,
4901 MathWorks' emacs_add_ons ftp directory}.
4905 @unnumberedsec Q4.7.7: Can I edit files on other hosts?
4907 Yes. Of course SXEmacs can use any network file system (such as NFS)
4908 you have available, and includes some optimisations and safety
4909 features appropriate to those environments.
4911 It is also possible to transparently edit files via FTP, ssh, or rsh.
4912 That is, SXEmacs makes a local copy using the transport in the
4913 background, and automatically refreshes the remote original from that
4914 copy when you save it. SXEmacs also is capable of doing file system
4915 manipulations like creating and removing directories and files. The
4916 FTP interface is provided by the standard @samp{efs} package @ref{Top,
4917 EFS, , efs}. The ssh/rsh interface is provided by the optional
4918 @samp{tramp} package @ref{Top, TRAMP, , tramp}.
4920 @node Miscellaneous, MS Windows, Subsystems, Top
4921 @unnumbered 5 The Miscellaneous Stuff
4923 This is part 5 of the SXEmacs Frequently Asked Questions list. This
4924 section is devoted to anything that doesn't fit neatly into the other
4928 Major & Minor Modes:
4929 * Q5.0.1:: How can I do source code highlighting using font-lock?
4930 * Q5.0.2:: I do not like cc-mode. How do I use the old c-mode?
4931 * Q5.0.3:: How do I get @samp{More} Syntax Highlighting on by default?
4932 * Q5.0.4:: How can I enable auto-indent and/or Filladapt?
4933 * Q5.0.5:: How can I get SXEmacs to come up in text/auto-fill mode by default?
4934 * Q5.0.6:: How do I start up a second shell buffer?
4935 * Q5.0.7:: Telnet from shell filters too much.
4936 * Q5.0.8:: Why does edt emulation not work?
4937 * Q5.0.9:: How can I emulate VI and use it as my default mode?
4938 * Q5.0.10:: [This question intentionally left blank]
4939 * Q5.0.11:: [This question intentionally left blank]
4940 * Q5.0.12:: How do I disable gnuserv from opening a new frame?
4941 * Q5.0.13:: How do I start gnuserv so that each subsequent SXEmacs is a client?
4942 * Q5.0.14:: Strange things are happening in Shell Mode.
4943 * Q5.0.15:: Where do I get the latest CC Mode?
4944 * Q5.0.16:: I find auto-show-mode disconcerting. How do I turn it off?
4945 * Q5.0.17:: How can I get two instances of info?
4946 * Q5.0.18:: [This question intentionally left blank]
4947 * Q5.0.19:: Is there something better than LaTeX mode?
4948 * Q5.0.20:: Is there a way to start a new SXEmacs if there's no
4949 gnuserv running, and otherwise use gnuclient?
4951 Emacs Lisp Programming Techniques:
4952 * Q5.1.1:: The difference in key sequences between XEmacs/SXEmacs and GNU Emacs?
4953 * Q5.1.2:: Can I generate "fake" keyboard events?
4954 * Q5.1.3:: Could you explain @code{read-kbd-macro} in more detail?
4955 * Q5.1.4:: What is the performance hit of @code{let}?
4956 * Q5.1.5:: What is the recommended use of @code{setq}?
4957 * Q5.1.6:: What is the typical misuse of @code{setq} ?
4958 * Q5.1.7:: I like the @code{do} form of cl, does it slow things down?
4959 * Q5.1.8:: I like recursion, does it slow things down?
4960 * Q5.1.9:: How do I put a glyph as annotation in a buffer?
4961 * Q5.1.10:: @code{map-extents} won't traverse all of my extents!
4962 * Q5.1.11:: My elisp program is horribly slow. Is there an easy way to
4963 find out where it spends time?
4966 * Q5.2.1:: How do I turn off the sound?
4967 * Q5.2.2:: How do I get funky sounds instead of a boring beep?
4968 * Q5.2.3:: What's NAS, how do I get it?
4969 * Q5.2.4:: Sunsite sounds don't play.
4973 * Q5.3.1:: How do you make SXEmacs indent CL if-clauses correctly?
4974 * Q5.3.2:: [This question intentionally left blank]
4975 * Q5.3.3:: How can I print WYSIWYG a font-locked buffer?
4976 * Q5.3.4:: Getting @kbd{M-x lpr} to work with postscript printer.
4977 * Q5.3.5:: How do I specify the paths that SXEmacs uses for finding files?
4978 * Q5.3.6:: [This question intentionally left blank]
4979 * Q5.3.7:: Can I have the end of the buffer delimited in some way?
4980 * Q5.3.8:: How do I insert today's date into a buffer?
4981 * Q5.3.9:: Are only certain syntactic character classes available for abbrevs?
4982 * Q5.3.10:: How can I get those oh-so-neat X-Face lines?
4983 * Q5.3.11:: How do I add new Info directories?
4984 * Q5.3.12:: What do I need to change to make printing work?
4989 @unnumberedsec 5.0: Major & Minor Modes
4990 @unnumberedsec Q5.0.1: How can I do source code highlighting using font-lock?
4992 For most modes, font-lock is already set up and just needs to be turned
4993 on. This can be done by adding the line:
4996 (require 'font-lock)
4999 to your @file{init.el}. You can turn it on for the current buffer and
5000 session only by @kbd{M-x font-lock-mode}. See the file
5001 @file{etc/sample.init.el} for more information.
5004 @c (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
5005 @c (add-hook 'dired-mode-hook 'turn-on-font-lock)
5007 See also @code{Syntax Highlighting} from the @code{Options} menu.
5008 Remember to save options.
5012 @unnumberedsec Q5.0.2: I do not like cc-mode. How do I use the old c-mode?
5014 Well, first off, consider if you really want to do this. cc-mode is
5015 much more powerful than the old c-mode. If you're having trouble
5016 getting your old offsets to work, try using @code{c-set-offset} instead.
5017 You might also consider using the package @code{cc-compat}.
5019 But, if you still insist, add the following lines to your @file{init.el}:
5022 (fmakunbound 'c-mode)
5023 (makunbound 'c-mode-map)
5024 (fmakunbound 'c++-mode)
5025 (makunbound 'c++-mode-map)
5026 (makunbound 'c-style-alist)
5027 (load-library "old-c-mode")
5028 (load-library "old-c++-mode")
5031 This must be done before any other reference is made to either c-mode or
5036 @unnumberedsec Q5.0.3: How do I get @samp{More} Syntax Highlighting on by default?
5038 Use the following code in your @file{init.el}:
5041 (setq-default font-lock-maximum-decoration t)
5044 See also @code{Syntax Highlighting} from the @code{Options} menu.
5045 Remember to save options.
5049 @unnumberedsec Q5.0.4: How can I enable auto-indent and/or Filladapt?
5051 Put the following line in your @file{init.el}:
5054 (setq indent-line-function 'indent-relative-maybe)
5057 If you want to get fancy, try the @code{filladapt} package available
5058 standard with SXEmacs. Put this into your @file{init.el}:
5061 (require 'filladapt)
5062 (setq-default filladapt-mode t)
5063 (add-hook 'c-mode-hook 'turn-off-filladapt-mode)
5066 This will enable Filladapt for all modes except C mode, where it doesn't
5067 work well. To turn Filladapt on only in particular major modes, remove
5068 the @code{(setq-default ...)} line and use
5069 @code{turn-on-filladapt-mode}, like this:
5072 (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
5075 You can customize filling and adaptive filling with Customize.
5076 Select from the @code{Options} menu
5077 @code{Advanced (Customize)->Emacs->Editing->Fill->Fill...}
5078 or type @kbd{M-x customize @key{RET} fill @key{RET}}.
5080 Note that well-behaving text-lookalike modes will run
5081 @code{text-mode-hook} by default (e.g. that's what Message does). For
5082 the nasty ones, you'll have to provide the @code{add-hook}s yourself.
5084 Please note that the @code{fa-extras} package is no longer useful.
5088 @unnumberedsec Q5.0.5: How can I get SXEmacs to come up in text/auto-fill mode by default?
5090 Try the following lisp in your @file{init.el}:
5093 (setq default-major-mode 'text-mode)
5094 (setq text-mode-hook 'turn-on-auto-fill)
5097 @strong{WARNING}: note that changing the value of
5098 @code{default-major-mode} from @code{fundamental-mode} can break a large
5099 amount of built-in code that expects newly created buffers to be in
5100 @code{fundamental-mode}. (Changing from @code{fundamental-mode} to
5101 @code{text-mode} might not wreak too much havoc, but changing to
5102 something more exotic like a lisp-mode would break many Emacs packages).
5104 Note that Emacs by default starts up in buffer @code{*scratch*} in
5105 @code{initial-major-mode}, which defaults to
5106 @code{lisp-interaction-mode}. Thus adding the following form to your
5107 Emacs init file will cause the initial @code{*scratch*} buffer to be put
5108 into auto-fill'ed @code{text-mode}:
5111 (setq initial-major-mode
5114 (turn-on-auto-fill)))
5117 Note that after your init file is loaded, if
5118 @code{inhibit-startup-message} is @code{nil} (the default) and the
5119 startup buffer is @code{*scratch*} then the startup message will be
5120 inserted into @code{*scratch*}; it will be removed after a timeout by
5121 erasing the entire @code{*scratch*} buffer. Keep in mind this default
5122 usage of @code{*scratch*} if you desire any prior manipulation of
5123 @code{*scratch*} from within your Emacs init file. In particular,
5124 anything you insert into @code{*scratch*} from your init file will be
5125 later erased. Also, if you change the mode of the @code{*scratch*}
5126 buffer, be sure that this will not interfere with possible later
5127 insertion of the startup message (e.g. if you put @code{*scratch*} into
5128 a nonstandard mode that has automatic font lock rules, then the startup
5129 message might get fontified in a strange foreign manner, e.g. as code in
5130 some programming language).
5134 @unnumberedsec Q5.0.6: How do I start up a second shell buffer?
5136 In the @code{*shell*} buffer:
5139 M-x rename-buffer @key{RET} *shell-1* @key{RET}
5143 This will then start a second shell. The key is that no buffer named
5144 @samp{*shell*} can exist. It might be preferable to use @kbd{M-x
5145 rename-uniquely} to rename the @code{*shell*} buffer instead of @kbd{M-x
5148 Alternately, you can set the variable @code{shell-multiple-shells}.
5149 If the value of this variable is non-nil, each time shell mode is invoked,
5154 @unnumberedsec Q5.0.7: Telnet from shell filters too much
5156 I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke
5157 and use a telnet session within it. Everything works fine except that
5158 now all @samp{^M}'s are filtered out by Emacs. Fixes?
5160 Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather
5161 than doing rsh or telnet within the local shell buffer. You can also
5162 use @kbd{M-x ssh} to open secure remote session if you have @code{ssh}
5167 @unnumberedsec Q5.0.8: Why does edt emulation not work?
5169 We don't know, but you can use tpu-edt emulation instead, which works
5170 fine and is a little fancier than the standard edt emulation. To do
5171 this, add the following line to your @file{init.el}:
5177 If you don't want it to replace @kbd{C-h} with an edt-style help menu
5181 (global-set-key [(control h)] 'help-for-help)
5186 @unnumberedsec Q5.0.9: How can I emulate VI and use it as my default mode?
5188 Our recommended VI emulator is viper. To make viper-mode the default,
5189 add this to your @file{init.el}:
5195 @email{kifer@@CS.SunySB.EDU, Michael Kifer} writes:
5198 This should be added as close to the top of @file{init.el} as you can get
5199 it, otherwise some minor modes may not get viper-ized.
5204 @unnumberedsec Q5.0.10: [This question intentionally left blank]
5206 Obsolete question, left blank to avoid renumbering
5210 @unnumberedsec Q5.0.11: [This question intentionally left blank]
5212 Obsolete question, left blank to avoid renumbering
5216 @unnumberedsec Q5.0.12: How do I disable gnuserv from opening a new frame?
5218 If you set the @code{gnuserv-frame} variable to the frame that should be
5219 used to display buffers that are pulled up, a new frame will not be
5220 created. For example, you could put
5223 (setq gnuserv-frame (selected-frame))
5226 early on in your @file{init.el}, to ensure that the first frame created
5227 is the one used for your gnuserv buffers.
5229 There is an option to set the gnuserv target to the current frame. See
5230 @code{Options->Display->"Other Window" Location->Make Current Frame Gnuserv Target}
5232 You can also change this with Customize. Select from the
5233 @code{Options} menu @code{Advanced
5234 (Customize)->Emacs->Environment->Gnuserv->Gnuserv Frame...} or type
5235 @kbd{M-x customize @key{RET} gnuserv @key{RET}}.
5239 @unnumberedsec Q5.0.13: How do I start gnuserv so that each subsequent SXEmacs is a client?
5241 Put the following in your @file{init.el} file to start the server:
5247 Start your first SXEmacs as usual. After that, you can do:
5250 gnuclient randomfilename
5253 from the command line to get your existing SXEmacs process to open a
5254 new frame and visit randomfilename in that window. When you're done
5255 editing randomfilename, hit @kbd{C-x #} to kill the buffer and get rid
5258 See also man page of gnuclient.
5262 @unnumberedsec Q5.0.14: Strange things are happening in Shell Mode.
5264 Sometimes (i.e. it's not repeatable, and I can't work out why it
5265 happens) when I'm typing into shell mode, I hit return and only a
5266 portion of the command is given to the shell, and a blank prompt is
5267 returned. If I hit return again, the rest of the previous command is
5270 @email{martin@@xemacs.org, Martin Buchholz} writes:
5273 There is a known problem with interaction between @code{csh} and the
5274 @code{filec} option and SXEmacs. You should add the following to your
5278 if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
5284 @unnumberedsec Q5.0.15: Where do I get the latest CC Mode?
5286 See @uref{http://cc-mode.sourceforge.net/}.
5290 @unnumberedsec Q5.0.16: I find auto-show-mode disconcerting. How do I turn it off?
5292 @code{auto-show-mode} controls whether or not a horizontal scrollbar
5293 magically appears when a line is too long to be displayed. This is
5294 enabled by default. To turn it off, put the following in your
5298 (setq auto-show-mode nil)
5299 (setq-default auto-show-mode nil)
5304 @unnumberedsec Q5.0.17: How can I get two instances of info?
5310 @unnumberedsec Q5.0.18: [This question intentionally left blank]
5314 @unnumberedsec Q5.0.19: Is there something better than LaTeX mode?
5316 @email{dak@@fsnif.neuroinformatik.ruhr-uni-bochum.de, David Kastrup} writes:
5319 The standard TeX modes leave much to be desired, and are somewhat
5320 leniently maintained. Serious TeX users use AUC TeX (@pxref{Q4.7.1}).
5325 @unnumberedsec Q5.0.20: Is there a way to start a new SXEmacs if there's no gnuserv running, and otherwise use gnuclient?
5327 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
5329 Here is one of the solutions, we have this in a script called
5330 @file{etc/editclient.sh}.
5333 if gnuclient -batch -eval t >/dev/null 2>&1
5335 exec gnuclient $@{1+"$@@"@}
5337 sxemacs -unmapped -f gnuserv-start &
5338 until gnuclient -batch -eval t >/dev/null 2>&1
5342 exec gnuclient $@{1+"$@@"@}
5346 Note that there is a known problem when running SXEmacs and
5347 @samp{gnuclient -nw} on the same TTY.
5352 @unnumberedsec 5.1: Emacs Lisp Programming Techniques
5353 @unnumberedsec Q5.1.1: What is the difference in key sequences between XEmacs/SXEmacs and GNU Emacs?
5355 @email{clerik@@naggum.no, Erik Naggum} writes;
5358 Emacs has a legacy of keyboards that produced characters with modifier
5359 bits, and therefore map a variety of input systems into this scheme even
5360 today. XEmacs is instead optimized for X events. This causes an
5361 incompatibility in the way key sequences are specified, but both Emacs
5362 and XEmacs will accept a key sequence as a vector of lists of modifiers
5363 that ends with a key, e.g., to bind @kbd{M-C-a}, you would say
5364 @code{[(meta control a)]} in both Emacsen. XEmacs has an abbreviated
5365 form for a single key, just (meta control a). Emacs has an abbreviated
5366 form for the Control and the Meta modifiers to string-characters (the
5367 ASCII characters), as in @samp{\M-\C-a}. XEmacs users need to be aware
5368 that the abbreviated form works only for one-character key sequences,
5369 while Emacs users need to be aware that the string-character is rather
5370 limited. Specifically, the string-character can accommodate only 256
5371 different values, 128 of which have the Meta modifier and 128 of which
5372 have not. In each of these blocks, only 32 characters have the Control
5373 modifier. Whereas @code{[(meta control A)]} differs from @code{[(meta
5374 control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A}
5375 do not. Programmers are advised to use the full common form, both
5376 because it is more readable and less error-prone, and because it is
5377 supported by both Emacsen.
5380 Another (even safer) way to be sure of the key-sequences is to use the
5381 @code{read-kbd-macro} function, which takes a string like @samp{C-c
5382 <up>}, and converts it to the internal key representation of the Emacs
5383 you use. The function is available under all Emacsen.
5387 @unnumberedsec Q5.1.2: Can I generate "fake" keyboard events?
5389 I wonder if there is an interactive function that can generate
5390 @dfn{fake} keyboard events. This way, I could simply map them inside
5396 (defun cg--generate-char-event (ch)
5397 "Generate an event, as if ch has been typed"
5398 (dispatch-event (character-to-event ch)))
5400 ;; Backspace and Delete stuff
5401 (global-set-key [backspace]
5402 (lambda () (interactive) (cg--generate-char-event 127)))
5403 (global-set-key [unknown_keysym_0x4]
5404 (lambda () (interactive) (cg--generate-char-event 4)))
5409 @unnumberedsec Q5.1.3: Could you explain @code{read-kbd-macro} in more detail?
5411 The @code{read-kbd-macro} function returns the internal Emacs
5412 representation of a human-readable string (which is its argument).
5416 (read-kbd-macro "C-c C-a")
5417 @result{} [(control ?c) (control ?a)]
5419 (read-kbd-macro "C-c C-. <up>")
5420 @result{} [(control ?c) (control ?.) up]
5423 In GNU Emacs the same forms will be evaluated to what GNU Emacs
5424 understands internally---the sequences @code{"\C-x\C-c"} and @code{[3
5425 67108910 up]}, respectively.
5427 The exact @dfn{human-readable} syntax is defined in the docstring of
5428 @code{edmacro-mode}. I'll repeat it here, for completeness.
5431 Format of keyboard macros during editing:
5433 Text is divided into @dfn{words} separated by whitespace. Except for
5434 the words described below, the characters of each word go directly as
5435 characters of the macro. The whitespace that separates words is
5436 ignored. Whitespace in the macro must be written explicitly, as in
5437 @kbd{foo @key{SPC} bar @key{RET}}.
5441 The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD},
5442 @kbd{ESC}, and @kbd{NUL} represent special control characters. The
5443 words must be written in uppercase.
5446 A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or
5447 @code{<f1>}, represents a function key. (Note that in the standard
5448 configuration, the function key @code{<return>} and the control key
5449 @key{RET} are synonymous.) You can use angle brackets on the words
5450 @key{RET}, @key{SPC}, etc., but they are not required there.
5453 Keys can be written by their @sc{ascii} code, using a backslash followed
5454 by up to six octal digits. This is the only way to represent keys with
5458 One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-}
5459 (shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may
5460 precede a character or key notation. For function keys, the prefixes
5461 may go inside or outside of the brackets: @code{C-<down>} @equiv{}
5462 @code{<C-down>}. The prefixes may be written in any order: @kbd{M-C-x}
5463 @equiv{} @kbd{C-M-x}.
5465 Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except
5466 that the Meta prefix is allowed on a sequence of digits and optional
5467 minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}.
5470 The @code{^} notation for control characters also works: @kbd{^M}
5474 Double angle brackets enclose command names: @code{<<next-line>>} is
5475 shorthand for @kbd{M-x next-line @key{RET}}.
5478 Finally, @code{REM} or @code{;;} causes the rest of the line to be
5479 ignored as a comment.
5482 Any word may be prefixed by a multiplier in the form of a decimal number
5483 and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>},
5484 and @code{10*foo} @equiv{}
5488 @code{foofoofoofoofoofoofoofoofoofoo}.
5490 Multiple text keys can normally be strung together to form a word, but
5491 you may need to add whitespace if the word would look like one of the
5492 above notations: @code{; ; ;} is a keyboard macro with three semicolons,
5493 but @code{;;;} is a comment. Likewise, @code{\ 1 2 3} is four keys but
5494 @code{\123} is a single key written in octal, and @code{< right >} is
5495 seven keys but @code{<right>} is a single function key. When in doubt,
5501 @unnumberedsec Q5.1.4: What is the performance hit of @code{let}?
5503 In most cases, not noticeable. Besides, there's no avoiding
5504 @code{let}---you have to bind your local variables, after all. Some
5505 pose a question whether to nest @code{let}s, or use one @code{let} per
5506 function. I think because of clarity and maintenance (and possible
5507 future implementation), @code{let}-s should be used (nested) in a way to
5508 provide the clearest code.
5512 @unnumberedsec Q5.1.5: What is the recommended use of @code{setq}?
5515 @item Global variables
5517 You will typically @code{defvar} your global variable to a default
5518 value, and use @code{setq} to set it later.
5520 It is never a good practice to @code{setq} user variables (like
5521 @code{case-fold-search}, etc.), as it ignores the user's choice
5522 unconditionally. Note that @code{defvar} doesn't change the value of a
5523 variable if it was bound previously. If you wish to change a
5524 user-variable temporarily, use @code{let}:
5527 (let ((case-fold-search nil))
5528 ... ; code with searches that must be case-sensitive
5532 You will notice the user-variables by their docstrings beginning with an
5533 asterisk (a convention).
5535 @item Local variables
5537 Bind them with @code{let}, which will unbind them (or restore their
5538 previous value, if they were bound) after exiting from the @code{let}
5539 form. Change the value of local variables with @code{setq} or whatever
5540 you like (e.g. @code{incf}, @code{setf} and such). The @code{let} form
5541 can even return one of its local variables.
5546 ;; iterate through the elements of the list returned by
5547 ;; `hairy-function-that-returns-list'
5548 (let ((l (hairy-function-that-returns-list)))
5550 ... do something with (car l) ...
5554 Another typical usage includes building a value simply to work with it.
5557 ;; Build the mode keymap out of the key-translation-alist
5558 (let ((inbox (file-truename (expand-file-name box)))
5560 ... code dealing with inbox ...
5564 This piece of code uses the local variable @code{inbox}, which becomes
5565 unbound (or regains old value) after exiting the form. The form also
5566 returns the value of @code{inbox}, which can be reused, for instance:
5569 (setq foo-processed-inbox
5576 @unnumberedsec Q5.1.6: What is the typical misuse of @code{setq} ?
5578 A typical misuse is probably @code{setq}ing a variable that was meant to
5579 be local. Such a variable will remain bound forever, never to be
5580 garbage-collected. For example, the code doing:
5583 (defun my-function (whatever)
5585 ... build a large list ...
5589 does a bad thing, as @code{a} will keep consuming memory, never to be
5590 unbound. The correct thing is to do it like this:
5593 (defun my-function (whatever)
5594 (let (a) ; default initialisation is to nil
5595 ... build a large list ...
5596 ... and exit, unbinding `a' in the process ...)
5599 Not only is this prettier syntactically, but it makes it possible for
5600 Emacs to garbage-collect the objects which @code{a} used to reference.
5602 Note that even global variables should not be @code{setq}ed without
5603 @code{defvar}ing them first, because the byte-compiler issues warnings.
5604 The reason for the warning is the following:
5607 (defvar flurgoze nil) ; ok, global internal variable
5610 (setq flurghoze t) ; ops! a typo, but semantically correct.
5611 ; however, the byte-compiler warns.
5613 While compiling toplevel forms:
5614 ** assignment to free variable flurghoze
5619 @unnumberedsec Q5.1.7: I like the @code{do} form of cl, does it slow things down?
5621 It shouldn't. Here is what Dave Gillespie has to say about cl.el
5625 Many of the advanced features of this package, such as @code{defun*},
5626 @code{loop}, and @code{setf}, are implemented as Lisp macros. In
5627 byte-compiled code, these complex notations will be expanded into
5628 equivalent Lisp code which is simple and efficient. For example, the
5636 are expanded at compile-time to the Lisp forms
5640 (setcar p (cons x (car p)))
5643 which are the most efficient ways of doing these respective operations
5644 in Lisp. Thus, there is no performance penalty for using the more
5645 readable @code{incf} and @code{push} forms in your compiled code.
5647 @emph{Interpreted} code, on the other hand, must expand these macros
5648 every time they are executed. For this reason it is strongly
5649 recommended that code making heavy use of macros be compiled. (The
5650 features labelled @dfn{Special Form} instead of @dfn{Function} in this
5651 manual are macros.) A loop using @code{incf} a hundred times will
5652 execute considerably faster if compiled, and will also garbage-collect
5653 less because the macro expansion will not have to be generated, used,
5654 and thrown away a hundred times.
5656 You can find out how a macro expands by using the @code{cl-prettyexpand}
5662 @unnumberedsec Q5.1.8: I like recursion, does it slow things down?
5664 Yes. Emacs byte-compiler cannot do much to optimize recursion. But
5665 think well whether this is a real concern in Emacs. Much of the Emacs
5666 slowness comes from internal mechanisms such as redisplay, or from the
5667 fact that it is an interpreter.
5669 Please try not to make your code much uglier to gain a very small speed
5670 gain. It's not usually worth it.
5674 @unnumberedsec Q5.1.9: How do I put a glyph as annotation in a buffer?
5676 Here is a solution that will insert the glyph annotation at the
5677 beginning of buffer:
5680 (make-annotation (make-glyph '([FORMAT :file FILE]
5681 [string :data "fallback-text"]))
5687 Replace @samp{FORMAT} with an unquoted symbol representing the format of
5688 the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.)
5689 Instead of @samp{FILE}, use the image file name
5694 @file{/usr/local/lib/sxemacs-22.1.4/etc/recycle.xpm}).
5696 You can turn this to a function (that optionally prompts you for a file
5697 name), and inserts the glyph at @code{(point)} instead of
5702 @unnumberedsec Q5.1.10: @code{map-extents} won't traverse all of my extents!
5704 I tried to use @code{map-extents} to do an operation on all the extents
5705 in a region. However, it seems to quit after processing a random number
5706 of extents. Is it buggy?
5708 No. The documentation of @code{map-extents} states that it will iterate
5709 across the extents as long as @var{function} returns @code{nil}.
5710 Unexperienced programmers often forget to return @code{nil} explicitly,
5711 which results in buggy code. For instance, the following code is
5712 supposed to delete all the extents in a buffer, and issue as many
5713 @samp{fubar!} messages.
5716 (map-extents (lambda (ext ignore)
5718 (message "fubar!")))
5721 Instead, it will delete only the first extent, and stop right there --
5722 because @code{message} will return a non-nil value. The correct code
5726 (map-extents (lambda (ext ignore)
5734 @unnumberedsec Q5.1.11: My elisp program is horribly slow. Is there
5735 an easy way to find out where it spends time?
5738 @email{hniksic@@xemacs.org, Hrvoje Niksic} writes:
5740 Under XEmacs 20.4 and later you can use @kbd{M-x profile-key-sequence},
5741 press a key (say @key{RET} in the Gnus Group buffer), and get the
5742 results using @kbd{M-x profile-results}. It should give you an idea of
5743 where the time is being spent.
5748 @unnumberedsec Q5.2.1: How do I turn off the sound?
5749 @c hehe, this is neat
5750 @c should i mention that if nothing's done, sound is off entirely?
5752 Add the following line to your @file{init.el}:
5755 (setq bell-volume 0)
5756 (setq sound-alist nil)
5759 That will make your SXEmacs totally silent---even the default ding sound
5760 (TTY beep on TTY-s) will be gone.
5762 You can also change these with Customize. Select from the
5763 @code{Options} menu @code{Advanced
5764 (Customize)->Emacs->Environment->Sound->Sound...} or type @kbd{M-x
5765 customize @key{RET} sound @key{RET}}.
5769 @unnumberedsec Q5.2.2: How do I get funky sounds instead of a boring beep?
5771 Make sure your SXEmacs was compiled with audio and media support, and
5772 then put this in your @file{init.el}:
5775 (load-default-sounds)
5780 @unnumberedsec Q5.2.3: What's NAS, how do I get it?
5782 @xref{Q2.0.3}, for an explanation of the @dfn{Network Audio System}.
5786 @unnumberedsec Q5.2.4: Sunsite sounds don't play.
5788 I'm having some trouble with sounds I've downloaded from sunsite. They
5789 play when I run them through @code{showaudio} or cat them directly to
5790 @file{/dev/audio}, but SXEmacs refuses to play them.
5792 @email{gutschk@@uni-muenster.de, Markus Gutschke} writes:
5795 [Many of] These files have an (erroneous) 24byte header that tells about
5796 the format that they have been recorded in. If you cat them to
5797 @file{/dev/audio}, the header will be ignored and the default behavior
5798 for /dev/audio will be used. This happens to be 8kHz uLaw. It is
5799 probably possible to fix the header by piping through @code{sox} and
5800 passing explicit parameters for specifying the sampling format; you then
5801 need to perform a 'null' conversion from SunAudio to SunAudio.
5806 @unnumberedsec 5.3: Miscellaneous
5807 @unnumberedsec Q5.3.1: How do you make SXEmacs indent CL if-clauses correctly?
5809 I'd like SXEmacs to indent all the clauses of a Common Lisp @code{if} the
5810 same amount instead of indenting the 3rd clause differently from the
5813 One way is to add, to @file{init.el}:
5816 (put 'if 'lisp-indent-function nil)
5819 However, note that the package @code{cl-indent} that comes with
5820 SXEmacs sets up this kind of indentation by default. @code{cl-indent}
5821 also knows about many other CL-specific forms. To use @code{cl-indent},
5826 (setq lisp-indent-function (function common-lisp-indent-function))
5829 One can also customize @file{cl-indent.el} so it mimics the default
5830 @code{if} indentation @code{then} indented more than the @code{else}.
5834 (put 'if 'common-lisp-indent-function '(nil nil &body))
5839 @unnumberedsec Q5.3.2: [This question intentionally left blank]
5841 Obsolete question, left blank to avoid renumbering.
5845 @unnumberedsec Q5.3.3: How can I print WYSIWYG a font-locked buffer?
5847 Font-lock looks nice. How can I print (WYSIWYG) the highlighted
5850 The package @code{ps-print}, which is now included with SXEmacs, provides
5851 the ability to do this. The source code contains complete instructions
5853 @file{$prefix/lib/sxemacs/xemacs-packages/lisp/ps-print/ps-print.el},
5854 being the default location of an installed ps-print package.
5858 @unnumberedsec Q5.3.4: Getting @kbd{M-x lpr} to work with postscript printer.
5860 My printer is a Postscript printer and @code{lpr} only works for
5861 Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x
5862 lpr-buffer} to work?
5864 Put something like this in your @file{init.el}:
5867 (setq lpr-command "a2ps")
5868 (setq lpr-switches '("-p" "-1"))
5871 If you don't use a2ps to convert ASCII to postscript (why not, it's
5872 free?), replace with the command you do use. Note also that some
5873 versions of a2ps require a @samp{-Pprinter} to ensure spooling.
5877 @unnumberedsec Q5.3.5: How do I specify the paths that SXEmacs uses for finding files?
5879 You can specify what paths to use by using a number of different flags
5880 when running configure. See the section MAKE VARIABLES in the top-level
5881 file INSTALL in the SXEmacs distribution for a listing of those flags.
5883 Most of the time, however, the simplest fix is: @strong{do not} specify
5884 paths as you might for GNU Emacs. SXEmacs can generally determine the
5885 necessary paths dynamically at run time. The only path that generally
5886 needs to be specified is the root directory to install into. That can
5887 be specified by passing the @code{--prefix} flag to configure. For a
5888 description of the SXEmacs install tree, please consult the @file{NEWS}
5893 @unnumberedsec Q5.3.6: [This question intentionally left blank]
5895 Obsolete question, left blank to avoid renumbering.
5899 @unnumberedsec Q5.3.7: Can I have the end of the buffer delimited in some way?
5901 Say, with: @samp{[END]}?
5906 (let ((ext (make-extent (point-min) (point-max))))
5907 (set-extent-property ext 'start-closed t)
5908 (set-extent-property ext 'end-closed t)
5909 (set-extent-property ext 'detachable nil)
5910 (set-extent-end-glyph ext (make-glyph [string :data "[END]"])))
5913 Since this is SXEmacs, you can specify an icon to be shown on
5914 window-system devices. To do so, change the @code{make-glyph} call to
5915 something like this:
5918 (make-glyph '([xpm :file "~/something.xpm"]
5919 [string :data "[END]"]))
5922 You can inline the @sc{xpm} definition yourself by specifying
5923 @code{:data} instead of @code{:file}. Here is such a full-featured
5924 version that works on both X and TTY devices:
5927 (let ((ext (make-extent (point-min) (point-max))))
5928 (set-extent-property ext 'start-closed t)
5929 (set-extent-property ext 'end-closed t)
5930 (set-extent-property ext 'detachable nil)
5931 (set-extent-end-glyph ext (make-glyph '([xpm :data "\
5933 static char* eye = @{
5942 \"___________`_`_`___b_b_b_b_________`____\",
5943 \"_________`_`_`___b_c_c_c_b_b____________\",
5944 \"_____`_`_`_e___b_b_c_c_c___b___b_______`\",
5945 \"___`_`_e_a___b_b_d___b___b___b___b______\",
5946 \"_`_`_e_a_e___b_b_d_b___b___b___b___b____\",
5947 \"_`_`_a_e_a___b_b_d___b___b___b___b___b__\",
5948 \"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\",
5949 \"___`_`_e_a___b_b_b_d_c___b___b___d_b____\",
5950 \"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\",
5951 \"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\",
5952 \"___`_____`_`_`_`___b_b_b_b_b_b__________\",
5954 [string :data "[END]"]))))
5957 Note that you might want to make this a function, and put it to a hook.
5958 We leave that as an exercise for the reader.
5962 @unnumberedsec Q5.3.8: How do I insert today's date into a buffer?
5967 (insert (current-time-string))
5972 @unnumberedsec Q5.3.9: Are only certain syntactic character classes available for abbrevs?
5974 @c @email{gutschk@@uni-muenster.de, Markus Gutschke} writes:
5977 @c Yes, abbrevs only expands word-syntax strings. While XEmacs does not
5978 @c prevent you from defining (e.g. with @kbd{C-x a g} or @kbd{C-x a l})
5979 @c abbrevs that contain special characters, it will refuse to expand
5980 @c them. So you need to ensure, that the abbreviation contains letters and
5981 @c digits only. This means that @samp{xd}, @samp{d5}, and @samp{5d} are
5982 @c valid abbrevs, but @samp{&d}, and @samp{x d} are not.
5984 @c If this sounds confusing to you, (re-)read the online documentation for
5985 @c abbrevs (@kbd{C-h i m XEmacs @key{RET} m Abbrevs @key{RET}}), and then come back and
5986 @c read this question/answer again.
5989 @c Starting with XEmacs 20.3 this restriction has been lifted.
5991 Does not apply anymore.
5995 @unnumberedsec Q5.3.10: How can I get those oh-so-neat X-Face lines?
5997 Firstly there is an ftp site which describes X-faces and has the
5998 associated tools mentioned below, at
5999 @uref{ftp://ftp.cs.indiana.edu:/pub/faces/}.
6005 Create 48x48x1 bitmap with your favorite tool
6008 Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc.,
6009 and then compile the face.
6013 cat file.xbm | xbm2ikon |compface > file.face
6017 Then be sure to quote things that are necessary for emacs strings:
6020 cat ./file.face | sed 's/\\/\\\\/g'
6024 | sed 's/\"/\\\"/g' > ./file.face.quoted
6028 Then set up emacs to include the file as a mail header - there were a
6029 couple of suggestions here---either something like:
6032 (setq mail-default-headers
6033 "X-Face: @email{Ugly looking text string here}")
6036 Or, alternatively, as:
6039 (defun mail-insert-x-face ()
6041 (goto-char (point-min))
6042 (search-forward mail-header-separator)
6045 (insert-file-contents "~/.face")))
6047 (add-hook 'mail-setup-hook 'mail-insert-x-face)
6051 However, 2 things might be wrong:
6053 Some versions of pbmtoicon produces some header lines that is not
6054 expected by the version of compface that I grabbed. So I found I had to
6055 include a @code{tail +3} in the pipeline like this:
6058 cat file.xbm | xbm2ikon | tail +3 |compface > file.face
6061 Some people have also found that if one uses the @code{(insert-file)}
6062 method, one should NOT quote the face string using the sed script .
6064 It might also be helpful to use @email{stig@@hackvan.com, Stig's} script
6065 (included in the compface distribution at XEmacs.org) to do the
6067 @comment For convenience xbm2xface is available for anonymous FTP at
6068 @comment @uref{ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl}.
6070 Contributors for this item:
6083 @unnumberedsec Q5.3.11: How do I add new Info directories?
6085 You use something like:
6088 (setq Info-directory-list (cons
6089 (expand-file-name "~/info")
6090 Info-default-directory-list))
6093 @email{davidm@@prism.kla.com, David Masterson} writes:
6096 Emacs Info and (S)XEmacs Info do many things differently. If you're
6097 trying to support a number of versions of Emacs, here are some notes
6102 Emacs Info scans @code{Info-directory-list} from right-to-left while
6103 SXEmacs Info reads it from left-to-right, so append to the @emph{correct}
6107 Use @code{Info-default-directory-list} to initialize
6108 @code{Info-directory-list} @emph{if} it is available at startup, but not
6109 all Emacsen define it.
6112 Emacs Info looks for a standard @file{dir} file in each of the
6113 directories scanned from #1 and magically concatenates them together.
6116 SXEmacs Info looks for a @file{localdir} file (which consists of just the
6117 menu entries from a @file{dir} file) in each of the directories scanned
6118 from #1 (except the first), does a simple concatenation of them, and
6119 magically attaches the resulting list to the end of the menu in the
6120 @file{dir} file in the first directory.
6123 Another alternative is to convert the documentation to HTML with
6124 texi2html and read it from a web browser like Lynx or W3.
6129 @unnumberedsec Q5.3.12: What do I need to change to make printing work?
6131 For regular printing there are two variables that can be customized.
6135 This should be set to a command that takes standard input and sends
6136 it to a printer. Something like:
6139 (setq lpr-command "lp")
6143 This should be set to a list that contains whatever the print command
6144 requires to do its job. Something like:
6147 (setq lpr-switches '("-depson"))
6151 For postscript printing there are three analogous variables to
6155 @item ps-lpr-command
6156 This should be set to a command that takes postscript on standard input
6157 and directs it to a postscript printer.
6159 @item ps-lpr-switches
6160 This should be set to a list of switches required for
6161 @code{ps-lpr-command} to do its job.
6163 @item ps-print-color-p
6164 This boolean variable should be set @code{t} if printing will be done in
6165 color, otherwise it should be set to @code{nil}.
6168 NOTE: It is an undocumented limitation in SXEmacs that postscript
6169 printing (the @code{Pretty Print Buffer} menu item) @strong{requires} a
6170 window system environment. It cannot be used outside of X11.
6173 @node MS Windows, Current Events, Miscellaneous, Top
6174 @unnumbered 6 XEmacs on MS Windows
6176 This is part 6 of the SXEmacs Frequently Asked Questions list, written
6177 by Sebastian Freundt and others.
6180 * Q6.0.1:: Why did SXEmacs cut all support for Windows?
6184 @unnumberedsec Q6.0.1: Why did SXEmacs cut all support for Windows?
6187 MS Windows is not Posix conform.
6193 Maintaining code for a platform that @strong{none} of the developers
6194 use is a little hairy. Besides, even if that were case, writing
6195 POSIX-conform code while simultaneously regarding the madnesses (yes,
6196 there are many of them) from Redmond, and preferrably sustaining the
6197 perfomance is absolutely impossible. There is much code which has not
6198 been optimised (or sometimes even de-optimised) merely to take some
6199 windows concept into account.
6202 @node Current Events, , MS Windows, Top
6203 @unnumbered 7 What the Future Holds
6205 This is part 7 of the SXEmacs Frequently Asked Questions list. This
6206 section will change frequently, and (in theory) should contain any
6207 interesting items that have transpired recently. (But in practice it's
6208 not getting updated like this.)
6210 This section also contains descriptions of the new features in all the
6211 recent releases of SXEmacs. For the most part, the information below is
6212 a synopsis of the more complete information that can be found in the
6213 file @file{NEWS} in the @file{etc} directory of the SXEmacs distribution.
6214 You can view this file in SXEmacs using @kbd{C-h n} or the @samp{Help}
6217 Information on older versions of SXEmacs can be found in @file{ONEWS}
6218 in the same directory, or @file{OONEWS} for really old versions.
6221 * Q7.0.1:: What new features will be in SXEmacs soon?
6222 * Q7.0.2:: What's new in SXEmacs 22.1.0?
6223 * Q7.0.3:: What's new in SXEmacs 22.1.1?
6224 * Q7.0.4:: What's new in SXEmacs 22.1.2?
6225 * Q7.0.5:: What's new in SXEmacs 22.1.3?
6226 * Q7.0.6:: What's new in SXEmacs 22.1.4?
6230 @unnumberedsec Q7.0.1: What new features will be in SXEmacs soon?
6232 @strong{YOU} tell @strong{ME}!
6236 @unnumberedsec Q7.0.2: What's new in SXEmacs 22.1.0?
6238 This is the first release of SXEmacs. It is a fork of XEmacs
6239 21.4.16. The vast majority of the changes between SXEmacs 22.1.0 and
6240 the code it descended from, XEmacs 21.4.16, are purely renaming
6241 "XEmacs" to "SXEmacs".
6244 @unnumberedsec Q7.0.3: What's new in SXEmacs 22.1.1?
6248 @var{user-init-directory} set to @file{~/.sxemacs} -- Youngs.
6250 Symlinking this to your old @file{~/.xemacs} directory is enough to
6251 get up and running with SXEmacs.
6254 Packages hierarchy default set to @file{$prefix/lib/sxemacs} -- Youngs.
6256 Symlinking this to your old @file{$prefix/lib/xemacs} directory is
6257 enough to get up and running with SXEmacs. SXEmacs will do this for
6258 you when you do @code{make install}.
6261 Rename items in the menubar -- Slusar, Youngs.
6264 Beginnings of FFI -- Zajcev.
6266 FFI is @dfn{Foreign Function Interface} and will allow access to functions
6267 and libraries outside of SXEmacs from within lisp. Not completed yet,
6268 but the basic infrastructure is in place.
6271 FreeBSD build fixes -- Slusar.
6274 @code{M-x report-sxemacs-bug} -- Youngs.
6276 For now, this is just a wrapper around report-xemacs-bug with the
6277 appropriate variables set to SXEmacs values.
6280 Fix etags.c -- Slusar.
6285 @code{M-x build-report} -- Youngs.
6287 Make it work for SXEmacs.
6290 Fix major bug in regex.c
6292 This fixed a whole swag of crashes involving regexps and
6296 Sync up with XEmacs 21.4 -- Various Developers.
6301 @unnumberedsec Q7.0.4: What's new in SXEmacs 22.1.2?
6305 autoconf 2.59 compatible configure scripts -- Youngs, Purvis.
6307 Many configure options have changed. Please run @code{./configure --help}
6308 to see what the new options are.
6311 Most win32 code is now gone -- Youngs, Freundt.
6314 @code{describe-installation} report libc version on Slackware -- Youngs.
6317 etags.c updated to Francesco's version 17.11 -- Youngs.
6320 Support @code{ls --dired} properly -- Sperber.
6323 FFI (Foreign Function Interface) updates -- Zajcev.
6325 One of the most exciting things is that this version of SXEmacs can
6326 download files from the internet _without_ the need of any XEmacs
6327 packages being installed. If you have libcurl and enable FFI in
6328 SXEmacs at build time, you can:
6332 (curl:download "http://www.somedomain.com/path/file"
6336 To put your mind at ease, libcurl is @strong{NOT} needed to build SXEmacs.
6337 The above will work even if you install libcurl after
6338 building/installing SXEmacs.
6341 Don't echo GC messages for non-string GC'ing -- Zajcev.
6343 This drastically reduces the number of "Garbage Collecting" messages
6344 that you see in the echo area. Garbage collection is still happening,
6345 it is just not in your face as much.
6348 movemail.c security fixes -- Oskarsson.
6351 PUI's *packages* buffer enhancements -- Koch.
6354 Saner fallbacks for `backup-buffer' -- Youngs.
6356 Based on an idea from JWZ, if the backup can't be written, try in
6357 `auto-save-directory', and if that fails, fall back to $HOME.
6360 OpenSSL support -- Freundt.
6362 Of course. The OpenSSL library itself is actually separated into two
6363 libraries: libcrypto and libssl. libcrypto is the part which comes to
6364 elisp with the current API. libssl is planned for the near future.
6366 With this interface/gateway we now have access to the wonderful world
6367 of static cryptography (static here means no handshake/protocols/etc.).
6373 the OpenSSL PRNG = (pseudo) random number generator to provide
6374 generating cryptographically secure randomness
6377 the OpenSSL MDs (message digests) to provide all sorts of hashing
6378 (we had an md5 implementation already)
6381 the HMAC aka keyed hashing aka message authentication code to provide
6382 hashes secured by a password
6385 the CIPHER engine (i.e. symmetric crypto systems) to provide
6386 encryption/decryption routines secured by a password
6389 the PKEY engine (i.e. asymmetric crypto systems) to provide generation
6390 and distribution of private/public key pairs (as probably known by
6394 the HYBRIDe engine aka PKCS aka public key crypto systems to provide
6395 encryption based on (foreign) public keys and decryption with own
6396 private keys to provide also digital signatures and verification (as
6397 probably known by gpg)
6401 Remove most of the generated files from the repo -- Youngs, Freundt.
6404 Allow suppression of WM decorations -- Turnbull.
6406 This makes balloon-help windows infinitely better behaved. Thank you
6410 Fontify *scratch* buffer according to user's settings -- Kehoe.
6413 Fix bug hanging SXEmacs when yanking > 260kb -- Kehoe.
6416 lispref manual updated for SXEmacs -- Freundt.
6419 PostgreSQL updates (mainly doc updates) -- Frenudt.
6424 @unnumberedsec Q7.0.5: What's new in SXEmacs 22.1.3?
6428 OpenSSL updates, improvements, and fixes -- Freundt.
6431 FFI updates, and fixes -- Zajcev.
6433 FFI now defaults to "on" if libffi can be found at configure time. It
6434 you don't want this, use: `--disable-ffi'.
6436 FTP downloads with `curl:download' is working properly now. And with
6437 HTTP transfers you can transfer just the HTTP header for a file if you
6441 Extent/glyph fixes -- Sidwell, Kuehl.
6444 32 mouse buttons supported -- Youngs.
6446 (global-set-key [(button32)] 'some-function) is valid in SXEmacs.
6449 Modeline tweaks -- Ferreira.
6451 Move line/column number indicators to left side (aka XE 21.5)
6454 @code{M-x uptime} -- Youngs.
6456 Every good OS has an uptime util, SXEmacs is no exception. Reports
6457 uptime in various formats.
6460 ia64 build fixes -- Lesjak.
6463 @kbd{C-h n} will no longer find NEWS files from packages -- Youngs.
6466 List of package mirrors updated -- Aichner, Skyttä.
6469 Bootstrappable PUI -- Youngs.
6471 SXEmacs no longer needs to have _any_ packages pre-installed before
6472 PUI can be used. See (Info-goto-node "(sxemacs)Bootstrapping PUI").
6475 Bignums, and a whole swag of sexy new number goodness -- Freundt.
6477 Bignums, bigfloats, and ratios that you may know from XEmacs 21.5 are
6478 now in SXEmacs. That and a whole lot more...
6480 Features provided when all of the library demands are met:
6483 (featurep 'bigz) and
6484 (featurep 'bignum) <=> if MPZ from GMP or BSD MP is present
6486 (featurep 'bigq) and
6487 (featurep 'ratio) <=> if MPQ from GMP is present
6489 (featurep 'bigf) and
6490 (featurep 'bigfloat) <=> if MPF from GMP is present
6492 (featurep 'bigfr) <=> if MPFR is present
6494 (featurep 'bigc) <=> if MPC is present
6496 (featurep 'number-types) <=> if one of the above features is
6500 For complete details see: (Info-goto-node "(lispref)Enhanced Number Types")
6503 Raw strings -- Kuehl.
6505 SXEmacs tries to relieve backslashitis by implementing raw strings.
6506 You'll imediately notice the benefit of raw strings when use them for
6507 those hairy regexps. Consider the regular expression (from
6511 "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(\\\\[@@A-Za-z]+\\)"
6513 As a raw string it could be written as...
6515 #r"\(?:^\|[^\]\)\(?:\)*\(\\[@@A-Za-z]+\)"
6518 Most of the SXEmacs core lisp code has been converted over to using
6519 raw strings whereever appropriate.
6522 Improved font-locking in a TTY -- Ferreira.
6524 To illustrate this...
6527 $ sxemacs -nw -vanilla
6529 ...and look at the modeline. Now open a .c file and turn on
6532 C-x C-f /path/to/file.c RET
6533 M-x font-lock-mode RET
6537 Compiler fixes -- Zajcev.
6540 SXEmacs can no longer be built with a C++ compiler -- Youngs.
6542 To build SXEmacs you will need a C compiler at least the equivalent of
6543 GCC 2.95.3. Building with a C++ compiler is no longer supported.
6546 Autoconf fixes, updates -- Freundt, Kuehl, Youngs.
6548 All autoconf options now have a help string (for ./configure --help)
6549 and the default setting for each option is noted.
6552 PostgreSQL auto-detection improved -- Youngs.
6554 If pg_config is in your $PATH, SXEmacs will add PostgreSQL support at
6555 configure/build time.
6558 Documentation (Texinfo) updates -- Freundt, Youngs.
6560 The SXEmacs manual is now called "sxemacs" instead of "xemacs". C-h
6561 C-i sxemacs RET to read it.
6563 Most of the Texinfo docs now have been updated to say "SXEmacs"
6564 whereever appropriate instead of "XEmacs".
6567 GTK (version 1.2) build fixes -- Youngs.
6572 @unnumberedsec Q7.0.6: What's new in SXEmacs 22.1.4?
6576 Many more image formats via FFI/libWand -- Freundt.
6578 FFI-enabled SXEmacs can load up libWand and thus display any image
6579 format that libWand (ImageMagick) supports.
6582 Lots of updates to the ENT (Enhanced Number Types) code -- Freundt.
6585 Mule is on by default -- Youngs.
6588 Embeddable keyboard macros -- Kuehl.
6590 This means that the following sort of thing is possible:
6594 C-x ( foo C-x e C-x )
6601 Default widgets/dialogs to Athena instead of Motif -- Youngs.
6604 OpenSSL updates -- Freundt.
6606 Digest, encryption, and decryption routines that operate on files has
6607 been added. Previously this was only available for buffers.
6610 Build reports have been revamped -- Youngs, Freundt.
6612 The SXEmacs build report no longer conflicts with the XEmacs
6613 build-report.el. Plus ours also reports on shared lib dependencies
6614 and config.h stuff. Sending from Gnus is also supported.
6617 FFI updates/fixes -- Youngs, Zajcev, Freundt.
6620 Ability to build postscript, pdf, and html docs -- Ferreira.
6623 Double linked lists and bloom filters implemented -- Freundt.
6625 Bloom filters are a space and time-efficient way to decide about the
6626 membership of an element to a given set. Using lisp-lists or vectors,
6627 one usually has to traverse the entire list or vector, before
6628 membership can be decided. Using hash tables, membership decision is
6629 in O(1) (bloom filters also decide in O(1)), but the hash-table's size
6630 grows proportionally with the number n of elements, thus its space
6631 complexity is O(n), whereas Bloom filters take a constant amount of
6632 space regardless how many elements are in it.
6635 Lightning fast recursive version of directory-files -- Freundt.
6637 It's called `directory-files-recur' and in some situations it is even
6638 faster than GNU's find(1).
6641 Portuguese added to etc/HELLO -- Ferreira.
6644 Massive improvements, enhancements for multimedia (audio) -- Freundt.
6646 SXEmacs supports several "sound servers" like: OSS, NAS, ESD, Polypaudio,
6647 ALSA, aRts, and Jack. And media streams can be handled by sndfile, ffmpeg,
6648 sox, mad, xine, gstreamer. The SXEmacs developers recommend Polyp/ffmpeg
6651 And yes, SXEmacs @emph{can} play mp3 files. :-)
6654 Autoconf fixes/updates -- Youngs, Freundt.
6656 All of the enable/disable options have been converted to with/without
6657 options. This allows us to sort them into groups.
6659 Also fixes were made to allow building on FreeBSD and NetBSD.
6662 Big update for the FAQ -- Youngs, Freundt.
6665 Server Sockets! -- Ferreira.
6667 SXEmacs now has server sockets (Yay!). See
6668 `open-network-server-stream'.
6671 Compiler fixes (gcc 2.95) -- Freundt.
6674 bug-reporter update -- Youngs.
6676 `report-sxemacs-bug' now directs people to our BugZilla installation
6677 at @url{http://issues.sxemacs.org/}
6680 Documentation updates/fixes/improvements -- Youngs, Ferreira, Freundt.