Initial git import
[sxemacs] / info / sxemacs-faq.texi
1 \input texinfo.tex      @c -*- mode: texinfo; coding: iso-2022-8 -*-
2 @c %**start of header
3 @setfilename sxemacs-faq.info
4 @settitle Frequently asked questions about SXEmacs
5 @setchapternewpage off
6 @c %**end of header
7 @finalout
8 @titlepage
9 @title SXEmacs FAQ
10 @subtitle Frequently Asked Questions about SXEmacs @hfill Edition 22.1.4
11 @sp 1
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>
20 @page
21 @end titlepage
22
23 @ifinfo
24 @dircategory SXEmacs Editor
25 @direntry
26 * FAQ: (sxemacs-faq).            SXEmacs FAQ.
27 @end direntry
28 @end ifinfo
29
30 @node Top, Introduction, (dir), (dir)
31 @top SXEmacs FAQ
32
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.
36
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.
40
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.
44
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.
48
49 @c If you have a Web browser, the official hypertext version is at
50 @c @iftex
51 @c @*
52 @c @end iftex
53 @c @uref{http://www.xemacs.org/FAQ/xemacs-faq.html}
54
55 @c @ifset CANONICAL
56 @c @html
57 @c This document is available in several different formats:
58 @c @itemize @bullet
59 @c @item
60 @c @uref{xemacs-faq.txt, As a single ASCII file}, produced by
61 @c @code{makeinfo --no-headers}
62 @c @item
63 @c @uref{xemacs-faq.dvi, As a .dvi file}, as used with
64 @c @uref{http://www.tug.org, TeX.}
65 @c @item
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}
68 @c @item
69 @c In html format, @uref{xemacs-faq_1.html, split by chapter}, or in
70 @c @uref{xemacs-faq.html, one monolithic} document.
71 @c @item
72 @c The canonical version of the FAQ is the texinfo document
73 @c @uref{xemacs-faq.texi, man/xemacs-faq.texi}.
74 @c @item
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/}.
79 @c 
80 @c @end itemize
81 @c 
82 @c @end html
83 @c 
84 @c @end ifset
85 @c 
86 @c end ifset points to CANONICAL
87
88 @menu
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.
96
97 @detailmenu
98
99  --- The Detailed Node Listing ---
100
101 Introduction, Policy, Credits
102
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?
117
118 Policies:
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?
122
123 Credits:
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?
127
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?
138
139 Getting Started:
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?
146
147 Installation and Trouble Shooting
148
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)
164
165 Trouble Shooting:
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!
191
192 Customisation and Options
193
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}?
203
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.
213
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?
222
223 The Modeline:
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?
229
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?
233
234 The Keyboard:
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?
246
247 The Cursor:
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?
251
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?
261
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?
268
269 Scrollbars:
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?
274
275 Text Selections:
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?
282
283 Major Subsystems
284
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.
298
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?
303
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?
310
311 Other Mail & News:
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)?
317
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?
321
322 Energize:
323 * Q4.5.1::      What is/was Energize?
324
325 Infodock:
326 * Q4.6.1::      What is Infodock?
327
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?
336
337 The Miscellaneous Stuff
338
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?
360
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?
374
375 Sound:
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.
380 @c extend me
381
382 Miscellaneous:
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?
395
396 SXEmacs on MS Windows
397
398 General Info:
399 * Q6.0.1::      Why did SXEmacs cut all support for Windows?
400
401 What the Future Holds
402
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?
409
410 @end detailmenu
411 @end menu
412
413 @c missing FAQs:
414 @c - Where is the RedHat/Fedora/Slackware/Debian/SuSE/Mandrake/foobar
415 @c   package?
416 @c - What is this tla thingy?
417
418
419 @node Introduction, Installation, Top, Top
420 @unnumbered 1 Introduction, Policy, Credits
421
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
427 available resources.
428
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.
436
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ø.
442
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.
446
447 @menu
448 Introduction:
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?
463
464 Policies:
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?
468
469 Credits:
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?
473
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?
484
485 Getting Started:
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?
492 @end menu
493
494 @unnumberedsec 1.0: Introduction
495
496 @node Q1.0.1
497 @unnumberedsec Q1.0.1: What is SXEmacs?
498
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
504 to Linux.
505
506 SXEmacs is a recent fork of the popular XEmacs and runs on nearly all
507 versions of Unix in existence.
508
509
510 @node Q1.0.2
511 @unnumberedsec Q1.0.2: What is the current version of SXEmacs?
512
513 SXEmacs 22.1.4 is the latest released version.
514 The current development line will become 22.1.5.
515
516
517 @node Q1.0.3
518 @unnumberedsec Q1.0.3: Where can I find it?
519
520 The canonical source can be found via anonymous FTP at:
521
522 @example
523 @uref{ftp://ftp.sxemacs.org/sxemacs/}
524 @end example
525
526 There are also snapshots of the current development line available.
527 However, the preferred method to obtain such ``snapshots'' is via tla
528 (GNU arch):
529
530 @example
531 tla register-archive http://arch.sxemacs.org/2006
532 tla get steve@@sxemacs.org--2006/sxemacs--main--22.1.5 sxemacs
533 @end example
534
535
536 @node Q1.0.4
537 @unnumberedsec Q1.0.4: Why another version of Emacs?
538
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.
544
545
546 @unnumberedsubsec Q1.0.4.1 GNU Emacs vs. SXEmacs/XEmacs
547
548 Here is a list of some of the reasons why we think you might
549 consider using it:
550  
551 @itemize @bullet
552 @item
553 It looks nicer.
554  
555 @item
556 The XEmacs and SXEmacs maintainers, especially the SXEmacs
557 maintainers, are generally more receptive to suggestions than the GNU
558 Emacs maintainers.
559
560 @item
561 Many, many more bundled packages than GNU Emacs.
562
563 @item
564 Packages at all.
565
566 @c @c does not apply anymore
567 @c @item
568 @c Face support on TTY's.
569
570 @c @c does not apply anymore
571 @c @item
572 @c A built-in toolbar.
573
574 @c @c does not apply anymore
575 @c @item
576 @c Some internationalisation support (including full MULE support, if
577 @c compiled with it).
578
579 @c @c does not apply anymore
580 @c @item
581 @c Variable-width fonts.
582
583 @c @c does not apply anymore
584 @c @item
585 @c Variable-height lines.
586
587 @item
588 Marginal annotations.
589
590 @item
591 ToolTalk support.
592
593 @item
594 XEmacs can be used as an Xt widget, and can be embedded within another
595 application.
596
597 @c @c does not apply anymore
598 @c @item
599 @c Horizontal and vertical scrollbars (using real toolkit scrollbars).
600
601 @item
602 Better APIs (and performance) for attaching fonts, colors, and other
603 properties to text.
604  
605 @c @c does not apply anymore
606 @c @item
607 @c The ability to embed arbitrary graphics in a buffer.
608
609 @item
610 Completely compatible (at the C level) with the Xt-based toolkits.
611
612 @item
613 Native support for PostgreSQL databases, LDAP servers and Berkeley DB.
614
615 @item
616 Support for GMP numbers (multi-precision integers, quotients and
617 floats).
618
619 @item
620 Support for multiple tty connections.
621
622 @c the FSF guys' implementation is a disease!
623 @item
624 Sound support.
625
626 @end itemize
627
628
629 @unnumberedsubsec Q1.0.4.2 SXEmacs vs. XEmacs
630
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.
635
636 @itemize
637 @item
638 Foreign Function Interface (FFI).
639
640 @item
641 PostgreSQL notify support.
642
643 @item
644 Native OpenSSL support.
645
646 @item
647 Support for mpfr floats, Gaussian and complex numbers, quaternions and
648 residue class rings.
649
650 @item
651 Support for raw strings.
652
653 @item
654 Much faster hashing functions.
655
656 @item
657 Support for internal URL access via cURL.
658
659 @item
660 Support for various image formats: Any format that ImageMagick is able
661 to handle.
662
663 @item
664 Support for modern sound libraries and sound servers: ESD, Polyp,
665 aRts, Jack, ALSA, and ao
666
667 @item
668 Support for various media formats (provided by external libraries):
669 Any format that FFmpeg, sndfile, SoX, MAD and gstreamer can handle.
670
671 @item
672 Support for the implementation network services through the use of
673 network server stream.
674
675 @end itemize
676
677
678
679 @node Q1.0.5
680 @unnumberedsec Q1.0.5: Why haven't XEmacs/SXEmacs and GNU Emacs Merged?
681
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.
686
687
688 @node Q1.0.6
689 @unnumberedsec Q1.0.6: Where can I get help?
690
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.
694
695 For items not found in the manual, try reading this FAQ and reading the
696 Usenet group comp.emacs.xemacs.
697
698 If you choose to post to a newsgroup, @strong{please use
699 comp.emacs.xemacs}.  Please do not post SXEmacs/XEmacs related questions
700 to gnu.emacs.help.
701
702 SXEmacs is an official group at the Freenode IRC network (formerly
703 OPN).  Join us at @uref{irc://irc.freenode.net/sxemacs}.
704
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.
708
709
710 @node Q1.0.7
711 @unnumberedsec Q1.0.7: Where are the mailing lists archived?
712
713 The archives can be found at
714 @uref{http://www.sxemacs.org/list-archives/html/sxemacs-devel/}.
715
716 Subscription can be done via
717 @uref{http://www.sxemacs.org/mailman/listinfo}
718
719
720 @node Q1.0.8
721 @unnumberedsec Q1.0.8: How do you pronounce SXEmacs?
722
723 The most common pronounciation is @samp{sexy macs}.
724
725
726 @node Q1.0.9
727 @unnumberedsec Q1.0.9: What does SXEmacs look like?
728
729 Look at the screenshot section at @uref{http://www.sxemacs.org}.
730
731
732 @node Q1.0.10
733 @unnumberedsec Q1.0.10: Is there a port of SXEmacs to Microsoft ('95 or NT)?
734
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.
737
738
739 @node Q1.0.11
740 @unnumberedsec Q1.0.11: Is there a port of SXEmacs to the Macintosh?
741
742 Good question. Is there?
743
744
745 @node Q1.0.12
746 @unnumberedsec Q1.0.12: Is there a port of SXEmacs to NextStep?
747
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.
751
752 A what?
753
754
755 @node Q1.0.13
756 @unnumberedsec Q1.0.13: Is there a port of SXEmacs to OS/2?
757
758 @c No, but Alexander Nikolaev <avn_1251@@mail.ru> is working on it.
759
760 Aaaaargh. You could have also asked: Is there a port of SXEmacs to my
761 hamster.
762
763
764 @node Q1.0.14
765 @unnumberedsec Q1.0.14: Where can I obtain a printed copy of the SXEmacs User's Manual?
766
767 Pre-printed manuals are not available.  If you are familiar with
768 TeX, you can generate your own manual from the SXEmacs sources.
769
770 HTML and Postscript versions of SXEmacs manuals are available from the
771 SXEmacs web site at @uref{http://www.sxemacs.org}.
772 @c are they?
773
774
775 @node Q1.1.1
776 @unnumberedsec 1.1: Policies
777 @unnumberedsec Q1.1.1: What is the FAQ editorial policy?
778
779 The FAQ is actively maintained and modified regularly.  All links should
780 be up to date.  
781
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.
790
791 Questions and answers included into the FAQ will be edited for
792 spelling and grammar and will be attributed.
793
794
795 @node Q1.1.2
796 @unnumberedsec Q1.1.2: How do I become a beta tester?
797
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.
801
802 Be prepared to get your hands dirty, as beta testers are expected to
803 identify problems as best they can.
804
805
806 @node Q1.1.3
807 @unnumberedsec Q1.1.3: How do I contribute to SXEmacs itself?
808
809 Quoting a famous developer:
810
811 I know the answer exactly.
812 Gotta run.
813
814
815 @node Q1.2.1
816 @unnumberedsec 1.2: Credits
817 @unnumberedsec Q1.2.1: Who wrote SXEmacs?
818
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
822 menu.
823
824 @c @itemize @bullet
825 @c @item @email{martin@@xemacs.org, Martin Buchholz}
826 @c @html
827 @c <br><img src="mrb.jpeg" alt="Portrait of Martin Buchholz"><br>
828 @c @end html
829 @c 
830 @c 
831 @c @item @email{stephen@@xemacs.org, Stephen Turnbull}
832 @c 
833 @c 
834 @c @item @email{ben@@xemacs.org, Ben Wing}
835 @c @html
836 @c <br><img src="wing.gif" alt="Portrait of Ben Wing"><br>
837 @c @end html
838 @c 
839 @c 
840 @c @item @email{hniksic@@xemacs.org, Hrvoje Niksic}
841 @c 
842 @c @html
843 @c <br><img src="hniksic.jpeg" alt="Portrait of Hrvoje Niksic"><br>
844 @c @end html
845 @c 
846 @c @end itemize
847 @c 
848 @c The developers responsible for older releases were:
849 @c 
850 @c @itemize @bullet
851 @c @item @email{steve@@xemacs.org, Steve Baur}
852 @c 
853 @c @html
854 @c <br><img src="steve.gif" alt="Portrait of Steve Baur"><br>
855 @c @end html
856 @c 
857 @c @item @email{cthomp@@xemacs.org, Chuck Thompson}
858 @c @html
859 @c <br><img src="cthomp.jpeg" alt="Portrait of Chuck Thompson"><br>
860 @c @end html
861 @c 
862 @c @item @email{jwz@@jwz.org, Jamie Zawinski}
863 @c @html
864 @c <br><img src="jwz.gif" alt="Portrait of Jamie Zawinski"><br>
865 @c @end html
866 @c 
867 @c @item @email{mly@@adoc.xerox.com, Richard Mlynarik}
868 @c 
869 @c Steve Baur was the primary maintainer for 19.15 through 21.0.
870 @c 
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.
873 @c 
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.
877 @c 
878 @c @end itemize
879 @c 
880 @c Along with many other contributors, partially enumerated in the
881 @c @samp{About XEmacs} option in the Help menu.
882
883
884 @node Q1.2.2
885 @unnumberedsec Q1.2.2: Who contributed to this version of the FAQ?
886
887 The following people contributed valuable suggestions to building this
888 version of the FAQ (listed in alphabetical order):
889
890 @itemize @bullet
891 @item @email{steve@@xemacs.org, SL Baur}
892
893 @item @email{hroptatyr@@sxemacs.org, Sebastian Freundt}
894
895 @item @email{hniksic@@xemacs.org, Hrvoje Niksic}
896
897 @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari}
898
899 @end itemize
900
901
902 @node Q1.2.3
903 @unnumberedsec Q1.2.3: Who contributed to the FAQ in the past?
904
905 This is only a partial list, as many names were lost in a hard disk
906 crash some time ago.
907
908 @itemize @bullet
909 @item @email{binge@@aloft.att.com, Curtis.N.Bingham}
910
911 @item @email{bruncott@@dormeur.inria.fr, Georges Brun-Cottan}
912
913 @item @email{rjc@@cogsci.ed.ac.uk, Richard Caley}
914
915 @item @email{cognot@@ensg.u-nancy.fr, Richard Cognot}
916
917 @item @email{daku@@nortel.ca, Mark Daku}
918
919 @item @email{wgd@@martigny.ai.mit.edu, William G. Dubuque}
920
921 @item @email{eeide@@cs.utah.edu, Eric Eide}
922
923 @item @email{af@@biomath.jussieu.fr, Alain Fauconnet}
924
925 @item @email{cflatter@@nrao.edu, Chris Flatters}
926
927 @item @email{ginsparg@@adra.com, Evelyn Ginsparg}
928
929 @item @email{hall@@aplcenmp.apl.jhu.edu, Marty Hall}
930
931 @item @email{dkindred@@cmu.edu, Darrell Kindred}
932
933 @item @email{dmoore@@ucsd.edu, David Moore}
934
935 @item @email{arup+@@cmu.edu, Arup Mukherjee}
936
937 @item @email{nickel@@prz.tu-berlin.de, Juergen Nickelsen}
938
939 @item @email{powell@@csl.ncsa.uiuc.edu, Kevin R. Powell}
940
941 @item @email{dworkin@@ccs.neu.edu, Justin Sheehy}
942
943 @item @email{stig@@hackvan.com, Stig}
944
945 @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari}
946 @end itemize
947
948
949 @node Q1.3.1
950 @unnumberedsec 1.3: Internationalisation
951 @unnumberedsec Q1.3.1: What is the status of internationalisation support aka MULE (including Asian language support?
952
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.
957
958
959 @node Q1.3.2
960 @unnumberedsec Q1.3.2: How can I help with internationalisation?
961
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}.
966
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.
970
971 Translations of the TUTORIAL and man page are welcome, and SXEmacs
972 does support multilingual menus, but we have few current translations.
973
974 @xref{Q1.1.2}.
975
976
977 @node Q1.3.3
978 @unnumberedsec Q1.3.3: How do I type non-ASCII characters?
979
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}.
985
986 @xref{Q3.2.7}, which covers display of non-ASCII characters.
987
988 @node Q1.3.4
989 @unnumberedsec Q1.3.4: Can SXEmacs messages come out in a different language?
990
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.
994
995 However, menubar localisation @emph{does} work.  To enable it, add to
996 your @file{Emacs} file entries like this:
997
998 @example
999 Emacs*XlwMenu.resourceLabels:                   True
1000 Emacs*XlwMenu.file.labelString:                 Fichier
1001 Emacs*XlwMenu.openInOtherWindow.labelString:    In anderem Fenster oeffnen
1002 @end example
1003
1004 The name of the resource is derived from the non-localised entry by
1005 removing punctuation and capitalizing as above.
1006
1007
1008 @node Q1.3.5
1009 @unnumberedsec Q1.3.5: Please explain the various input methods in MULE/SXEmacs
1010
1011 Mule supports a wide variety of input methods.  There are three basic
1012 classes: Lisp implementations, generic platform support, and library
1013 interfaces.
1014
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
1023 like Chinese.
1024
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,
1030 anywhere.
1031
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.
1039
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.
1049
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.
1059
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.
1065
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.
1070
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.
1075
1076 SJ3, by Sony, supports only Japanese.
1077
1078 Egg consists of following parts:
1079
1080 @enumerate
1081 @item
1082 Input character Translation System (ITS) layer.
1083 It translates ASCII inputs to Kana/PinYin/Hangul characters.
1084
1085 @item
1086 Kana/PinYin/Hangul to Kanji transfer layer.
1087 The interface layer to network Kana-Kanji server (Wnn and Sj3).
1088 @end enumerate
1089
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.
1096
1097 Much of this information was provided by @email{morioka@@jaist.ac.jp,
1098 MORIOKA Tomohiko}.
1099
1100 @node Q1.3.6
1101 @unnumberedsec Q1.3.6: How do I portably code for MULE/SXEmacs?
1102
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.
1107
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.
1114
1115 @email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes:
1116
1117 @quotation
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.]
1122
1123 MULE and the next version of Emacs are similar but the symbols are very
1124 different---requiring separate code as well.
1125
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.]
1131
1132 I have the following suggestions about dealing with mule variants:
1133
1134 @itemize @bullet
1135 @item
1136 @code{(featurep 'mule)} @code{t} on all mule variants
1137
1138 @item
1139 @code{(boundp 'MULE)} is @code{t} on only MULE.  Maybe the next version
1140 of Emacs will not have this symbol.
1141
1142 @item
1143 MULE has a variable @code{mule-version}.  Perhaps the next version of
1144 Emacs will have this variable as well.
1145 @end itemize
1146
1147 Following is a sample to distinguish mule variants:
1148
1149 @lisp
1150 (if (featurep 'mule)
1151     (cond ((boundp 'MULE)
1152            ;; for original Mule
1153            )
1154           ((string-match "XEmacs" emacs-version)
1155            ;; for XEmacs with Mule
1156            )
1157           (t
1158            ;; for next version of Emacs
1159            ))
1160   ;; for old emacs variants
1161   )
1162 @end lisp
1163 @end quotation
1164
1165
1166 @node Q1.3.7
1167 @unnumberedsec Q1.3.7: How about Cyrillic Modes?
1168
1169 @email{ilya@@math.ohio-state.edu, Ilya Zakharevich} writes:
1170
1171 @quotation
1172 There is a cyrillic mode in the file @file{mysetup.zip} in
1173 @iftex
1174 @*
1175 @end iftex
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
1179 @end quotation
1180
1181 @uref{http://www.math.uga.edu/~valery/russian.el}.
1182
1183 @email{d.barsky@@ee.surrey.ac.uk, Dima Barsky} writes:
1184
1185 @quotation
1186 There is another cyrillic mode for both GNU Emacs and XEmacs by
1187 @email{manin@@camelot.mssm.edu, Dmitrii
1188 (Mitya) Manin} at
1189 @iftex
1190
1191 @end iftex
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
1195 @end quotation
1196
1197 @email{rebecca.ore@@op.net, Rebecca Ore} writes:
1198
1199 @quotation
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}
1202 @end quotation
1203
1204
1205 @node Q1.3.8
1206 @unnumberedsec Q1.3.8: Does SXEmacs support Unicode?
1207
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
1210 Unicode Fonts?}
1211
1212 To get Unicode support, you need a Mule-enabled SXEmacs.  Install
1213 Mule-UCS from packages in the usual way.  Put
1214
1215 @example
1216 (require 'un-define)
1217 (set-coding-priority-list '(utf-8))
1218 (set-coding-category-system 'utf-8 'utf-8)
1219 @end example
1220
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.
1224
1225 Install standard national fonts (not Unicode fonts) for all
1226 character sets you use.  See @ref{Q1.3.9}.
1227
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).
1230
1231
1232 @node Q1.3.9
1233 @unnumberedsec Q1.3.9: How does SXEmacs display Unicode?
1234
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.
1239
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'.
1247
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.
1251
1252 Real Unicode support will be introduced in SXEmacs 22.2.
1253 @c will it?
1254
1255
1256 @node Q1.4.1
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?
1259
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}.
1270
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.
1277
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
1282 @key{RET}}.
1283
1284
1285 @node Q1.4.2
1286 @unnumberedsec Q1.4.2: Can I use the same @file{init.el}/@file{.emacs} with XEmacs or GNU Emacs?
1287
1288 Yes.  The sample @file{init.el} included in the SXEmacs
1289 distribution will show you how to handle different versions and flavours
1290 of Emacs.
1291
1292
1293 @node Q1.4.3
1294 @unnumberedsec Q1.4.3: Any good tutorials around?
1295
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}.
1300
1301
1302 @node Q1.4.4
1303 @unnumberedsec Q1.4.4: May I see an example of a useful SXEmacs Lisp function?
1304
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
1310 insert 3 copies.
1311
1312 @lisp
1313 (defun double-word (count)
1314   "Insert a copy of the current word underneath the cursor"
1315   (interactive "*p")
1316   (let (here there string)
1317     (save-excursion
1318       (forward-word -1)
1319       (setq here (point))
1320       (forward-word 1)
1321       (setq there (point))
1322       (setq string (buffer-substring here there)))
1323     (while (>= count 1)
1324       (insert string)
1325       (decf count))))
1326 @end lisp
1327
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}.
1336
1337
1338 @node Q1.4.5
1339 @unnumberedsec Q1.4.5: And how do I bind it to a key?
1340
1341 To bind to a key do:
1342
1343 @lisp
1344 (global-set-key "\C-cd" 'double-word)
1345 @end lisp
1346
1347 Or interactively, @kbd{M-x global-set-key} and follow the prompts.
1348
1349
1350 @node Q1.4.6
1351 @unnumberedsec Q1.4.6: What's the difference between a macro and a function?
1352
1353 Quoting from the Lisp Reference (a.k.a @dfn{Lispref}) Manual:
1354
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.
1360
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
1364 or parts of them.
1365
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.
1369
1370
1371
1372 @node Installation, Customisation, Introduction, Top
1373 @unnumbered 2 Installation and Trouble Shooting
1374
1375 This is part 2 of the SXEmacs Frequently Asked Questions list.  This
1376 section is devoted to Installation, Maintenance and Trouble Shooting.
1377
1378 @menu
1379 Installation:
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)
1395
1396 Trouble Shooting:
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!
1422 @end menu
1423
1424
1425 @node Q2.0.1
1426 @unnumberedsec 2.0: Installation
1427 @unnumberedsec Q2.0.1: Running SXEmacs without installing
1428
1429 How can I just try SXEmacs without installing it?
1430
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.
1435
1436
1437 @node Q2.0.2
1438 @unnumberedsec Q2.0.2: SXEmacs is too big
1439
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
1446 the support lisp.
1447
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.
1453
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.
1457
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.
1464
1465 Another method is to do @kbd{M-x package-get-delete-package}.
1466
1467 @node Q2.0.3
1468 @unnumberedsec Q2.0.3: Compiling SXEmacs with Netaudio.
1469
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?
1474
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:
1479
1480 @example
1481 --site-libraries=WHATEVER
1482 --site-includes=WHATEVER
1483 @end example
1484
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).
1490
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/}.
1495
1496
1497 @node Q2.0.4
1498 @unnumberedsec Q2.0.4: Problems with Linux and ncurses.
1499
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:
1502 @c @c oh great
1503 @c 
1504 @c @example
1505 @c src/xemacs -nw -q
1506 @c Initialisation error:
1507 @c @iftex
1508 @c @*
1509 @c @end iftex
1510 @c Terminal type `xterm' undefined (or can't access database?)
1511 @c @end example
1512 @c 
1513 @c @email{ben@@xemacs.org, Ben Wing} writes:
1514 @c 
1515 @c @quotation
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.
1518 @c @end quotation
1519
1520 There are none!
1521
1522
1523 @node Q2.0.5
1524 @unnumberedsec Q2.0.5: Do I need X11 to run SXEmacs?
1525
1526 No.
1527
1528
1529 @node Q2.0.6
1530 @unnumberedsec Q2.0.6: I'm having strange crashes.  What do I do?
1531
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.
1535
1536
1537 @node Q2.0.7
1538 @unnumberedsec Q2.0.7: Libraries in non-standard locations
1539
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
1542 avail.
1543
1544 @example
1545 --with-site-prefixes=/path/to/site1::/path/to/site2::/path/to/site3
1546 @end example
1547
1548
1549 @node Q2.0.8
1550 @unnumberedsec Q2.0.8: can't resolve symbol _h_errno
1551
1552 Does not apply anymore.
1553
1554
1555 @node Q2.0.9
1556 @unnumberedsec Q2.0.9: Where do I find external libraries?
1557
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.
1561
1562
1563 @node Q2.0.10
1564 @unnumberedsec Q2.0.10: After I run configure I find a core dump, is something wrong?
1565
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:
1569 @c 
1570 @c @quotation
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.
1574 @c 
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.
1578 @c @end quotation
1579 @c 
1580 @c It has also been observed that the vfork test on Solaris will leave a
1581 @c core dump.
1582
1583 Send a build report.
1584
1585
1586 @node Q2.0.11
1587 @unnumberedsec Q2.0.11: SXEmacs doesn't resolve hostnames.
1588
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.
1591
1592 @email{ckd@@loiosh.kei.com, Christopher Davis} writes:
1593
1594 @quotation
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.
1599
1600 This is also why Netscape ships two binaries for SunOS 4.1.x.
1601
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.
1605 @end quotation
1606
1607
1608 @node Q2.0.12
1609 @unnumberedsec Q2.0.12: Why can't I strip SXEmacs?
1610
1611 @email{cognot@@fronsac.ensg.u-nancy.fr, Richard Cognot} writes:
1612
1613 @quotation
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.
1619
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.
1626
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
1630 kits).
1631 @end quotation
1632
1633 @email{nat@@nataa.fr.eu.org, Nat Makarevitch} writes:
1634
1635 @quotation
1636 Here is the trick:
1637
1638 @enumerate
1639 @item
1640 [ ./configure; make ]
1641
1642 @item
1643 rm src/sxemacs
1644
1645 @item
1646 strip src/temacs
1647
1648 @item
1649 make
1650
1651 @item
1652 cp src/sxemacs /usr/local/bin/sxemacs
1653
1654 @end enumerate
1655 @end quotation
1656
1657
1658 @node Q2.0.13
1659 @unnumberedsec Q2.0.13: I don't need no steenkin' packages.  Do I?
1660
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
1665 _useful_.
1666
1667
1668 @node Q2.0.14
1669 @unnumberedsec Q2.0.14: How do I figure out which packages to install?
1670
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
1674
1675 @file{xemacs-sumo.tar.gz}
1676
1677 For a SXEmacs compiled with Mule you also need
1678
1679 @file{xemacs-mule-sumo.tar.gz}
1680
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
1685
1686 Install them by
1687
1688 @code{cd $prefix/lib/sxemacs ; gunzip -c <tarballname> | tar xf -}
1689
1690 See README.packages for more detailed installation instructions.
1691
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.
1695
1696
1697 @node Q2.0.15
1698 @unnumberedsec Q2.0.15: EFS fails with "500 AUTH not understood"
1699
1700 A typical error: FTP Error: USER request failed; 500 AUTH not understood.
1701
1702 Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends
1703 on comp.emacs.xemacs:
1704
1705    tell your ftp client to not attempt AUTH authentication (or do not
1706    use FTP servers that don't understand AUTH)
1707
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
1711 documentation.
1712
1713
1714 @node Q2.1.1
1715 @unnumberedsec 2.1: Trouble Shooting
1716 @unnumberedsec Q2.1.1: Help!  SXEmacs just crashed on me!
1717
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.
1725
1726 You can use the command @kbd{M-x recover-session} after a crash to pick
1727 up where you left off.
1728
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).
1742
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:
1750
1751 @example
1752 gdb `which sxemacs` core
1753 @end example
1754
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.
1759
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.
1764
1765 When making a problem report make sure that:
1766
1767 @enumerate
1768 @item
1769 Report @strong{all} of the information output by SXEmacs during the
1770 crash.
1771
1772 @item
1773 You mention what OS & Hardware you are running SXEmacs on.
1774
1775 @item
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
1779 mainline.
1780
1781 @item
1782 What build options you are using.
1783
1784 @item
1785 What are the versions of your libc and external libraries you use.
1786
1787 @item
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.
1791
1792 @item
1793 If the problem happened on a TTY, please include the terminal type.
1794 @end enumerate
1795
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
1801 build-rpt}. 
1802
1803
1804 @node Q2.1.2
1805 @unnumberedsec Q2.1.2: Cryptic Minibuffer messages.
1806
1807 When I try to use some particular option of some particular package, I
1808 get a cryptic error in the minibuffer.
1809
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:
1818
1819 @enumerate
1820 @item
1821 Visit the .el file in a SXEmacs buffer.
1822
1823 @item
1824 Issue the command @kbd{M-x eval-current-buffer}.
1825
1826 @item
1827 Reproduce the error.
1828 @end enumerate
1829
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.
1833
1834
1835 @node Q2.1.3
1836 @unnumberedsec Q2.1.3: Translation Table Syntax messages at Startup
1837
1838 I get tons of translation table syntax error messages during startup.
1839 How do I get rid of them?
1840
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}.
1844
1845 @itemize @bullet
1846 @item
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
1853 should be at 
1854 @iftex
1855 @*
1856 @end iftex
1857 @file{<sxemacs_prefix>/lib/sxemacs-22.1.<x>/etc/XKeysymDB}.
1858
1859 @item
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
1865 described above.
1866 @end itemize
1867
1868
1869 @node Q2.1.4
1870 @unnumberedsec Q2.1.4: Startup warnings about deducing proper fonts?
1871
1872 How can I avoid the startup warnings about deducing proper fonts?
1873
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:
1876
1877 @format
1878 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
1879 @end format
1880
1881 More precisely, do the following in your resource file:
1882
1883 @format
1884 Emacs.default.attributeFont: \
1885 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
1886 @end format
1887
1888 If you just don't want to see the @samp{*Warnings*} buffer at startup
1889 time, you can set this:
1890
1891 @lisp
1892 (setq display-warning-minimum-level 'error)
1893 @end lisp
1894
1895 The buffer still exists; it just isn't in your face.
1896
1897
1898 @node Q2.1.5
1899 @unnumberedsec Q2.1.5: SXEmacs cannot connect to my X Terminal!
1900
1901 Help!  I can not get SXEmacs to display on my Envizex X-terminal!
1902
1903 Try setting the @code{DISPLAY} variable using the numeric IP address of
1904 the host you are running SXEmacs from.
1905
1906
1907 @node Q2.1.6
1908 @unnumberedsec Q2.1.6: SXEmacs just locked up my Linux X server!
1909
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}.
1914
1915 It is possible that using a font server may also solve the problem.
1916
1917
1918 @node Q2.1.7
1919 @unnumberedsec Q2.1.7: HP Alt key as Meta.
1920
1921 How can I make SXEmacs recognize the Alt key of my HP workstation as a
1922 Meta key?
1923
1924 Put the following line into a file and load it with xmodmap(1) before
1925 starting SXEmacs:
1926
1927 @example
1928 remove Mod1 = Mode_switch
1929 @end example
1930
1931
1932 @node Q2.1.8
1933 @unnumberedsec Q2.1.8: got (wrong-type-argument color-instance-p nil)
1934
1935 @email{nataliek@@rd.scitec.com.au, Natalie Kershaw} writes:
1936
1937 @quotation
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.
1941
1942 @lisp
1943 Signalling:
1944 (error "got (wrong-type-argument color-instance-p nil)
1945 and I don't know why!")
1946 @end lisp
1947 @end quotation
1948
1949 @email{map01kd@@gold.ac.uk, dinos} writes:
1950
1951 @quotation
1952 I think this is due to undefined resources; You need to define color
1953 backgrounds and foregrounds into your @file{.../app-defaults/Emacs}
1954 like:
1955
1956 @example
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.
1961 @end example
1962 @end quotation
1963
1964 Natalie Kershaw adds:
1965
1966 @quotation
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:
1970
1971 @example
1972 xemacs*cursorColor:    black
1973 xemacs*pointerColor:   black
1974 @end example
1975
1976 With the new colors installed the problem still occurs if the above
1977 resources are not defined.
1978
1979 If the new colors are not present then an additional error occurs on
1980 SXEmacs startup, which says @samp{Color Red3} not defined.
1981 @end quotation
1982
1983
1984 @node Q2.1.9
1985 @unnumberedsec Q2.1.9: SXEmacs causes my OpenWindows 3.0 server to crash.
1986
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
1990 background pixmaps.
1991
1992
1993 @node Q2.1.10
1994 @unnumberedsec Q2.1.10: Warnings from incorrect key modifiers.
1995
1996 The following information comes from the @file{PROBLEMS} file that comes
1997 with SXEmacs.
1998
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.
2002
2003 @example
2004 #! /bin/sh
2005 xmodmap 2> /dev/null - << EOF
2006 keysym Alt_L = Meta_L
2007 keysym Alt_R = Meta_R
2008 EOF
2009
2010 xmodmap - << EOF
2011 clear mod1
2012 keysym Mode_switch = NoSymbol
2013 add mod1 = Meta_L
2014 keysym Meta_R = Mode_switch
2015 add mod2 = Mode_switch
2016 EOF
2017 @end example
2018
2019
2020 @node Q2.1.11
2021 @unnumberedsec Q2.1.11: @samp{Can't instantiate image error...} in toolbar
2022 @c New
2023
2024 @email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes:
2025
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:
2029
2030 @example
2031  Can't instantiate image (probably cached):
2032  [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
2033  (16 16 <strange control characters> ...
2034 @end example
2035
2036 @email{kyle_jones@@wonderworks.com, Kyle Jones} writes:
2037 @quotation
2038 This is problem specific to some Chips and Technologies video
2039 chips, when running XFree86.  Putting
2040
2041 @code{Option "sw_cursor"}
2042
2043 in @file{XF86Config} gets rid of the problem.
2044 @end quotation
2045
2046
2047 @node Q2.1.12
2048 @unnumberedsec Q2.1.12: Problems with Regular Expressions on DEC OSF1.
2049
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.
2054 @c 
2055 @c @email{douglask@@dstc.edu.au, Douglas Kosovic} writes:
2056 @c 
2057 @c @quotation
2058 @c Actually it's a DEC cc optimisation bug that screws up the regexp
2059 @c handling in XEmacs.
2060 @c 
2061 @c Rebuilding using the @samp{-migrate} switch for DEC cc (which uses a
2062 @c different sort of optimisation) works fine.
2063 @c @end quotation
2064 @c 
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:
2067 @c 
2068 @c @example
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.
2072 @c 
2073 @c 
2074 @c 
2075 @c @end example
2076 @c 
2077 @c NOTE: There have been a variety of other problems reported that are
2078 @c fixed in this fashion.
2079
2080 Does not apply anymore.
2081
2082
2083 @node Q2.1.13
2084 @unnumberedsec Q2.1.13: HP/UX 10.10 and @code{create_process} failure.
2085
2086 @c @email{Dave.Carrigan@@ipl.ca, Dave Carrigan} writes:
2087 @c 
2088 @c @quotation
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).
2092 @c @end quotation
2093 @c 
2094 @c @email{johnson@@dtc.hp.com, Phil Johnson} writes:
2095 @c 
2096 @c @quotation
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}).
2101 @c 
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.
2104 @c @end quotation
2105 @c 
2106 @c @email{cognot@@ensg.u-nancy.fr, Richard Cognot} writes:
2107 @c 
2108 @c @quotation
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).
2111 @c @end quotation
2112
2113 Does not apply anymore.
2114
2115
2116 @node Q2.1.14
2117 @unnumberedsec Q2.1.14: @kbd{C-g} doesn't work for me.  Is it broken?
2118
2119 @email{ben@@xemacs.org, Ben Wing} writes:
2120
2121 @quotation
2122 @kbd{C-g} does work for most people in most circumstances.  If it
2123 doesn't, there are only two explanations:
2124
2125 @enumerate
2126 @item
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.
2129
2130 @item
2131 SIGIO is broken on your system, but BROKEN_SIGIO isn't defined.
2132 @end enumerate
2133
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.
2136 @end quotation
2137
2138 @email{terra@@diku.dk, Morten Welinder} writes:
2139
2140 @quotation
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.
2147 @end quotation
2148
2149
2150 @node Q2.1.15
2151 @unnumberedsec Q2.1.15: How to debug a SXEmacs problem with a debugger
2152
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:
2156
2157 @itemize @bullet
2158 @item
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.
2167
2168 @item
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.
2176
2177 @item
2178 If you're able to run SXEmacs under a debugger and reproduce the crash,
2179 here are some things you can do:
2180
2181 @item
2182 If SXEmacs is hitting an assertion failure, put a breakpoint on
2183 @code{assert_failed()}.
2184
2185 @item
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.
2189
2190 @item
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.
2193
2194 @item
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:
2199
2200 @example
2201 call dp (OBJECT)
2202 @end example
2203
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
2207 invoked.
2208
2209 @item
2210 If you want to get a Lisp backtrace showing the Lisp call
2211 stack, do this:
2212
2213 @example
2214 call db ()
2215 @end example
2216
2217 @item
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.
2222
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
2228 sxemacs:
2229
2230 @table @code
2231 @item pobj
2232 Usage: pobj lisp_object @*
2233 Print the internal C representation of a lisp object.
2234
2235 @item xtype
2236 Usage: xtype lisp_object @*
2237 Print the Lisp type of a lisp object.
2238
2239 @item lbt
2240 Usage: lbt @*
2241 Print the current Lisp stack trace.
2242 Requires a running sxemacs process.  (It works by calling the db
2243 routine described above.)
2244
2245 @item ldp
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.)
2250
2251 @item run-temacs
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.
2256
2257 @item dump-temacs
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.
2262
2263 @item check-sxemacs
2264 Usage: check-sxemacs @*
2265 Run the test suite.  Equivalent to 'make check'.
2266
2267 @item check-temacs
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.
2272 @end table
2273
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.
2276
2277 @item
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
2285 be clean.
2286
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.
2289
2290 @item
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:
2294
2295 @enumerate a
2296 @item
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.
2300
2301 @item
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.
2310
2311 @item
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.
2321
2322 @item
2323 You will get a Lisp backtrace output when SXEmacs crashes, so you'll have
2324 something useful.
2325
2326 @end enumerate
2327 @end itemize
2328
2329
2330 @node Q2.1.16
2331 @unnumberedsec Q2.1.16: SXEmacs crashes in @code{strcat} on HP/UX 10
2332
2333 From the problems database (through
2334 the former address http://support.mayfield.hp.com/):
2335
2336 @example
2337 Problem Report: 5003302299
2338 Status:         Open
2339
2340 System/Model:   9000/700
2341 Product Name:   HPUX S800 10.0X
2342 Product Vers:   9245XB.10.00
2343
2344 Description: strcat(3C) may read beyond
2345 end of source string, can cause SIGSEGV
2346
2347
2348 *** PROBLEM TEXT ***
2349 strcat(3C) may read beyond the source string onto an unmapped page,
2350 causing a segmentation violation.
2351 @end example
2352
2353
2354 @node Q2.1.17
2355 @unnumberedsec Q2.1.17: @samp{Marker does not point anywhere}
2356
2357 As with other errors, set @code{debug-on-error} to @code{t} to get the
2358 backtrace when the error occurs.
2359
2360
2361 @node Q2.1.18
2362 @unnumberedsec Q2.1.18: SXEmacs is outputting lots of X errors.
2363
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}.
2367
2368
2369 @node Q2.1.19
2370 @unnumberedsec Q2.1.19: SXEmacs does not follow the local timezone.
2371
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:
2375
2376 @lisp
2377 (set-time-zone-rule "MET")
2378 @end lisp
2379
2380 to your @file{init.el} or the @file{site-start.el} file if you can.
2381 Replace @code{MET} with your local timezone.
2382
2383
2384 @node Q2.1.20
2385 @unnumberedsec Q2.1.20: @samp{Symbol's function definition is void: hkey-help-show.}
2386
2387 This is a problem with a partially loaded hyperbole.  Try adding:
2388
2389 @lisp
2390 (require 'hmouse-drv)
2391 @end lisp
2392
2393 where you load hyperbole and the problem should go away.
2394
2395
2396 @node Q2.1.21
2397 @unnumberedsec Q2.1.21: [This question intentionally left blank]
2398
2399
2400 @node Q2.1.22
2401 @unnumberedsec Q2.1.22: SXEmacs seems to take a really long time to do some things
2402
2403 @email{dmoore@@ucsd.edu, David Moore} writes:
2404
2405 @quotation
2406 Two things you can do:
2407
2408 1) C level:
2409
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
2412 this just run:
2413
2414 @example
2415 gdb /path/to/sxemacs/sxemacs ####
2416 @end example
2417
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.
2424
2425 2) Lisp level:
2426
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.
2430
2431 debug-on-quit doesn't work if something's turned on inhibit-quit or in
2432 some other strange cases.
2433 @end quotation
2434
2435
2436 @node Q2.1.23
2437 @unnumberedsec Q2.1.23:  Movemail on Linux does not work for SXEmacs
2438
2439 @email{steve@@xemacs.org, SL Baur} writes:
2440
2441 @quotation
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
2445 that reads:
2446
2447 @example
2448 #define MAIL_USE_FLOCK
2449 @end example
2450 @end quotation
2451
2452
2453 @node Q2.1.24
2454 @unnumberedsec Q2.1.24:  SXEmacs won't start without network.
2455
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:
2459
2460 @example
2461 127.0.0.1        localhost
2462 @end example
2463
2464 Add that line, and SXEmacs will be happy.
2465
2466
2467 @node Q2.1.25
2468 @unnumberedsec Q2.1.25::  After upgrading, SXEmacs won't do `foo' any more!
2469
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}).
2476
2477 @c #### should xref to XEmacs manual here
2478
2479
2480 @node Customisation, Subsystems, Installation, Top
2481 @unnumbered 3 Customisation and Options
2482
2483 This is part 3 of the SXEmacs Frequently Asked Questions list.  This
2484 section is devoted to Customisation and screen settings.
2485
2486 @menu
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}?
2497
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.
2507
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?
2516
2517 The Modeline:
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?
2523
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?
2527
2528 The Keyboard:
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?
2540
2541 The Cursor:
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?
2545
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?
2555
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?
2562
2563 Scrollbars:
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?
2568
2569 Text Selections:
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?
2576 @end menu
2577
2578 @node Q3.0.1
2579 @unnumberedsec 3.0: Customisation -- Emacs Lisp and @file{init.el}
2580 @unnumberedsec Q3.0.1: What version of Emacs am I running?
2581
2582 How can @file{init.el} determine which of the family of
2583 Emacsen I am using?
2584
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!
2589
2590 For all new code, you can use the variables @code{running-xemacs} and
2591 @code{running-sxemacs} or something like
2592
2593 @lisp
2594 (when (featurep 'sxemacs)
2595   ...)
2596 (when (featurep 'xemacs)
2597   ...)
2598 @end lisp
2599 @noindent
2600 as well.
2601
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.
2606
2607
2608 @node Q3.0.2
2609 @unnumberedsec Q3.0.2: How can I evaluate Emacs-Lisp expressions?
2610
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
2613 buffer?
2614
2615 Press @kbd{M-:} (the default binding of @code{eval-expression}), and
2616 enter the expression to the minibuffer.
2617
2618
2619 @node Q3.0.3
2620 @unnumberedsec Q3.0.3: @code{(setq tab-width 6)} behaves oddly.
2621
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.
2625
2626 Use @code{setq-default} instead, since @code{tab-width} is
2627 all-buffer-local.
2628
2629
2630 @node Q3.0.4
2631 @unnumberedsec Q3.0.4: How can I add directories to the @code{load-path}?
2632
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:
2635
2636 @lisp
2637 ;;; Add things at the beginning of the load-path, do not add
2638 ;;; duplicate directories:
2639 (pushnew "bar" load-path :test 'equal)
2640
2641 (pushnew "foo" load-path :test 'equal)
2642
2643 ;;; Add things at the end, unconditionally
2644 (setq load-path (nconc load-path '("foo" "bar")))
2645 @end lisp
2646
2647 @email{keithh@@nortel.ca, keith (k.p.) hanlan} writes:
2648
2649 @quotation
2650 To add directories using Unix shell metacharacters use
2651 @file{expand-file-name} like this:
2652
2653 @lisp
2654 (push (expand-file-name "~keithh/.emacsdir") load-path)
2655 @end lisp
2656 @end quotation
2657
2658
2659 @node Q3.0.5
2660 @unnumberedsec Q3.0.5: How to check if a lisp function is defined?
2661
2662 Use the following elisp:
2663
2664 @lisp
2665 (fboundp 'foo)
2666 @end lisp
2667
2668 It's almost always a mistake to test @code{emacs-version} or any similar
2669 variables.
2670
2671 Instead, use feature-tests, such as @code{featurep}, @code{boundp},
2672 @code{fboundp}, or even simple behavioral tests, eg.:
2673
2674 @lisp
2675 (defvar foo-old-losing-code-p
2676   (condition-case nil (progn (losing-code t) nil)
2677     (wrong-number-of-arguments t)))
2678 @end lisp
2679
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.
2683
2684
2685 @node Q3.0.6
2686 @unnumberedsec Q3.0.6: Can I force the output of @code{(face-list)} to a buffer?
2687
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.
2690
2691 Evaluate the expression in the @samp{*scratch*} buffer with point after
2692 the rightmost paren and typing @kbd{C-j}.
2693
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
2696 buffer.
2697
2698
2699 @node Q3.0.7
2700 @unnumberedsec Q3.0.7: Font selections in don't get saved after @code{Save Options}.
2701
2702 @email{mannj@@ll.mit.edu, John Mann} writes:
2703
2704 @quotation
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.
2709 @end quotation
2710
2711 Also, set the following in your @file{init.el}:
2712
2713 @lisp
2714 (setq options-save-faces t)
2715 @end lisp
2716
2717
2718 @node Q3.0.8
2719 @unnumberedsec Q3.0.8: How do I get a single minibuffer frame?
2720
2721 @email{acs@@acm.org, Vin Shelton} writes:
2722
2723 @lisp
2724 (setq initial-frame-plist '(minibuffer nil))
2725 (setq default-frame-plist '(minibuffer nil))
2726 (setq default-minibuffer-frame
2727       (make-frame
2728        '(minibuffer only
2729                     width 86
2730                     height 1
2731                     menubar-visible-p nil
2732                     default-toolbar-visible-p nil
2733                     name "minibuffer"
2734                     top -2
2735                     left -2
2736                     has-modeline-p nil)))
2737 (frame-notice-user-settings)
2738 @end lisp
2739
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.
2743
2744
2745 @node Q3.0.9
2746 @unnumberedsec Q3.0.9: What is @code{Customize}?
2747
2748 Starting with XEmacs 20.2 there is new system 'Customize' for customising
2749 SXEmacs options.
2750
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}.
2755
2756 Also try out with @kbd{M-x customize-browse}
2757
2758
2759 @node Q3.1.1
2760 @unnumberedsec 3.1: X Window System & Resources
2761 @unnumberedsec Q3.1.1: Where is a list of X resources?
2762
2763 Search through the @file{NEWS} file for @samp{X Resources}.  A fairly
2764 comprehensive list is given after it.
2765
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.
2773
2774
2775 @node Q3.1.2
2776 @unnumberedsec Q3.1.2: How can I detect a color display?
2777
2778 You can test the return value of the function @code{(device-class)}, as
2779 in:
2780
2781 @lisp
2782 (when (eq (device-class) 'color)
2783   (set-face-foreground  'font-lock-comment-face "Grey")
2784   (set-face-foreground  'font-lock-string-face  "Red")
2785   ....
2786   )
2787 @end lisp
2788
2789
2790 @node Q3.1.3
2791 @unnumberedsec Q3.1.3: [This question intentionally left blank]
2792
2793 @node Q3.1.4
2794 @unnumberedsec Q3.1.4: [This question intentionally left blank]
2795
2796
2797 @node Q3.1.5
2798 @unnumberedsec Q3.1.5: How can I get the icon to just say @samp{SXEmacs}?
2799
2800 I'd like the icon to just say @samp{SXEmacs}, and not include the name of
2801 the current file in it.
2802
2803 Add the following line to your @file{init.el}:
2804
2805 @lisp
2806 (setq frame-icon-title-format "SXEmacs")
2807 @end lisp
2808
2809
2810 @node Q3.1.6
2811 @unnumberedsec Q3.1.6: How can I have the window title area display the full path?
2812
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.
2815
2816 Add the following line to your @file{init.el}:
2817
2818 @lisp
2819 (setq frame-title-format "%S: %f")
2820 @end lisp
2821
2822 A more sophisticated title might be:
2823
2824 @lisp
2825 (setq frame-title-format
2826       '("%S: " (buffer-file-name "%f"
2827                                  (dired-directory dired-directory "%b"))))
2828 @end lisp
2829
2830 That is, use the file name, or the dired-directory, or the buffer name.
2831
2832
2833 @node Q3.1.7
2834 @unnumberedsec Q3.1.7: @samp{sxemacs -name junk} doesn't work?
2835
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?
2844
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
2852 widget would be:
2853
2854 @example
2855 Name:    FOO   .shell             .container   .BAR
2856 Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
2857 @end example
2858
2859 instead of the default
2860
2861 @example
2862 Name:    sxemacs.shell            .container   .emacs
2863 Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
2864 @end example
2865
2866
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.
2877
2878 To make a frame with a particular name use:
2879
2880 @lisp
2881 (make-frame '((name . "the-name")))
2882 @end lisp
2883
2884
2885 @node Q3.1.8
2886 @unnumberedsec Q3.1.8: @samp{-iconic} doesn't work.
2887
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...
2891
2892 @email{ben@@xemacs.org, Ben Wing} writes:
2893
2894 @quotation
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
2897 bugs...
2898 @end quotation
2899
2900
2901 @node Q3.2.1
2902 @unnumberedsec 3.2: Textual Fonts & Colors
2903 @unnumberedsec Q3.2.1: How can I set color options from @file{init.el}?
2904
2905 How can I set the most commonly used color options from my
2906 @file{init.el} instead of from my @file{.Xresources}?
2907
2908 Like this:
2909
2910 @lisp
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/
2914                                         ; mouse
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
2918                                         ; buffers
2919 (set-face-foreground 'highlight    "yellow")
2920 (set-face-background 'modeline     "blue") ; Line at bottom
2921                                         ; of buffer
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
2925                                         ; while searching
2926 (set-face-foreground 'isearch      "red")
2927 (setq x-pointer-foreground-color   "black") ; Adds to bg color,
2928                                         ; so keep black
2929 (setq x-pointer-background-color   "blue") ; This is color
2930                                         ; you really
2931                                         ; want ptr/crsr
2932 @end lisp
2933
2934
2935 @node Q3.2.2
2936 @unnumberedsec Q3.2.2: How do I set the text, menu and modeline fonts?
2937
2938 Note that you should use @samp{Emacs.} and not @samp{Emacs*} when
2939 setting face values.
2940
2941 In @file{.Xresources}:
2942
2943 @example
2944 Emacs.default.attributeFont:  -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
2945 Emacs*menubar*font:           fixed
2946 Emacs.modeline.attributeFont: fixed
2947 @end example
2948
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}.
2953
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.)
2959
2960
2961 @node Q3.2.3
2962 @unnumberedsec Q3.2.3: How can I set the colors when highlighting a region?
2963
2964 How can I set the background/foreground colors when highlighting a
2965 region?
2966
2967 You can change the face @code{zmacs-region} either in your
2968 @file{.Xresources}:
2969
2970 @example
2971 Emacs.zmacs-region.attributeForeground: firebrick
2972 Emacs.zmacs-region.attributeBackground: lightseagreen
2973 @end example
2974
2975 or in your @file{init.el}:
2976
2977 @lisp
2978 (set-face-background 'zmacs-region "red")
2979 (set-face-foreground 'zmacs-region "yellow")
2980 @end lisp
2981
2982
2983 @node Q3.2.4
2984 @unnumberedsec Q3.2.4: How can I limit color map usage?
2985
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?
2988
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
2993 map).
2994
2995 If you have the money, another solution would be to use a truecolor or
2996 direct color video.
2997
2998
2999 @node Q3.2.5
3000 @unnumberedsec Q3.2.5: My tty supports color, but SXEmacs doesn't use them.
3001
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:
3005
3006 @lisp
3007 (if (eq 'tty (device-type))
3008     (set-device-class nil 'color))
3009 @end lisp
3010
3011
3012 @node Q3.2.6
3013 @unnumberedsec Q3.2.6: Can I have pixmap backgrounds in SXEmacs?
3014 @c New
3015 @email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes:
3016
3017 @quotation
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.,
3020
3021
3022 @example
3023   Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
3024 @end example
3025
3026
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.,
3030
3031 @lisp
3032   (set-face-background-pixmap 'default "/path/to/image.xpm")
3033   (set-face-background-pixmap 'bold    "/path/to/another_image.xpm")
3034 @end lisp
3035
3036 and so on.  You can also do this interactively via @kbd{M-x edit-faces}.
3037
3038 @end quotation
3039
3040
3041 @node Q3.2.7
3042 @unnumberedsec Q3.2.7: How do I display non-ASCII characters?
3043 @c New
3044
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}.
3052
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:
3058
3059 @quotation
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.
3063 @end quotation
3064
3065 For the related problem of @emph{inputting} non-ASCII characters in a
3066 non-Mule SXEmacs, @xref{Q3.5.7}.
3067
3068
3069 @node Q3.3.1
3070 @unnumberedsec 3.3: The Modeline
3071 @unnumberedsec Q3.3.1: How can I make the modeline go away?
3072
3073 @lisp
3074 (set-specifier has-modeline-p nil)
3075 @end lisp
3076
3077
3078 @node Q3.3.2
3079 @unnumberedsec Q3.3.2: How do you have SXEmacs display the line number in the modeline?
3080
3081 Add the following line to your @file{init.el} file to
3082 display the line number:
3083
3084 @lisp
3085 (line-number-mode 1)
3086 @end lisp
3087
3088 Use the following to display the column number:
3089
3090 @lisp
3091 (column-number-mode 1)
3092 @end lisp
3093
3094 Or select from the @code{Options} menu
3095 @iftex
3096 @*
3097 @end iftex
3098 @code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode}
3099 and/or
3100 @iftex
3101 @*
3102 @end iftex
3103 @code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode}
3104
3105 Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}.
3106
3107
3108 @node Q3.3.3
3109 @unnumberedsec Q3.3.3: How do I get SXEmacs to put the time of day on the modeline?
3110
3111 Add the following line to your @file{init.el}/@file{.emacs} file to
3112 display the time:
3113
3114 @lisp
3115 (display-time)
3116 @end lisp
3117
3118 See @code{Customize} from the @code{Options} menu for customisation.
3119
3120
3121 @node Q3.3.4
3122 @unnumberedsec Q3.3.4: How do I turn off current chapter from AUC TeX modeline?
3123
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?
3126
3127 It's not AUC TeX, it comes from @code{func-menu} in @file{func-menu.el}.
3128
3129 @c Add this code to your @file{init.el}/@file{.emacs} to turn it off:
3130 @c
3131 @c @lisp
3132 @c (setq fume-display-in-modeline-p nil)
3133 @c @end lisp
3134 @c
3135 @c Or just add a hook to @code{TeX-mode-hook} to turn it off only for TeX
3136 @c mode:
3137 @c
3138 @c @lisp
3139 @c (add-hook 'TeX-mode-hook
3140 @c           '(lambda () (setq fume-display-in-modeline-p nil)))
3141 @c @end lisp
3142 @c
3143 @email{dhughes@@origin-at.co.uk, David Hughes} writes:
3144
3145 @quotation
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.
3150
3151 @lisp
3152 (setq-default fume-auto-rescan-buffer-p nil)
3153 @end lisp
3154 @end quotation
3155
3156
3157 @node Q3.3.5
3158 @unnumberedsec Q3.3.5: How can one change the modeline color based on the mode used?
3159
3160 You can use something like the following:
3161
3162 @lisp
3163 (add-hook 'lisp-mode-hook
3164           (lambda ()
3165             (set-face-background 'modeline "red" (current-buffer))))
3166 @end lisp
3167
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.
3173
3174 Notes:
3175
3176 @itemize @bullet
3177
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.
3183
3184 @item
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
3187 hook.
3188
3189 @item
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
3193 current mode.
3194 @end itemize
3195
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.
3199
3200
3201 @node Q3.4.1
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?
3204
3205 Use the command @kbd{M-x make-frame-on-display}.  This command is also
3206 on the File menu in the menubar.
3207
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.
3211
3212
3213 @node Q3.4.2
3214 @unnumberedsec Q3.4.2: Can I really connect to a running SXEmacs after calling up over a modem?  How?
3215
3216 Yes.  Use @code{gnuclient -nw}.
3217
3218 Also see @ref{Q5.0.12}.
3219
3220
3221 @node Q3.5.1
3222 @unnumberedsec 3.5: The Keyboard
3223 @unnumberedsec Q3.5.1: How can I bind complex functions (or macros) to keys?
3224
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
3227 with:
3228
3229 @lisp
3230 (define-key global-map [f18] 'x-insert-selection)
3231 @end lisp
3232
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:
3239
3240 @lisp
3241 (global-set-key [f18]
3242   (lambda () (interactive) (x-insert-selection t nil)))
3243 @end lisp
3244
3245 This binds the f18 key to a @dfn{generic} functional object.  The
3246 interactive spec is required because only interactive functions can be
3247 bound to keys.
3248
3249 For the FAQ example you could use:
3250
3251 @lisp
3252 (global-set-key [(control ?.)]
3253   (lambda () (interactive) (scroll-up 1)))
3254 (global-set-key [(control ?;)]
3255   (lambda () (interactive) (scroll-up -1)))
3256 @end lisp
3257
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}).
3261
3262
3263 @node Q3.5.2
3264 @unnumberedsec Q3.5.2: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
3265
3266 Add the following line to your @file{init.el} file:
3267
3268 @lisp
3269 (setq next-line-add-newlines nil)
3270 @end lisp
3271
3272 This has been the default setting in SXEmacs for some time.
3273
3274
3275 @node Q3.5.3
3276 @unnumberedsec Q3.5.3: How do I bind C-. and C-; to scroll one line up and down?
3277
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}:
3280
3281 @lisp
3282 (defun scroll-up-one-line ()
3283   (interactive)
3284   (scroll-up 1))
3285
3286 (defun scroll-down-one-line ()
3287   (interactive)
3288   (scroll-down 1))
3289
3290 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
3291 (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
3292 @end lisp
3293
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).
3297
3298
3299 @node Q3.5.4
3300 @unnumberedsec Q3.5.4: Globally binding @kbd{Delete}?
3301
3302 I cannot manage to globally bind my @kbd{Delete} key to something other
3303 than the default.  How does one do this?
3304
3305 Answer: The problem is that many modes explicitly bind @kbd{Delete}.  To
3306 get around this, try the following:
3307
3308 @lisp
3309 (defun foo ()
3310   (interactive)
3311   (message "You hit DELETE"))
3312
3313 (define-key key-translation-map 'delete 'redirected-delete)
3314 (global-set-key 'redirected-delete 'foo)
3315 @end lisp
3316
3317 Also see @ref{Q3.5.10}.
3318
3319
3320 @node Q3.5.5
3321 @unnumberedsec Q3.5.5: Scrolling one line at a time.
3322
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.
3325
3326 Try this:
3327
3328 @lisp
3329 (defun scroll-one-line-up (&optional arg)
3330   "Scroll the selected window up (forward in the text) one line (or N lines)."
3331   (interactive "p")
3332   (scroll-up (or arg 1)))
3333
3334 (defun scroll-one-line-down (&optional arg)
3335   "Scroll the selected window down (backward in the text) one line (or N)."
3336   (interactive "p")
3337   (scroll-down (or arg 1)))
3338
3339 (global-set-key [up]   'scroll-one-line-up)
3340 (global-set-key [down] 'scroll-one-line-down)
3341 @end lisp
3342
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}):
3345
3346 @lisp
3347 (setq scroll-step 1)
3348 @end lisp
3349
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}}.
3354
3355
3356 @node Q3.5.6
3357 @unnumberedsec Q3.5.6: How to map @kbd{Help} key alone on Sun type4 keyboard?
3358
3359 The following works in GNU Emacs 19:
3360
3361 @lisp
3362 (global-set-key [help] 'help-command);; Help
3363 @end lisp
3364
3365 The following works in SXEmacs with the addition of shift:
3366
3367 @lisp
3368 (global-set-key [(shift help)] 'help-command);; Help
3369 @end lisp
3370
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}.
3374
3375 OLWM grabs the @kbd{help} key, and retransmits it to the appropriate
3376 client using
3377 @iftex
3378 @*
3379 @end iftex
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:}.
3385
3386
3387 @node Q3.5.7
3388 @unnumberedsec Q3.5.7: How can you type in special characters in SXEmacs?
3389 @c Changed
3390 One way is to use the package @code{x-compose}.  Then you can use
3391 sequences like @kbd{Compose " a} to get ä, etc.
3392
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.
3395
3396 @email{glynn@@sensei.co.uk, Glynn Clements} writes:
3397
3398 @quotation
3399 It depends upon your X server.
3400
3401 Generally, the simplest way is to define a key as Multi_key with
3402 xmodmap, e.g.
3403 @c hey, show some respect, willya -- there's xkeycaps, isn't there? --
3404 @c chr ;)
3405 @example
3406         xmodmap -e 'keycode 0xff20 = Multi_key'
3407 @end example
3408
3409 You will need to pick an appropriate keycode. Use xev to find out the
3410 keycodes for each key.
3411
3412 [NB: On a `Windows' keyboard, recent versions of XFree86 automatically
3413 define the right `Windows' key as Multi_key'.]
3414
3415 Once you have Multi_key defined, you can use e.g.
3416 @example
3417         Multi a '       => á
3418         Multi e "       => ë
3419         Multi c ,       => ç
3420 @end example
3421
3422 etc.
3423
3424 Also, recent versions of XFree86 define various AltGr-<key>
3425 combinations as dead keys, i.e.
3426 @example
3427         AltGr [         => dead_diaeresis
3428         AltGr ]         => dead_tilde
3429         AltGr ;         => dead_acute
3430 @end example
3431 etc.
3432
3433 Running @samp{xmodmap -pk} will list all of the defined keysyms.
3434 @end quotation
3435
3436 For the related problem of @emph{displaying} non-ASCII characters in a
3437 non-Mule SXEmacs, @xref{Q3.2.7}.
3438
3439
3440 @node Q3.5.8
3441 @unnumberedsec Q3.5.8: [This question intentionally left blank]
3442
3443 Obsolete question, left blank to avoid renumbering.
3444
3445
3446 @node Q3.5.9
3447 @unnumberedsec Q3.5.9: How do I make the Delete key delete forward?
3448
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}}.
3454
3455 Also see @ref{Q3.5.4}.
3456
3457
3458 @node Q3.5.10
3459 @unnumberedsec Q3.5.10: Can I turn on @dfn{sticky} modifier keys?
3460
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.
3465
3466 @email{ben@@xemacs.org, Ben Wing} writes:
3467
3468 @quotation
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.
3471 @end quotation
3472
3473 @node Q3.5.11
3474 @unnumberedsec Q3.5.11: How do I map the arrow keys?
3475 @c New
3476 Say you want to map @kbd{C-@key{right}} to forward-word:
3477
3478 @email{sds@@usa.net, Sam Steingold} writes:
3479
3480 @quotation
3481 @lisp
3482 ; both (S)XEmacs and Emacs
3483 (define-key global-map [(control right)] 'forward-word)
3484 @end lisp
3485 or
3486 @lisp
3487 ; Emacs only
3488 (define-key global-map [C-right] 'forward-word)
3489 @end lisp
3490 or
3491 @lisp
3492 ; ver > 20, both
3493 (define-key global-map (kbd "C-<right>") 'forward-word)
3494 @end lisp
3495 @end quotation
3496
3497
3498
3499 @node Q3.6.1
3500 @unnumberedsec 3.6: The Cursor
3501 @unnumberedsec Q3.6.1: Is there a way to make the bar cursor thicker?
3502
3503 I'd like to have the bar cursor a little thicker, as I tend to "lose" it
3504 often.
3505
3506 For a 1 pixel bar cursor, use:
3507
3508 @lisp
3509 (setq bar-cursor t)
3510 @end lisp
3511
3512 For a 2 pixel bar cursor, use:
3513
3514 @lisp
3515 (setq bar-cursor 'anything-else)
3516 @end lisp
3517
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}}.
3522
3523 You can use a color to make it stand out better:
3524
3525 @example
3526 Emacs*cursorColor:      Red
3527 @end example
3528
3529
3530 @node Q3.6.2
3531 @unnumberedsec Q3.6.2: Is there a way to get back the block cursor?
3532
3533 @lisp
3534 (setq bar-cursor nil)
3535 @end lisp
3536
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}}.
3541
3542
3543 @node Q3.6.3
3544 @unnumberedsec Q3.6.3: Can I make the cursor blink?
3545
3546 Yes, like this:
3547
3548 @lisp
3549 (blink-cursor-mode)
3550 @end lisp
3551
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.
3555
3556
3557 @node Q3.7.1
3558 @unnumberedsec 3.7: The Mouse and Highlighting
3559 @unnumberedsec Q3.7.1: How can I turn off Mouse pasting?
3560
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?
3563
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}.
3568
3569 @lisp
3570 (defun mouse-set-point-and-select (event)
3571   "Sets the point at the mouse location, then marks following form"
3572   (interactive "@@e")
3573   (mouse-set-point event)
3574   (mark-sexp 1))
3575 (define-key global-map [button2] 'mouse-set-point-and-select)
3576 @end lisp
3577
3578
3579 @node Q3.7.2
3580 @unnumberedsec Q3.7.2: How do I set control/meta/etc modifiers on mouse buttons?
3581
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
3586 file.
3587
3588 [Inside a function that gets called by the lisp-mode-hook and
3589 ilisp-mode-hook]
3590
3591 @lisp
3592 (local-set-key [(meta button1)] 'edit-definitions-lisp)
3593 @end lisp
3594
3595
3596 @node Q3.7.3
3597 @unnumberedsec Q3.7.3: Clicking the left button does not do anything in buffer list.
3598
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.
3602
3603 Use the middle mouse button.
3604
3605
3606 @node Q3.7.4
3607 @unnumberedsec Q3.7.4: How can I get a list of buffers when I hit mouse button 3?
3608
3609 The following code will replace the default popup on button3:
3610
3611 @lisp
3612 (global-set-key [button3] 'popup-buffer-menu)
3613 @end lisp
3614
3615
3616 @node Q3.7.5
3617 @unnumberedsec Q3.7.5: Why does cut-and-paste not work between SXEmacs and a cmdtool?
3618
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..
3622
3623
3624 @node Q3.7.6
3625 @unnumberedsec Q3.7.6: How I can set SXEmacs up so that it pastes where the text cursor is?
3626
3627 By default SXEmacs pastes X selections where the mouse pointer is.  How
3628 do I disable this?
3629
3630 Examine the function @code{mouse-yank}, by typing @kbd{C-h f mouse-yank
3631 @key{RET}}.
3632
3633 To get SXEmacs to paste at the text cursor, add this your @file{init.el}:
3634
3635 @lisp
3636 (setq mouse-yank-at-point t)
3637 @end lisp
3638
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}}.
3643
3644
3645 @node Q3.7.7
3646 @unnumberedsec Q3.7.7: How do I select a rectangular region?
3647
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.
3651
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.
3655
3656 You can also do the following to change default behavior to sweep out
3657 rectangular regions:
3658
3659 @lisp
3660 (setq mouse-track-rectangle-p t)
3661 @end lisp
3662
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}}.
3667
3668
3669 @example
3670  mouse-track-do-rectangle: (event)
3671    -- an interactive compiled Lisp function.
3672  Like `mouse-track' but selects rectangles instead of regions.
3673 @end example
3674
3675
3676 @node Q3.7.8
3677 @unnumberedsec Q3.7.8: Why does @kbd{M-w} take so long?
3678
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.
3683
3684
3685 @node Q3.8.1
3686 @unnumberedsec 3.8: The Menubar and Toolbar
3687 @unnumberedsec Q3.8.1: How do I get rid of the menu (or menubar)?
3688
3689 @c If you are running XEmacs 19.13 or earlier, add this command to your
3690 @c @file{init.el}/@file{.emacs}.
3691 @c
3692 @c @lisp
3693 @c (set-menubar nil)
3694 @c @end lisp
3695 @c
3696 @c Starting with XEmacs 19.14 the preferred method is:
3697 @c
3698 @lisp
3699 (set-specifier menubar-visible-p nil)
3700 @end lisp
3701
3702
3703 @node Q3.8.2
3704 @unnumberedsec Q3.8.2: Can I customise the basic menubar?
3705
3706 For an extensive menubar, add this line to your @file{init.el}:
3707
3708 @lisp
3709 (load "big-menubar")
3710 @end lisp
3711
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
3714 package. 
3715
3716
3717 @node Q3.8.3
3718 @unnumberedsec Q3.8.3: How do I control how many buffers are listed in the menu @code{Buffers List}?
3719
3720 Add the following to your @file{init.el} (suit to fit):
3721
3722 @lisp
3723 (setq buffers-menu-max-size 20)
3724 @end lisp
3725
3726 For no limit, use an argument of @samp{nil}.
3727
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}}.
3732
3733
3734 @node Q3.8.4
3735 @unnumberedsec Q3.8.4: Resources like @code{Emacs*menubar*font} are not working?
3736
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.
3739
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:
3743
3744 @example
3745 Emacs*menubar*fontList: FONT
3746 @end example
3747
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
3753
3754 @example
3755 *fontList: FONT
3756 @end example
3757
3758 will override
3759
3760 @example
3761 Emacs*menubar*font: FONT
3762 @end example
3763
3764 even though the latter is more specific.
3765
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.
3770 Example:
3771
3772 @example
3773 *fontSet: FONT
3774 @end example
3775
3776
3777 @node Q3.8.5
3778 @unnumberedsec Q3.8.5: How can I bind a key to a function to toggle the toolbar?
3779
3780 Try something like:
3781
3782 @lisp
3783 (defun my-toggle-toolbar ()
3784   (interactive)
3785   (set-specifier default-toolbar-visible-p
3786                  (not (specifier-instance default-toolbar-visible-p))))
3787 (global-set-key "\C-xT" 'my-toggle-toolbar)
3788 @end lisp
3789
3790
3791 @node Q3.9.1
3792 @unnumberedsec 3.9: Scrollbars
3793 @unnumberedsec Q3.9.1: How can I disable the scrollbar?
3794
3795 To disable them for all frames, add the following line to
3796 your @file{.Xresources}:
3797
3798 @example
3799 Emacs.scrollBarWidth:  0
3800 @end example
3801
3802 Or select from the @code{Options} menu @code{Frame Appearance->Scrollbars}.
3803 Remember to save options.
3804
3805 To turn the scrollbar off on a per-frame basis, use the following
3806 function:
3807
3808 @lisp
3809 (set-specifier scrollbar-width 0 (selected-frame))
3810 @end lisp
3811
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:
3815
3816 @lisp
3817 (set-specifier scrollbar-width 0 (current-buffer))
3818 @end lisp
3819
3820
3821 @node Q3.9.2
3822 @unnumberedsec Q3.9.2: How can one use resources to change scrollbar colors?
3823
3824 Here's a recap of how to use resources to change your scrollbar colors:
3825
3826 @example
3827 ! Motif scrollbars
3828
3829 Emacs*XmScrollBar.Background: skyblue
3830 Emacs*XmScrollBar.troughColor: lightgray
3831
3832 ! Athena scrollbars
3833
3834 Emacs*Scrollbar.Foreground: skyblue
3835 Emacs*Scrollbar.Background: lightgray
3836 @end example
3837
3838 Note the capitalisation of @code{Scrollbar} for the Athena widget.
3839
3840
3841 @node Q3.9.3
3842 @unnumberedsec Q3.9.3: Moving the scrollbar can move the point; can I disable this?
3843
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?
3847
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
3851 hand corner.
3852
3853 This cannot be changed.
3854
3855
3856 @node Q3.9.4
3857 @unnumberedsec Q3.9.4: How can I turn off automatic horizontal scrolling in specific modes?
3858
3859 Do @code{(setq truncate-lines t)} in the mode-hooks for any modes
3860 in which you want lines truncated.
3861
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
3865 do
3866
3867 @lisp
3868 (set-specifier scrollbar-height 0)
3869 @end lisp
3870
3871 then horizontal scrollbars will not appear in truncated buffers unless
3872 the package specifically asked for them.
3873
3874
3875 @node Q3.10.1
3876 @unnumberedsec 3.10: Text Selections
3877 @unnumberedsec Q3.10.1: How can I turn off or change highlighted selections?
3878
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:
3883
3884 @lisp
3885 (setq zmacs-regions nil)
3886 @end lisp
3887
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}}.
3892
3893 To change the face for selection, look at @code{Options->Customize} on
3894 the menubar.
3895
3896
3897 @node Q3.10.2
3898 @unnumberedsec Q3.10.2: How do I get that typing on an active region removes it?
3899
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.
3902
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.
3907
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}:
3911
3912 @lisp
3913 (cond
3914  ((fboundp 'turn-on-pending-delete)
3915   (turn-on-pending-delete))
3916  ((fboundp 'pending-delete-on)
3917   (pending-delete-on t)))
3918 @end lisp
3919
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
3922 more portable.
3923
3924
3925 @node Q3.10.3
3926 @unnumberedsec Q3.10.3: Can I turn off the highlight during isearch?
3927
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?
3930
3931 Put the following in your @file{init.el}:
3932
3933 @lisp
3934 (setq isearch-highlight nil)
3935 @end lisp
3936
3937 You can also change this with Customize. Type @kbd{M-x
3938 customize-variable @key{RET} isearch-highlight @key{RET}}.
3939
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.
3943
3944
3945 @node Q3.10.4
3946 @unnumberedsec Q3.10.4: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)?
3947
3948 Put this in your @file{init.el}:
3949
3950 @lisp
3951 (setq zmacs-regions nil)
3952 @end lisp
3953
3954 @strong{Warning: This command turns off all region highlighting.}
3955
3956 Also see @ref{Q3.10.1}.
3957
3958
3959 @node Q3.10.5
3960 @unnumberedsec Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
3961
3962 Does not apply anymore.
3963
3964
3965 @node Q3.10.6
3966 @unnumberedsec Q3.10.6: Why is killing so slow?
3967
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:
3971
3972 @table @strong
3973 @item Primary selection
3974 a transient selection that gets replaced every time a new selection is made
3975
3976 @item Secondary selection
3977 for "exchanging" with the primary selection
3978
3979 @item Cut buffers
3980 a clipboard internal to the X server (deprecated)
3981
3982 @item Clipboard selection
3983 a selection with a notification protocol that allows a separate app to
3984 manage the clipboard
3985 @end table
3986
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.
3991
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.
3997
3998 So the slowdown occurs because SXEmacs now engages in the clipboard
3999 notification protocol on @emph{every} kill.  This is especially slow on
4000 Motif.
4001
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.
4005
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}.
4015
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.)
4024
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.
4028
4029 Thanks to Jeff Mincy and Glynn Clements for corrections.
4030
4031
4032 @node Subsystems, Miscellaneous, Customisation, Top
4033 @unnumbered 4 Major Subsystems
4034
4035 This is part 4 of the SXEmacs Frequently Asked Questions list.  This
4036 section is devoted to major SXEmacs subsystems.
4037
4038 @menu
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.
4053
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?
4058
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?
4065
4066 Other Mail & News:
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)?
4072
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?
4076
4077 Energize:
4078 * Q4.5.1::      What is/was Energize?
4079
4080 Infodock:
4081 * Q4.6.1::      What is Infodock?
4082
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?
4091 @end menu
4092
4093 @node Q4.0.1
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?
4096
4097 Use @code{vm-spool-files}, like this for example:
4098
4099 @lisp
4100 (setq vm-spool-files '("/var/spool/mail/wing"
4101                        "netcom23.netcom.com:110:pass:wing:MYPASS"))
4102 @end lisp
4103
4104 Of course substitute your actual password for MYPASS.
4105
4106
4107 @node Q4.0.2
4108 @unnumberedsec Q4.0.2: How do I get VM to filter mail for me?
4109
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/}.
4114
4115 Also see the Mail Filtering FAQ at:
4116 @iftex
4117 @*
4118 @end iftex
4119 @uref{ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq}.
4120 @c Link above,
4121 @c <URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html>
4122 @c was dead.
4123
4124
4125 @node Q4.0.3
4126 @unnumberedsec Q4.0.3: How can I get VM to automatically check for new mail?
4127
4128 @email{turner@@lanl.gov, John Turner} writes:
4129
4130 @quotation
4131 Use the following:
4132
4133 @lisp
4134 (setq vm-auto-get-new-mail 60)
4135 @end lisp
4136 @end quotation
4137
4138
4139 @node Q4.0.4
4140 @unnumberedsec Q4.0.4: [This question intentionally left blank]
4141
4142 Obsolete question, left blank to avoid renumbering.
4143
4144
4145 @node Q4.0.5
4146 @unnumberedsec Q4.0.5: How do I get my outgoing mail archived?
4147
4148 @lisp
4149 (setq mail-archive-file-name "~/outbox")
4150 @end lisp
4151
4152
4153 @node Q4.0.6
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"?
4155
4156 Set @code{vm-reply-ignored-addresses} to a list, like
4157
4158 @lisp
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"))
4162 @end lisp
4163
4164 Note that each string is a regular expression.
4165
4166
4167 @node Q4.0.7
4168 @unnumberedsec Q4.0.7: Is there a mailing list or FAQ for VM?
4169
4170 A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}.
4171
4172 VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
4173
4174
4175 @node Q4.0.8
4176 @unnumberedsec Q4.0.8: Remote mail reading with VM.
4177
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?
4183
4184 @email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes:
4185
4186 @quotation
4187 There are several ways to do this.
4188
4189 @enumerate
4190 @item
4191 Set your display to your home machine and run dxpc or one of the other X
4192 compressors.
4193
4194 @item
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
4197 do the pop get's.
4198
4199 @item
4200 Run a POP server on your desktop machine as well and do a sort of two
4201 tiered POP get.
4202 @end enumerate
4203 @end quotation
4204
4205         @email{wmperry@@monolith.spry.com, William Perry} adds:
4206
4207 @quotation
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.
4211 @end quotation
4212
4213
4214 @node Q4.0.9
4215 @unnumberedsec Q4.0.9: rmail or VM gets an error incorporating new mail.
4216
4217 Quoting the SXEmacs PROBLEMS file:
4218
4219 @quotation
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}.
4223
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
4229 it includes.
4230
4231 @strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
4232 SYSTEM, YOU CAN LOSE MAIL!}
4233
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
4238 root):
4239
4240 @example
4241 chgrp mail movemail
4242 chmod 2755 movemail
4243 @end example
4244
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.
4251 @end quotation
4252
4253
4254 @node Q4.0.10
4255 @unnumberedsec Q4.0.10: How do I make VM stay in a single frame?
4256
4257 John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes:
4258
4259 @quotation
4260 @lisp
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)
4266 @end lisp
4267 @end quotation
4268
4269
4270 @node Q4.0.11
4271 @unnumberedsec Q4.0.11: How do I make VM or mh-e display graphical smilies?
4272 @c Changed June
4273 For mh-e use the following:
4274
4275 @lisp
4276 (add-hook 'mh-show-mode-hook '(lambda ()
4277                                 (smiley-region (point-min)
4278                                                (point-max))))
4279 @end lisp
4280
4281 @email{bill@@carpenter.ORG, WJCarpenter} writes:
4282 For VM use the following:
4283 @lisp
4284        (autoload 'smiley-region "smiley" nil t)
4285        (add-hook 'vm-select-message-hook
4286                  '(lambda ()
4287                     (smiley-region (point-min)
4288                                    (point-max))))
4289 @end lisp
4290
4291 For tm use the following:
4292 @lisp
4293 (autoload 'smiley-buffer "smiley" nil t)
4294 (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
4295 @end lisp
4296
4297
4298 @node Q4.0.12
4299 @unnumberedsec Q4.0.12: Customisation of VM not covered in the manual, or here.
4300
4301 @email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes:
4302
4303 @quotation
4304 The meta-answer is to look into the file @file{vm-vars.el}, in the vm
4305 directory of the lisp library.
4306
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.
4310
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
4314 instructions.
4315
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.
4319 @end quotation
4320
4321
4322 @node Q4.1.1
4323 @unnumberedsec 4.1: Web browsing with W3
4324 @unnumberedsec Q4.1.1: What is W3?
4325
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...
4328
4329 It has a home web page at
4330 @uref{http://www.cs.indiana.edu/elisp/w3/docs.html}.
4331
4332
4333 @node Q4.1.2
4334 @unnumberedsec Q4.1.2: How do I run W3 from behind a firewall?
4335
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".
4338
4339
4340 @node Q4.1.3
4341 @unnumberedsec Q4.1.3: Is it true that W3 supports style sheets and tables?
4342
4343 Yes, and much more.  W3, as distributed with the latest SXEmacs is a
4344 full-featured web browser.
4345
4346
4347 @node Q4.2.1
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!
4350
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:
4354 @c 
4355 @c @example
4356 @c @uref{http://www.ccs.neu.edu/software/contrib/gnus/}
4357 @c @end example
4358
4359 See the Gnus home page
4360 @example
4361 @uref{http://www.gnus.org/}
4362 @end example
4363
4364
4365 @node Q4.2.2
4366 @unnumberedsec Q4.2.2: This question intentionally left blank.
4367
4368 Obsolete question, left blank to avoid renumbering.
4369
4370
4371 @node Q4.2.3
4372 @unnumberedsec Q4.2.3: How do I make Gnus stay within a single frame?
4373
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:
4377
4378 @lisp
4379 (defun toolbar-news ()
4380   (gnus))
4381 @end lisp
4382
4383 It will redefine the callback function of the icon to just call
4384 @code{gnus}, without all the fancy frame stuff.
4385
4386
4387 @node Q4.2.4
4388 @unnumberedsec Q4.2.4: How do I customize the From: line?
4389
4390 How do I change the @code{From:} line?  I have set gnus-user-from-line
4391 to
4392 @example
4393 Gail Gurman <gail.gurman@@sybase.com>
4394 @end example
4395 @noindent , but SXEmacs Gnus doesn't use
4396 it. Instead it uses
4397 @example
4398 Gail Mara Gurman @email{gailg@@deall}
4399 @end example
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?
4403
4404 @email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes:
4405
4406 @quotation
4407 Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or
4408 @code{mail-host-address} to @samp{sybase.com}.
4409 @end quotation
4410
4411
4412 @node Q4.3.1
4413 @unnumberedsec 4.3: Other Mail & News
4414 @unnumberedsec Q4.3.1: How can I read and/or compose MIME messages?
4415 @c Changed June
4416
4417 VM supports MIME natively.
4418
4419 You probably want to use the Tools for MIME (tm).  @xref{Q4.3.2}, for
4420 details.
4421
4422 @email{trey@@cs.berkeley.edu, Trey Jackson} has an Emacs & MIME web page at
4423 @iftex
4424 @*
4425 @end iftex
4426 @uref{http://bmrc.berkeley.edu/~trey/emacs/mime.html}.
4427
4428
4429 Another possibility is RMIME.  You may find RMIME at
4430 @iftex
4431 @*
4432 @end iftex
4433 @uref{http://www.cinti.net/~rmoody/rmime/index.html}.
4434
4435
4436 @node Q4.3.2
4437 @unnumberedsec Q4.3.2: What is TM and where do I get it?
4438
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
4443 SXEmacs buffer.
4444
4445 TM was written by @email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} and
4446 @email{shuhei-k@@jaist.ac.jp, KOBAYASHI Shuhei}.
4447
4448 It is based on the work of @email{umerin@@mse.kyutech.ac.jp, UMEDA
4449 Masanobu}, the original writer of GNUS.
4450
4451 The following information is from the @file{README}:
4452
4453 @dfn{tm} is a MIME package for GNU Emacs.
4454 tm has following functions:
4455
4456 @itemize @bullet
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.
4461 @end itemize
4462
4463 tm is available from following anonymous ftp sites:
4464 @itemize @bullet
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).
4473 @end itemize
4474
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,
4477 trivial to use.
4478
4479 @email{youngs@@sxemacs.org, Steve Youngs} writes:
4480
4481 @quotation
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
4484 in these packages.
4485 @end quotation
4486
4487
4488 @node Q4.3.3
4489 @unnumberedsec Q4.3.3: Why isn't this @code{movemail} program working?
4490
4491 Ben Wing @email{ben@@xemacs.org} writes:
4492
4493 @quotation
4494 It wasn't chown'ed/chmod'd correctly.
4495 @end quotation
4496
4497
4498 @node Q4.3.4
4499 @unnumberedsec Q4.3.4: Movemail is also distributed by Netscape?  Can that cause problems?
4500
4501 @email{steve@@xemacs.org, Steve Baur} writes:
4502
4503 @quotation
4504 Yes.  Always use the movemail installed with your SXEmacs.  Failure to do
4505 so can result in lost mail.
4506 @end quotation
4507
4508 Please refer to @email{jwz@@jwz.org, Jamie Zawinski's} notes at
4509 @iftex
4510 @*
4511 @end iftex
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
4515 SXEmacs.
4516
4517
4518 @node Q4.3.5
4519 @unnumberedsec Q4.3.5: Where do I find pstogif (required by tm)?
4520
4521 pstogif is part of the latex2html package.
4522
4523 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
4524
4525 latex2html is best found at the CTAN hosts and their mirrors
4526 in
4527 @iftex
4528 @*
4529 @end iftex
4530 @file{tex-archive/support/latex2html}.
4531
4532 CTAN hosts are:
4533
4534 @itemize @bullet
4535 @item @uref{ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/}.
4536 @item @uref{ftp://ftp.dante.de/tex-archive/support/latex2html/}.
4537 @end itemize
4538
4539 There is a good mirror at ftp.cdrom.com;
4540 @iftex
4541 @*
4542 @end iftex
4543 @uref{ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/}.
4544
4545
4546 @node Q4.4.1
4547 @unnumberedsec 4.4: Sparcworks, EOS, and WorkShop
4548 @unnumberedsec Q4.4.1: What is SPARCworks, EOS, and WorkShop?
4549
4550 @email{turner@@lanl.gov, John Turner} writes:
4551
4552 @quotation
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.
4556 @end quotation
4557
4558 See @uref{http://www.sun.com/software/Developer-products/}
4559 for more info.
4560
4561 EOS stands for "Era on SPARCworks", but I don't know what Era stands
4562 for.
4563
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
4568 time.
4569
4570 @email{cthomp@@xemacs.org, Chuck Thompson} writes:
4571
4572 @quotation
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.
4576 @end quotation
4577
4578 @email{martin@@xemacs.org, Martin Buchholz} writes:
4579
4580 @quotation
4581 EOS is being replaced with a new graphical development environment
4582 called Sun WorkShop.  For more details, check out
4583 @iftex
4584 @*
4585 @end iftex
4586 @uref{http://www.sun.com/software/Products/Developer-products}.
4587 @end quotation
4588
4589
4590 @node Q4.4.2
4591 @unnumberedsec Q4.4.2: How do I start the Sun Workshop support in SXEmacs?
4592
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):
4596
4597 @lisp
4598 (when (featurep 'tooltalk)
4599   (load "tooltalk-macros")
4600   (load "tooltalk-util")
4601   (load "tooltalk-init"))
4602 (when (featurep 'sparcworks)
4603   (load "sunpro-init")
4604   (load "ring")
4605   (load "comint")
4606   (load "annotations")
4607   (sunpro-startup))
4608 @end lisp
4609
4610
4611 @node Q4.5.1
4612 @unnumberedsec 4.5: Energize
4613 @unnumberedsec Q4.5.1: What is/was Energize?
4614
4615 @email{gray@@meteor.harlequin.com, David N Gray} writes:
4616 @quotation
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
4624 did so.)
4625 @end quotation
4626
4627
4628 @node Q4.6.1
4629 @unnumberedsec 4.6: Infodock
4630 @unnumberedsec Q4.6.1: What is Infodock?
4631
4632 @uref{http://sourceforge.net/projects/infodock/, InfoDock} is an
4633 integrated productivity toolset, mainly aimed at technical people,
4634 hosted at SourceForge.
4635
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
4640 Foundation.
4641
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.
4649
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
4654 are ready to run.
4655
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
4659 Emacs Manual.
4660
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.
4664
4665 @noindent
4666 Four types of menubars are provided:
4667 @enumerate
4668 @item
4669 An extensive menubar providing access to global InfoDock commands.
4670 @item
4671 Mode-specific menubars tailored to the current major mode.
4672 @item
4673 A simple menubar for basic editing to help novices get started with InfoDock.
4674 @item
4675 The standard SXEmacs menubar.
4676 @end enumerate
4677
4678 Most modes also include mode-specific popup menus.  Additionally, region and
4679 rectangle popup menus are included.
4680
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.
4685
4686 The @samp{OO-Browser}, a multi-language object-oriented code browser, is a
4687 standard part of InfoDock.
4688
4689 InfoDock saves a more extensive set of user options than other Emacs
4690 versions.
4691
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.
4696
4697 Your working set of buffers is automatically saved and restored (if you
4698 answer yes to a prompt) between InfoDock sessions.
4699
4700 Refined color choices for code highlighting are provided for both dark and
4701 light background display frames.
4702
4703 The @kbd{C-z} key prefix performs frame-based commands which parallel the
4704 @kbd{C-x} key prefix for window-based commands.
4705
4706 The Smart Menu system is included for producing command menus on dumb
4707 terminals.
4708
4709 Lisp libraries are better categorized according to function.
4710
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.
4714
4715 InfoDock questions, answers and discussion should go to the mail list
4716 @iftex
4717 @*
4718 @end iftex
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
4722 requests.
4723
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>.
4727
4728 @example
4729    cd <DIST-DIR>
4730 @end example
4731
4732 Ftp to ftp.xemacs.org  (Internet Host ID = 128.174.252.16):
4733
4734 @example
4735    prompt> ftp ftp.xemacs.org
4736 @end example
4737
4738 Login as @samp{anonymous} with your own <user-id>@@<site-name> as a password.
4739
4740 @example
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.
4745 @end example
4746
4747 Move to the location of the InfoDock archives:
4748
4749 @example
4750    ftp> cd pub/infodock
4751 @end example
4752
4753 Set your transfer mode to binary:
4754
4755 @example
4756    ftp> bin
4757    200 Type set to I.
4758 @end example
4759
4760 Turn off prompting:
4761
4762 @example
4763    ftp> prompt
4764    Interactive mode off.
4765 @end example
4766
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:
4770
4771 @example
4772    ftp> mget ID-INSTALL
4773    ftp> mget id-*
4774 @end example
4775
4776 Close the FTP connection:
4777
4778 @example
4779    ftp> quit
4780    221 Goodbye.
4781 @end example
4782
4783 Read the @file{ID-INSTALL} file which you just retrieved for
4784 step-by-step installation instructions.
4785
4786
4787 @node Q4.7.1
4788 @unnumberedsec 4.7: Other Unbundled Packages
4789 @unnumberedsec Q4.7.1: What is AUC TeX?  Where do you get it?
4790
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.
4795
4796 The most recent version is always available by ftp at
4797 @iftex
4798 @*
4799 @end iftex
4800 @uref{ftp://sunsite.dk/packages/auctex/auctex.tar.gz}.
4801
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}.
4804
4805 WWW users may want to check out the AUC TeX page at
4806 @iftex
4807 @*
4808 @end iftex
4809 @uref{http://sunsite.dk/auctex/}.
4810
4811
4812 @node Q4.7.2
4813 @unnumberedsec Q4.7.2: Are there any Emacs Lisp Spreadsheets?
4814
4815 Yes.  Check out @dfn{dismal} (which stands for Dis' Mode Ain't Lotus) at
4816 @iftex
4817 @*
4818 @end iftex
4819 @uref{ftp://cs.nyu.edu/pub/local/fox/dismal/}.
4820
4821
4822 @node Q4.7.3
4823 @unnumberedsec Q4.7.3: [This question intentionally left blank]
4824
4825
4826 @node Q4.7.4
4827 @unnumberedsec Q4.7.4: Problems installing AUC TeX.
4828
4829 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
4830
4831 @quotation
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
4836 problem...
4837 @end quotation
4838
4839 Most problems with AUC TeX are one of two things:
4840
4841 @itemize @bullet
4842 @item
4843 The TeX-lisp-directory in @file{tex-site.el} and the makefile don't
4844 match.
4845
4846 Fix: make sure you configure AUC TeX properly @strong{before} installing.
4847
4848 @item
4849 You have an old version of easymenu.el in your path.
4850
4851 Fix: use @code{locate-library} and remove old versions to make sure it
4852 @strong{only} finds the one that came with SXEmacs.
4853 @end itemize
4854
4855
4856 @node Q4.7.5
4857 @unnumberedsec Q4.7.5: Is there a reason for an Emacs package not to be included in SXEmacs?
4858
4859 The reason for an Emacs package not to be included in SXEmacs is
4860 usually one or more of the following:
4861
4862 @enumerate
4863 @item
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
4866 (S)XEmacs.
4867
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.
4871
4872 @item
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.
4877
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.
4882
4883 @item
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
4886 our attention.
4887
4888 @item
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
4892 appreciated.
4893 @end enumerate
4894
4895
4896 @node Q4.7.6
4897 @unnumberedsec Q4.7.5: Is there a MatLab mode?
4898
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}.
4902
4903
4904 @node Q4.7.7
4905 @unnumberedsec Q4.7.7: Can I edit files on other hosts?
4906
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.
4910
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}.
4919
4920 @node Miscellaneous, MS Windows, Subsystems, Top
4921 @unnumbered 5 The Miscellaneous Stuff
4922
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
4925 sections.
4926
4927 @menu
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?
4950
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?
4964
4965 Sound:
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.
4970 @c extend me
4971
4972 Miscellaneous:
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?
4985 @end menu
4986
4987
4988 @node Q5.0.1
4989 @unnumberedsec 5.0: Major & Minor Modes
4990 @unnumberedsec Q5.0.1: How can I do source code highlighting using font-lock?
4991
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:
4994
4995 @lisp
4996 (require 'font-lock)
4997 @end lisp
4998
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.
5002
5003 @c the old way:
5004 @c     (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
5005 @c     (add-hook 'dired-mode-hook      'turn-on-font-lock)
5006
5007 See also @code{Syntax Highlighting} from the @code{Options} menu.
5008 Remember to save options.
5009
5010
5011 @node Q5.0.2
5012 @unnumberedsec Q5.0.2: I do not like cc-mode.  How do I use the old c-mode?
5013
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}.
5018
5019 But, if you still insist, add the following lines to your @file{init.el}:
5020
5021 @lisp
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")
5029 @end lisp
5030
5031 This must be done before any other reference is made to either c-mode or
5032 c++-mode.
5033
5034
5035 @node Q5.0.3
5036 @unnumberedsec Q5.0.3: How do I get @samp{More} Syntax Highlighting on by default?
5037
5038 Use the following code in your @file{init.el}:
5039
5040 @lisp
5041 (setq-default font-lock-maximum-decoration t)
5042 @end lisp
5043
5044 See also @code{Syntax Highlighting} from the @code{Options} menu.
5045 Remember to save options.
5046
5047
5048 @node Q5.0.4
5049 @unnumberedsec Q5.0.4: How can I enable auto-indent and/or Filladapt?
5050
5051 Put the following line in your @file{init.el}:
5052
5053 @lisp
5054 (setq indent-line-function 'indent-relative-maybe)
5055 @end lisp
5056
5057 If you want to get fancy, try the @code{filladapt} package available
5058 standard with SXEmacs.  Put this into your @file{init.el}:
5059
5060 @lisp
5061 (require 'filladapt)
5062 (setq-default filladapt-mode t)
5063 (add-hook 'c-mode-hook 'turn-off-filladapt-mode)
5064 @end lisp
5065
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:
5070
5071 @lisp
5072 (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
5073 @end lisp
5074
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}}.
5079
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.
5083
5084 Please note that the @code{fa-extras} package is no longer useful.
5085
5086
5087 @node Q5.0.5
5088 @unnumberedsec Q5.0.5: How can I get SXEmacs to come up in text/auto-fill mode by default?
5089
5090 Try the following lisp in your @file{init.el}:
5091
5092 @lisp
5093 (setq default-major-mode 'text-mode)
5094 (setq text-mode-hook 'turn-on-auto-fill)
5095 @end lisp
5096
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).
5103
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}:
5109
5110 @lisp
5111 (setq initial-major-mode
5112       (lambda ()
5113         (text-mode)
5114         (turn-on-auto-fill)))
5115 @end lisp
5116
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).
5131
5132
5133 @node Q5.0.6
5134 @unnumberedsec Q5.0.6: How do I start up a second shell buffer?
5135
5136 In the @code{*shell*} buffer:
5137
5138 @lisp
5139 M-x rename-buffer @key{RET} *shell-1* @key{RET}
5140 M-x shell RET
5141 @end lisp
5142
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
5146 rename-buffer}.
5147
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,
5150 a new shell is made
5151
5152
5153 @node Q5.0.7
5154 @unnumberedsec Q5.0.7: Telnet from shell filters too much
5155
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?
5159
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}
5163 installed.
5164
5165
5166 @node Q5.0.8
5167 @unnumberedsec Q5.0.8: Why does edt emulation not work?
5168
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}:
5172
5173 @lisp
5174 (tpu-edt)
5175 @end lisp
5176
5177 If you don't want it to replace @kbd{C-h} with an edt-style help menu
5178 add this as well:
5179
5180 @lisp
5181 (global-set-key [(control h)] 'help-for-help)
5182 @end lisp
5183
5184
5185 @node Q5.0.9
5186 @unnumberedsec Q5.0.9: How can I emulate VI and use it as my default mode?
5187
5188 Our recommended VI emulator is viper. To make viper-mode the default,
5189 add this to your @file{init.el}:
5190
5191 @lisp
5192 (viper-mode)
5193 @end lisp
5194
5195 @email{kifer@@CS.SunySB.EDU, Michael Kifer} writes:
5196
5197 @quotation
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.
5200 @end quotation
5201
5202
5203 @node Q5.0.10
5204 @unnumberedsec Q5.0.10: [This question intentionally left blank]
5205
5206 Obsolete question, left blank to avoid renumbering
5207
5208
5209 @node Q5.0.11
5210 @unnumberedsec Q5.0.11: [This question intentionally left blank]
5211
5212 Obsolete question, left blank to avoid renumbering
5213
5214
5215 @node Q5.0.12
5216 @unnumberedsec Q5.0.12: How do I disable gnuserv from opening a new frame?
5217
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
5221
5222 @lisp
5223 (setq gnuserv-frame (selected-frame))
5224 @end lisp
5225
5226 early on in your @file{init.el}, to ensure that the first frame created
5227 is the one used for your gnuserv buffers.
5228
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}
5231
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}}.
5236
5237
5238 @node Q5.0.13
5239 @unnumberedsec Q5.0.13: How do I start gnuserv so that each subsequent SXEmacs is a client?
5240
5241 Put the following in your @file{init.el} file to start the server:
5242
5243 @lisp
5244 (gnuserv-start)
5245 @end lisp
5246
5247 Start your first SXEmacs as usual.  After that, you can do:
5248
5249 @example
5250 gnuclient randomfilename
5251 @end example
5252
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
5256 of the frame.
5257
5258 See also man page of gnuclient.
5259
5260
5261 @node Q5.0.14
5262 @unnumberedsec Q5.0.14: Strange things are happening in Shell Mode.
5263
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
5268 given to the shell.
5269
5270 @email{martin@@xemacs.org, Martin Buchholz} writes:
5271
5272 @quotation
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
5275 @file{.cshrc}:
5276
5277 @example
5278 if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
5279 @end example
5280 @end quotation
5281
5282
5283 @node Q5.0.15
5284 @unnumberedsec Q5.0.15: Where do I get the latest CC Mode?
5285
5286 See @uref{http://cc-mode.sourceforge.net/}.
5287
5288
5289 @node Q5.0.16
5290 @unnumberedsec Q5.0.16: I find auto-show-mode disconcerting.  How do I turn it off?
5291
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
5295 @file{init.el}:
5296
5297 @lisp
5298 (setq auto-show-mode nil)
5299 (setq-default auto-show-mode nil)
5300 @end lisp
5301
5302
5303 @node Q5.0.17
5304 @unnumberedsec Q5.0.17: How can I get two instances of info?
5305
5306 Good question.
5307
5308
5309 @node Q5.0.18
5310 @unnumberedsec Q5.0.18: [This question intentionally left blank]
5311
5312
5313 @node Q5.0.19
5314 @unnumberedsec Q5.0.19: Is there something better than LaTeX mode?
5315
5316 @email{dak@@fsnif.neuroinformatik.ruhr-uni-bochum.de, David Kastrup} writes:
5317
5318 @quotation
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}).
5321 @end quotation
5322
5323
5324 @node Q5.0.20
5325 @unnumberedsec Q5.0.20: Is there a way to start a new SXEmacs if there's no gnuserv running, and otherwise use gnuclient?
5326
5327 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
5328 @quotation
5329 Here is one of the solutions, we have this in a script called
5330 @file{etc/editclient.sh}.
5331 @example
5332  #!/bin/sh
5333  if gnuclient -batch -eval t >/dev/null 2>&1
5334  then
5335    exec gnuclient $@{1+"$@@"@}
5336  else
5337    sxemacs -unmapped -f gnuserv-start &
5338    until gnuclient -batch -eval t >/dev/null 2>&1
5339    do
5340       sleep 1
5341    done
5342    exec gnuclient $@{1+"$@@"@}
5343  fi
5344 @end example
5345
5346 Note that there is a known problem when running SXEmacs and 
5347 @samp{gnuclient -nw} on the same TTY.
5348 @end quotation
5349
5350
5351 @node Q5.1.1
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?
5354
5355 @email{clerik@@naggum.no, Erik Naggum} writes;
5356
5357 @quotation
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.
5378 @end quotation
5379
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.
5384
5385
5386 @node Q5.1.2
5387 @unnumberedsec Q5.1.2: Can I generate "fake" keyboard events?
5388
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
5391 SXEmacs.
5392
5393 This seems to work:
5394
5395 @lisp
5396 (defun cg--generate-char-event (ch)
5397   "Generate an event, as if ch has been typed"
5398   (dispatch-event (character-to-event ch)))
5399
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)))
5405 @end lisp
5406
5407
5408 @node Q5.1.3
5409 @unnumberedsec Q5.1.3: Could you explain @code{read-kbd-macro} in more detail?
5410
5411 The @code{read-kbd-macro} function returns the internal Emacs
5412 representation of a human-readable string (which is its argument).
5413 Thus:
5414
5415 @lisp
5416 (read-kbd-macro "C-c C-a")
5417 @result{} [(control ?c) (control ?a)]
5418
5419 (read-kbd-macro "C-c C-. <up>")
5420 @result{} [(control ?c) (control ?.) up]
5421 @end lisp
5422
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.
5426
5427 The exact @dfn{human-readable} syntax is defined in the docstring of
5428 @code{edmacro-mode}.  I'll repeat it here, for completeness.
5429
5430 @quotation
5431 Format of keyboard macros during editing:
5432
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}}.
5438
5439 @itemize @bullet
5440 @item
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.
5444
5445 @item
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.
5451
5452 @item
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
5455 codes above \377.
5456
5457 @item
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}.
5464
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}.
5468
5469 @item
5470 The @code{^} notation for control characters also works: @kbd{^M}
5471 @equiv{} @kbd{C-m}.
5472
5473 @item
5474 Double angle brackets enclose command names: @code{<<next-line>>} is
5475 shorthand for @kbd{M-x next-line @key{RET}}.
5476
5477 @item
5478 Finally, @code{REM} or @code{;;} causes the rest of the line to be
5479 ignored as a comment.
5480 @end itemize
5481
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{}
5485 @iftex
5486 @*
5487 @end iftex
5488 @code{foofoofoofoofoofoofoofoofoofoo}.
5489
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,
5496 use whitespace.
5497 @end quotation
5498
5499
5500 @node Q5.1.4
5501 @unnumberedsec Q5.1.4: What is the performance hit of @code{let}?
5502
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.
5509
5510
5511 @node Q5.1.5
5512 @unnumberedsec Q5.1.5: What is the recommended use of @code{setq}?
5513
5514 @itemize @bullet
5515 @item Global variables
5516
5517 You will typically @code{defvar} your global variable to a default
5518 value, and use @code{setq} to set it later.
5519
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}:
5525
5526 @lisp
5527 (let ((case-fold-search nil))
5528   ...                                   ; code with searches that must be case-sensitive
5529   ...)
5530 @end lisp
5531
5532 You will notice the user-variables by their docstrings beginning with an
5533 asterisk (a convention).
5534
5535 @item Local variables
5536
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.
5542
5543 Typical usage:
5544
5545 @lisp
5546 ;; iterate through the elements of the list returned by
5547 ;; `hairy-function-that-returns-list'
5548 (let ((l (hairy-function-that-returns-list)))
5549   (while l
5550     ... do something with (car l) ...
5551     (setq l (cdr l))))
5552 @end lisp
5553
5554 Another typical usage includes building a value simply to work with it.
5555
5556 @lisp
5557 ;; Build the mode keymap out of the key-translation-alist
5558 (let ((inbox (file-truename (expand-file-name box)))
5559       (i 0))
5560   ... code dealing with inbox ...
5561   inbox)
5562 @end lisp
5563
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:
5567
5568 @lisp
5569 (setq foo-processed-inbox
5570       (let .....))
5571 @end lisp
5572 @end itemize
5573
5574
5575 @node Q5.1.6
5576 @unnumberedsec Q5.1.6: What is the typical misuse of @code{setq} ?
5577
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:
5581
5582 @lisp
5583 (defun my-function (whatever)
5584   (setq a nil)
5585   ... build a large list ...
5586   ... and exit ...)
5587 @end lisp
5588
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:
5591
5592 @lisp
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  ...)
5597 @end lisp
5598
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.
5601
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:
5605
5606 @lisp
5607 (defvar flurgoze nil)                   ; ok, global internal variable
5608 ...
5609
5610 (setq flurghoze t)                      ; ops!  a typo, but semantically correct.
5611                                         ; however, the byte-compiler warns.
5612
5613 While compiling toplevel forms:
5614 ** assignment to free variable flurghoze
5615 @end lisp
5616
5617
5618 @node Q5.1.7
5619 @unnumberedsec Q5.1.7: I like the @code{do} form of cl, does it slow things down?
5620
5621 It shouldn't.  Here is what Dave Gillespie has to say about cl.el
5622 performance:
5623
5624 @quotation
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
5629 forms
5630
5631 @lisp
5632 (incf i n)
5633 (push x (car p))
5634 @end lisp
5635
5636 are expanded at compile-time to the Lisp forms
5637
5638 @lisp
5639 (setq i (+ i n))
5640 (setcar p (cons x (car p)))
5641 @end lisp
5642
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.
5646
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.
5655
5656 You can find out how a macro expands by using the @code{cl-prettyexpand}
5657 function.
5658 @end quotation
5659
5660
5661 @node Q5.1.8
5662 @unnumberedsec Q5.1.8: I like recursion, does it slow things down?
5663
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.
5668
5669 Please try not to make your code much uglier to gain a very small speed
5670 gain.  It's not usually worth it.
5671
5672
5673 @node Q5.1.9
5674 @unnumberedsec Q5.1.9: How do I put a glyph as annotation in a buffer?
5675
5676 Here is a solution that will insert the glyph annotation at the
5677 beginning of buffer:
5678
5679 @lisp
5680 (make-annotation (make-glyph '([FORMAT :file FILE]
5681                                [string :data "fallback-text"]))
5682                  (point-min)
5683                  'text
5684                  (current-buffer))
5685 @end lisp
5686
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
5690 (e.g.
5691 @iftex
5692 @*
5693 @end iftex
5694 @file{/usr/local/lib/sxemacs-22.1.4/etc/recycle.xpm}).
5695
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
5698 @code{(point-min)}.
5699
5700
5701 @node Q5.1.10
5702 @unnumberedsec Q5.1.10: @code{map-extents} won't traverse all of my extents!
5703
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?
5707
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.
5714
5715 @lisp
5716 (map-extents (lambda (ext ignore)
5717                (delete-extent ext)
5718                (message "fubar!")))
5719 @end lisp
5720
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
5723 is:
5724
5725 @lisp
5726 (map-extents (lambda (ext ignore)
5727                (delete-extent ext)
5728                (message "fubar!")
5729                nil))
5730 @end lisp
5731
5732
5733 @node Q5.1.11
5734 @unnumberedsec Q5.1.11: My elisp program is horribly slow.  Is there
5735 an easy way to find out where it spends time?
5736 @c New
5737
5738 @email{hniksic@@xemacs.org, Hrvoje Niksic} writes:
5739 @quotation
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.
5744 @end quotation
5745
5746
5747 @node Q5.2.1
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?
5751
5752 Add the following line to your @file{init.el}:
5753
5754 @lisp
5755 (setq bell-volume 0)
5756 (setq sound-alist nil)
5757 @end lisp
5758
5759 That will make your SXEmacs totally silent---even the default ding sound
5760 (TTY beep on TTY-s) will be gone.
5761
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}}.
5766
5767
5768 @node Q5.2.2
5769 @unnumberedsec Q5.2.2: How do I get funky sounds instead of a boring beep?
5770
5771 Make sure your SXEmacs was compiled with audio and media support, and
5772 then put this in your @file{init.el}:
5773
5774 @lisp
5775 (load-default-sounds)
5776 @end lisp
5777
5778
5779 @node Q5.2.3
5780 @unnumberedsec Q5.2.3: What's NAS, how do I get it?
5781
5782 @xref{Q2.0.3}, for an explanation of the @dfn{Network Audio System}.
5783
5784
5785 @node Q5.2.4
5786 @unnumberedsec Q5.2.4: Sunsite sounds don't play.
5787
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.
5791
5792 @email{gutschk@@uni-muenster.de, Markus Gutschke} writes:
5793
5794 @quotation
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.
5802 @end quotation
5803
5804
5805 @node Q5.3.1
5806 @unnumberedsec 5.3: Miscellaneous
5807 @unnumberedsec Q5.3.1: How do you make SXEmacs indent CL if-clauses correctly?
5808
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
5811 first two.
5812
5813 One way is to add, to @file{init.el}:
5814
5815 @lisp
5816 (put 'if 'lisp-indent-function nil)
5817 @end lisp
5818
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},
5822 one can do this:
5823
5824 @lisp
5825 (load "cl-indent")
5826 (setq lisp-indent-function (function common-lisp-indent-function))
5827 @end lisp
5828
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}.
5831 Here's how:
5832
5833 @lisp
5834 (put 'if 'common-lisp-indent-function '(nil nil &body))
5835 @end lisp
5836
5837
5838 @node Q5.3.2
5839 @unnumberedsec Q5.3.2: [This question intentionally left blank]
5840
5841 Obsolete question, left blank to avoid renumbering.
5842
5843
5844 @node Q5.3.3
5845 @unnumberedsec Q5.3.3: How can I print WYSIWYG a font-locked buffer?
5846
5847 Font-lock looks nice.  How can I print (WYSIWYG) the highlighted
5848 document?
5849
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
5852 on its use, in
5853 @file{$prefix/lib/sxemacs/xemacs-packages/lisp/ps-print/ps-print.el},
5854 being the default location of an installed ps-print package.
5855
5856
5857 @node Q5.3.4
5858 @unnumberedsec Q5.3.4: Getting @kbd{M-x lpr} to work with postscript printer.
5859
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?
5863
5864 Put something like this in your @file{init.el}:
5865
5866 @lisp
5867 (setq lpr-command "a2ps")
5868 (setq lpr-switches '("-p" "-1"))
5869 @end lisp
5870
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.
5874
5875
5876 @node Q5.3.5
5877 @unnumberedsec Q5.3.5: How do I specify the paths that SXEmacs uses for finding files?
5878
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.
5882
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}
5889 file.
5890
5891
5892 @node Q5.3.6
5893 @unnumberedsec Q5.3.6: [This question intentionally left blank]
5894
5895 Obsolete question, left blank to avoid renumbering.
5896
5897
5898 @node Q5.3.7
5899 @unnumberedsec Q5.3.7: Can I have the end of the buffer delimited in some way?
5900
5901 Say, with: @samp{[END]}?
5902
5903 Try this:
5904
5905 @lisp
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]"])))
5911 @end lisp
5912
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:
5916
5917 @lisp
5918 (make-glyph '([xpm :file "~/something.xpm"]
5919               [string :data "[END]"]))
5920 @end lisp
5921
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:
5925
5926 @lisp
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 "\
5932 /* XPM */
5933 static char* eye = @{
5934 \"20 11 7 2\",
5935 \"__ c None\"
5936 \"_` c #7f7f7f\",
5937 \"_a c #fefefe\",
5938 \"_b c #7f0000\",
5939 \"_c c #fefe00\",
5940 \"_d c #fe0000\",
5941 \"_e c #bfbfbf\",
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__________\",
5953 @} ;"]
5954                                           [string :data "[END]"]))))
5955 @end lisp
5956
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.
5959
5960
5961 @node Q5.3.8
5962 @unnumberedsec Q5.3.8: How do I insert today's date into a buffer?
5963
5964 Like this:
5965
5966 @lisp
5967 (insert (current-time-string))
5968 @end lisp
5969
5970
5971 @node Q5.3.9
5972 @unnumberedsec Q5.3.9: Are only certain syntactic character classes available for abbrevs?
5973
5974 @c @email{gutschk@@uni-muenster.de, Markus Gutschke} writes:
5975 @c 
5976 @c @quotation
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.
5983 @c 
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.
5987 @c @end quotation
5988 @c 
5989 @c Starting with XEmacs 20.3 this restriction has been lifted.
5990
5991 Does not apply anymore.
5992
5993
5994 @node Q5.3.10
5995 @unnumberedsec Q5.3.10: How can I get those oh-so-neat X-Face lines?
5996
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/}.
6000
6001 Then the steps are
6002
6003 @enumerate
6004 @item
6005 Create 48x48x1 bitmap with your favorite tool
6006
6007 @item
6008 Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc.,
6009 and then compile the face.
6010
6011 @item
6012 @example
6013 cat file.xbm | xbm2ikon |compface > file.face
6014 @end example
6015
6016 @item
6017 Then be sure to quote things that are necessary for emacs strings:
6018
6019 @example
6020 cat ./file.face | sed 's/\\/\\\\/g'
6021 @iftex
6022 \ @*
6023 @end iftex
6024 | sed 's/\"/\\\"/g' > ./file.face.quoted
6025 @end example
6026
6027 @item
6028 Then set up emacs to include the file as a mail header - there were a
6029 couple of suggestions here---either something like:
6030
6031 @lisp
6032 (setq  mail-default-headers
6033        "X-Face:  @email{Ugly looking text string here}")
6034 @end lisp
6035
6036 Or, alternatively, as:
6037
6038 @lisp
6039 (defun mail-insert-x-face ()
6040   (save-excursion
6041     (goto-char (point-min))
6042     (search-forward mail-header-separator)
6043     (beginning-of-line)
6044     (insert "X-Face:")
6045     (insert-file-contents "~/.face")))
6046
6047 (add-hook 'mail-setup-hook 'mail-insert-x-face)
6048 @end lisp
6049 @end enumerate
6050
6051 However, 2 things might be wrong:
6052
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:
6056
6057 @example
6058 cat file.xbm | xbm2ikon | tail +3 |compface > file.face
6059 @end example
6060
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 .
6063
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
6066 conversion.
6067 @comment For convenience xbm2xface is available for anonymous FTP at
6068 @comment @uref{ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl}.
6069
6070 Contributors for this item:
6071
6072 Paul Emsley,
6073 Ricardo Marek,
6074 Amir J. Katz,
6075 Glen McCort,
6076 Heinz Uphoff,
6077 Peter Arius,
6078 Paul Harrison, and
6079 Vegard Vesterheim
6080
6081
6082 @node Q5.3.11
6083 @unnumberedsec Q5.3.11: How do I add new Info directories?
6084
6085 You use something like:
6086
6087 @lisp
6088 (setq Info-directory-list (cons
6089                            (expand-file-name "~/info")
6090                            Info-default-directory-list))
6091 @end lisp
6092
6093 @email{davidm@@prism.kla.com, David Masterson} writes:
6094
6095 @quotation
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
6098 to remember:
6099
6100 @enumerate
6101 @item
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}
6104 end of the list.
6105
6106 @item
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.
6110
6111 @item
6112 Emacs Info looks for a standard @file{dir} file in each of the
6113 directories scanned from #1 and magically concatenates them together.
6114
6115 @item
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.
6121 @end enumerate
6122
6123 Another alternative is to convert the documentation to HTML with
6124 texi2html and read it from a web browser like Lynx or W3.
6125 @end quotation
6126
6127
6128 @node Q5.3.12
6129 @unnumberedsec Q5.3.12: What do I need to change to make printing work?
6130
6131 For regular printing there are two variables that can be customized.
6132
6133 @table @code
6134 @item lpr-command
6135 This should be set to a command that takes standard input and sends
6136 it to a printer.  Something like:
6137
6138 @lisp
6139 (setq lpr-command "lp")
6140 @end lisp
6141
6142 @item lpr-switches
6143 This should be set to a list that contains whatever the print command
6144 requires to do its job.  Something like:
6145
6146 @lisp
6147 (setq lpr-switches '("-depson"))
6148 @end lisp
6149 @end table
6150
6151 For postscript printing there are three analogous variables to
6152 customize.
6153
6154 @table @code
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.
6158
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.
6162
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}.
6166 @end table
6167
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.
6171
6172
6173 @node MS Windows, Current Events, Miscellaneous, Top
6174 @unnumbered 6 XEmacs on MS Windows
6175
6176 This is part 6 of the SXEmacs Frequently Asked Questions list, written
6177 by Sebastian Freundt and others.
6178
6179 @menu
6180 * Q6.0.1::      Why did SXEmacs cut all support for Windows?
6181 @end menu
6182
6183 @node Q6.0.1
6184 @unnumberedsec Q6.0.1: Why did SXEmacs cut all support for Windows?
6185
6186 Short answer:
6187 MS Windows is not Posix conform.
6188
6189 Flame answer:
6190 MS Windows steenks.
6191
6192 Long answer:
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.
6200
6201
6202 @node Current Events, , MS Windows, Top
6203 @unnumbered 7 What the Future Holds
6204
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.)
6209
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}
6215 menu.
6216
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.
6219
6220 @menu
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?
6227 @end menu
6228
6229 @node Q7.0.1
6230 @unnumberedsec Q7.0.1: What new features will be in SXEmacs soon?
6231
6232 @strong{YOU} tell @strong{ME}!
6233
6234
6235 @node Q7.0.2
6236 @unnumberedsec Q7.0.2: What's new in SXEmacs 22.1.0?
6237
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".
6242
6243 @node Q7.0.3
6244 @unnumberedsec Q7.0.3: What's new in SXEmacs 22.1.1?
6245
6246 @itemize @bullet
6247 @item
6248 @var{user-init-directory} set to @file{~/.sxemacs} -- Youngs.
6249
6250 Symlinking this to your old @file{~/.xemacs} directory is enough to
6251 get up and running with SXEmacs.
6252
6253 @item
6254 Packages hierarchy default set to @file{$prefix/lib/sxemacs} -- Youngs.
6255
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}.
6259
6260 @item
6261 Rename items in the menubar -- Slusar, Youngs.
6262
6263 @item
6264 Beginnings of FFI -- Zajcev.
6265
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.
6269
6270 @item
6271 FreeBSD build fixes -- Slusar.
6272
6273 @item
6274 @code{M-x report-sxemacs-bug} -- Youngs.
6275
6276 For now, this is just a wrapper around report-xemacs-bug with the
6277 appropriate variables set to SXEmacs values.
6278
6279 @item
6280 Fix etags.c -- Slusar.
6281
6282 Avoid a segv.
6283
6284 @item
6285 @code{M-x build-report} -- Youngs.
6286
6287 Make it work for SXEmacs.
6288
6289 @item
6290 Fix major bug in regex.c
6291
6292 This fixed a whole swag of crashes involving regexps and
6293 syntax-tables. 
6294
6295 @item
6296 Sync up with XEmacs 21.4 -- Various Developers.
6297 @end itemize
6298
6299
6300 @node Q7.0.4
6301 @unnumberedsec Q7.0.4: What's new in SXEmacs 22.1.2?
6302
6303 @itemize @bullet
6304 @item
6305 autoconf 2.59 compatible configure scripts -- Youngs, Purvis.
6306
6307 Many configure options have changed.  Please run @code{./configure --help}
6308 to see what the new options are.
6309
6310 @item
6311 Most win32 code is now gone -- Youngs, Freundt.
6312
6313 @item
6314 @code{describe-installation} report libc version on Slackware -- Youngs.
6315
6316 @item
6317 etags.c updated to Francesco's version 17.11 -- Youngs.
6318
6319 @item
6320 Support @code{ls --dired} properly -- Sperber.
6321
6322 @item
6323 FFI (Foreign Function Interface) updates -- Zajcev.
6324
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:
6329
6330 @example
6331 (require 'ffi-curl)
6332 (curl:download "http://www.somedomain.com/path/file"
6333                "/tmp/file")
6334 @end example
6335
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.
6339
6340 @item
6341 Don't echo GC messages for non-string GC'ing -- Zajcev.
6342
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.
6346
6347 @item
6348 movemail.c security fixes -- Oskarsson.
6349
6350 @item
6351 PUI's *packages* buffer enhancements -- Koch.
6352
6353 @item
6354 Saner fallbacks for `backup-buffer' -- Youngs.
6355
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.
6358
6359 @item
6360 OpenSSL support -- Freundt.
6361
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.
6365
6366 With this interface/gateway we now have access to the wonderful world
6367 of static cryptography (static here means no handshake/protocols/etc.).
6368
6369 The API contains:
6370
6371 @itemize @bullet
6372 @item
6373 the OpenSSL PRNG = (pseudo) random number generator to provide
6374 generating cryptographically secure randomness
6375
6376 @item
6377 the OpenSSL MDs (message digests) to provide all sorts of hashing
6378 (we had an md5 implementation already)
6379
6380 @item
6381 the HMAC aka keyed hashing aka message authentication code to provide
6382 hashes secured by a password
6383
6384 @item
6385 the CIPHER engine (i.e. symmetric crypto systems) to provide
6386 encryption/decryption routines secured by a password
6387
6388 @item
6389 the PKEY engine (i.e. asymmetric crypto systems) to provide generation
6390 and distribution of private/public key pairs (as probably known by
6391 gpg)
6392
6393 @item
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)
6398 @end itemize
6399
6400 @item
6401 Remove most of the generated files from the repo -- Youngs, Freundt.
6402
6403 @item
6404 Allow suppression of WM decorations -- Turnbull.
6405
6406 This makes balloon-help windows infinitely better behaved.  Thank you
6407 very much, Steve T.
6408
6409 @item
6410 Fontify *scratch* buffer according to user's settings -- Kehoe.
6411
6412 @item
6413 Fix bug hanging SXEmacs when yanking > 260kb -- Kehoe.
6414
6415 @item
6416 lispref manual updated for SXEmacs -- Freundt.
6417
6418 @item
6419 PostgreSQL updates (mainly doc updates) -- Frenudt.
6420 @end itemize
6421
6422
6423 @node Q7.0.5
6424 @unnumberedsec Q7.0.5: What's new in SXEmacs 22.1.3?
6425
6426 @itemize @bullet
6427 @item
6428 OpenSSL updates, improvements, and fixes -- Freundt.
6429
6430 @item
6431 FFI updates, and fixes -- Zajcev.
6432
6433 FFI now defaults to "on" if libffi can be found at configure time.  It
6434 you don't want this, use: `--disable-ffi'.
6435
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
6438 wish.
6439
6440 @item
6441 Extent/glyph fixes -- Sidwell, Kuehl.
6442
6443 @item
6444 32 mouse buttons supported -- Youngs.
6445
6446 (global-set-key [(button32)] 'some-function) is valid in SXEmacs.
6447
6448 @item
6449 Modeline tweaks -- Ferreira.
6450
6451 Move line/column number indicators to left side (aka XE 21.5)
6452
6453 @item
6454 @code{M-x uptime} -- Youngs.
6455
6456 Every good OS has an uptime util, SXEmacs is no exception.  Reports
6457 uptime in various formats.
6458
6459 @item
6460 ia64 build fixes -- Lesjak.
6461
6462 @item
6463 @kbd{C-h n} will no longer find NEWS files from packages -- Youngs.
6464
6465 @item
6466 List of package mirrors updated -- Aichner, Skyttä.
6467
6468 @item
6469 Bootstrappable PUI -- Youngs.
6470
6471 SXEmacs no longer needs to have _any_ packages pre-installed before
6472 PUI can be used.  See (Info-goto-node "(sxemacs)Bootstrapping PUI").
6473
6474 @item
6475 Bignums, and a whole swag of sexy new number goodness -- Freundt.
6476
6477 Bignums, bigfloats, and ratios that you may know from XEmacs 21.5 are
6478 now in SXEmacs.  That and a whole lot more...
6479
6480 Features provided when all of the library demands are met:
6481
6482 @example
6483   (featurep 'bigz) and 
6484   (featurep 'bignum)       <=> if MPZ from GMP or BSD MP is present
6485   
6486   (featurep 'bigq) and
6487   (featurep 'ratio)        <=> if MPQ from GMP is present
6488   
6489   (featurep 'bigf) and
6490   (featurep 'bigfloat)     <=> if MPF from GMP is present
6491   
6492   (featurep 'bigfr)        <=> if MPFR is present
6493   
6494   (featurep 'bigc)         <=> if MPC is present
6495   
6496   (featurep 'number-types) <=> if one of the above features is
6497   provided
6498 @end example
6499
6500 For complete details see: (Info-goto-node "(lispref)Enhanced Number Types")
6501
6502 @item
6503 Raw strings -- Kuehl.
6504
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
6508 font-latex.el)... 
6509
6510 @example
6511   "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(\\\\[@@A-Za-z]+\\)"
6512
6513 As a raw string it could be written as...
6514
6515   #r"\(?:^\|[^\]\)\(?:\)*\(\\[@@A-Za-z]+\)"
6516 @end example
6517
6518 Most of the SXEmacs core lisp code has been converted over to using
6519 raw strings whereever appropriate.
6520
6521 @item
6522 Improved font-locking in a TTY -- Ferreira.
6523
6524 To illustrate this...
6525
6526 @example
6527   $ sxemacs -nw -vanilla
6528
6529 ...and look at the modeline.  Now open a .c file and turn on
6530 font-lock... 
6531
6532   C-x C-f /path/to/file.c RET
6533   M-x font-lock-mode RET
6534 @end example
6535
6536 @item
6537 Compiler fixes -- Zajcev.
6538
6539 @item
6540 SXEmacs can no longer be built with a C++ compiler -- Youngs.
6541
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.
6544
6545 @item
6546 Autoconf fixes, updates -- Freundt, Kuehl, Youngs.
6547
6548 All autoconf options now have a help string (for ./configure --help)
6549 and the default setting for each option is noted.
6550
6551 @item
6552 PostgreSQL auto-detection improved -- Youngs.
6553
6554 If pg_config is in your $PATH, SXEmacs will add PostgreSQL support at
6555 configure/build time.
6556
6557 @item
6558 Documentation (Texinfo) updates -- Freundt, Youngs.
6559
6560 The SXEmacs manual is now called "sxemacs" instead of "xemacs".  C-h
6561 C-i sxemacs RET to read it.
6562
6563 Most of the Texinfo docs now have been updated to say "SXEmacs"
6564 whereever appropriate instead of "XEmacs".
6565
6566 @item
6567 GTK (version 1.2) build fixes -- Youngs.
6568 @end itemize
6569
6570
6571 @node Q7.0.6
6572 @unnumberedsec Q7.0.6: What's new in SXEmacs 22.1.4?
6573
6574 @itemize @bullet
6575 @item
6576 Many more image formats via FFI/libWand -- Freundt.
6577
6578 FFI-enabled SXEmacs can load up libWand and thus display any image
6579 format that libWand (ImageMagick) supports.
6580
6581 @item
6582 Lots of updates to the ENT (Enhanced Number Types) code -- Freundt.
6583
6584 @item
6585 Mule is on by default -- Youngs.
6586
6587 @item
6588 Embeddable keyboard macros -- Kuehl.
6589
6590 This means that the following sort of thing is possible:
6591
6592 @example
6593 C-x ( bar C-x )
6594 C-x ( foo C-x e C-x )
6595
6596 C-x e
6597 => foo bar
6598 @end example
6599
6600 @item
6601 Default widgets/dialogs to Athena instead of Motif -- Youngs.
6602
6603 @item
6604 OpenSSL updates -- Freundt.
6605
6606 Digest, encryption, and decryption routines that operate on files has
6607 been added.  Previously this was only available for buffers.
6608
6609 @item
6610 Build reports have been revamped -- Youngs, Freundt.
6611
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.
6615
6616 @item
6617 FFI updates/fixes -- Youngs, Zajcev, Freundt.
6618
6619 @item
6620 Ability to build postscript, pdf, and html docs -- Ferreira.
6621
6622 @item
6623 Double linked lists and bloom filters implemented -- Freundt.
6624
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.
6633
6634 @item
6635 Lightning fast recursive version of directory-files -- Freundt.
6636
6637 It's called `directory-files-recur' and in some situations it is even
6638 faster than GNU's find(1).
6639
6640 @item
6641 Portuguese added to etc/HELLO -- Ferreira.
6642
6643 @item
6644 Massive improvements, enhancements for multimedia (audio) -- Freundt.
6645
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
6649 whenever possible.
6650
6651 And yes, SXEmacs @emph{can} play mp3 files. :-)
6652
6653 @item
6654 Autoconf fixes/updates -- Youngs, Freundt.
6655
6656 All of the enable/disable options have been converted to with/without
6657 options.  This allows us to sort them into groups.
6658
6659 Also fixes were made to allow building on FreeBSD and NetBSD.
6660
6661 @item
6662 Big update for the FAQ -- Youngs, Freundt.
6663
6664 @item
6665 Server Sockets! -- Ferreira.
6666
6667 SXEmacs now has server sockets (Yay!).  See
6668 `open-network-server-stream'.
6669
6670 @item
6671 Compiler fixes (gcc 2.95) -- Freundt.
6672
6673 @item
6674 bug-reporter update -- Youngs.
6675
6676 `report-sxemacs-bug' now directs people to our BugZilla installation
6677 at @url{http://issues.sxemacs.org/}
6678
6679 @item
6680 Documentation updates/fixes/improvements -- Youngs, Ferreira, Freundt.
6681 @end itemize
6682
6683 @bye