4b6f796dbfeec976720e4347548bf4a6d58c928e
[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
321 Energize:
322 * Q4.5.1::      What is/was Energize?
323
324 Infodock:
325 * Q4.6.1::      What is Infodock?
326
327 Other Unbundled Packages:
328 * Q4.7.1::      What is AUC TeX?  Where do you get it?
329 * Q4.7.2::      Are there any Emacs Lisp Spreadsheets?
330 * Q4.7.3::      [This question intentionally left blank]
331 * Q4.7.4::      Problems installing AUC TeX
332 * Q4.7.5::      Is there a reason for an Emacs package not to be included in SXEmacs?
333 * Q4.7.6::      Is there a MatLab mode?
334 * Q4.7.7::      Can I edit files on other hosts?
335
336 The Miscellaneous Stuff
337
338 * Q5.0.1::      How can I do source code highlighting using font-lock?
339 * Q5.0.2::      I do not like cc-mode.  How do I use the old c-mode?
340 * Q5.0.3::      How do I get @samp{More} Syntax Highlighting on by default?
341 * Q5.0.4::      How can I enable auto-indent and/or Filladapt?
342 * Q5.0.5::      How can I get SXEmacs to come up in text/auto-fill mode by default?
343 * Q5.0.6::      How do I start up a second shell buffer?
344 * Q5.0.7::      Telnet from shell filters too much.
345 * Q5.0.8::      Why does edt emulation not work?
346 * Q5.0.9::      How can I emulate VI and use it as my default mode?
347 * Q5.0.10::     [This question intentionally left blank]
348 * Q5.0.11::     [This question intentionally left blank]
349 * Q5.0.12::     How do I disable gnuserv from opening a new frame?
350 * Q5.0.13::     How do I start gnuserv so that each subsequent SXEmacs is a client?
351 * Q5.0.14::     Strange things are happening in Shell Mode.
352 * Q5.0.15::     Where do I get the latest CC Mode?
353 * Q5.0.16::     I find auto-show-mode disconcerting.  How do I turn it off?
354 * Q5.0.17::     How can I get two instances of info?
355 * Q5.0.18::     [This question intentionally left blank]
356 * Q5.0.19::     Is there something better than LaTeX mode?
357 * Q5.0.20::     Is there a way to start a new SXEmacs if there's no
358                   gnuserv running, and otherwise use gnuclient?
359
360 Emacs Lisp Programming Techniques:
361 * Q5.1.1::      The difference in key sequences between XEmacs/SXEmacs and GNU Emacs?
362 * Q5.1.2::      Can I generate "fake" keyboard events?
363 * Q5.1.3::      Could you explain @code{read-kbd-macro} in more detail?
364 * Q5.1.4::      What is the performance hit of @code{let}?
365 * Q5.1.5::      What is the recommended use of @code{setq}?
366 * Q5.1.6::      What is the typical misuse of @code{setq} ?
367 * Q5.1.7::      I like the @code{do} form of cl, does it slow things down?
368 * Q5.1.8::      I like recursion, does it slow things down?
369 * Q5.1.9::      How do I put a glyph as annotation in a buffer?
370 * Q5.1.10::     @code{map-extents} won't traverse all of my extents!
371 * Q5.1.11::     My elisp program is horribly slow.  Is there an easy way to
372                   find out where it spends time?
373
374 Sound:
375 * Q5.2.1::      How do I turn off the sound?
376 * Q5.2.2::      How do I get funky sounds instead of a boring beep?
377 * Q5.2.3::      What's NAS, how do I get it?
378 * Q5.2.4::      Sunsite sounds don't play.
379 @c extend me
380
381 Miscellaneous:
382 * Q5.3.1::      How do you make SXEmacs indent CL if-clauses correctly?
383 * Q5.3.2::      [This question intentionally left blank]
384 * Q5.3.3::      How can I print WYSIWYG a font-locked buffer?
385 * Q5.3.4::      Getting @kbd{M-x lpr} to work with postscript printer.
386 * Q5.3.5::      How do I specify the paths that SXEmacs uses for finding files?
387 * Q5.3.6::      [This question intentionally left blank]
388 * Q5.3.7::      Can I have the end of the buffer delimited in some way?
389 * Q5.3.8::      How do I insert today's date into a buffer?
390 * Q5.3.9::      Are only certain syntactic character classes available for abbrevs?
391 * Q5.3.10::     How can I get those oh-so-neat X-Face lines?
392 * Q5.3.11::     How do I add new Info directories?
393 * Q5.3.12::     What do I need to change to make printing work?
394
395 SXEmacs on MS Windows
396
397 General Info:
398 * Q6.0.1::      Why did SXEmacs cut all support for Windows?
399
400 What the Future Holds
401
402 * Q7.0.1::      What new features will be in SXEmacs soon?
403 * Q7.0.2::      What's new in SXEmacs 22.1.0?
404 * Q7.0.3::      What's new in SXEmacs 22.1.1?
405 * Q7.0.4::      What's new in SXEmacs 22.1.2?
406 * Q7.0.5::      What's new in SXEmacs 22.1.3?
407 * Q7.0.6::      What's new in SXEmacs 22.1.4?
408
409 @end detailmenu
410 @end menu
411
412 @c missing FAQs:
413 @c - Where is the RedHat/Fedora/Slackware/Debian/SuSE/Mandrake/foobar
414 @c   package?
415 @c - What is this tla thingy?
416
417
418 @node Introduction, Installation, Top, Top
419 @unnumbered 1 Introduction, Policy, Credits
420
421 Learning SXEmacs is a lifelong activity.  Even people who have used Emacs
422 for years keep discovering new features.  Therefore this document cannot
423 be complete.  Instead it is aimed at the person who is either
424 considering SXEmacs for their own use, or has just obtained it and is
425 wondering what to do next.  It is also useful as a reference to
426 available resources.
427
428 The origin of this FAQ is well beyond SXEmacs-times and stems from the
429 XEmacs crew.  The initiator was @email{rossini@@biostat.washington.edu,
430 Anthony Rossini}.  The tale goes he got tired of hearing JWZ complain
431 about repeatedly having to answer questions.  @email{ben@@xemacs.org,
432 Ben Wing} and @email{cthomp@@xemacs.org, Chuck Thompson}, the principal
433 authors of XEmacs, then took over and Ben did a massive update
434 reorganising the whole thing.
435
436 The previous version was converted to hypertext format, and edited by
437 @email{steve@@xemacs.org, Steven L. Baur}.  It was converted back to
438 texinfo by @email{hniksic@@xemacs.org, Hrvoje Niksic}.  The FAQ was then
439 maintained by @email{andreas@@sccon.com, Andreas Kaempf}, who passed it
440 on to Christian Nybø.
441
442 If you notice any errors or items which should be added or amended to
443 this FAQ please send email to @email{sxemacs-devel@@sxemacs.org}.
444 Include @samp{SXEmacs FAQ} on the Subject: line.
445
446 @menu
447 Introduction:
448 * Q1.0.1::      What is SXEmacs?
449 * Q1.0.2::      What is the current version of SXEmacs?
450 * Q1.0.3::      Where can I find it?
451 * Q1.0.4::      Why another version of Emacs?
452 * Q1.0.5::      Why haven't XEmacs/SXEmacs and GNU Emacs merged?
453 * Q1.0.6::      Where can I get help?
454 * Q1.0.7::      Where are the mailing lists archived?
455 * Q1.0.8::      How do you pronounce SXEmacs?
456 * Q1.0.9::      What does SXEmacs look like?
457 * Q1.0.10::     Is there a port of SXEmacs to Microsoft ('95 or NT)?
458 * Q1.0.11::     Is there a port of SXEmacs to the Macintosh?
459 * Q1.0.12::     Is there a port of SXEmacs to NextStep?
460 * Q1.0.13::     Is there a port of SXEmacs to OS/2?
461 * Q1.0.14::     Where can I get a printed copy of the SXEmacs users manual?
462
463 Policies:
464 * Q1.1.1::      What is the FAQ editorial policy?
465 * Q1.1.2::      How do I become a beta tester?
466 * Q1.1.3::      How do I contribute to SXEmacs itself?
467
468 Credits:
469 * Q1.2.1::      Who wrote XEmacs? Who wrote SXEmacs?
470 * Q1.2.2::      Who contributed to this version of the FAQ?
471 * Q1.2.3::      Who contributed to the FAQ in the past?
472
473 Internationalisation:
474 * Q1.3.1::      What is the status of internationalisation support aka MULE (including Asian language support?
475 * Q1.3.2::      How can I help with internationalisation?
476 * Q1.3.3::      How do I type non-ASCII characters?
477 * Q1.3.4::      Can SXEmacs messages come out in a different language?
478 * Q1.3.5::      Please explain the various input methods in MULE/SXEmacs
479 * Q1.3.6::      How do I portably code for MULE/XEmacs/SXEmacs?
480 * Q1.3.7::      How about Cyrillic Modes?
481 * Q1.3.8::      Does SXEmacs support Unicode?
482 * Q1.3.9::      How does SXEmacs display Unicode?
483
484 Getting Started:
485 * Q1.4.1::      What is an @file{init.el} or @file{.emacs} and is there a sample one?
486 * Q1.4.2::      Can I use the same @file{init.el}/@file{.emacs} with other Emacsen?
487 * Q1.4.3::      Any good SXEmacs tutorials around?
488 * Q1.4.4::      May I see an example of a useful SXEmacs Lisp function?
489 * Q1.4.5::      And how do I bind it to a key?
490 * Q1.4.6::      What's the difference between a macro and a function?
491 @end menu
492
493 @unnumberedsec 1.0: Introduction
494
495 @node Q1.0.1
496 @unnumberedsec Q1.0.1: What is SXEmacs?
497
498 SXEmacs is a powerful, highly customisable open source text editor and
499 application development system, with full GUI support.  It is protected
500 under the GNU Public License and related to other versions of Emacs, in
501 particular XEmacs and GNU Emacs.  Its emphasis is on modern graphical
502 user interface support and an open software development model, similar
503 to Linux.
504
505 SXEmacs is a recent fork of the popular XEmacs and runs on nearly all
506 versions of Unix in existence.
507
508
509 @node Q1.0.2
510 @unnumberedsec Q1.0.2: What is the current version of SXEmacs?
511
512 SXEmacs 22.1.4 is the latest released version.
513 The current development line will become 22.1.5.
514
515
516 @node Q1.0.3
517 @unnumberedsec Q1.0.3: Where can I find it?
518
519 The canonical source can be found via anonymous FTP at:
520
521 @example
522 @uref{ftp://ftp.sxemacs.org/sxemacs/}
523 @end example
524
525 There are also snapshots of the current development line available.
526 However, the preferred method to obtain such ``snapshots'' is via tla
527 (GNU arch):
528
529 @example
530 tla register-archive http://arch.sxemacs.org/2006
531 tla get steve@@sxemacs.org--2006/sxemacs--main--22.1.5 sxemacs
532 @end example
533
534
535 @node Q1.0.4
536 @unnumberedsec Q1.0.4: Why another version of Emacs?
537
538 First of all, the situation got a little complicated.  With SXEmacs
539 regarded as a featurised, cleaned-up XEmacs, there are only two major
540 Emacs flavours.  Disregarding that, we have three.  Thus let us compare
541 GNU Emacs to SXEmacs/XEmacs in the first place, and afterwards do the
542 comparison SXEmacs vs. XEmacs.
543
544
545 @unnumberedsubsec Q1.0.4.1 GNU Emacs vs. SXEmacs/XEmacs
546
547 Here is a list of some of the reasons why we think you might
548 consider using it:
549
550 @itemize @bullet
551 @item
552 It looks nicer.
553
554 @item
555 The XEmacs and SXEmacs maintainers, especially the SXEmacs
556 maintainers, are generally more receptive to suggestions than the GNU
557 Emacs maintainers.
558
559 @item
560 Many, many more bundled packages than GNU Emacs.
561
562 @item
563 Packages at all.
564
565 @c @c does not apply anymore
566 @c @item
567 @c Face support on TTY's.
568
569 @c @c does not apply anymore
570 @c @item
571 @c A built-in toolbar.
572
573 @c @c does not apply anymore
574 @c @item
575 @c Some internationalisation support (including full MULE support, if
576 @c compiled with it).
577
578 @c @c does not apply anymore
579 @c @item
580 @c Variable-width fonts.
581
582 @c @c does not apply anymore
583 @c @item
584 @c Variable-height lines.
585
586 @item
587 Marginal annotations.
588
589 @item
590 XEmacs can be used as an Xt widget, and can be embedded within another
591 application.
592
593 @c @c does not apply anymore
594 @c @item
595 @c Horizontal and vertical scrollbars (using real toolkit scrollbars).
596
597 @item
598 Better APIs (and performance) for attaching fonts, colors, and other
599 properties to text.
600
601 @c @c does not apply anymore
602 @c @item
603 @c The ability to embed arbitrary graphics in a buffer.
604
605 @item
606 Completely compatible (at the C level) with the Xt-based toolkits.
607
608 @item
609 Native support for PostgreSQL databases, LDAP servers and Berkeley DB.
610
611 @item
612 Support for GMP numbers (multi-precision integers, quotients and
613 floats).
614
615 @item
616 Support for multiple tty connections.
617
618 @c the FSF guys' implementation is a disease!
619 @item
620 Sound support.
621
622 @end itemize
623
624
625 @unnumberedsubsec Q1.0.4.2 SXEmacs vs. XEmacs
626
627 SXEmacs' strengths are clearly its feature list and its performance.
628 Also, these were the main reasons to fork.  XEmacs maintainers became
629 more and more uninterested in useful additions, reductions and
630 optimisations on the C-level.
631
632 @itemize
633 @item
634 Foreign Function Interface (FFI).
635
636 @item
637 PostgreSQL notify support.
638
639 @item
640 Native OpenSSL support.
641
642 @item
643 Support for mpfr floats, Gaussian and complex numbers, quaternions and
644 residue class rings.
645
646 @item
647 Support for raw strings.
648
649 @item
650 Much faster hashing functions.
651
652 @item
653 Support for internal URL access via cURL.
654
655 @item
656 Support for various image formats: Any format that ImageMagick is able
657 to handle.
658
659 @item
660 Support for modern sound libraries and sound servers: ESD, Polyp,
661 aRts, Jack, ALSA, and ao
662
663 @item
664 Support for various media formats (provided by external libraries):
665 Any format that FFmpeg, sndfile, SoX, MAD and gstreamer can handle.
666
667 @item
668 Support for the implementation network services through the use of
669 network server stream.
670
671 @end itemize
672
673
674
675 @node Q1.0.5
676 @unnumberedsec Q1.0.5: Why haven't XEmacs/SXEmacs and GNU Emacs Merged?
677
678 There are currently irreconcilable differences in the views about
679 technical, programming, design and organisational matters between RMS
680 and the SXEmacs/XEmacs development team which provide little hope for a
681 merge to take place in the short-term future.
682
683
684 @node Q1.0.6
685 @unnumberedsec Q1.0.6: Where can I get help?
686
687 Probably the easiest way, if everything is installed, is to use Info, by
688 pressing @kbd{C-h i}, or looking for an Info item on the
689 Help Menu.  @kbd{M-x apropos} can be used to look for particular commands.
690
691 For items not found in the manual, try reading this FAQ and reading the
692 Usenet group comp.emacs.xemacs.
693
694 If you choose to post to a newsgroup, @strong{please use
695 comp.emacs.xemacs}.  Please do not post SXEmacs/XEmacs related questions
696 to gnu.emacs.help.
697
698 SXEmacs is an official group at the Freenode IRC network (formerly
699 OPN).  Join us at @uref{irc://irc.freenode.net/sxemacs}.
700
701 If you cannot post, nor read Usenet news, nor want to join us at IRC,
702 there is a mailing at @email{sxemacs-devel@@sxemacs.org} for general
703 and developing issues.
704
705
706 @node Q1.0.7
707 @unnumberedsec Q1.0.7: Where are the mailing lists archived?
708
709 The archives can be found at
710 @uref{http://www.sxemacs.org/list-archives/html/sxemacs-devel/}.
711
712 Subscription can be done via
713 @uref{http://www.sxemacs.org/mailman/listinfo}
714
715
716 @node Q1.0.8
717 @unnumberedsec Q1.0.8: How do you pronounce SXEmacs?
718
719 The most common pronounciation is @samp{sexy macs}.
720
721
722 @node Q1.0.9
723 @unnumberedsec Q1.0.9: What does SXEmacs look like?
724
725 Look at the screenshot section at @uref{http://www.sxemacs.org}.
726
727
728 @node Q1.0.10
729 @unnumberedsec Q1.0.10: Is there a port of SXEmacs to Microsoft ('95 or NT)?
730
731 Of course not!  The SXEmacs developers have so much fun stripping all of
732 the erroneous code and workaround-hacks related to Microsoft Windows.
733
734
735 @node Q1.0.11
736 @unnumberedsec Q1.0.11: Is there a port of SXEmacs to the Macintosh?
737
738 Good question. Is there?
739
740
741 @node Q1.0.12
742 @unnumberedsec Q1.0.12: Is there a port of SXEmacs to NextStep?
743
744 @c Carl Edman, apparently no longer at @email{cedman@@princeton.edu}, did
745 @c the port of GNU Emacs to NeXTstep and expressed interest in doing the
746 @c XEmacs port, but never went any farther.
747
748 A what?
749
750
751 @node Q1.0.13
752 @unnumberedsec Q1.0.13: Is there a port of SXEmacs to OS/2?
753
754 @c No, but Alexander Nikolaev <avn_1251@@mail.ru> is working on it.
755
756 Aaaaargh. You could have also asked: Is there a port of SXEmacs to my
757 hamster.
758
759
760 @node Q1.0.14
761 @unnumberedsec Q1.0.14: Where can I obtain a printed copy of the SXEmacs User's Manual?
762
763 Pre-printed manuals are not available.  If you are familiar with
764 TeX, you can generate your own manual from the SXEmacs sources.
765
766 HTML and Postscript versions of SXEmacs manuals are available from the
767 SXEmacs web site at @uref{http://www.sxemacs.org}.
768 @c are they?
769
770
771 @node Q1.1.1
772 @unnumberedsec 1.1: Policies
773 @unnumberedsec Q1.1.1: What is the FAQ editorial policy?
774
775 The FAQ is actively maintained and modified regularly.  All links should
776 be up to date.
777
778 If you think you have a better way of answering a question, or think a
779 question should be included, we'd like to hear about it.
780 Please make sure that @samp{SXEmacs FAQ} appears on the Subject: line
781 if you prefer to send us a mail.  If you would like to use IRC
782 instead, please make sure that someone actively responds to your
783 request.  We usually stay in the channel while we are asleep, but
784 if you join, post the request and leave again, we have no means to
785 get into contact with you again.
786
787 Questions and answers included into the FAQ will be edited for
788 spelling and grammar and will be attributed.
789
790
791 @node Q1.1.2
792 @unnumberedsec Q1.1.2: How do I become a beta tester?
793
794 We have no formal way.  Also there are no presumptions.  Just
795 subscribe to the mailing list @email{sxemacs-devel@@sxemacs.org} and
796 say hello or join us at IRC.
797
798 Be prepared to get your hands dirty, as beta testers are expected to
799 identify problems as best they can.
800
801
802 @node Q1.1.3
803 @unnumberedsec Q1.1.3: How do I contribute to SXEmacs itself?
804
805 Quoting a famous developer:
806
807 I know the answer exactly.
808 Gotta run.
809
810
811 @node Q1.2.1
812 @unnumberedsec 1.2: Credits
813 @unnumberedsec Q1.2.1: Who wrote SXEmacs?
814
815 SXEmacs is the result of the time and effort of many people.  The
816 developers responsible for recent releases can be viewed by
817 @kbd{M-x about-sxemacs} or the @samp{About SXEmacs} item in the Help
818 menu.
819
820 @c @itemize @bullet
821 @c @item @email{martin@@xemacs.org, Martin Buchholz}
822 @c @html
823 @c <br><img src="mrb.jpeg" alt="Portrait of Martin Buchholz"><br>
824 @c @end html
825 @c
826 @c
827 @c @item @email{stephen@@xemacs.org, Stephen Turnbull}
828 @c
829 @c
830 @c @item @email{ben@@xemacs.org, Ben Wing}
831 @c @html
832 @c <br><img src="wing.gif" alt="Portrait of Ben Wing"><br>
833 @c @end html
834 @c
835 @c
836 @c @item @email{hniksic@@xemacs.org, Hrvoje Niksic}
837 @c
838 @c @html
839 @c <br><img src="hniksic.jpeg" alt="Portrait of Hrvoje Niksic"><br>
840 @c @end html
841 @c
842 @c @end itemize
843 @c
844 @c The developers responsible for older releases were:
845 @c
846 @c @itemize @bullet
847 @c @item @email{steve@@xemacs.org, Steve Baur}
848 @c
849 @c @html
850 @c <br><img src="steve.gif" alt="Portrait of Steve Baur"><br>
851 @c @end html
852 @c
853 @c @item @email{cthomp@@xemacs.org, Chuck Thompson}
854 @c @html
855 @c <br><img src="cthomp.jpeg" alt="Portrait of Chuck Thompson"><br>
856 @c @end html
857 @c
858 @c @item @email{jwz@@jwz.org, Jamie Zawinski}
859 @c @html
860 @c <br><img src="jwz.gif" alt="Portrait of Jamie Zawinski"><br>
861 @c @end html
862 @c
863 @c @item @email{mly@@adoc.xerox.com, Richard Mlynarik}
864 @c
865 @c Steve Baur was the primary maintainer for 19.15 through 21.0.
866 @c
867 @c Chuck Thompson and Ben Wing were the maintainers for 19.11 through 19.14
868 @c and heavy code contributors for 19.8 through 19.10.
869 @c
870 @c Jamie Zawinski was the maintainer for 19.0 through 19.10 (the entire
871 @c history of Lucid Emacs).  Richard Mlynarik was a heavy code contributor
872 @c to 19.6 through 19.8.
873 @c
874 @c @end itemize
875 @c
876 @c Along with many other contributors, partially enumerated in the
877 @c @samp{About XEmacs} option in the Help menu.
878
879
880 @node Q1.2.2
881 @unnumberedsec Q1.2.2: Who contributed to this version of the FAQ?
882
883 The following people contributed valuable suggestions to building this
884 version of the FAQ (listed in alphabetical order):
885
886 @itemize @bullet
887 @item @email{steve@@xemacs.org, SL Baur}
888
889 @item @email{hroptatyr@@sxemacs.org, Sebastian Freundt}
890
891 @item @email{hniksic@@xemacs.org, Hrvoje Niksic}
892
893 @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari}
894
895 @end itemize
896
897
898 @node Q1.2.3
899 @unnumberedsec Q1.2.3: Who contributed to the FAQ in the past?
900
901 This is only a partial list, as many names were lost in a hard disk
902 crash some time ago.
903
904 @itemize @bullet
905 @item @email{binge@@aloft.att.com, Curtis.N.Bingham}
906
907 @item @email{bruncott@@dormeur.inria.fr, Georges Brun-Cottan}
908
909 @item @email{rjc@@cogsci.ed.ac.uk, Richard Caley}
910
911 @item @email{cognot@@ensg.u-nancy.fr, Richard Cognot}
912
913 @item @email{daku@@nortel.ca, Mark Daku}
914
915 @item @email{wgd@@martigny.ai.mit.edu, William G. Dubuque}
916
917 @item @email{eeide@@cs.utah.edu, Eric Eide}
918
919 @item @email{af@@biomath.jussieu.fr, Alain Fauconnet}
920
921 @item @email{cflatter@@nrao.edu, Chris Flatters}
922
923 @item @email{ginsparg@@adra.com, Evelyn Ginsparg}
924
925 @item @email{hall@@aplcenmp.apl.jhu.edu, Marty Hall}
926
927 @item @email{dkindred@@cmu.edu, Darrell Kindred}
928
929 @item @email{dmoore@@ucsd.edu, David Moore}
930
931 @item @email{arup+@@cmu.edu, Arup Mukherjee}
932
933 @item @email{nickel@@prz.tu-berlin.de, Juergen Nickelsen}
934
935 @item @email{powell@@csl.ncsa.uiuc.edu, Kevin R. Powell}
936
937 @item @email{dworkin@@ccs.neu.edu, Justin Sheehy}
938
939 @item @email{stig@@hackvan.com, Stig}
940
941 @item @email{Aki.Vehtari@@hut.fi, Aki Vehtari}
942 @end itemize
943
944
945 @node Q1.3.1
946 @unnumberedsec 1.3: Internationalisation
947 @unnumberedsec Q1.3.1: What is the status of internationalisation support aka MULE (including Asian language support?
948
949 Both the stable and development versions of SXEmacs include
950 internationalisation support (aka MULE).  MULE currently works on
951 Unix and Linux systems.  Binaries compiled without MULE support run
952 faster than MULE capable SXEmacsen.
953
954
955 @node Q1.3.2
956 @unnumberedsec Q1.3.2: How can I help with internationalisation?
957
958 If you would like to help, you can use the usual ways to get into
959 contact with us, that is join the mailing list
960 @email{sxemacs-devel@@sxemacs.org} or join us at
961 @uref{irc://irc.freenode.net/sxemacs}.
962
963 Especially needed are people who speak/write languages other than
964 English, who are willing to use SXEmacs/MULE regularly, and have some
965 experience with Elisp.
966
967 Translations of the TUTORIAL and man page are welcome, and SXEmacs
968 does support multilingual menus, but we have few current translations.
969
970 @xref{Q1.1.2}.
971
972
973 @node Q1.3.3
974 @unnumberedsec Q1.3.3: How do I type non-ASCII characters?
975
976 See question 3.5.7 (@pxref{Q3.5.7}) in part 3 of this FAQ for some
977 simple methods that also work in non-MULE builds of SXEmacs (but only for
978 one-octet coded character sets, and mostly for ISO 8859/1).  Many of the
979 methods available for Cyrillic (@pxref{Q1.3.7}) work without MULE.
980 MULE has more general capabilities.  @xref{Q1.3.5}.
981
982 @xref{Q3.2.7}, which covers display of non-ASCII characters.
983
984 @node Q1.3.4
985 @unnumberedsec Q1.3.4: Can SXEmacs messages come out in a different language?
986
987 The message-catalog support was written but is badly bit-rotted.
988 SXEmacs 22.2 may do so, but it is not of high priority currently.
989 Again, if you are willing to help, contact us.
990
991 However, menubar localisation @emph{does} work.  To enable it, add to
992 your @file{Emacs} file entries like this:
993
994 @example
995 Emacs*XlwMenu.resourceLabels:                   True
996 Emacs*XlwMenu.file.labelString:                 Fichier
997 Emacs*XlwMenu.openInOtherWindow.labelString:    In anderem Fenster oeffnen
998 @end example
999
1000 The name of the resource is derived from the non-localised entry by
1001 removing punctuation and capitalizing as above.
1002
1003
1004 @node Q1.3.5
1005 @unnumberedsec Q1.3.5: Please explain the various input methods in MULE/SXEmacs
1006
1007 Mule supports a wide variety of input methods.  There are three basic
1008 classes: Lisp implementations, generic platform support, and library
1009 interfaces.
1010
1011 @emph{Lisp implementations} include Quail, which provides table-driven
1012 input methods for almost all the character sets that Mule supports
1013 (including all of the ISO 8859 family, the Indic languages, Thai, and
1014 so on), and SKK, for Japanese.  (SKK also supports an interface to an
1015 external "dictionary server" process.)  Quail supports both typical
1016 "dead-key" methods (eg, in the "latin-1-prefix" method, @kbd{" a}
1017 produces ä, LATIN SMALL LETTER A WITH DIAERESIS), and the complex
1018 dictionary-based phonetic methods used for Asian ideographic languages
1019 like Chinese.
1020
1021 Lisp implementations can be less powerful (but they are not perceptibly
1022 inefficient), and of course are not portable to non-Emacs applications.
1023 The incompatibility can be very annoying.  On the other hand, they
1024 require no special platform support or external libraries, so if you can
1025 display the characters, Mule can input them for you and you can edit,
1026 anywhere.
1027
1028 @emph{Generic platform support} is currently limited to the X Input
1029 Method (XIM) framework, but IIIMF (Sun's Internet-Intranet Input
1030 Method Framework) support is extremely desirable.  XIM is enabled at
1031 build time by use of the @samp{--with-xim} flag to @code{configure}.
1032 For use of XIM, see your platform documentation.  However, normally
1033 the input method you use is specified via the @samp{LANG} and
1034 @samp{XMODIFIERS} environment variables.
1035
1036 Of course, input skills are portable across most applications.  However,
1037 especially in modern GUI systems the habit of using bucky bits has
1038 fallen into sad disuse, and many XIM systems are poorly configured for
1039 use with Emacs.  For example, the kinput2 input manager (a separate
1040 process providing an interface between Japanese dictionary servers such
1041 as Canna and Wnn, and the application) tends to gobble up keystrokes
1042 generating Meta characters.  This means that to edit while using an XIM
1043 input method, you must toggle the input method off every time you want
1044 to use @kbd{M-f}.  Your mileage may vary.
1045
1046 @emph{Library interfaces} are most common for Japanese, although Wnn
1047 supports Chinese (traditional and simplified) and Korean.  There are
1048 Chinese and Korean input servers available, but we do not know of any
1049 patches for SXEmacs to use them directly.  You can use them via
1050 IM-enabled terminals, by manipulating the terminal coding systems.  We
1051 describe only the Japanese-oriented systems here.  The advantage of
1052 these systems is that they are very powerful, and on platforms where
1053 they are available there is typically a wide range of applications that
1054 support them.  Thus your input skills are portable across applications.
1055
1056 Mule provides built-in interfaces to the following input methods: Wnn4,
1057 Wnn6, Canna, and SJ3.  These can be configured at build time.  There are
1058 patches available (no URL, sorry) to support the SKK server, as well.
1059 Wnn and SJ3 use the @code{egg} user interface.  The interface for Canna
1060 is specialized to Canna.
1061
1062 Wnn supports Japanese, Chinese and Korean. It is made by OMRON and Kyôto
1063 University. It is a powerful and complex system.  Wnn4 is free and Wnn6
1064 is not.  Wnn uses grammatical hints and probability of word association,
1065 so in principle Wnn can be cleverer than other methods.
1066
1067 Canna, made by NEC, supports only Japanese.  It is a simple and powerful
1068 system. Canna uses only grammar, but its grammar and dictionary are
1069 quite sophisticated.  So for standard modern Japanese, Canna seems
1070 cleverer than Wnn4. In addition, the UNIX version of Canna is free.
1071
1072 SJ3, by Sony, supports only Japanese.
1073
1074 Egg consists of following parts:
1075
1076 @enumerate
1077 @item
1078 Input character Translation System (ITS) layer.
1079 It translates ASCII inputs to Kana/PinYin/Hangul characters.
1080
1081 @item
1082 Kana/PinYin/Hangul to Kanji transfer layer.
1083 The interface layer to network Kana-Kanji server (Wnn and Sj3).
1084 @end enumerate
1085
1086 These input methods are modal.  They have a raw (alphabet) mode, a
1087 phonetic input mode, and Kana-Kanji transfer mode.  However there are
1088 mode-less input methods for Egg and Canna.  @samp{boiled-egg} is a
1089 mode-less input method running on Egg.  For Canna, @samp{canna.el} has a
1090 tiny boiled-egg-like command, @code{(canna-boil)}, and there are some
1091 boiled-egg-like utilities.
1092
1093 Much of this information was provided by @email{morioka@@jaist.ac.jp,
1094 MORIOKA Tomohiko}.
1095
1096 @node Q1.3.6
1097 @unnumberedsec Q1.3.6: How do I portably code for MULE/SXEmacs?
1098
1099 MULE has evolved rapidly over the last few years, and the original third
1100 party patch (for GNU Emacs 19), GNU Emacs 20+, and XEmacs 20+ have quite
1101 different implementations.  The APIs also vary although recent versions
1102 of XEmacs have tended to converge to the GNU Emacs standard.
1103
1104 MULE implementations are going to continue to evolve.  Both GNU Emacs
1105 and XEmacs are working hard on Unicode support, which will involve new
1106 APIs and probably variations on old ones.  For XEmacs 22, the old ISO
1107 2022-based system for recognizing encodings will be replaced by a much
1108 more flexible system, which should improve accuracy of automatic coding
1109 detections, but will also involve new APIs.
1110
1111 @email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} writes:
1112
1113 @quotation
1114 The application implementor must write separate code for these mule
1115 variants.  [Please don't hesitate to report these variants to us; they
1116 are not, strictly speaking, bugs, but they give third-party developers
1117 the same kind of creepy-crawly feeling.  We'll do what we can. -- Ed.]
1118
1119 MULE and the next version of Emacs are similar but the symbols are very
1120 different---requiring separate code as well.
1121
1122 Namely we must support 3 kinds of mule variants and 4 or 5 or 6 kinds of
1123 emacs variants... (;_;) I'm shocked, so I wrote a wrapper package called
1124 @code{emu} to provide a common interface.  [There is an XEmacs package
1125 of APEL which provides much more comprehensive coverage.  Be careful,
1126 however; APEL has problems of its own. -- Ed.]
1127
1128 I have the following suggestions about dealing with mule variants:
1129
1130 @itemize @bullet
1131 @item
1132 @code{(featurep 'mule)} @code{t} on all mule variants
1133
1134 @item
1135 @code{(boundp 'MULE)} is @code{t} on only MULE.  Maybe the next version
1136 of Emacs will not have this symbol.
1137
1138 @item
1139 MULE has a variable @code{mule-version}.  Perhaps the next version of
1140 Emacs will have this variable as well.
1141 @end itemize
1142
1143 Following is a sample to distinguish mule variants:
1144
1145 @lisp
1146 (if (featurep 'mule)
1147     (cond ((boundp 'MULE)
1148            ;; for original Mule
1149            )
1150           ((string-match "XEmacs" emacs-version)
1151            ;; for XEmacs with Mule
1152            )
1153           (t
1154            ;; for next version of Emacs
1155            ))
1156   ;; for old emacs variants
1157   )
1158 @end lisp
1159 @end quotation
1160
1161
1162 @node Q1.3.7
1163 @unnumberedsec Q1.3.7: How about Cyrillic Modes?
1164
1165 @email{ilya@@math.ohio-state.edu, Ilya Zakharevich} writes:
1166
1167 @quotation
1168 There is a cyrillic mode in the file @file{mysetup.zip} in
1169 @iftex
1170 @*
1171 @end iftex
1172 @uref{ftp://ftp.math.ohio-state.edu/pub/users/ilya/emacs/}.  This is a
1173 modification to @email{ava@@math.jhu.ed, Valery Alexeev's} @file{russian.el}
1174 which can be obtained from
1175 @end quotation
1176
1177 @uref{http://www.math.uga.edu/~valery/russian.el}.
1178
1179 @email{d.barsky@@ee.surrey.ac.uk, Dima Barsky} writes:
1180
1181 @quotation
1182 There is another cyrillic mode for both GNU Emacs and XEmacs by
1183 @email{manin@@camelot.mssm.edu, Dmitrii
1184 (Mitya) Manin} at
1185 @iftex
1186
1187 @end iftex
1188 @uref{http://kulichki-lat.rambler.ru/centrolit/manin/cyr.el}.
1189 @c Link above, <URL:http://camelot.mssm.edu/~manin/cyr.el> was dead.
1190 @c Changed to russian host instead
1191 @end quotation
1192
1193 @email{rebecca.ore@@op.net, Rebecca Ore} writes:
1194
1195 @quotation
1196 The fullest resource I found on Russian language use (in and out of
1197 SXEmacs) is @uref{http://www.ibiblio.org/sergei/Software/Software.html}
1198 @end quotation
1199
1200
1201 @node Q1.3.8
1202 @unnumberedsec Q1.3.8: Does SXEmacs support Unicode?
1203
1204 Partially, as an external encoding for files, processes, and terminals.
1205 It does not yet support Unicode fonts @ref{Q1.3.9, Does SXEmacs support
1206 Unicode Fonts?}
1207
1208 To get Unicode support, you need a Mule-enabled SXEmacs.  Install
1209 Mule-UCS from packages in the usual way.  Put
1210
1211 @example
1212 (require 'un-define)
1213 (set-coding-priority-list '(utf-8))
1214 (set-coding-category-system 'utf-8 'utf-8)
1215 @end example
1216
1217 in your init file to enable the UTF-8 coding system.  You may wish to
1218 view the documentation of @code{set-coding-priority-list} if you find
1219 that files that are not UTF-8 are being mis-recognised as UTF-8.
1220
1221 Install standard national fonts (not Unicode fonts) for all
1222 character sets you use.  See @ref{Q1.3.9}.
1223
1224 Mule-UCS also supports 16-bit forms of Unicode (UTF-16).  It does not
1225 support 31-bit forms of Unicode (UTF-32 or UCS-4).
1226
1227
1228 @node Q1.3.9
1229 @unnumberedsec Q1.3.9: How does SXEmacs display Unicode?
1230
1231 Mule doesn't have a Unicode charset internally, so there's nothing to
1232 bind a Unicode registry to.  It would not be straightforward to create,
1233 either, because Unicode is not ISO 2022-compatible.  You'd have to
1234 translate it to multiple 96x96 pages.
1235
1236 This means that Mule-UCS uses ordinary national fonts for display.  This
1237 is not really a problem, except for those languages that use the Unified
1238 Han characters.  The problem here is that Mule-UCS maps from Unicode
1239 code points to national character sets in a deterministic way.  By
1240 default, this means that Japanese fonts are tried first, then Chinese,
1241 then Korean.  To change the priority ordering, use the command
1242 `un-define-change-charset-order'.
1243
1244 It also means you can't use Unicode fonts directly, at least not without
1245 extreme hackery.  You can run -nw with (set-terminal-coding-system
1246 'utf-8) if you really want a Unicode font for some reason.
1247
1248 Real Unicode support will be introduced in SXEmacs 22.2.
1249 @c will it?
1250
1251
1252 @node Q1.4.1
1253 @unnumberedsec 1.4: Getting Started, Backing up & Recovery
1254 @unnumberedsec Q1.4.1: What is an @file{init.el} or @file{.emacs} and is there a sample one?
1255
1256 The @file{init.el} or @file{.emacs} file is used to customise SXEmacs
1257 to your tastes.  The preferred location for the init
1258 file is @file{~/.sxemacs/init.el}.  We still accept the older location
1259 @file{~/.emacs}, but the first time you run it, it will ask to migrate
1260 your file to the new location.
1261 If you answer yes, the file will be moved, and a "compatibility"
1262 @file{.emacs} file will be placed in the old location so that you can
1263 still run older versions of XEmacs, or versions of GNU Emacs, which
1264 expect the old location.  The @file{.emacs} file present is just a
1265 stub that loads the real file in @file{~/.sxemacs/init.el}.
1266
1267 No two init files are alike, nor are they expected to be alike, but
1268 that's the point.  The SXEmacs distribution contains an excellent
1269 starter example in the @file{etc/} directory called
1270 @file{sample.init.el}.  Copy this file from there to
1271 @file{~/.sxemacs/init.el}, where @samp{~} means your home directory,
1272 of course.  Then edit it to suit.
1273
1274 You may bring the @file{sample.init.el} file into a SXEmacs buffer
1275 from the menubar.  The menu entry is always under the @samp{Samples}
1276 submenu in the @samp{Help} menu.  To determine the location of the
1277 @file{etc/} directory type the command @kbd{C-h v data-directory
1278 @key{RET}}.
1279
1280
1281 @node Q1.4.2
1282 @unnumberedsec Q1.4.2: Can I use the same @file{init.el}/@file{.emacs} with XEmacs or GNU Emacs?
1283
1284 Yes.  The sample @file{init.el} included in the SXEmacs
1285 distribution will show you how to handle different versions and flavours
1286 of Emacs.
1287
1288
1289 @node Q1.4.3
1290 @unnumberedsec Q1.4.3: Any good tutorials around?
1291
1292 There's the SXEmacs tutorial available from the Help Menu under
1293 @samp{Basics->Tutorials}, or by typing @kbd{C-h t}. To check whether
1294 it's available in a non-english language, type @kbd{C-u C-h t TAB}, type
1295 the first letters of your preferred language, then type @key{RET}.
1296
1297
1298 @node Q1.4.4
1299 @unnumberedsec Q1.4.4: May I see an example of a useful SXEmacs Lisp function?
1300
1301 The following function does a little bit of everything useful.  It does
1302 something with the prefix argument, it examines the text around the
1303 cursor, and it's interactive so it may be bound to a key.  It inserts
1304 copies of the current word the cursor is sitting on at the cursor.  If
1305 you give it a prefix argument: @kbd{C-u 3 M-x double-word} then it will
1306 insert 3 copies.
1307
1308 @lisp
1309 (defun double-word (count)
1310   "Insert a copy of the current word underneath the cursor"
1311   (interactive "*p")
1312   (let (here there string)
1313     (save-excursion
1314       (forward-word -1)
1315       (setq here (point))
1316       (forward-word 1)
1317       (setq there (point))
1318       (setq string (buffer-substring here there)))
1319     (while (>= count 1)
1320       (insert string)
1321       (decf count))))
1322 @end lisp
1323
1324 The best way to see what is going on here is to let SXEmacs tell you.
1325 Put the code into an SXEmacs buffer, and do a @kbd{C-h f} with the cursor
1326 sitting just to the right of the function you want explained.  Eg.  move
1327 the cursor to the SPACE between @code{interactive} and @samp{"*p"} and
1328 hit @kbd{C-h f} to see what the function @code{interactive} does.  Doing
1329 this will tell you that the @code{*} requires a writable buffer, and
1330 @code{p} converts the prefix argument to a number, and
1331 @code{interactive} allows you to execute the command with @kbd{M-x}.
1332
1333
1334 @node Q1.4.5
1335 @unnumberedsec Q1.4.5: And how do I bind it to a key?
1336
1337 To bind to a key do:
1338
1339 @lisp
1340 (global-set-key "\C-cd" 'double-word)
1341 @end lisp
1342
1343 Or interactively, @kbd{M-x global-set-key} and follow the prompts.
1344
1345
1346 @node Q1.4.6
1347 @unnumberedsec Q1.4.6: What's the difference between a macro and a function?
1348
1349 Quoting from the Lisp Reference (a.k.a @dfn{Lispref}) Manual:
1350
1351 @dfn{Macros} enable you to define new control constructs and other
1352 language features.  A macro is defined much like a function, but instead
1353 of telling how to compute a value, it tells how to compute another Lisp
1354 expression which will in turn compute the value.  We call this
1355 expression the @dfn{expansion} of the macro.
1356
1357 Macros can do this because they operate on the unevaluated expressions
1358 for the arguments, not on the argument values as functions do.  They can
1359 therefore construct an expansion containing these argument expressions
1360 or parts of them.
1361
1362 Do not confuse the two terms with @dfn{keyboard macros}, which are
1363 another matter, entirely.  A keyboard macro is a key bound to several
1364 other keys.  Refer to manual for details.
1365
1366
1367
1368 @node Installation, Customisation, Introduction, Top
1369 @unnumbered 2 Installation and Trouble Shooting
1370
1371 This is part 2 of the SXEmacs Frequently Asked Questions list.  This
1372 section is devoted to Installation, Maintenance and Trouble Shooting.
1373
1374 @menu
1375 Installation:
1376 * Q2.0.1::      Running SXEmacs without installing.
1377 * Q2.0.2::      SXEmacs is too big.
1378 * Q2.0.3::      Compiling SXEmacs with Netaudio. @c what?!
1379 * Q2.0.4::      Problems with Linux and ncurses.
1380 * Q2.0.5::      Do I need X11 to run SXEmacs?
1381 * Q2.0.6::      I'm having strange crashes.  What do I do?
1382 * Q2.0.7::      Libraries in non-standard locations.
1383 * Q2.0.8::      can't resolve symbol _h_errno
1384 * Q2.0.9::      Where do I find external libraries?
1385 * Q2.0.10::     After I run configure I find a coredump, is something wrong?
1386 * Q2.0.11::     SXEmacs can't resolve host names.
1387 * Q2.0.12::     Why can't I strip SXEmacs?
1388 * Q2.0.13::     I don't need no steenkin' packages.  Do I?
1389 * Q2.0.14::     How do I figure out which packages to install?
1390 * Q2.0.15::     EFS fails with "500 AUTH not understood" (NEW)
1391
1392 Trouble Shooting:
1393 * Q2.1.1::      SXEmacs just crashed on me!
1394 * Q2.1.2::      Cryptic Minibuffer messages.
1395 * Q2.1.3::      Translation Table Syntax messages at Startup.
1396 * Q2.1.4::      Startup warnings about deducing proper fonts?
1397 * Q2.1.5::      SXEmacs cannot connect to my X Terminal.
1398 * Q2.1.6::      SXEmacs just locked up my Linux X server.
1399 * Q2.1.7::      HP Alt key as Meta.
1400 * Q2.1.8::      got (wrong-type-argument color-instance-p nil)!
1401 * Q2.1.9::      SXEmacs causes my OpenWindows 3.0 server to crash.
1402 * Q2.1.10::     Warnings from incorrect key modifiers.
1403 * Q2.1.11::     Can't instantiate image error... in toolbar
1404 * Q2.1.12::     Regular Expression Problems on DEC OSF1.
1405 * Q2.1.13::     HP/UX 10.10 and @code{create_process} failure
1406 * Q2.1.14::     @kbd{C-g} doesn't work for me.  Is it broken?
1407 * Q2.1.15::     How to debug a SXEmacs problem with a debugger.
1408 * Q2.1.16::     SXEmacs crashes in @code{strcat} on HP/UX 10.
1409 * Q2.1.17::     @samp{Marker does not point anywhere}.
1410 * Q2.1.18::     SXEmacs is outputting lots of X errors.
1411 * Q2.1.19::     SXEmacs does not follow the local timezone.
1412 * Q2.1.20::     @samp{Symbol's function definition is void: hkey-help-show.}
1413 * Q2.1.21::     [This question intentionally left blank]
1414 * Q2.1.22::     SXEmacs seems to take a really long time to do some things.
1415 * Q2.1.23::     Movemail on Linux does not work for SXEmacs.
1416 * Q2.1.24::     SXEmacs won't start without network.
1417 * Q2.1.25::     After upgrading, SXEmacs won't do `foo' any more!
1418 @end menu
1419
1420
1421 @node Q2.0.1
1422 @unnumberedsec 2.0: Installation
1423 @unnumberedsec Q2.0.1: Running SXEmacs without installing
1424
1425 How can I just try SXEmacs without installing it?
1426
1427 SXEmacs will run in place without requiring installation and copying of
1428 the Lisp directories, and without having to specify a special build-time
1429 flag.  It's the copying of the Lisp directories that requires so much
1430 space.  SXEmacs is largely written in Lisp.
1431
1432
1433 @node Q2.0.2
1434 @unnumberedsec Q2.0.2: SXEmacs is too big
1435
1436 The space required by the installation directories can be
1437 reduced dramatically if desired.  Gzip all the .el files.  Remove all
1438 the packages you'll never want to use.  Remove the TexInfo manuals.
1439 Remove the Info (and use just hardcopy versions of the manual).  Remove
1440 most of the stuff in etc.  Remove or gzip all the source code.  Gzip or
1441 remove the C source code.  Configure it so that copies are not made of
1442 the support lisp.
1443
1444 These are all Emacs Lisp source code and bytecompiled object code.
1445 You may safely gzip everything named *.el here.  You may remove any
1446 package you don't use.  @emph{Nothing bad will happen if you delete a
1447 package that you do not use}.  You must be sure you do not use it
1448 though, so be conservative at first.
1449
1450 Any package with the possible exceptions of xemacs-base, and EFS are
1451 candidates for removal.  Ask yourself, @emph{Do I ever want to use this
1452 package?}  If the answer is no, then it is a candidate for removal.
1453
1454 First, gzip all the .el files.  Then go about package by package and
1455 start gzipping the .elc files.  Then run SXEmacs and do whatever it is
1456 you normally do.  If nothing bad happens, then remove the package.
1457 You can remove a package via the PUI interface (@kbd{M-x
1458 pui-list-packages}, then press @kbd{d} to mark the packages you wish
1459 to delete, and then @kbd{x} to delete them.
1460
1461 Another method is to do @kbd{M-x package-get-delete-package}.
1462
1463 @node Q2.0.3
1464 @unnumberedsec Q2.0.3: Compiling SXEmacs with Netaudio.
1465
1466 What is the best way to compile SXEmacs with the netaudio system,
1467 since I have got the netaudio system compiled but installed at a weird
1468 place, I am not root.  Also in the READMEs it does not say anything
1469 about compiling with the audioserver?
1470
1471 You should only need to add some stuff to the configure command line.
1472 @c To tell it to compile in netaudio support: @samp{--with-sound=both}, or
1473 @c @samp{--with-sound=nas} if you don't want native sound support for some
1474 @c reason.) To tell it where to find the netaudio includes and libraries:
1475
1476 @example
1477 --site-libraries=WHATEVER
1478 --site-includes=WHATEVER
1479 @end example
1480
1481 Then (fingers crossed) it should compile and it will use netaudio if
1482 you have a server running corresponding to the X server. The netaudio
1483 server has to be there when SXEmacs starts. If the netaudio server
1484 goes away and another is run, SXEmacs should cope (fingers crossed,
1485 error handling in netaudio isn't perfect).
1486
1487 BTW, netaudio has been renamed as it has a name clash with something
1488 else, so if you see references to NAS or Network Audio System, it's the
1489 same thing.  It also might be found at
1490 @uref{ftp://ftp.x.org/contrib/audio/nas/}.
1491
1492
1493 @node Q2.0.4
1494 @unnumberedsec Q2.0.4: Problems with Linux and ncurses.
1495
1496 @c On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with libc
1497 @c 5.2.18, XEmacs 20.0b20 is unable to open a tty device:
1498 @c @c oh great
1499 @c
1500 @c @example
1501 @c src/xemacs -nw -q
1502 @c Initialisation error:
1503 @c @iftex
1504 @c @*
1505 @c @end iftex
1506 @c Terminal type `xterm' undefined (or can't access database?)
1507 @c @end example
1508 @c
1509 @c @email{ben@@xemacs.org, Ben Wing} writes:
1510 @c
1511 @c @quotation
1512 @c Your ncurses configuration is messed up.  Your /usr/lib/terminfo is a
1513 @c bad pointer, perhaps to a CD-ROM that is not inserted.
1514 @c @end quotation
1515
1516 There are none!
1517
1518
1519 @node Q2.0.5
1520 @unnumberedsec Q2.0.5: Do I need X11 to run SXEmacs?
1521
1522 No.
1523
1524
1525 @node Q2.0.6
1526 @unnumberedsec Q2.0.6: I'm having strange crashes.  What do I do?
1527
1528 There have been a variety of reports of crashes due to compilers with
1529 buggy optimisers.  Please see the @file{PROBLEMS} file that comes with
1530 SXEmacs to read what it says about your platform.
1531
1532
1533 @node Q2.0.7
1534 @unnumberedsec Q2.0.7: Libraries in non-standard locations
1535
1536 I have x-faces, jpeg, xpm etc. all in different places.  I've tried
1537 space-separated, comma-separated, several --site-libraries, all to no
1538 avail.
1539
1540 @example
1541 --with-site-prefixes=/path/to/site1::/path/to/site2::/path/to/site3
1542 @end example
1543
1544
1545 @node Q2.0.8
1546 @unnumberedsec Q2.0.8: can't resolve symbol _h_errno
1547
1548 Does not apply anymore.
1549
1550
1551 @node Q2.0.9
1552 @unnumberedsec Q2.0.9: Where do I find external libraries?
1553
1554 Oh well ... we support far too many external libraries to list them
1555 here.  Have a glance at INSTALL to check if there are special
1556 instructions for some of the libraries you intend to use.
1557
1558
1559 @node Q2.0.10
1560 @unnumberedsec Q2.0.10: After I run configure I find a core dump, is something wrong?
1561
1562 @c @c WHOOOOOOOAT?!?!
1563 @c Not necessarily.  If you have GNU sed 3.0 you should downgrade it to
1564 @c 2.05.  From the @file{README} at prep.ai.mit.edu:
1565 @c
1566 @c @quotation
1567 @c sed 3.0 has been withdrawn from distribution.  It has major revisions,
1568 @c which mostly seem to be improvements; but it turns out to have bugs too
1569 @c which cause trouble in some common cases.
1570 @c
1571 @c Tom Lord won't be able to work fixing the bugs until May.  So in the
1572 @c mean time, we've decided to withdraw sed 3.0 from distribution and make
1573 @c version 2.05 once again the recommended version.
1574 @c @end quotation
1575 @c
1576 @c It has also been observed that the vfork test on Solaris will leave a
1577 @c core dump.
1578
1579 Send a build report.
1580
1581
1582 @node Q2.0.11
1583 @unnumberedsec Q2.0.11: SXEmacs doesn't resolve hostnames.
1584
1585 This is the result of a long-standing problem with SunOS and the fact
1586 that stock SunOS systems do not ship with DNS resolver code in libc.
1587
1588 @email{ckd@@loiosh.kei.com, Christopher Davis} writes:
1589
1590 @quotation
1591 That's correct [The SunOS 4.1.3 precompiled binaries don't do name
1592 lookup].  Since Sun figured that everyone used NIS to do name lookups
1593 (that DNS thing was apparently only a passing fad, right?), the stock
1594 SunOS 4.x systems don't have DNS-based name lookups in libc.
1595
1596 This is also why Netscape ships two binaries for SunOS 4.1.x.
1597
1598 The best solution is to compile it yourself; the configure script will
1599 check to see if you've put DNS in the shared libc and will then proceed
1600 to link against the DNS resolver library code.
1601 @end quotation
1602
1603
1604 @node Q2.0.12
1605 @unnumberedsec Q2.0.12: Why can't I strip SXEmacs?
1606
1607 @email{cognot@@fronsac.ensg.u-nancy.fr, Richard Cognot} writes:
1608
1609 @quotation
1610 Because of the way SXEmacs (and every other Emacsen, AFAIK) is
1611 built. The link gives you a bare-boned emacs (called temacs). temacs
1612 is then run, preloading some of the lisp files. The result is then
1613 dumped into a new executable, named xemacs, which will contain all of
1614 the preloaded lisp functions and data.
1615
1616 Now, during the dump itself, the executable (code+data+symbols) is
1617 written on disk using a special unexec() function. This function is
1618 obviously heavily system dependent. And on some systems, it leads to an
1619 executable which, although valid, cannot be stripped without damage. If
1620 memory serves, this is especially the case for AIX binaries. On other
1621 architectures it might work OK.
1622
1623 The Right Way to strip the emacs binary is to strip temacs prior to
1624 dumping xemacs. This will always work, although you can do that only if
1625 you install from sources (as temacs is @file{not} part of the binary
1626 kits).
1627 @end quotation
1628
1629 @email{nat@@nataa.fr.eu.org, Nat Makarevitch} writes:
1630
1631 @quotation
1632 Here is the trick:
1633
1634 @enumerate
1635 @item
1636 [ ./configure; make ]
1637
1638 @item
1639 rm src/sxemacs
1640
1641 @item
1642 strip src/temacs
1643
1644 @item
1645 make
1646
1647 @item
1648 cp src/sxemacs /usr/local/bin/sxemacs
1649
1650 @end enumerate
1651 @end quotation
1652
1653
1654 @node Q2.0.13
1655 @unnumberedsec Q2.0.13: I don't need no steenkin' packages.  Do I?
1656
1657 Strictly speaking, no.  SXEmacs will build and install just fine
1658 without any packages installed.  However, only the most basic editing
1659 functions will be available with no packages installed, so installing
1660 packages is an essential part of making your installed SXEmacs
1661 _useful_.
1662
1663
1664 @node Q2.0.14
1665 @unnumberedsec Q2.0.14: How do I figure out which packages to install?
1666
1667 Many people really liked the old way that packages were bundled and do
1668 not want to mess with packages at all.  You can grab all the packages at
1669 once like you used to with old SXEmacs versions.  Download the file
1670
1671 @file{xemacs-sumo.tar.gz}
1672
1673 For a SXEmacs compiled with Mule you also need
1674
1675 @file{xemacs-mule-sumo.tar.gz}
1676
1677 from the @file{packages} directory on your XEmacs mirror archive.
1678 N.B. They are called 'Sumo Tarballs' for good reason. They are
1679 currently about 15MB and 2.3MB (gzipped) respectively.
1680 @c mwhahahahaha, that'd load within a second here I think :P
1681
1682 Install them by
1683
1684 @code{cd $prefix/lib/sxemacs ; gunzip -c <tarballname> | tar xf -}
1685
1686 See README.packages for more detailed installation instructions.
1687
1688 As the Sumo tarballs are not regenerated as often as the individual
1689 packages, it is recommended that you use the automatic package tools
1690 afterwards to pick up any recent updates.
1691
1692
1693 @node Q2.0.15
1694 @unnumberedsec Q2.0.15: EFS fails with "500 AUTH not understood"
1695
1696 A typical error: FTP Error: USER request failed; 500 AUTH not understood.
1697
1698 Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends
1699 on comp.emacs.xemacs:
1700
1701    tell your ftp client to not attempt AUTH authentication (or do not
1702    use FTP servers that don't understand AUTH)
1703
1704 and notes that you need to add an element (often "-u") to
1705 @code{efs-ftp-program-args}.  Use @kbd{M-x customize-variable}, and
1706 verify the needed flag with @code{man ftp} or other local
1707 documentation.
1708
1709
1710 @node Q2.1.1
1711 @unnumberedsec 2.1: Trouble Shooting
1712 @unnumberedsec Q2.1.1: Help!  SXEmacs just crashed on me!
1713
1714 First of all, don't panic.  Whenever SXEmacs crashes, it tries
1715 extremely hard to auto-save all of your files before dying.  The main
1716 time that this will not happen is if the machine physically lost power
1717 or if you killed the SXEmacs process using @code{kill -9}.  The next
1718 time you try to edit those files, you will be informed that a more
1719 recent auto-save file exists.  You can use @kbd{M-x recover-file} to
1720 retrieve the auto-saved version of the file.
1721
1722 You can use the command @kbd{M-x recover-session} after a crash to pick
1723 up where you left off.
1724
1725 Now, SXEmacs is not perfect, and there may occasionally be times, or
1726 particular sequences of actions, that cause it to crash.  If you can
1727 come up with a reproducible way of doing this (or even if you have a
1728 pretty good memory of exactly what you were doing at the time), the
1729 maintainers would be very interested in knowing about it.  The best
1730 way to report a bug is using @kbd{M-x report-sxemacs-bug} (or by
1731 selecting @samp{Send Bug Report...} from the Help menu).  If that
1732 won't work (e.g. you can't get SXEmacs working at all), send ordinary
1733 mail to @email{sxemacs-devel@@sxemacs.org}. @emph{MAKE SURE} to
1734 include the output from the crash, especially including the Lisp
1735 backtrace, as well as the SXEmacs configuration from @kbd{M-x
1736 describe-installation} (or equivalently, the file @file{Installation}
1737 in the top of the build tree).
1738
1739 If at all possible, include a C stack backtrace of the core dump that
1740 was produced.  This shows where exactly things went wrong, and makes it
1741 much easier to diagnose problems.  To do this under Unix, you need to
1742 locate the core file (it's called @file{core}, and is usually sitting in
1743 the directory that you started SXEmacs from, or your home directory if
1744 that other directory was not writable).  Then, go to that directory and
1745 execute a command like:
1746
1747 @example
1748 gdb `which sxemacs` core
1749 @end example
1750
1751 and then issue the command @samp{where} to get the stack backtrace.  You
1752 might have to use @code{dbx} or some similar debugger in place of
1753 @code{gdb}.  If you don't have any such debugger available, complain to
1754 your system administrator.
1755
1756 It's possible that a core file didn't get produced, in which case you're
1757 out of luck.  Go complain to your system administrator and tell him not
1758 to disable core files by default.  Also see @ref{Q2.1.15}, for tips and
1759 techniques for dealing with a debugger.
1760
1761 When making a problem report make sure that:
1762
1763 @enumerate
1764 @item
1765 Report @strong{all} of the information output by SXEmacs during the
1766 crash.
1767
1768 @item
1769 You mention what OS & Hardware you are running SXEmacs on.
1770
1771 @item
1772 What version of SXEmacs you are running.  Equivalently, if you are
1773 using your own tla-branch of SXEmacs either tell where it is
1774 available or include to which degree your version resembles the
1775 mainline.
1776
1777 @item
1778 What build options you are using.
1779
1780 @item
1781 What are the versions of your libc and external libraries you use.
1782
1783 @item
1784 If the problem is related to graphics and you are running Unix, we will
1785 also need to know what version of the X Window System you are running,
1786 and what window manager you are using.
1787
1788 @item
1789 If the problem happened on a TTY, please include the terminal type.
1790 @end enumerate
1791
1792 Much of the information above is automatically generated by @kbd{M-x
1793 report-sxemacs-bug}.  Even more, and often useful, information can be
1794 generated by redirecting the output of @code{make} and @code{make check}
1795 to a file (@file{,,make-all.out} and @file{,,make-check.out} are the
1796 default used by @code{build-report}), and executing @kbd{M-x
1797 build-rpt}.
1798
1799
1800 @node Q2.1.2
1801 @unnumberedsec Q2.1.2: Cryptic Minibuffer messages.
1802
1803 When I try to use some particular option of some particular package, I
1804 get a cryptic error in the minibuffer.
1805
1806 If you can't figure out what's going on, select Options/General
1807 Options/Debug on Error from the Menubar and then try and make the error
1808 happen again.  This will give you a backtrace that may be enlightening.
1809 If not, try reading through this FAQ; if that fails, you could try
1810 posting to comp.emacs.xemacs (making sure to include the backtrace) and
1811 someone may be able to help.  If you can identify which Emacs lisp
1812 source file the error is coming from you can get a more detailed stack
1813 backtrace by doing the following:
1814
1815 @enumerate
1816 @item
1817 Visit the .el file in a SXEmacs buffer.
1818
1819 @item
1820 Issue the command @kbd{M-x eval-current-buffer}.
1821
1822 @item
1823 Reproduce the error.
1824 @end enumerate
1825
1826 Depending on the version of SXEmacs, you may either select View->Show
1827 Message Log (recent versions)from the menubar to see the most recent
1828 messages.  This command is bound to @kbd{C-h l} by default.
1829
1830
1831 @node Q2.1.3
1832 @unnumberedsec Q2.1.3: Translation Table Syntax messages at Startup
1833
1834 I get tons of translation table syntax error messages during startup.
1835 How do I get rid of them?
1836
1837 There are two causes of this problem.  The first usually only strikes
1838 people using the prebuilt binaries.  The culprit in both cases is the
1839 file @file{XKeysymDB}.
1840
1841 @itemize @bullet
1842 @item
1843 The binary cannot find the @file{XKeysymDB} file.  The location is
1844 hardcoded at compile time so if the system the binary was built on
1845 another machin and puts it a different place than your system does,
1846 you have problems.  To fix, set the environment variable
1847 @code{XKEYSYMDB} to the location of the @file{XKeysymDB} file on your
1848 system or to the location of the one included with SXEmacs which
1849 should be at
1850 @iftex
1851 @*
1852 @end iftex
1853 @file{<sxemacs_prefix>/lib/sxemacs-22.1.<x>/etc/XKeysymDB}.
1854
1855 @item
1856 The binary is finding the XKeysymDB but it is out-of-date on your
1857 system and does not contain the necessary lines.  Either ask your
1858 system administrator to replace it with the one which comes with
1859 SXEmacs (which is the stock R6 version and is backwards compatible) or
1860 set your @code{XKEYSYMDB} variable to the location of SXEmacs's
1861 described above.
1862 @end itemize
1863
1864
1865 @node Q2.1.4
1866 @unnumberedsec Q2.1.4: Startup warnings about deducing proper fonts?
1867
1868 How can I avoid the startup warnings about deducing proper fonts?
1869
1870 This is highly dependent on your installation, but try with the
1871 following font as your base font for SXEmacs and see what it does:
1872
1873 @format
1874 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
1875 @end format
1876
1877 More precisely, do the following in your resource file:
1878
1879 @format
1880 Emacs.default.attributeFont: \
1881 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
1882 @end format
1883
1884 If you just don't want to see the @samp{*Warnings*} buffer at startup
1885 time, you can set this:
1886
1887 @lisp
1888 (setq display-warning-minimum-level 'error)
1889 @end lisp
1890
1891 The buffer still exists; it just isn't in your face.
1892
1893
1894 @node Q2.1.5
1895 @unnumberedsec Q2.1.5: SXEmacs cannot connect to my X Terminal!
1896
1897 Help!  I can not get SXEmacs to display on my Envizex X-terminal!
1898
1899 Try setting the @code{DISPLAY} variable using the numeric IP address of
1900 the host you are running SXEmacs from.
1901
1902
1903 @node Q2.1.6
1904 @unnumberedsec Q2.1.6: SXEmacs just locked up my Linux X server!
1905
1906 There have been several reports of the X server locking up under
1907 Linux.  In all reported cases removing speedo and scaled fonts from
1908 the font path corrected the problem.  This can be done with the
1909 command @code{xset}.
1910
1911 It is possible that using a font server may also solve the problem.
1912
1913
1914 @node Q2.1.7
1915 @unnumberedsec Q2.1.7: HP Alt key as Meta.
1916
1917 How can I make SXEmacs recognize the Alt key of my HP workstation as a
1918 Meta key?
1919
1920 Put the following line into a file and load it with xmodmap(1) before
1921 starting SXEmacs:
1922
1923 @example
1924 remove Mod1 = Mode_switch
1925 @end example
1926
1927
1928 @node Q2.1.8
1929 @unnumberedsec Q2.1.8: got (wrong-type-argument color-instance-p nil)
1930
1931 @email{nataliek@@rd.scitec.com.au, Natalie Kershaw} writes:
1932
1933 @quotation
1934 I am trying to run xemacs 19.13 under X11R4. Whenever I move the mouse I
1935 get the following error. Has anyone seen anything like this? This
1936 doesn't occur on X11R5.
1937
1938 @lisp
1939 Signalling:
1940 (error "got (wrong-type-argument color-instance-p nil)
1941 and I don't know why!")
1942 @end lisp
1943 @end quotation
1944
1945 @email{map01kd@@gold.ac.uk, dinos} writes:
1946
1947 @quotation
1948 I think this is due to undefined resources; You need to define color
1949 backgrounds and foregrounds into your @file{.../app-defaults/Emacs}
1950 like:
1951
1952 @example
1953 *Foreground:    Black   ;everything will be of black on grey95,
1954 *Background:    Grey95  ;unless otherwise specified.
1955 *cursorColor:   Red3    ;red3 cursor with grey95 border.
1956 *pointerColor:  Red3    ;red3 pointer with grey95 border.
1957 @end example
1958 @end quotation
1959
1960 Natalie Kershaw adds:
1961
1962 @quotation
1963 What fixed the problem was adding some more colors to the X color
1964 database (copying the X11R5 colors over), and also defining the
1965 following resources:
1966
1967 @example
1968 xemacs*cursorColor:    black
1969 xemacs*pointerColor:   black
1970 @end example
1971
1972 With the new colors installed the problem still occurs if the above
1973 resources are not defined.
1974
1975 If the new colors are not present then an additional error occurs on
1976 SXEmacs startup, which says @samp{Color Red3} not defined.
1977 @end quotation
1978
1979
1980 @node Q2.1.9
1981 @unnumberedsec Q2.1.9: SXEmacs causes my OpenWindows 3.0 server to crash.
1982
1983 The OpenWindows 3.0 server is incredibly buggy.  Your best bet is to
1984 replace it with one from the generic MIT X11 release.  You might also
1985 try disabling parts of your @file{init.el}, like those that enable
1986 background pixmaps.
1987
1988
1989 @node Q2.1.10
1990 @unnumberedsec Q2.1.10: Warnings from incorrect key modifiers.
1991
1992 The following information comes from the @file{PROBLEMS} file that comes
1993 with SXEmacs.
1994
1995 If you're having troubles with HP/UX it is because HP/UX defines the
1996 modifiers wrong in X.  Here is a shell script to fix the problem; be
1997 sure that it is run after VUE configures the X server.
1998
1999 @example
2000 #! /bin/sh
2001 xmodmap 2> /dev/null - << EOF
2002 keysym Alt_L = Meta_L
2003 keysym Alt_R = Meta_R
2004 EOF
2005
2006 xmodmap - << EOF
2007 clear mod1
2008 keysym Mode_switch = NoSymbol
2009 add mod1 = Meta_L
2010 keysym Meta_R = Mode_switch
2011 add mod2 = Mode_switch
2012 EOF
2013 @end example
2014
2015
2016 @node Q2.1.11
2017 @unnumberedsec Q2.1.11: @samp{Can't instantiate image error...} in toolbar
2018 @c New
2019
2020 @email{expt@@alanine.ram.org, Dr. Ram Samudrala} writes:
2021
2022 I just installed the XEmacs (20.4-2) RPMS that I downloaded from
2023 @uref{http://www.xemacs.org/}.  Everything works fine, except that when
2024 I place my mouse over the toolbar, it beeps and gives me this message:
2025
2026 @example
2027  Can't instantiate image (probably cached):
2028  [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
2029  (16 16 <strange control characters> ...
2030 @end example
2031
2032 @email{kyle_jones@@wonderworks.com, Kyle Jones} writes:
2033 @quotation
2034 This is problem specific to some Chips and Technologies video
2035 chips, when running XFree86.  Putting
2036
2037 @code{Option "sw_cursor"}
2038
2039 in @file{XF86Config} gets rid of the problem.
2040 @end quotation
2041
2042
2043 @node Q2.1.12
2044 @unnumberedsec Q2.1.12: Problems with Regular Expressions on DEC OSF1.
2045
2046 @c I have xemacs 19.13 running on an alpha running OSF1 V3.2 148 and ispell
2047 @c would not run because it claimed the version number was incorrect
2048 @c although it was indeed OK. I traced the problem to the regular
2049 @c expression handler.
2050 @c
2051 @c @email{douglask@@dstc.edu.au, Douglas Kosovic} writes:
2052 @c
2053 @c @quotation
2054 @c Actually it's a DEC cc optimisation bug that screws up the regexp
2055 @c handling in XEmacs.
2056 @c
2057 @c Rebuilding using the @samp{-migrate} switch for DEC cc (which uses a
2058 @c different sort of optimisation) works fine.
2059 @c @end quotation
2060 @c
2061 @c See @file{xemacs-19_13-dunix-3_2c.patch} at the following URL on how to
2062 @c build with the @samp{-migrate} flag:
2063 @c
2064 @c @example
2065 @c @uref{http://www-digital.cern.ch/carney/emacs/emacs.html}
2066 @c @c Link above, <URL:http://www-digital.cern.ch/carney/emacs/emacs.html> is
2067 @c @c dead. And the directory `carney' is empty.
2068 @c
2069 @c
2070 @c
2071 @c @end example
2072 @c
2073 @c NOTE: There have been a variety of other problems reported that are
2074 @c fixed in this fashion.
2075
2076 Does not apply anymore.
2077
2078
2079 @node Q2.1.13
2080 @unnumberedsec Q2.1.13: HP/UX 10.10 and @code{create_process} failure.
2081
2082 @c @email{Dave.Carrigan@@ipl.ca, Dave Carrigan} writes:
2083 @c
2084 @c @quotation
2085 @c With XEmacs 19.13 and HP/UX 10.10, anything that relies on the
2086 @c @code{create_process} function fails. This breaks a lot of things
2087 @c (shell-mode, compile, ange-ftp, to name a few).
2088 @c @end quotation
2089 @c
2090 @c @email{johnson@@dtc.hp.com, Phil Johnson} writes:
2091 @c
2092 @c @quotation
2093 @c This is a problem specific to HP-UX 10.10.  It only occurs when XEmacs
2094 @c is compiled for shared libraries (the default), so you can work around
2095 @c it by compiling a statically-linked binary (run configure with
2096 @c @samp{--dynamic=no}).
2097 @c
2098 @c I'm not sure whether the problem is with a particular shared library or
2099 @c if it's a kernel problem which crept into 10.10.
2100 @c @end quotation
2101 @c
2102 @c @email{cognot@@ensg.u-nancy.fr, Richard Cognot} writes:
2103 @c
2104 @c @quotation
2105 @c I had a few problems with 10.10. Apparently, some of them were solved by
2106 @c forcing a static link of libc (manually).
2107 @c @end quotation
2108
2109 Does not apply anymore.
2110
2111
2112 @node Q2.1.14
2113 @unnumberedsec Q2.1.14: @kbd{C-g} doesn't work for me.  Is it broken?
2114
2115 @email{ben@@xemacs.org, Ben Wing} writes:
2116
2117 @quotation
2118 @kbd{C-g} does work for most people in most circumstances.  If it
2119 doesn't, there are only two explanations:
2120
2121 @enumerate
2122 @item
2123 The code is wrapped with a binding of @code{inhibit-quit} to
2124 @code{t}.  @kbd{Ctrl-Shift-G} should still work, I think.
2125
2126 @item
2127 SIGIO is broken on your system, but BROKEN_SIGIO isn't defined.
2128 @end enumerate
2129
2130 To test #2, try executing @code{(while t)} from the @samp{*scratch*}
2131 buffer.  If @kbd{C-g} doesn't interrupt, then you're seeing #2.
2132 @end quotation
2133
2134 @email{terra@@diku.dk, Morten Welinder} writes:
2135
2136 @quotation
2137 On some (but @emph{not} all) machines a hung SXEmacsen can be revived
2138 by @code{kill -FPE <pid>}.  This is a hack, of course, not a solution.
2139 This technique works on a Sun4 running 4.1.3_U1.  To see if it works
2140 for you, start another SXEmacs and test with that first.  If you get a
2141 core dump the method doesn't work and if you get @samp{Arithmetic
2142 error} then it does.
2143 @end quotation
2144
2145
2146 @node Q2.1.15
2147 @unnumberedsec Q2.1.15: How to debug a SXEmacs problem with a debugger
2148
2149 If SXEmacs does crash on you, one of the most productive things you
2150 can do to help get the bug fixed is to poke around a bit with the
2151 debugger.  Here are some hints:
2152
2153 @itemize @bullet
2154 @item
2155 First of all, if the crash is at all reproducible, consider very
2156 strongly recompiling your SXEmacs with debugging symbols and with no
2157 optimisation (e.g. with GCC use the compiler flags @samp{-g -O0} --
2158 that's an "oh" followed by a zero), and with the configure options
2159 @samp{--debug=yes} and @samp{--error-checking=all}.  This will make
2160 your SXEmacs run somewhat slower, but you are a lot more likely to
2161 catch the problem earlier (closer to its source).  It makes it a lot
2162 easier to determine what's going on with a debugger.
2163
2164 @item
2165 If it's not a true crash (@emph{i.e.}, SXEmacs is hung, or a zombie
2166 process), or it's inconvenient to run SXEmacs again because SXEmacs is
2167 already running or is running in batch mode as part of a bunch of
2168 scripts, you may be able to attach to the existing process with your
2169 debugger.  Most debuggers let you do this by substituting the process ID
2170 for the core file when you invoke the debugger from the command line, or
2171 by using the @code{attach} command or something similar.
2172
2173 @item
2174 If you're able to run SXEmacs under a debugger and reproduce the crash,
2175 here are some things you can do:
2176
2177 @item
2178 If SXEmacs is hitting an assertion failure, put a breakpoint on
2179 @code{assert_failed()}.
2180
2181 @item
2182 If SXEmacs is hitting some weird Lisp error that's causing it to crash
2183 (e.g. during startup), put a breakpoint on @code{signal_1()}---this is
2184 declared static in eval.c.
2185
2186 @item
2187 If SXEmacs is outputting lots of X errors, put a breakpoint on
2188 @code{x_error_handler()}; that will tell you which call is causing them.
2189
2190 @item
2191 Internally, you will probably see lots of variables that hold objects of
2192 type @code{Lisp_Object}.  These are references to Lisp objects.
2193 Printing them out with the debugger probably won't be too
2194 useful---you'll likely just see a number.  To decode them, do this:
2195
2196 @example
2197 call dp (OBJECT)
2198 @end example
2199
2200 where @var{OBJECT} is whatever you want to decode (it can be a variable,
2201 a function call, etc.).  This uses the Lisp printing routines to out a
2202 readable representation on the TTY from which the sxemacs process was
2203 invoked.
2204
2205 @item
2206 If you want to get a Lisp backtrace showing the Lisp call
2207 stack, do this:
2208
2209 @example
2210 call db ()
2211 @end example
2212
2213 @item
2214 Using @code{dp} and @code{db} has two disadvantages - they can only be
2215 used with a running (including hung or zombie) sxemacs process, and they
2216 do not display the internal C structure of a Lisp Object.  Even if all
2217 you've got is a core dump, all is not lost.
2218
2219 If you're using GDB, there are some macros in the file
2220 @file{src/.gdbinit} in the SXEmacs source distribution that should
2221 make it easier for you to decode Lisp objects.  This file is
2222 automatically read by gdb if gdb is run in the directory where sxemacs
2223 was built, and contains these useful macros to inspect the state of
2224 sxemacs:
2225
2226 @table @code
2227 @item pobj
2228 Usage: pobj lisp_object @*
2229 Print the internal C representation of a lisp object.
2230
2231 @item xtype
2232 Usage: xtype lisp_object @*
2233 Print the Lisp type of a lisp object.
2234
2235 @item lbt
2236 Usage: lbt @*
2237 Print the current Lisp stack trace.
2238 Requires a running sxemacs process.  (It works by calling the db
2239 routine described above.)
2240
2241 @item ldp
2242 Usage: ldp lisp_object @*
2243 Print a Lisp Object value using the Lisp printer.
2244 Requires a running sxemacs process.  (It works by calling the dp
2245 routine described above.)
2246
2247 @item run-temacs
2248 Usage: run-temacs @*
2249 Run temacs interactively, like sxemacs.
2250 Use this with debugging tools (like purify) that cannot deal with
2251 dumping, or when temacs builds successfully, but sxemacs does not.
2252
2253 @item dump-temacs
2254 Usage: dump-temacs @*
2255 Run the dumping part of the build procedure.
2256 Use when debugging temacs, not sxemacs!
2257 Use this when temacs builds successfully, but sxemacs does not.
2258
2259 @item check-sxemacs
2260 Usage: check-sxemacs @*
2261 Run the test suite.  Equivalent to 'make check'.
2262
2263 @item check-temacs
2264 Usage: check-temacs @*
2265 Run the test suite on temacs.  Equivalent to 'make check-temacs'.
2266 Use this with debugging tools (like purify) that cannot deal with dumping,
2267 or when temacs builds successfully, but sxemacs does not.
2268 @end table
2269
2270 If you are using Sun's @file{dbx} debugger, there is an equivalent file
2271 @file{src/.dbxrc}, which defines the same commands for dbx.
2272
2273 @item
2274 If you're using a debugger to get a C stack backtrace and you're seeing
2275 stack traces with some of the innermost frames mangled, it may be due to
2276 dynamic linking. (This happens especially under Linux.) Consider
2277 reconfiguring with @samp{--dynamic=no}.  Also, sometimes (again under
2278 Linux), stack backtraces of core dumps will have the frame where the
2279 fatal signal occurred mangled; if you can obtain a stack trace while
2280 running the SXEmacs process under a debugger, the stack trace should
2281 be clean.
2282
2283 @c @email{1CMC3466@@ibm.mtsac.edu, Curtiss} suggests upgrading to ld.so
2284 @c version 1.8 if dynamic linking and debugging is a problem on Linux.
2285
2286 @item
2287 If you're using a debugger to get a C stack backtrace and you're
2288 getting a completely mangled and bogus stack trace, it's probably due to
2289 one of the following:
2290
2291 @enumerate a
2292 @item
2293 Your executable has been stripped.  Bad news.  Tell your sysadmin not to
2294 do this---it doesn't accomplish anything except to save a bit of disk
2295 space, and makes debugging much much harder.
2296
2297 @item
2298 Your stack is getting trashed.  Debugging this is hard; you have to do a
2299 binary-search type of narrowing down where the crash occurs, until you
2300 figure out exactly which line is causing the problem.  Of course, this
2301 only works if the bug is highly reproducible.  Also, in many cases if
2302 you run SXEmacs from the debugger, the debugger can protect the stack
2303 somewhat.  However, if the stack is being smashed, it is typically the
2304 case that there is a wild pointer somewhere in the program, often
2305 quite far from where the crash occurs.
2306
2307 @item
2308 If your stack trace has exactly one frame in it, with address 0x0, this
2309 could simply mean that SXEmacs attempted to execute code at that
2310 address, e.g. through jumping to a null function pointer.
2311 Unfortunately, under those circumstances, GDB under Linux doesn't know
2312 how to get a stack trace.
2313 Yes, this is the fourth Linux-related problem I've mentioned.  I
2314 have no idea why GDB under Linux is so bogus.  Complain to the GDB
2315 authors, or to comp.os.linux.development.system.  Again, you'll have
2316 to use the narrowing-down process described above.
2317
2318 @item
2319 You will get a Lisp backtrace output when SXEmacs crashes, so you'll have
2320 something useful.
2321
2322 @end enumerate
2323 @end itemize
2324
2325
2326 @node Q2.1.16
2327 @unnumberedsec Q2.1.16: SXEmacs crashes in @code{strcat} on HP/UX 10
2328
2329 From the problems database (through
2330 the former address http://support.mayfield.hp.com/):
2331
2332 @example
2333 Problem Report: 5003302299
2334 Status:         Open
2335
2336 System/Model:   9000/700
2337 Product Name:   HPUX S800 10.0X
2338 Product Vers:   9245XB.10.00
2339
2340 Description: strcat(3C) may read beyond
2341 end of source string, can cause SIGSEGV
2342
2343
2344 *** PROBLEM TEXT ***
2345 strcat(3C) may read beyond the source string onto an unmapped page,
2346 causing a segmentation violation.
2347 @end example
2348
2349
2350 @node Q2.1.17
2351 @unnumberedsec Q2.1.17: @samp{Marker does not point anywhere}
2352
2353 As with other errors, set @code{debug-on-error} to @code{t} to get the
2354 backtrace when the error occurs.
2355
2356
2357 @node Q2.1.18
2358 @unnumberedsec Q2.1.18: SXEmacs is outputting lots of X errors.
2359
2360 If this is happening, we would very much like to know what's causing
2361 them.  To find this out, see @ref{Q2.1.15}.  Try to get both a C and Lisp
2362 backtrace, and send them to @email{sxemacs-devel@@sxemacs.org}.
2363
2364
2365 @node Q2.1.19
2366 @unnumberedsec Q2.1.19: SXEmacs does not follow the local timezone.
2367
2368 When using one of the prebuilt binaries many users have observed that
2369 SXEmacs uses the timezone under which it was built, but not the
2370 timezone under which it is running.  The solution is to add:
2371
2372 @lisp
2373 (set-time-zone-rule "MET")
2374 @end lisp
2375
2376 to your @file{init.el} or the @file{site-start.el} file if you can.
2377 Replace @code{MET} with your local timezone.
2378
2379
2380 @node Q2.1.20
2381 @unnumberedsec Q2.1.20: @samp{Symbol's function definition is void: hkey-help-show.}
2382
2383 This is a problem with a partially loaded hyperbole.  Try adding:
2384
2385 @lisp
2386 (require 'hmouse-drv)
2387 @end lisp
2388
2389 where you load hyperbole and the problem should go away.
2390
2391
2392 @node Q2.1.21
2393 @unnumberedsec Q2.1.21: [This question intentionally left blank]
2394
2395
2396 @node Q2.1.22
2397 @unnumberedsec Q2.1.22: SXEmacs seems to take a really long time to do some things
2398
2399 @email{dmoore@@ucsd.edu, David Moore} writes:
2400
2401 @quotation
2402 Two things you can do:
2403
2404 1) C level:
2405
2406 When you see it going mad like this, you might want to use gdb from an
2407 'xterm' to attach to the running process and get a stack trace.  To do
2408 this just run:
2409
2410 @example
2411 gdb /path/to/sxemacs/sxemacs ####
2412 @end example
2413
2414 Where @code{####} is the process id of your sxemacs, instead of
2415 specifying the core.  When gdb attaches, the sxemacs will stop [1] and
2416 you can type `where' in gdb to get a stack trace as usual.  To get
2417 things moving again, you can just type `quit' in gdb.  It'll tell you
2418 the program is running and ask if you want to quit anyways.  Say 'y' and
2419 it'll quit and have your emacs continue from where it was at.
2420
2421 2) Lisp level:
2422
2423 Turn on debug-on-quit early on.  When you think things are going slow
2424 hit C-g and it may pop you in the debugger so you can see what routine
2425 is running.  Press `c' to get going again.
2426
2427 debug-on-quit doesn't work if something's turned on inhibit-quit or in
2428 some other strange cases.
2429 @end quotation
2430
2431
2432 @node Q2.1.23
2433 @unnumberedsec Q2.1.23:  Movemail on Linux does not work for SXEmacs
2434
2435 @email{steve@@xemacs.org, SL Baur} writes:
2436
2437 @quotation
2438 Movemail on Linux used to default to using flock file locking.  It now
2439 defaults to using @code{.lock} file locking.  If this is not
2440 appropriate for your system, edit src/s/linux.h and uncomment the line
2441 that reads:
2442
2443 @example
2444 #define MAIL_USE_FLOCK
2445 @end example
2446 @end quotation
2447
2448
2449 @node Q2.1.24
2450 @unnumberedsec Q2.1.24:  SXEmacs won't start without network.
2451
2452 If SXEmacs starts when you're on the network, but fails when you're not
2453 on the network, you may be missing a "localhost" entry in your
2454 @file{/etc/hosts} file.  The file should contain an entry like:
2455
2456 @example
2457 127.0.0.1        localhost
2458 @end example
2459
2460 Add that line, and SXEmacs will be happy.
2461
2462
2463 @node Q2.1.25
2464 @unnumberedsec Q2.1.25::  After upgrading, SXEmacs won't do `foo' any more!
2465
2466 You have been used to doing `foo', but now when you invoke it (or click
2467 the toolbar button or select the menu item), nothing (or an error)
2468 happens.  The simplest explanation is that you are missing a package
2469 that is essential to you.  You can either track it down and install it
2470 (there is a list of packages and brief descriptions of their contents in
2471 @file{etc/PACKAGES}), or install the `Sumo Tarball' (@pxref{Q2.0.14}).
2472
2473 @c #### should xref to XEmacs manual here
2474
2475
2476 @node Customisation, Subsystems, Installation, Top
2477 @unnumbered 3 Customisation and Options
2478
2479 This is part 3 of the SXEmacs Frequently Asked Questions list.  This
2480 section is devoted to Customisation and screen settings.
2481
2482 @menu
2483 Customisation---Emacs Lisp and @file{init.el}/@file{.emacs}:
2484 * Q3.0.1::      What version of Emacs am I running?
2485 * Q3.0.2::      How do I evaluate Elisp expressions?
2486 * Q3.0.3::      @code{(setq tab-width 6)} behaves oddly.
2487 * Q3.0.4::      How can I add directories to the @code{load-path}?
2488 * Q3.0.5::      How to check if a lisp function is defined?
2489 * Q3.0.6::      Can I force the output of @code{(face-list)} to a buffer?
2490 * Q3.0.7::      Font selections don't get saved after @code{Save Options}.
2491 * Q3.0.8::      How do I make a single minibuffer frame?
2492 * Q3.0.9::      What is @code{Customize}?
2493
2494 X Window System & Resources:
2495 * Q3.1.1::      Where is a list of X resources?
2496 * Q3.1.2::      How can I detect a color display?
2497 * Q3.1.3::      [This question intentionally left blank]
2498 * Q3.1.4::      [This question intentionally left blank]
2499 * Q3.1.5::      How can I get the icon to just say @samp{SXEmacs}?
2500 * Q3.1.6::      How can I have the window title area display the full path?
2501 * Q3.1.7::      @samp{sxemacs -name junk} doesn't work?
2502 * Q3.1.8::      @samp{-iconic} doesn't work.
2503
2504 Textual Fonts & Colors:
2505 * Q3.2.1::      How can I set color options from @file{init.el}?
2506 * Q3.2.2::      How do I set the text, menu and modeline fonts?
2507 * Q3.2.3::      How can I set the colors when highlighting a region?
2508 * Q3.2.4::      How can I limit color map usage?
2509 * Q3.2.5::      My tty supports color, but SXEmacs doesn't use them.
2510 * Q3.2.6::      Can I have pixmap backgrounds in SXEmacs?
2511 * Q3.2.7::      How do I display non-ASCII characters?
2512
2513 The Modeline:
2514 * Q3.3.1::      How can I make the modeline go away?
2515 * Q3.3.2::      How do you have SXEmacs display the line number in the modeline?
2516 * Q3.3.3::      How do I get SXEmacs to put the time of day on the modeline?
2517 * Q3.3.4::      How do I turn off current chapter from AUC TeX modeline?
2518 * Q3.3.5::      How can one change the modeline color based on the mode used?
2519
2520 Multiple Device Support:
2521 * Q3.4.1::      How do I open a frame on another screen of my multi-headed display?
2522 * Q3.4.2::      Can I really connect to a running SXEmacs after calling up over a modem?  How?
2523
2524 The Keyboard:
2525 * Q3.5.1::      How can I bind complex functions (or macros) to keys?
2526 * Q3.5.2::      How can I stop down-arrow from adding empty lines to the bottom of my buffers?
2527 * Q3.5.3::      How do I bind C-. and C-; to scroll one line up and down?
2528 * Q3.5.4::      Globally binding @kbd{Delete}?
2529 * Q3.5.5::      Scrolling one line at a time.
2530 * Q3.5.6::      How to map @kbd{Help} key alone on Sun type4 keyboard?
2531 * Q3.5.7::      How can you type in special characters in SXEmacs?
2532 * Q3.5.8::      [This question intentionally left blank]
2533 * Q3.5.9::      How do I make the Delete key delete forward?
2534 * Q3.5.10::     Can I turn on @dfn{sticky} modifier keys?
2535 * Q3.5.11::     How do I map the arrow keys?
2536
2537 The Cursor:
2538 * Q3.6.1::      Is there a way to make the bar cursor thicker?
2539 * 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?
2540 * Q3.6.3::      Can I make the cursor blink?
2541
2542 The Mouse and Highlighting:
2543 * Q3.7.1::      How can I turn off Mouse pasting?
2544 * Q3.7.2::      How do I set control/meta/etc modifiers on mouse buttons?
2545 * Q3.7.3::      Clicking the left button does not do anything in buffer list.
2546 * Q3.7.4::      How can I get a list of buffers when I hit mouse button 3?
2547 * Q3.7.5::      Why does cut-and-paste not work between SXEmacs and a cmdtool?
2548 * Q3.7.6::      How I can set SXEmacs up so that it pastes where the text cursor is?
2549 * Q3.7.7::      How do I select a rectangular region?
2550 * Q3.7.8::      Why does @kbd{M-w} take so long?
2551
2552 The Menubar and Toolbar:
2553 * Q3.8.1::      How do I get rid of the menu (or menubar)?
2554 * Q3.8.2::      Can I customise the basic menubar?
2555 * Q3.8.3::      How do I control how many buffers are listed in the menu @code{Buffers} list?
2556 * Q3.8.4::      Resources like @code{Emacs*menubar*font} are not working?
2557 * Q3.8.5::      How can I bind a key to a function to toggle the toolbar?
2558
2559 Scrollbars:
2560 * Q3.9.1::      How can I disable the scrollbar?
2561 * Q3.9.2::      How can one use resources to change scrollbar colors?
2562 * Q3.9.3::      Moving the scrollbar can move the point; can I disable this?
2563 * Q3.9.4::      How can I turn off automatic horizontal scrolling in specific modes?
2564
2565 Text Selections:
2566 * Q3.10.1::     How can I turn off or change highlighted selections?
2567 * Q3.10.2::     How do I get that typing on an active region removes it?
2568 * Q3.10.3::     Can I turn off the highlight during isearch?
2569 * Q3.10.4::     How do I turn off highlighting after @kbd{C-x C-p} (mark-page)?
2570 * Q3.10.5::     The region disappears when I hit the end of buffer while scrolling.
2571 * Q3.10.6::     Why is killing so slow?
2572 @end menu
2573
2574 @node Q3.0.1
2575 @unnumberedsec 3.0: Customisation -- Emacs Lisp and @file{init.el}
2576 @unnumberedsec Q3.0.1: What version of Emacs am I running?
2577
2578 How can @file{init.el} determine which of the family of
2579 Emacsen I am using?
2580
2581 To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
2582 XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
2583 example given in @file{etc/sample.init.el}.  There are other nifty
2584 things in there as well!
2585
2586 For all new code, you can use the variables @code{running-xemacs} and
2587 @code{running-sxemacs} or something like
2588
2589 @lisp
2590 (when (featurep 'sxemacs)
2591   ...)
2592 (when (featurep 'xemacs)
2593   ...)
2594 @end lisp
2595 @noindent
2596 as well.
2597
2598 Please note, that you should double check these values, if you intend
2599 to use xemacs-exclusive features.  Both, the variable
2600 @code{running-xemacs} and the form @code{(featurep 'xemacs)} evaluate
2601 to @code{t} within SXEmacs.  This is due to compatibility reasons.
2602
2603
2604 @node Q3.0.2
2605 @unnumberedsec Q3.0.2: How can I evaluate Emacs-Lisp expressions?
2606
2607 I know I can evaluate Elisp expressions from @code{*scratch*} buffer
2608 with @kbd{C-j} after the expression.  How do I do it from another
2609 buffer?
2610
2611 Press @kbd{M-:} (the default binding of @code{eval-expression}), and
2612 enter the expression to the minibuffer.
2613
2614
2615 @node Q3.0.3
2616 @unnumberedsec Q3.0.3: @code{(setq tab-width 6)} behaves oddly.
2617
2618 If you put @code{(setq tab-width 6)} in your @file{init.el} file it
2619 does not work!  Is there a reason for this?  If you do it at the EVAL
2620 prompt it works fine!! How strange.
2621
2622 Use @code{setq-default} instead, since @code{tab-width} is
2623 all-buffer-local.
2624
2625
2626 @node Q3.0.4
2627 @unnumberedsec Q3.0.4: How can I add directories to the @code{load-path}?
2628
2629 Here are two ways to do that, one that puts your directories at the
2630 front of the load-path, the other at the end:
2631
2632 @lisp
2633 ;;; Add things at the beginning of the load-path, do not add
2634 ;;; duplicate directories:
2635 (pushnew "bar" load-path :test 'equal)
2636
2637 (pushnew "foo" load-path :test 'equal)
2638
2639 ;;; Add things at the end, unconditionally
2640 (setq load-path (nconc load-path '("foo" "bar")))
2641 @end lisp
2642
2643 @email{keithh@@nortel.ca, keith (k.p.) hanlan} writes:
2644
2645 @quotation
2646 To add directories using Unix shell metacharacters use
2647 @file{expand-file-name} like this:
2648
2649 @lisp
2650 (push (expand-file-name "~keithh/.emacsdir") load-path)
2651 @end lisp
2652 @end quotation
2653
2654
2655 @node Q3.0.5
2656 @unnumberedsec Q3.0.5: How to check if a lisp function is defined?
2657
2658 Use the following elisp:
2659
2660 @lisp
2661 (fboundp 'foo)
2662 @end lisp
2663
2664 It's almost always a mistake to test @code{emacs-version} or any similar
2665 variables.
2666
2667 Instead, use feature-tests, such as @code{featurep}, @code{boundp},
2668 @code{fboundp}, or even simple behavioral tests, eg.:
2669
2670 @lisp
2671 (defvar foo-old-losing-code-p
2672   (condition-case nil (progn (losing-code t) nil)
2673     (wrong-number-of-arguments t)))
2674 @end lisp
2675
2676 There is an incredible amount of broken code out there which could work
2677 much better more often in more places if it did the above instead of
2678 trying to divine its environment from the value of one variable.
2679
2680
2681 @node Q3.0.6
2682 @unnumberedsec Q3.0.6: Can I force the output of @code{(face-list)} to a buffer?
2683
2684 It would be good having it in a buffer, as the output of
2685 @code{(face-list)} is too wide to fit to a minibuffer.
2686
2687 Evaluate the expression in the @samp{*scratch*} buffer with point after
2688 the rightmost paren and typing @kbd{C-j}.
2689
2690 If the minibuffer smallness is the only problem you encounter, you can
2691 simply press @kbd{C-h l} to get the former minibuffer contents in a
2692 buffer.
2693
2694
2695 @node Q3.0.7
2696 @unnumberedsec Q3.0.7: Font selections in don't get saved after @code{Save Options}.
2697
2698 @email{mannj@@ll.mit.edu, John Mann} writes:
2699
2700 @quotation
2701 You have to go to Options->Frame Appearance and unselect
2702 @samp{Frame-Local Font Menu}.  If this option is selected, font changes
2703 are only applied to the @emph{current} frame and do @emph{not} get saved
2704 when you save options.
2705 @end quotation
2706
2707 Also, set the following in your @file{init.el}:
2708
2709 @lisp
2710 (setq options-save-faces t)
2711 @end lisp
2712
2713
2714 @node Q3.0.8
2715 @unnumberedsec Q3.0.8: How do I get a single minibuffer frame?
2716
2717 @email{acs@@acm.org, Vin Shelton} writes:
2718
2719 @lisp
2720 (setq initial-frame-plist '(minibuffer nil))
2721 (setq default-frame-plist '(minibuffer nil))
2722 (setq default-minibuffer-frame
2723       (make-frame
2724        '(minibuffer only
2725                     width 86
2726                     height 1
2727                     menubar-visible-p nil
2728                     default-toolbar-visible-p nil
2729                     name "minibuffer"
2730                     top -2
2731                     left -2
2732                     has-modeline-p nil)))
2733 (frame-notice-user-settings)
2734 @end lisp
2735
2736 @strong{Please note:} The single minibuffer frame may not be to everyone's
2737 taste, and there any number of other SXEmacs options settings that may
2738 make it difficult or inconvenient to use.
2739
2740
2741 @node Q3.0.9
2742 @unnumberedsec Q3.0.9: What is @code{Customize}?
2743
2744 Starting with XEmacs 20.2 there is new system 'Customize' for customising
2745 SXEmacs options.
2746
2747 You can access @code{Customize} from the @code{Options} menu
2748 or invoking one of customize commands by typing eg.
2749 @kbd{M-x customize}, @kbd{M-x customize-face},
2750 @kbd{M-x customize-variable} or @kbd{M-x customize-apropos}.
2751
2752 Also try out with @kbd{M-x customize-browse}
2753
2754
2755 @node Q3.1.1
2756 @unnumberedsec 3.1: X Window System & Resources
2757 @unnumberedsec Q3.1.1: Where is a list of X resources?
2758
2759 Search through the @file{NEWS} file for @samp{X Resources}.  A fairly
2760 comprehensive list is given after it.
2761
2762 In addition, an @file{app-defaults} file @file{etc/Emacs.ad} is
2763 supplied, listing the defaults.  The file @file{etc/sample.Xresources}
2764 gives a different set of defaults that you might consider for
2765 installation in your @file{~/.Xresources} file.  It is nearly the same
2766 as @file{etc/Emacs.ad}, but a few entries are altered.  Be careful about
2767 installing the contents of this file into your @file{.Xresources} (or
2768 legacy @file{.Xdefaults}) file if you use GNU Emacs under X11 as well.
2769
2770
2771 @node Q3.1.2
2772 @unnumberedsec Q3.1.2: How can I detect a color display?
2773
2774 You can test the return value of the function @code{(device-class)}, as
2775 in:
2776
2777 @lisp
2778 (when (eq (device-class) 'color)
2779   (set-face-foreground  'font-lock-comment-face "Grey")
2780   (set-face-foreground  'font-lock-string-face  "Red")
2781   ....
2782   )
2783 @end lisp
2784
2785
2786 @node Q3.1.3
2787 @unnumberedsec Q3.1.3: [This question intentionally left blank]
2788
2789 @node Q3.1.4
2790 @unnumberedsec Q3.1.4: [This question intentionally left blank]
2791
2792
2793 @node Q3.1.5
2794 @unnumberedsec Q3.1.5: How can I get the icon to just say @samp{SXEmacs}?
2795
2796 I'd like the icon to just say @samp{SXEmacs}, and not include the name of
2797 the current file in it.
2798
2799 Add the following line to your @file{init.el}:
2800
2801 @lisp
2802 (setq frame-icon-title-format "SXEmacs")
2803 @end lisp
2804
2805
2806 @node Q3.1.6
2807 @unnumberedsec Q3.1.6: How can I have the window title area display the full path?
2808
2809 I'd like to have the window title area display the full directory/name
2810 of the current buffer file and not just the name.
2811
2812 Add the following line to your @file{init.el}:
2813
2814 @lisp
2815 (setq frame-title-format "%S: %f")
2816 @end lisp
2817
2818 A more sophisticated title might be:
2819
2820 @lisp
2821 (setq frame-title-format
2822       '("%S: " (buffer-file-name "%f"
2823                                  (dired-directory dired-directory "%b"))))
2824 @end lisp
2825
2826 That is, use the file name, or the dired-directory, or the buffer name.
2827
2828
2829 @node Q3.1.7
2830 @unnumberedsec Q3.1.7: @samp{sxemacs -name junk} doesn't work?
2831
2832 When I run @samp{xterm -name junk}, I get an xterm whose class name
2833 according to xprop, is @samp{junk}.  This is the way it's supposed to
2834 work, I think.  When I run @samp{sxemacs -name junk} the class name is
2835 not set to @samp{junk}.  It's still @samp{emacs}.  What does
2836 @samp{sxemacs -name} really do?  The reason I ask is that my window
2837 manager (fvwm) will make a window sticky and I use SXEmacs to read my
2838 mail.  I want that SXEmacs window to be sticky, without having to use the
2839 window manager's function to set the window sticky.  What gives?
2840
2841 @samp{sxemacs -name} sets the application name for the program (that is,
2842 the thing which normally comes from @samp{argv[0]}).  Using @samp{-name}
2843 is the same as making a copy of the executable with that new name.  The
2844 @code{WM_CLASS} property on each frame is set to the frame-name, and the
2845 application-class.  So, if you did @samp{sxemacs -name FOO} and then
2846 created a frame named @var{BAR}, you'd get an X window with WM_CLASS =
2847 @code{( "BAR", "Emacs")}.  However, the resource hierarchy for this
2848 widget would be:
2849
2850 @example
2851 Name:    FOO   .shell             .container   .BAR
2852 Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
2853 @end example
2854
2855 instead of the default
2856
2857 @example
2858 Name:    sxemacs.shell            .container   .emacs
2859 Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
2860 @end example
2861
2862
2863 It is arguable that the first element of WM_CLASS should be set to the
2864 application-name instead of the frame-name, but I think that's less
2865 flexible, since it does not give you the ability to have multiple frames
2866 with different WM_CLASS properties.  Another possibility would be for
2867 the default frame name to come from the application name instead of
2868 simply being @samp{emacs}.  However, at this point, making that change
2869 would be troublesome: it would mean that many users would have to make
2870 yet another change to their resource files (since the default frame name
2871 would suddenly change from @samp{emacs} to @samp{sxemacs}, or whatever
2872 the executable happened to be named), so we'd rather avoid it.
2873
2874 To make a frame with a particular name use:
2875
2876 @lisp
2877 (make-frame '((name . "the-name")))
2878 @end lisp
2879
2880
2881 @node Q3.1.8
2882 @unnumberedsec Q3.1.8: @samp{-iconic} doesn't work.
2883
2884 When I start up SXEmacs using @samp{-iconic} it doesn't work right.
2885 Using @samp{-unmapped} on the command line, and setting the
2886 @code{initiallyUnmapped} X Resource don't seem to help much either...
2887
2888 @email{ben@@xemacs.org, Ben Wing} writes:
2889
2890 @quotation
2891 Ugh, this stuff is such an incredible mess that I've about given up
2892 getting it to work.  The principal problem is numerous window-manager
2893 bugs...
2894 @end quotation
2895
2896
2897 @node Q3.2.1
2898 @unnumberedsec 3.2: Textual Fonts & Colors
2899 @unnumberedsec Q3.2.1: How can I set color options from @file{init.el}?
2900
2901 How can I set the most commonly used color options from my
2902 @file{init.el} instead of from my @file{.Xresources}?
2903
2904 Like this:
2905
2906 @lisp
2907 (set-face-background 'default      "bisque") ; frame background
2908 (set-face-foreground 'default      "black") ; normal text
2909 (set-face-background 'zmacs-region "red") ; When selecting w/
2910                                         ; mouse
2911 (set-face-foreground 'zmacs-region "yellow")
2912 (set-face-font       'default      "*courier-bold-r*120-100-100*")
2913 (set-face-background 'highlight    "blue") ; Ie when selecting
2914                                         ; buffers
2915 (set-face-foreground 'highlight    "yellow")
2916 (set-face-background 'modeline     "blue") ; Line at bottom
2917                                         ; of buffer
2918 (set-face-foreground 'modeline     "white")
2919 (set-face-font       'modeline     "*bold-r-normal*140-100-100*")
2920 (set-face-background 'isearch      "yellow") ; When highlighting
2921                                         ; while searching
2922 (set-face-foreground 'isearch      "red")
2923 (setq x-pointer-foreground-color   "black") ; Adds to bg color,
2924                                         ; so keep black
2925 (setq x-pointer-background-color   "blue") ; This is color
2926                                         ; you really
2927                                         ; want ptr/crsr
2928 @end lisp
2929
2930
2931 @node Q3.2.2
2932 @unnumberedsec Q3.2.2: How do I set the text, menu and modeline fonts?
2933
2934 Note that you should use @samp{Emacs.} and not @samp{Emacs*} when
2935 setting face values.
2936
2937 In @file{.Xresources}:
2938
2939 @example
2940 Emacs.default.attributeFont:  -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
2941 Emacs*menubar*font:           fixed
2942 Emacs.modeline.attributeFont: fixed
2943 @end example
2944
2945 This is confusing because @samp{default} and @samp{modeline} are face
2946 names, and can be found listed with all faces in the current mode by
2947 using @kbd{M-x set-face-font (enter) ?}.  They use the face-specific
2948 resource @samp{attributeFont}.
2949
2950 On the other hand, @samp{menubar} is a normal X thing that uses the
2951 resource @samp{font}.  With Motif it @emph{may be} necessary to use
2952 @samp{fontList} @emph{instead of} @samp{font}.  In @emph{non-Motif}
2953 configurations with Mule it @emph{is} necessary to use @samp{fontSet}
2954 instead of @samp{font}.  (Sorry, there just is no simple recipe here.)
2955
2956
2957 @node Q3.2.3
2958 @unnumberedsec Q3.2.3: How can I set the colors when highlighting a region?
2959
2960 How can I set the background/foreground colors when highlighting a
2961 region?
2962
2963 You can change the face @code{zmacs-region} either in your
2964 @file{.Xresources}:
2965
2966 @example
2967 Emacs.zmacs-region.attributeForeground: firebrick
2968 Emacs.zmacs-region.attributeBackground: lightseagreen
2969 @end example
2970
2971 or in your @file{init.el}:
2972
2973 @lisp
2974 (set-face-background 'zmacs-region "red")
2975 (set-face-foreground 'zmacs-region "yellow")
2976 @end lisp
2977
2978
2979 @node Q3.2.4
2980 @unnumberedsec Q3.2.4: How can I limit color map usage?
2981
2982 I'm using Netscape (or another color grabber like SXEmacs);
2983 is there any way to limit the number of available colors in the color map?
2984
2985 Answer: No, but you can start Netscape before SXEmacs, and it will use
2986 the closest available color if the colormap is full.  You can also limit
2987 the number of colors Netscape uses, using the flags -mono, -ncols <#> or
2988 -install (for mono, limiting to <#> colors, or for using a private color
2989 map).
2990
2991 If you have the money, another solution would be to use a truecolor or
2992 direct color video.
2993
2994
2995 @node Q3.2.5
2996 @unnumberedsec Q3.2.5: My tty supports color, but SXEmacs doesn't use them.
2997
2998 SXEmacs tries to automatically determine whether your tty supports color,
2999 but sometimes guesses wrong.  In that case, you can make SXEmacs Do The
3000 Right Thing using this Lisp code:
3001
3002 @lisp
3003 (if (eq 'tty (device-type))
3004     (set-device-class nil 'color))
3005 @end lisp
3006
3007
3008 @node Q3.2.6
3009 @unnumberedsec Q3.2.6: Can I have pixmap backgrounds in SXEmacs?
3010 @c New
3011 @email{jvillaci@@wahnsinnig.extreme.indiana.edu, Juan Villacis} writes:
3012
3013 @quotation
3014 There are several ways to do it.  For example, you could specify a
3015 default pixmap image to use in your @file{~/.Xresources}, e.g.,
3016
3017
3018 @example
3019   Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
3020 @end example
3021
3022
3023 and then reload ~/.Xresources and restart SXEmacs.  Alternatively,
3024 since each face can have its own pixmap background, a better way
3025 would be to set a face's pixmap within your SXEmacs init file, e.g.,
3026
3027 @lisp
3028   (set-face-background-pixmap 'default "/path/to/image.xpm")
3029   (set-face-background-pixmap 'bold    "/path/to/another_image.xpm")
3030 @end lisp
3031
3032 and so on.  You can also do this interactively via @kbd{M-x edit-faces}.
3033
3034 @end quotation
3035
3036
3037 @node Q3.2.7
3038 @unnumberedsec Q3.2.7: How do I display non-ASCII characters?
3039 @c New
3040
3041 If you're using a Mule-enabled SXEmacs, then display is automatic.  If
3042 you're not seeing the characters you expect, either (1) you don't have
3043 appropriate fonts available or (2) SXEmacs did not correctly detect the
3044 coding system (@pxref{Recognize Coding, , , sxemacs}).  In case (1),
3045 install fonts as is customary for your platform.  In case (2), you
3046 need to tell SXEmacs explicitly what coding systems you're using.
3047 @ref{Specify Coding, , , sxemacs}.
3048
3049 If your SXEmacs is not Mule-enabled, and for some reason getting a
3050 Mule-enabled SXEmacs seems like the wrong thing to do, all is not lost.
3051 You can arrange it by brute force.  In @file{event-Xt.c} (suppress the
3052 urge to look in this file---play Doom instead, because you'll survive
3053 longer), it is written:
3054
3055 @quotation
3056 In a non-Mule world, a user can still have a multi-lingual editor, by
3057 doing @code{(set-face-font "-*-iso8859-2" (current-buffer))} for all
3058 their Latin-2 buffers, etc.
3059 @end quotation
3060
3061 For the related problem of @emph{inputting} non-ASCII characters in a
3062 non-Mule SXEmacs, @xref{Q3.5.7}.
3063
3064
3065 @node Q3.3.1
3066 @unnumberedsec 3.3: The Modeline
3067 @unnumberedsec Q3.3.1: How can I make the modeline go away?
3068
3069 @lisp
3070 (set-specifier has-modeline-p nil)
3071 @end lisp
3072
3073
3074 @node Q3.3.2
3075 @unnumberedsec Q3.3.2: How do you have SXEmacs display the line number in the modeline?
3076
3077 Add the following line to your @file{init.el} file to
3078 display the line number:
3079
3080 @lisp
3081 (line-number-mode 1)
3082 @end lisp
3083
3084 Use the following to display the column number:
3085
3086 @lisp
3087 (column-number-mode 1)
3088 @end lisp
3089
3090 Or select from the @code{Options} menu
3091 @iftex
3092 @*
3093 @end iftex
3094 @code{Advanced (Customize)->Emacs->Editing->Basics->Line Number Mode}
3095 and/or
3096 @iftex
3097 @*
3098 @end iftex
3099 @code{Advanced (Customize)->Emacs->Editing->Basics->Column Number Mode}
3100
3101 Or type @kbd{M-x customize @key{RET} editing-basics @key{RET}}.
3102
3103
3104 @node Q3.3.3
3105 @unnumberedsec Q3.3.3: How do I get SXEmacs to put the time of day on the modeline?
3106
3107 Add the following line to your @file{init.el}/@file{.emacs} file to
3108 display the time:
3109
3110 @lisp
3111 (display-time)
3112 @end lisp
3113
3114 See @code{Customize} from the @code{Options} menu for customisation.
3115
3116
3117 @node Q3.3.4
3118 @unnumberedsec Q3.3.4: How do I turn off current chapter from AUC TeX modeline?
3119
3120 With AUC TeX, fast typing is hard because the current chapter, section
3121 etc. are given in the modeline.  How can I turn this off?
3122
3123 It's not AUC TeX, it comes from @code{func-menu} in @file{func-menu.el}.
3124
3125 @c Add this code to your @file{init.el}/@file{.emacs} to turn it off:
3126 @c
3127 @c @lisp
3128 @c (setq fume-display-in-modeline-p nil)
3129 @c @end lisp
3130 @c
3131 @c Or just add a hook to @code{TeX-mode-hook} to turn it off only for TeX
3132 @c mode:
3133 @c
3134 @c @lisp
3135 @c (add-hook 'TeX-mode-hook
3136 @c           '(lambda () (setq fume-display-in-modeline-p nil)))
3137 @c @end lisp
3138 @c
3139 @email{dhughes@@origin-at.co.uk, David Hughes} writes:
3140
3141 @quotation
3142 Try this; you'll still get the function name displayed in the modeline,
3143 but it won't attempt to keep track when you modify the file. To refresh
3144 when it gets out of synch, you simply need click on the @samp{Rescan
3145 Buffer} option in the function-menu.
3146
3147 @lisp
3148 (setq-default fume-auto-rescan-buffer-p nil)
3149 @end lisp
3150 @end quotation
3151
3152
3153 @node Q3.3.5
3154 @unnumberedsec Q3.3.5: How can one change the modeline color based on the mode used?
3155
3156 You can use something like the following:
3157
3158 @lisp
3159 (add-hook 'lisp-mode-hook
3160           (lambda ()
3161             (set-face-background 'modeline "red" (current-buffer))))
3162 @end lisp
3163
3164 Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
3165 colors change from the default set in your @file{init.el}.
3166 The change will only be made in the buffer you just entered (which
3167 contains the Lisp file you are editing) and will not affect the modeline
3168 colors anywhere else.
3169
3170 Notes:
3171
3172 @itemize @bullet
3173
3174 @item The hook is the mode name plus @code{-hook}.  eg. c-mode-hook,
3175 c++-mode-hook, emacs-lisp-mode-hook (used for your
3176 @file{init.el} or a @file{xx.el} file),
3177 lisp-interaction-mode-hook (the @samp{*scratch*} buffer),
3178 text-mode-hook, etc.
3179
3180 @item
3181 Be sure to use @code{add-hook}, not @code{(setq c-mode-hook xxxx)},
3182 otherwise you will erase anything that anybody has already put on the
3183 hook.
3184
3185 @item
3186 You can also do @code{(set-face-font 'modeline @var{font})},
3187 eg. @code{(set-face-font 'modeline "*bold-r-normal*140-100-100*"
3188 (current-buffer))} if you wish the modeline font to vary based on the
3189 current mode.
3190 @end itemize
3191
3192 There are additional modeline faces, @code{modeline-buffer-id},
3193 @code{modeline-mousable}, and @code{modeline-mousable-minor-mode}, which
3194 you may want to customize.
3195
3196
3197 @node Q3.4.1
3198 @unnumberedsec 3.4: Multiple Device Support
3199 @unnumberedsec Q3.4.1: How do I open a frame on another screen of my multi-headed display?
3200
3201 Use the command @kbd{M-x make-frame-on-display}.  This command is also
3202 on the File menu in the menubar.
3203
3204 The command @code{make-frame-on-tty} also exists, which will establish a
3205 connection to any tty-like device.  Opening the TTY devices should be
3206 left to @code{gnuclient}, though.
3207
3208
3209 @node Q3.4.2
3210 @unnumberedsec Q3.4.2: Can I really connect to a running SXEmacs after calling up over a modem?  How?
3211
3212 Yes.  Use @code{gnuclient -nw}.
3213
3214 Also see @ref{Q5.0.12}.
3215
3216
3217 @node Q3.5.1
3218 @unnumberedsec 3.5: The Keyboard
3219 @unnumberedsec Q3.5.1: How can I bind complex functions (or macros) to keys?
3220
3221 As an example, say you want the @kbd{paste} key on a Sun keyboard to
3222 insert the current Primary X selection at point. You can accomplish this
3223 with:
3224
3225 @lisp
3226 (define-key global-map [f18] 'x-insert-selection)
3227 @end lisp
3228
3229 However, this only works if there is a current X selection (the
3230 selection will be highlighted).  The functionality I like is for the
3231 @kbd{paste} key to insert the current X selection if there is one,
3232 otherwise insert the contents of the clipboard.  To do this you need to
3233 pass arguments to @code{x-insert-selection}.  This is done by wrapping
3234 the call in a 'lambda form:
3235
3236 @lisp
3237 (global-set-key [f18]
3238   (lambda () (interactive) (x-insert-selection t nil)))
3239 @end lisp
3240
3241 This binds the f18 key to a @dfn{generic} functional object.  The
3242 interactive spec is required because only interactive functions can be
3243 bound to keys.
3244
3245 For the FAQ example you could use:
3246
3247 @lisp
3248 (global-set-key [(control ?.)]
3249   (lambda () (interactive) (scroll-up 1)))
3250 (global-set-key [(control ?;)]
3251   (lambda () (interactive) (scroll-up -1)))
3252 @end lisp
3253
3254 This is fine if you only need a few functions within the lambda body.
3255 If you're doing more it's cleaner to define a separate function as in
3256 question 3.5.3 (@pxref{Q3.5.3}).
3257
3258
3259 @node Q3.5.2
3260 @unnumberedsec Q3.5.2: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
3261
3262 Add the following line to your @file{init.el} file:
3263
3264 @lisp
3265 (setq next-line-add-newlines nil)
3266 @end lisp
3267
3268 This has been the default setting in SXEmacs for some time.
3269
3270
3271 @node Q3.5.3
3272 @unnumberedsec Q3.5.3: How do I bind C-. and C-; to scroll one line up and down?
3273
3274 Add the following (Thanks to @email{mly@@adoc.xerox.com, Richard Mlynarik} and
3275 @email{wayne@@zen.cac.stratus.com, Wayne Newberry}) to @file{.emacs}:
3276
3277 @lisp
3278 (defun scroll-up-one-line ()
3279   (interactive)
3280   (scroll-up 1))
3281
3282 (defun scroll-down-one-line ()
3283   (interactive)
3284   (scroll-down 1))
3285
3286 (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
3287 (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
3288 @end lisp
3289
3290 The key point is that you can only bind simple functions to keys; you
3291 can not bind a key to a function that you're also passing arguments to.
3292 (@pxref{Q3.5.1} for a better answer).
3293
3294
3295 @node Q3.5.4
3296 @unnumberedsec Q3.5.4: Globally binding @kbd{Delete}?
3297
3298 I cannot manage to globally bind my @kbd{Delete} key to something other
3299 than the default.  How does one do this?
3300
3301 Answer: The problem is that many modes explicitly bind @kbd{Delete}.  To
3302 get around this, try the following:
3303
3304 @lisp
3305 (defun foo ()
3306   (interactive)
3307   (message "You hit DELETE"))
3308
3309 (define-key key-translation-map 'delete 'redirected-delete)
3310 (global-set-key 'redirected-delete 'foo)
3311 @end lisp
3312
3313 Also see @ref{Q3.5.10}.
3314
3315
3316 @node Q3.5.5
3317 @unnumberedsec Q3.5.5: Scrolling one line at a time.
3318
3319 Can the cursor keys scroll the screen a line at a time, rather than the
3320 default half page jump?  I tend it to find it disorienting.
3321
3322 Try this:
3323
3324 @lisp
3325 (defun scroll-one-line-up (&optional arg)
3326   "Scroll the selected window up (forward in the text) one line (or N lines)."
3327   (interactive "p")
3328   (scroll-up (or arg 1)))
3329
3330 (defun scroll-one-line-down (&optional arg)
3331   "Scroll the selected window down (backward in the text) one line (or N)."
3332   (interactive "p")
3333   (scroll-down (or arg 1)))
3334
3335 (global-set-key [up]   'scroll-one-line-up)
3336 (global-set-key [down] 'scroll-one-line-down)
3337 @end lisp
3338
3339 The following will also work but will affect more than just the cursor
3340 keys (i.e. @kbd{C-n} and @kbd{C-p}):
3341
3342 @lisp
3343 (setq scroll-step 1)
3344 @end lisp
3345
3346 You can also change this with Customize.
3347 Select from the @code{Options} menu
3348 @code{Advanced (Customize)->Emacs->Environment->Windows->Scroll Step...} or type
3349 @kbd{M-x customize @key{RET} windows @key{RET}}.
3350
3351
3352 @node Q3.5.6
3353 @unnumberedsec Q3.5.6: How to map @kbd{Help} key alone on Sun type4 keyboard?
3354
3355 The following works in GNU Emacs 19:
3356
3357 @lisp
3358 (global-set-key [help] 'help-command);; Help
3359 @end lisp
3360
3361 The following works in SXEmacs with the addition of shift:
3362
3363 @lisp
3364 (global-set-key [(shift help)] 'help-command);; Help
3365 @end lisp
3366
3367 But it doesn't work alone.  This is in the file @file{PROBLEMS} which
3368 should have come with your SXEmacs installation: @emph{Emacs ignores the
3369 @kbd{help} key when running OLWM}.
3370
3371 OLWM grabs the @kbd{help} key, and retransmits it to the appropriate
3372 client using
3373 @iftex
3374 @*
3375 @end iftex
3376 @code{XSendEvent}.  Allowing Emacs to react to synthetic
3377 events is a security hole, so this is turned off by default.  You can
3378 enable it by setting the variable @code{x-allow-sendevents} to t.  You
3379 can also cause fix this by telling OLWM to not grab the help key, with
3380 the null binding @code{OpenWindows.KeyboardCommand.Help:}.
3381
3382
3383 @node Q3.5.7
3384 @unnumberedsec Q3.5.7: How can you type in special characters in SXEmacs?
3385 @c Changed
3386 One way is to use the package @code{x-compose}.  Then you can use
3387 sequences like @kbd{Compose " a} to get ä, etc.
3388
3389 Another way is to use the @code{iso-insert} package. Then you can use
3390 sequences like @kbd{C-x 8 " a} to get ä, etc.
3391
3392 @email{glynn@@sensei.co.uk, Glynn Clements} writes:
3393
3394 @quotation
3395 It depends upon your X server.
3396
3397 Generally, the simplest way is to define a key as Multi_key with
3398 xmodmap, e.g.
3399 @c hey, show some respect, willya -- there's xkeycaps, isn't there? --
3400 @c chr ;)
3401 @example
3402         xmodmap -e 'keycode 0xff20 = Multi_key'
3403 @end example
3404
3405 You will need to pick an appropriate keycode. Use xev to find out the
3406 keycodes for each key.
3407
3408 [NB: On a `Windows' keyboard, recent versions of XFree86 automatically
3409 define the right `Windows' key as Multi_key'.]
3410
3411 Once you have Multi_key defined, you can use e.g.
3412 @example
3413         Multi a '       => á
3414         Multi e "       => ë
3415         Multi c ,       => ç
3416 @end example
3417
3418 etc.
3419
3420 Also, recent versions of XFree86 define various AltGr-<key>
3421 combinations as dead keys, i.e.
3422 @example
3423         AltGr [         => dead_diaeresis
3424         AltGr ]         => dead_tilde
3425         AltGr ;         => dead_acute
3426 @end example
3427 etc.
3428
3429 Running @samp{xmodmap -pk} will list all of the defined keysyms.
3430 @end quotation
3431
3432 For the related problem of @emph{displaying} non-ASCII characters in a
3433 non-Mule SXEmacs, @xref{Q3.2.7}.
3434
3435
3436 @node Q3.5.8
3437 @unnumberedsec Q3.5.8: [This question intentionally left blank]
3438
3439 Obsolete question, left blank to avoid renumbering.
3440
3441
3442 @node Q3.5.9
3443 @unnumberedsec Q3.5.9: How do I make the Delete key delete forward?
3444
3445 A solution is to set variable @code{delete-key-deletes-forward} to t.
3446 You can also change this with Customize. Select from the
3447 @code{Options} menu @code{Advanced
3448 (Customize)->Emacs->Editing->Basics->Delete Key Deletes Forward} or
3449 type @kbd{M-x customize @key{RET} editing-basics @key{RET}}.
3450
3451 Also see @ref{Q3.5.4}.
3452
3453
3454 @node Q3.5.10
3455 @unnumberedsec Q3.5.10: Can I turn on @dfn{sticky} modifier keys?
3456
3457 Yes, with @code{(setq modifier-keys-are-sticky t)}.  This will give the
3458 effect of being able to press and release Shift and have the next
3459 character typed come out in upper case.  This will affect all the other
3460 modifier keys like Control and Meta as well.
3461
3462 @email{ben@@xemacs.org, Ben Wing} writes:
3463
3464 @quotation
3465 One thing about the sticky modifiers is that if you move the mouse out
3466 of the frame and back in, it cancels all currently ``stuck'' modifiers.
3467 @end quotation
3468
3469 @node Q3.5.11
3470 @unnumberedsec Q3.5.11: How do I map the arrow keys?
3471 @c New
3472 Say you want to map @kbd{C-@key{right}} to forward-word:
3473
3474 @email{sds@@usa.net, Sam Steingold} writes:
3475
3476 @quotation
3477 @lisp
3478 ; both (S)XEmacs and Emacs
3479 (define-key global-map [(control right)] 'forward-word)
3480 @end lisp
3481 or
3482 @lisp
3483 ; Emacs only
3484 (define-key global-map [C-right] 'forward-word)
3485 @end lisp
3486 or
3487 @lisp
3488 ; ver > 20, both
3489 (define-key global-map (kbd "C-<right>") 'forward-word)
3490 @end lisp
3491 @end quotation
3492
3493
3494
3495 @node Q3.6.1
3496 @unnumberedsec 3.6: The Cursor
3497 @unnumberedsec Q3.6.1: Is there a way to make the bar cursor thicker?
3498
3499 I'd like to have the bar cursor a little thicker, as I tend to "lose" it
3500 often.
3501
3502 For a 1 pixel bar cursor, use:
3503
3504 @lisp
3505 (setq bar-cursor t)
3506 @end lisp
3507
3508 For a 2 pixel bar cursor, use:
3509
3510 @lisp
3511 (setq bar-cursor 'anything-else)
3512 @end lisp
3513
3514 You can also change these with Customize.  Select from the
3515 @code{Options} menu @code{Advanced
3516 (Customize)->Emacs->Environment->Display->Bar Cursor...} or type
3517 @kbd{M-x customize @key{RET} display @key{RET}}.
3518
3519 You can use a color to make it stand out better:
3520
3521 @example
3522 Emacs*cursorColor:      Red
3523 @end example
3524
3525
3526 @node Q3.6.2
3527 @unnumberedsec Q3.6.2: Is there a way to get back the block cursor?
3528
3529 @lisp
3530 (setq bar-cursor nil)
3531 @end lisp
3532
3533 You can also change this with Customize.  Select from the
3534 @code{Options} menu @code{Advanced
3535 (Customize)->Emacs->Environment->Display->Bar Cursor...} or type
3536 @kbd{M-x customize @key{RET} display @key{RET}}.
3537
3538
3539 @node Q3.6.3
3540 @unnumberedsec Q3.6.3: Can I make the cursor blink?
3541
3542 Yes, like this:
3543
3544 @lisp
3545 (blink-cursor-mode)
3546 @end lisp
3547
3548 This function toggles between a steady cursor and a blinking cursor.
3549 You may also set this mode from the menu bar by selecting @samp{Options
3550 => Frame Appearance => Blinking Cursor}.  Remember to save options.
3551
3552
3553 @node Q3.7.1
3554 @unnumberedsec 3.7: The Mouse and Highlighting
3555 @unnumberedsec Q3.7.1: How can I turn off Mouse pasting?
3556
3557 I keep hitting the middle mouse button by accident and getting stuff
3558 pasted into my buffer so how can I turn this off?
3559
3560 Here is an alternative binding, whereby the middle mouse button selects
3561 (but does not cut) the expression under the mouse. Clicking middle on a
3562 left or right paren will select to the matching one.  Note that you can
3563 use @code{define-key} or @code{global-set-key}.
3564
3565 @lisp
3566 (defun mouse-set-point-and-select (event)
3567   "Sets the point at the mouse location, then marks following form"
3568   (interactive "@@e")
3569   (mouse-set-point event)
3570   (mark-sexp 1))
3571 (define-key global-map [button2] 'mouse-set-point-and-select)
3572 @end lisp
3573
3574
3575 @node Q3.7.2
3576 @unnumberedsec Q3.7.2: How do I set control/meta/etc modifiers on mouse buttons?
3577
3578 Use, for instance, @code{[(meta button1)]}. For example, here is a common
3579 setting for Common Lisp programmers who use the bundled @code{ilisp}
3580 package, whereby meta-button1 on a function name will find the file where
3581 the function name was defined, and put you at that location in the source
3582 file.
3583
3584 [Inside a function that gets called by the lisp-mode-hook and
3585 ilisp-mode-hook]
3586
3587 @lisp
3588 (local-set-key [(meta button1)] 'edit-definitions-lisp)
3589 @end lisp
3590
3591
3592 @node Q3.7.3
3593 @unnumberedsec Q3.7.3: Clicking the left button does not do anything in buffer list.
3594
3595 I do @kbd{C-x C-b} to get a list of buffers and the entries get
3596 highlighted when I move the mouse over them but clicking the left mouse
3597 does not do anything.
3598
3599 Use the middle mouse button.
3600
3601
3602 @node Q3.7.4
3603 @unnumberedsec Q3.7.4: How can I get a list of buffers when I hit mouse button 3?
3604
3605 The following code will replace the default popup on button3:
3606
3607 @lisp
3608 (global-set-key [button3] 'popup-buffer-menu)
3609 @end lisp
3610
3611
3612 @node Q3.7.5
3613 @unnumberedsec Q3.7.5: Why does cut-and-paste not work between SXEmacs and a cmdtool?
3614
3615 We don't know.  It's a bug.  There does seem to be a work-around,
3616 however.  Try running xclipboard first.  It appears to fix the problem
3617 even if you exit it..
3618
3619
3620 @node Q3.7.6
3621 @unnumberedsec Q3.7.6: How I can set SXEmacs up so that it pastes where the text cursor is?
3622
3623 By default SXEmacs pastes X selections where the mouse pointer is.  How
3624 do I disable this?
3625
3626 Examine the function @code{mouse-yank}, by typing @kbd{C-h f mouse-yank
3627 @key{RET}}.
3628
3629 To get SXEmacs to paste at the text cursor, add this your @file{init.el}:
3630
3631 @lisp
3632 (setq mouse-yank-at-point t)
3633 @end lisp
3634
3635 You can also change this with Customize.  Select from the
3636 @code{Options} menu @code{Advanced
3637 (Customize)->Emacs->Editing->Mouse->Yank At Point...} or type @kbd{M-x
3638 customize @key{RET} mouse @key{RET}}.
3639
3640
3641 @node Q3.7.7
3642 @unnumberedsec Q3.7.7: How do I select a rectangular region?
3643
3644 Just select the region normally, then use the rectangle commands (e.g.
3645 @code{kill-rectangle} on it.  The region does not highlight as a
3646 rectangle, but the commands work just fine.
3647
3648 To actually sweep out rectangular regions with the mouse you can use
3649 @code{mouse-track-do-rectangle} which is assigned to @kbd{M-button1}.
3650 Then use rectangle commands.
3651
3652 You can also do the following to change default behavior to sweep out
3653 rectangular regions:
3654
3655 @lisp
3656 (setq mouse-track-rectangle-p t)
3657 @end lisp
3658
3659 You can also change this with Customize.  Select from the
3660 @code{Options} menu @code{Advanced
3661 (Customize)->Emacs->Editing->Mouse->Track Rectangle...} or type
3662 @kbd{M-x customize @key{RET} mouse @key{RET}}.
3663
3664
3665 @example
3666  mouse-track-do-rectangle: (event)
3667    -- an interactive compiled Lisp function.
3668  Like `mouse-track' but selects rectangles instead of regions.
3669 @end example
3670
3671
3672 @node Q3.7.8
3673 @unnumberedsec Q3.7.8: Why does @kbd{M-w} take so long?
3674
3675 It actually doesn't.  It leaves the region visible for a second so that
3676 you can see what area is being yanked.  If you start working, though, it
3677 will immediately complete its operation.  In other words, it will only
3678 delay for a second if you let it.
3679
3680
3681 @node Q3.8.1
3682 @unnumberedsec 3.8: The Menubar and Toolbar
3683 @unnumberedsec Q3.8.1: How do I get rid of the menu (or menubar)?
3684
3685 @c If you are running XEmacs 19.13 or earlier, add this command to your
3686 @c @file{init.el}/@file{.emacs}.
3687 @c
3688 @c @lisp
3689 @c (set-menubar nil)
3690 @c @end lisp
3691 @c
3692 @c Starting with XEmacs 19.14 the preferred method is:
3693 @c
3694 @lisp
3695 (set-specifier menubar-visible-p nil)
3696 @end lisp
3697
3698
3699 @node Q3.8.2
3700 @unnumberedsec Q3.8.2: Can I customise the basic menubar?
3701
3702 For an extensive menubar, add this line to your @file{init.el}:
3703
3704 @lisp
3705 (load "big-menubar")
3706 @end lisp
3707
3708 If you'd like to write your own, this file provides as good a set of
3709 examples as any to start from.  The file is located in edit-utils
3710 package.
3711
3712
3713 @node Q3.8.3
3714 @unnumberedsec Q3.8.3: How do I control how many buffers are listed in the menu @code{Buffers List}?
3715
3716 Add the following to your @file{init.el} (suit to fit):
3717
3718 @lisp
3719 (setq buffers-menu-max-size 20)
3720 @end lisp
3721
3722 For no limit, use an argument of @samp{nil}.
3723
3724 You can also change this with Customize.  Select from the
3725 @code{Options} menu @code{Advanced
3726 (Customize)->Emacs->Environment->Menu->Buffers Menu->Max Size...} or
3727 type @kbd{M-x customize @key{RET} buffers-menu @key{RET}}.
3728
3729
3730 @node Q3.8.4
3731 @unnumberedsec Q3.8.4: Resources like @code{Emacs*menubar*font} are not working?
3732
3733 I am trying to use a resource like @code{Emacs*menubar*font} to set the
3734 font of the menubar but it's not working.
3735
3736 In Motif, the use of @samp{font} resources is obsoleted in order to
3737 support internationalisation.  If you are using the real Motif menubar,
3738 this resource is not recognized at all; you have to say:
3739
3740 @example
3741 Emacs*menubar*fontList: FONT
3742 @end example
3743
3744 If you are using the Lucid menubar, for backward compatibility with
3745 existing user configurations, the @samp{font} resource is recognized.
3746 Since this is not supported by Motif itself, the code is a kludge and
3747 the @samp{font} resource will be recognized only if the @samp{fontList}
3748 resource resource is unset.  This means that the resource
3749
3750 @example
3751 *fontList: FONT
3752 @end example
3753
3754 will override
3755
3756 @example
3757 Emacs*menubar*font: FONT
3758 @end example
3759
3760 even though the latter is more specific.
3761
3762 In non-Motif configurations using @samp{--with-mule} and
3763 @samp{--with-xfs} it @emph{is} necessary to use the @code{fontSet}
3764 resource @emph{instead of} the @code{font} resource.  The backward
3765 compatibility kludge was never implemented for non-Motif builds.
3766 Example:
3767
3768 @example
3769 *fontSet: FONT
3770 @end example
3771
3772
3773 @node Q3.8.5
3774 @unnumberedsec Q3.8.5: How can I bind a key to a function to toggle the toolbar?
3775
3776 Try something like:
3777
3778 @lisp
3779 (defun my-toggle-toolbar ()
3780   (interactive)
3781   (set-specifier default-toolbar-visible-p
3782                  (not (specifier-instance default-toolbar-visible-p))))
3783 (global-set-key "\C-xT" 'my-toggle-toolbar)
3784 @end lisp
3785
3786
3787 @node Q3.9.1
3788 @unnumberedsec 3.9: Scrollbars
3789 @unnumberedsec Q3.9.1: How can I disable the scrollbar?
3790
3791 To disable them for all frames, add the following line to
3792 your @file{.Xresources}:
3793
3794 @example
3795 Emacs.scrollBarWidth:  0
3796 @end example
3797
3798 Or select from the @code{Options} menu @code{Frame Appearance->Scrollbars}.
3799 Remember to save options.
3800
3801 To turn the scrollbar off on a per-frame basis, use the following
3802 function:
3803
3804 @lisp
3805 (set-specifier scrollbar-width 0 (selected-frame))
3806 @end lisp
3807
3808 You can actually turn the scrollbars on at any level you want by
3809 substituting for (selected-frame) in the above command.  For example, to
3810 turn the scrollbars off only in a single buffer:
3811
3812 @lisp
3813 (set-specifier scrollbar-width 0 (current-buffer))
3814 @end lisp
3815
3816
3817 @node Q3.9.2
3818 @unnumberedsec Q3.9.2: How can one use resources to change scrollbar colors?
3819
3820 Here's a recap of how to use resources to change your scrollbar colors:
3821
3822 @example
3823 ! Motif scrollbars
3824
3825 Emacs*XmScrollBar.Background: skyblue
3826 Emacs*XmScrollBar.troughColor: lightgray
3827
3828 ! Athena scrollbars
3829
3830 Emacs*Scrollbar.Foreground: skyblue
3831 Emacs*Scrollbar.Background: lightgray
3832 @end example
3833
3834 Note the capitalisation of @code{Scrollbar} for the Athena widget.
3835
3836
3837 @node Q3.9.3
3838 @unnumberedsec Q3.9.3: Moving the scrollbar can move the point; can I disable this?
3839
3840 When I move the scrollbar in a SXEmacs window, it moves the point as
3841 well, which should not be the default behavior.  Is this a bug or a
3842 feature?  Can I disable it?
3843
3844 The current behavior is a feature, not a bug.  Point remains at the same
3845 buffer position as long as that position does not scroll off the screen.
3846 In that event, point will end up in either the upper-left or lower-left
3847 hand corner.
3848
3849 This cannot be changed.
3850
3851
3852 @node Q3.9.4
3853 @unnumberedsec Q3.9.4: How can I turn off automatic horizontal scrolling in specific modes?
3854
3855 Do @code{(setq truncate-lines t)} in the mode-hooks for any modes
3856 in which you want lines truncated.
3857
3858 More precisely: If @code{truncate-lines} is nil, horizontal scrollbars
3859 will never appear.  Otherwise, they will appear only if the value of
3860 @code{scrollbar-height} for that buffer/window/etc. is non-zero.  If you
3861 do
3862
3863 @lisp
3864 (set-specifier scrollbar-height 0)
3865 @end lisp
3866
3867 then horizontal scrollbars will not appear in truncated buffers unless
3868 the package specifically asked for them.
3869
3870
3871 @node Q3.10.1
3872 @unnumberedsec 3.10: Text Selections
3873 @unnumberedsec Q3.10.1: How can I turn off or change highlighted selections?
3874
3875 The @code{zmacs} mode allows for what some might call gratuitous
3876 highlighting for selected regions (either by setting mark or by using
3877 the mouse).  This is the default behavior.  To turn off, add the
3878 following line to your @file{init.el} file:
3879
3880 @lisp
3881 (setq zmacs-regions nil)
3882 @end lisp
3883
3884 You can also change this with Customize. Select from the
3885 @code{Options} menu @code{Advanced
3886 (Customize)->Emacs->Editing->Basics->Zmacs Regions} or type @kbd{M-x
3887 customize @key{RET} editing-basics @key{RET}}.
3888
3889 To change the face for selection, look at @code{Options->Customize} on
3890 the menubar.
3891
3892
3893 @node Q3.10.2
3894 @unnumberedsec Q3.10.2: How do I get that typing on an active region removes it?
3895
3896 I want to change things so that if I select some text and start typing,
3897 the typed text replaces the selected text, similar to Motif.
3898
3899 You want to use something called @dfn{pending delete}.  Pending delete
3900 is what happens when you select a region (with the mouse or keyboard)
3901 and you press a key to replace the selected region by the key you typed.
3902 Usually backspace kills the selected region.
3903
3904 To get this behavior, ensure that you have the @file{pc} package
3905 installed, and add the following lines to your
3906 @file{init.el}/@file{.emacs}:
3907
3908 @lisp
3909 (cond
3910  ((fboundp 'turn-on-pending-delete)
3911   (turn-on-pending-delete))
3912  ((fboundp 'pending-delete-on)
3913   (pending-delete-on t)))
3914 @end lisp
3915
3916 Note that this will work with both Backspace and Delete.  This code is a
3917 tad more complicated than it has to be for SXEmacs in order to make it
3918 more portable.
3919
3920
3921 @node Q3.10.3
3922 @unnumberedsec Q3.10.3: Can I turn off the highlight during isearch?
3923
3924 I do not like my text highlighted while I am doing isearch as I am not
3925 able to see what's underneath.  How do I turn it off?
3926
3927 Put the following in your @file{init.el}:
3928
3929 @lisp
3930 (setq isearch-highlight nil)
3931 @end lisp
3932
3933 You can also change this with Customize. Type @kbd{M-x
3934 customize-variable @key{RET} isearch-highlight @key{RET}}.
3935
3936 Note also that isearch-highlight affects query-replace and ispell.
3937 Instead of disabling isearch-highlight you may find that a better
3938 solution consists of customizing the @code{isearch} face.
3939
3940
3941 @node Q3.10.4
3942 @unnumberedsec Q3.10.4: How do I turn off highlighting after @kbd{C-x C-p} (mark-page)?
3943
3944 Put this in your @file{init.el}:
3945
3946 @lisp
3947 (setq zmacs-regions nil)
3948 @end lisp
3949
3950 @strong{Warning: This command turns off all region highlighting.}
3951
3952 Also see @ref{Q3.10.1}.
3953
3954
3955 @node Q3.10.5
3956 @unnumberedsec Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
3957
3958 Does not apply anymore.
3959
3960
3961 @node Q3.10.6
3962 @unnumberedsec Q3.10.6: Why is killing so slow?
3963
3964 This actually is an X Windows question, although you'll notice it with
3965 keyboard operations as well as while using the GUI.  Basically, there
3966 are four ways to communicate interprogram via the X server:
3967
3968 @table @strong
3969 @item Primary selection
3970 a transient selection that gets replaced every time a new selection is made
3971
3972 @item Secondary selection
3973 for "exchanging" with the primary selection
3974
3975 @item Cut buffers
3976 a clipboard internal to the X server (deprecated)
3977
3978 @item Clipboard selection
3979 a selection with a notification protocol that allows a separate app to
3980 manage the clipboard
3981 @end table
3982
3983 The cut buffers are deprecated because managing them is even more
3984 inefficient than the clipboard notification protocol.  The primary
3985 selection works fine for many users and applications, but is not very
3986 robust under intensive or sophisticated use.
3987
3988 In Motif, a clipboard has become the primary means for managing cut
3989 and paste.  These means that "modern" applications tend to be oriented
3990 toward a true clipboard, rather than the primary selection.  It's not
3991 that SXEmacs doesn't support the simple primary selection method, it's
3992 that more and more other applications don't.
3993
3994 So the slowdown occurs because SXEmacs now engages in the clipboard
3995 notification protocol on @emph{every} kill.  This is especially slow on
3996 Motif.
3997
3998 With most people running most clients and server on the same host, and
3999 many of the rest working over very fast communication, you may expect
4000 that the situation is not going to improve.
4001
4002 There are a number of workarounds.  The most effective is to use a
4003 special command to do selection ownership only when you intend to paste
4004 to another application.  Useful commands are @code{kill-primary-selection}
4005 and @code{copy-primary-selection}.  These work only on text selected
4006 with the mouse (probably; experiment), and are bound by default to the
4007 @kbd{Cut} and @kbd{Copy}, respectively, buttons on the toolbar.
4008 @code{copy-primary-selection} is also bound to @kbd{C-Insert}.  You can
4009 yank the clipboard contents with @code{yank-primary-selection}, bound to
4010 the @kbd{Paste} toolbar button and @kbd{Sh-Insert}.
4011
4012 If you are communicating by cut and paste with applications that use the
4013 primary selection, then you can customize
4014 @code{interprogram-cut-function} to @code{nil}, restoring the XEmacs
4015 version 20 behavior.  How can you tell if a program will support this?
4016 Motifly-correct programs require the clipboard; you lose.  For others,
4017 only by trying it.  You also need to customize the complementary
4018 @code{interprogram-paste-function} to @code{nil}.  (Otherwise
4019 SXEmacs-to-SXEmacs pastes will not work correctly.)
4020
4021 You may get some relief on Motif by setting
4022 @code{x-selection-strict-motif-ownership} to nil, but this means you will
4023 only intermittently be able to paste SXEmacs kills to Motif applications.
4024
4025 Thanks to Jeff Mincy and Glynn Clements for corrections.
4026
4027
4028 @node Subsystems, Miscellaneous, Customisation, Top
4029 @unnumbered 4 Major Subsystems
4030
4031 This is part 4 of the SXEmacs Frequently Asked Questions list.  This
4032 section is devoted to major SXEmacs subsystems.
4033
4034 @menu
4035 Reading Mail with VM:
4036 * Q4.0.1::      How do I set up VM to retrieve remote mail using POP?
4037 * Q4.0.2::      How do I get VM to filter mail for me?
4038 * Q4.0.3::      How can I get VM to automatically check for new mail?
4039 * Q4.0.4::      [This question intentionally left blank]
4040 * Q4.0.5::      How do I get my outgoing mail archived?
4041 * Q4.0.6::      I have various addresses at which I receive mail.  How
4042                   can I tell VM to ignore them when doing a "reply-all"?
4043 * Q4.0.7::      Is there a mailing list or FAQ for VM?
4044 * Q4.0.8::      Remote mail reading with VM.
4045 * Q4.0.9::      rmail or VM gets an error incorporating new mail.
4046 * Q4.0.10::     How do I make VM stay in a single frame?
4047 * Q4.0.11::     How do I make VM or mh-e display graphical smilies?
4048 * Q4.0.12::     Customisation of VM not covered in the manual or here.
4049
4050 Web browsing with W3:
4051 * Q4.1.1::      What is W3?
4052 * Q4.1.2::      How do I run W3 from behind a firewall?
4053 * Q4.1.3::      Is it true that W3 supports style sheets and tables?
4054
4055 Reading Netnews and Mail with Gnus:
4056 * Q4.2.1::      GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,
4057                   Quassia Gnus, Pterodactyl Gnus, Oort Gnus, argh!
4058 * Q4.2.2::      [This question intentionally left blank]
4059 * Q4.2.3::      How do I make Gnus stay within a single frame?
4060 * Q4.2.4::      How do I customize the From: line?
4061
4062 Other Mail & News:
4063 * Q4.3.1::      How can I read and/or compose MIME messages?
4064 * Q4.3.2::      What is TM and where do I get it?
4065 * Q4.3.3::      Why isn't this @code{movemail} program working?
4066 * Q4.3.4::      Movemail is also distributed by Netscape?  Can that cause problems?
4067 * Q4.3.5::      Where do I find pstogif (required by tm)?
4068
4069 Sparcworks, EOS, and WorkShop:
4070 * Q4.4.1::      What is SPARCworks, EOS, and WorkShop
4071
4072 Energize:
4073 * Q4.5.1::      What is/was Energize?
4074
4075 Infodock:
4076 * Q4.6.1::      What is Infodock?
4077
4078 Other Unbundled Packages:
4079 * Q4.7.1::      What is AUC TeX?  Where do you get it?
4080 * Q4.7.2::      Are there any Emacs Lisp Spreadsheets?
4081 * Q4.7.3::      [This question intentionally left blank]
4082 * Q4.7.4::      Problems installing AUC TeX
4083 * Q4.7.5::      Is there a reason for an Emacs package not to be included in SXEmacs?
4084 * Q4.7.6::      Is there a MatLab mode?
4085 * Q4.7.7::      Can I edit files on other hosts?
4086 @end menu
4087
4088 @node Q4.0.1
4089 @unnumberedsec 4.0: Reading Mail with VM
4090 @unnumberedsec Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
4091
4092 Use @code{vm-spool-files}, like this for example:
4093
4094 @lisp
4095 (setq vm-spool-files '("/var/spool/mail/wing"
4096                        "netcom23.netcom.com:110:pass:wing:MYPASS"))
4097 @end lisp
4098
4099 Of course substitute your actual password for MYPASS.
4100
4101
4102 @node Q4.0.2
4103 @unnumberedsec Q4.0.2: How do I get VM to filter mail for me?
4104
4105 One possibility is to use procmail to split your mail before it gets to
4106 VM.  I prefer this personally, since there are many strange and
4107 wonderful things one can do with procmail.  Procmail may be found at
4108 @uref{ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/}.
4109
4110 Also see the Mail Filtering FAQ at:
4111 @iftex
4112 @*
4113 @end iftex
4114 @uref{ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq}.
4115 @c Link above,
4116 @c <URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html>
4117 @c was dead.
4118
4119
4120 @node Q4.0.3
4121 @unnumberedsec Q4.0.3: How can I get VM to automatically check for new mail?
4122
4123 @email{turner@@lanl.gov, John Turner} writes:
4124
4125 @quotation
4126 Use the following:
4127
4128 @lisp
4129 (setq vm-auto-get-new-mail 60)
4130 @end lisp
4131 @end quotation
4132
4133
4134 @node Q4.0.4
4135 @unnumberedsec Q4.0.4: [This question intentionally left blank]
4136
4137 Obsolete question, left blank to avoid renumbering.
4138
4139
4140 @node Q4.0.5
4141 @unnumberedsec Q4.0.5: How do I get my outgoing mail archived?
4142
4143 @lisp
4144 (setq mail-archive-file-name "~/outbox")
4145 @end lisp
4146
4147
4148 @node Q4.0.6
4149 @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"?
4150
4151 Set @code{vm-reply-ignored-addresses} to a list, like
4152
4153 @lisp
4154 (setq vm-reply-ignored-addresses
4155       '("wing@@nuspl@@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
4156         "wing@@netcom.com" "wing@@xemacs.org"))
4157 @end lisp
4158
4159 Note that each string is a regular expression.
4160
4161
4162 @node Q4.0.7
4163 @unnumberedsec Q4.0.7: Is there a mailing list or FAQ for VM?
4164
4165 A FAQ for VM exists at @uref{http://www.wonderworks.com/vm/FAQ.html}.
4166
4167 VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
4168
4169
4170 @node Q4.0.8
4171 @unnumberedsec Q4.0.8: Remote mail reading with VM.
4172
4173 My mailbox lives at the office on a big honkin server.  My regular INBOX
4174 lives on my honkin desktop machine.  I now can PPP to the office from
4175 home which is far from honking...  I'd like to be able to read mail at
4176 home without storing it here and I'd like to use sxemacs and VM at
4177 home...  Is there a recommended setup?
4178
4179 @email{nuspl@@nvwls.cc.purdue.edu, Joseph J. Nuspl Jr.} writes:
4180
4181 @quotation
4182 There are several ways to do this.
4183
4184 @enumerate
4185 @item
4186 Set your display to your home machine and run dxpc or one of the other X
4187 compressors.
4188
4189 @item
4190 NFS mount your desktop machine on your home machine and modify your pop
4191 command on your home machine to rsh to your desktop machine and actually
4192 do the pop get's.
4193
4194 @item
4195 Run a POP server on your desktop machine as well and do a sort of two
4196 tiered POP get.
4197 @end enumerate
4198 @end quotation
4199
4200         @email{wmperry@@monolith.spry.com, William Perry} adds:
4201
4202 @quotation
4203 Or you could run a pop script periodically on your desktop machine, and
4204 just use ange-ftp or NFS to get to your mailbox.  I used to do this all
4205 the time back at IU.
4206 @end quotation
4207
4208
4209 @node Q4.0.9
4210 @unnumberedsec Q4.0.9: rmail or VM gets an error incorporating new mail.
4211
4212 Quoting the SXEmacs PROBLEMS file:
4213
4214 @quotation
4215 rmail and VM get new mail from @file{/var/spool/mail/$USER} using a
4216 program called @code{movemail}.  This program interlocks with
4217 @code{/bin/mail} using the protocol defined by @code{/bin/mail}.
4218
4219 There are two different protocols in general use.  One of them uses the
4220 @code{flock} system call.  The other involves creating a lock file;
4221 @code{movemail} must be able to write in @file{/var/spool/mail} in order
4222 to do this.  You control which one is used by defining, or not defining,
4223 the macro @code{MAIL_USE_FLOCK} in @file{config.h} or the m- or s- file
4224 it includes.
4225
4226 @strong{IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
4227 SYSTEM, YOU CAN LOSE MAIL!}
4228
4229 If your system uses the lock file protocol, and fascist restrictions
4230 prevent ordinary users from writing the lock files in
4231 @file{/var/spool/mail}, you may need to make @code{movemail} setgid to a
4232 suitable group such as @samp{mail}.  You can use these commands (as
4233 root):
4234
4235 @example
4236 chgrp mail movemail
4237 chmod 2755 movemail
4238 @end example
4239
4240 Installation normally copies movemail from the build directory to an
4241 installation directory which is usually under @file{/usr/local/lib}.
4242 The installed copy of @code{movemail} is usually in the directory
4243 @file{/usr/local/lib/sxemacs-VERSION/TARGET}.  You must change the group
4244 and mode of the installed copy; changing the group and mode of the build
4245 directory copy is ineffective.
4246 @end quotation
4247
4248
4249 @node Q4.0.10
4250 @unnumberedsec Q4.0.10: How do I make VM stay in a single frame?
4251
4252 John.@email{Cooper@@Eng.Sun.COM, John S Cooper} writes:
4253
4254 @quotation
4255 @lisp
4256                                         ; Don't use multiple frames
4257 (setq vm-frame-per-composition nil)
4258 (setq vm-frame-per-folder nil)
4259 (setq vm-frame-per-edit nil)
4260 (setq vm-frame-per-summary nil)
4261 @end lisp
4262 @end quotation
4263
4264
4265 @node Q4.0.11
4266 @unnumberedsec Q4.0.11: How do I make VM or mh-e display graphical smilies?
4267 @c Changed June
4268 For mh-e use the following:
4269
4270 @lisp
4271 (add-hook 'mh-show-mode-hook '(lambda ()
4272                                 (smiley-region (point-min)
4273                                                (point-max))))
4274 @end lisp
4275
4276 @email{bill@@carpenter.ORG, WJCarpenter} writes:
4277 For VM use the following:
4278 @lisp
4279        (autoload 'smiley-region "smiley" nil t)
4280        (add-hook 'vm-select-message-hook
4281                  '(lambda ()
4282                     (smiley-region (point-min)
4283                                    (point-max))))
4284 @end lisp
4285
4286 For tm use the following:
4287 @lisp
4288 (autoload 'smiley-buffer "smiley" nil t)
4289 (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
4290 @end lisp
4291
4292
4293 @node Q4.0.12
4294 @unnumberedsec Q4.0.12: Customisation of VM not covered in the manual, or here.
4295
4296 @email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes:
4297
4298 @quotation
4299 The meta-answer is to look into the file @file{vm-vars.el}, in the vm
4300 directory of the lisp library.
4301
4302 @file{vm-vars.el} contains, initializes and carefully describes, with
4303 examples of usage, the plethora of user options that @emph{fully}
4304 control VM's behavior.
4305
4306 Enter vm-vars, @code{forward-search} for toolbar, find the variables
4307 that control the toolbar placement, appearance, existence, copy to
4308 your @file{init.el} or @file{.vm} and modify according to the detailed
4309 instructions.
4310
4311 The above also applies to all the various features of VM: search for
4312 some keywords, maybe the first you conjure isn't appropriate, find the
4313 appropriate variables, copy and experiment.
4314 @end quotation
4315
4316
4317 @node Q4.1.1
4318 @unnumberedsec 4.1: Web browsing with W3
4319 @unnumberedsec Q4.1.1: What is W3?
4320
4321 W3 is an advanced graphical browser written in Emacs lisp that runs on
4322 SXEmacs.  It has full support for cascaded style sheets, and more...
4323
4324 It has a home web page at
4325 @uref{http://www.cs.indiana.edu/elisp/w3/docs.html}.
4326
4327
4328 @node Q4.1.2
4329 @unnumberedsec Q4.1.2: How do I run W3 from behind a firewall?
4330
4331 There is a long, well-written, detailed section in the W3 manual that
4332 describes how to do this.  Look in the section entitled "Firewalls".
4333
4334
4335 @node Q4.1.3
4336 @unnumberedsec Q4.1.3: Is it true that W3 supports style sheets and tables?
4337
4338 Yes, and much more.  W3, as distributed with the latest SXEmacs is a
4339 full-featured web browser.
4340
4341
4342 @node Q4.2.1
4343 @unnumberedsec 4.2: Reading Netnews and Mail with Gnus
4344 @unnumberedsec Q4.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, Pterodactyl Gnus, Oort Gnus, argh!
4345
4346 The Gnus numbering issues are not meant for mere mortals to know them.
4347 @c If you feel you @emph{must} enter the muddy waters of Gnus, visit the
4348 @c excellent FAQ, maintained by Justin Sheehy, at:
4349 @c
4350 @c @example
4351 @c @uref{http://www.ccs.neu.edu/software/contrib/gnus/}
4352 @c @end example
4353
4354 See the Gnus home page
4355 @example
4356 @uref{http://www.gnus.org/}
4357 @end example
4358
4359
4360 @node Q4.2.2
4361 @unnumberedsec Q4.2.2: This question intentionally left blank.
4362
4363 Obsolete question, left blank to avoid renumbering.
4364
4365
4366 @node Q4.2.3
4367 @unnumberedsec Q4.2.3: How do I make Gnus stay within a single frame?
4368
4369 The toolbar code to start Gnus opens the new frame---and it's a feature
4370 rather than a bug.  If you don't like it, but would still like to click
4371 on the seemly icon, use the following code:
4372
4373 @lisp
4374 (defun toolbar-news ()
4375   (gnus))
4376 @end lisp
4377
4378 It will redefine the callback function of the icon to just call
4379 @code{gnus}, without all the fancy frame stuff.
4380
4381
4382 @node Q4.2.4
4383 @unnumberedsec Q4.2.4: How do I customize the From: line?
4384
4385 How do I change the @code{From:} line?  I have set gnus-user-from-line
4386 to
4387 @example
4388 Gail Gurman <gail.gurman@@sybase.com>
4389 @end example
4390 @noindent , but SXEmacs Gnus doesn't use
4391 it. Instead it uses
4392 @example
4393 Gail Mara Gurman @email{gailg@@deall}
4394 @end example
4395 @noindent and then complains
4396 that it's incorrect. Also, as you perhaps can see, my Message-ID is
4397 screwy. How can I change that?
4398
4399 @email{larsi@@ifi.uio.no, Lars Magne Ingebrigtsen} writes:
4400
4401 @quotation
4402 Set @code{user-mail-address} to @samp{gail.gurman@@sybase.com} or
4403 @code{mail-host-address} to @samp{sybase.com}.
4404 @end quotation
4405
4406
4407 @node Q4.3.1
4408 @unnumberedsec 4.3: Other Mail & News
4409 @unnumberedsec Q4.3.1: How can I read and/or compose MIME messages?
4410 @c Changed June
4411
4412 VM supports MIME natively.
4413
4414 You probably want to use the Tools for MIME (tm).  @xref{Q4.3.2}, for
4415 details.
4416
4417 @email{trey@@cs.berkeley.edu, Trey Jackson} has an Emacs & MIME web page at
4418 @iftex
4419 @*
4420 @end iftex
4421 @uref{http://bmrc.berkeley.edu/~trey/emacs/mime.html}.
4422
4423
4424 Another possibility is RMIME.  You may find RMIME at
4425 @iftex
4426 @*
4427 @end iftex
4428 @uref{http://www.cinti.net/~rmoody/rmime/index.html}.
4429
4430
4431 @node Q4.3.2
4432 @unnumberedsec Q4.3.2: What is TM and where do I get it?
4433
4434 TM stands for @dfn{Tools for MIME} and not Tiny MIME.  TM integrates
4435 with all major (S)XEmacs packages like Gnus (all flavours), VM, MH-E,
4436 and mailcrypt.  It provides totally transparent and trouble-free MIME
4437 support.  When appropriate a message will be decoded in place in an
4438 SXEmacs buffer.
4439
4440 TM was written by @email{morioka@@jaist.ac.jp, MORIOKA Tomohiko} and
4441 @email{shuhei-k@@jaist.ac.jp, KOBAYASHI Shuhei}.
4442
4443 It is based on the work of @email{umerin@@mse.kyutech.ac.jp, UMEDA
4444 Masanobu}, the original writer of GNUS.
4445
4446 The following information is from the @file{README}:
4447
4448 @dfn{tm} is a MIME package for GNU Emacs.
4449 tm has following functions:
4450
4451 @itemize @bullet
4452 @item MIME style multilingual header.
4453 @item MIME message viewer (mime/viewer-mode).
4454 @item MIME message composer (mime/editor-mode).
4455 @item MIME extenders for mh-e, GNUS, RMAIL and VM.
4456 @end itemize
4457
4458 tm is available from following anonymous ftp sites:
4459 @itemize @bullet
4460 @comment @item @uref{ftp://ftp.jaist.ac.jp/pub/GNU/elisp/mime/} (Japan).
4461 @comment @item @uref{ftp://ftp.nis.co.jp/pub/gnu/emacs-lisp/tm/} (Japan).
4462 @comment @c The host above is unknown.
4463 @comment @item @uref{ftp://ftp.nisiq.net/pub/gnu/emacs-lisp/tm/} (US).
4464 @comment @item @uref{ftp://ftp.miranova.com/pub/gnus/jaist.ac.jp/} (US).
4465 @item @uref{ftp://ftp.unicamp.br/pub/mail/mime/tm/} (Brasil).
4466 @item @uref{ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/} (Germany).
4467 @item @uref{ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/} (Germany).
4468 @end itemize
4469
4470 Don't let the installation procedure & instructions stop you from trying
4471 this package out---it's much simpler than it looks, and once installed,
4472 trivial to use.
4473
4474 @email{youngs@@sxemacs.org, Steve Youngs} writes:
4475
4476 @quotation
4477 All the major Emacs Lisp based MUAs (Gnus, MH-E, and VM) all do their
4478 own thing when it comes to MIME so you won't need TM to get MIME support
4479 in these packages.
4480 @end quotation
4481
4482
4483 @node Q4.3.3
4484 @unnumberedsec Q4.3.3: Why isn't this @code{movemail} program working?
4485
4486 Ben Wing @email{ben@@xemacs.org} writes:
4487
4488 @quotation
4489 It wasn't chown'ed/chmod'd correctly.
4490 @end quotation
4491
4492
4493 @node Q4.3.4
4494 @unnumberedsec Q4.3.4: Movemail is also distributed by Netscape?  Can that cause problems?
4495
4496 @email{steve@@xemacs.org, Steve Baur} writes:
4497
4498 @quotation
4499 Yes.  Always use the movemail installed with your SXEmacs.  Failure to do
4500 so can result in lost mail.
4501 @end quotation
4502
4503 Please refer to @email{jwz@@jwz.org, Jamie Zawinski's} notes at
4504 @iftex
4505 @*
4506 @end iftex
4507 @uref{http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/movemail.html}.
4508 In particular, this document will show you how to make Netscape use the
4509 version of movemail configured for your system by the person who built
4510 SXEmacs.
4511
4512
4513 @node Q4.3.5
4514 @unnumberedsec Q4.3.5: Where do I find pstogif (required by tm)?
4515
4516 pstogif is part of the latex2html package.
4517
4518 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
4519
4520 latex2html is best found at the CTAN hosts and their mirrors
4521 in
4522 @iftex
4523 @*
4524 @end iftex
4525 @file{tex-archive/support/latex2html}.
4526
4527 CTAN hosts are:
4528
4529 @itemize @bullet
4530 @item @uref{ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/}.
4531 @item @uref{ftp://ftp.dante.de/tex-archive/support/latex2html/}.
4532 @end itemize
4533
4534 There is a good mirror at ftp.cdrom.com;
4535 @iftex
4536 @*
4537 @end iftex
4538 @uref{ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/}.
4539
4540
4541 @node Q4.4.1
4542 @unnumberedsec 4.4: Sparcworks, EOS, and WorkShop
4543 @unnumberedsec Q4.4.1: What is SPARCworks, EOS, and WorkShop?
4544
4545 @email{turner@@lanl.gov, John Turner} writes:
4546
4547 @quotation
4548 SPARCworks is SunSoft's development environment, comprising compilers
4549 (C, C++, FORTRAN 77, Fortran 90, Ada, and Pascal), a debugger, and other
4550 tools such as TeamWare (for configuration management), MakeTool, etc.
4551 @end quotation
4552
4553 See @uref{http://www.sun.com/software/Developer-products/}
4554 for more info.
4555
4556 EOS stands for "Era on SPARCworks", but I don't know what Era stands
4557 for.
4558
4559 EOS is the integration of SXEmacs with the SPARCworks debugger.  It
4560 allows one to use a SXEmacs frame to view code (complete with
4561 fontification, etc.), set breakpoints, print variables, etc., while
4562 using the SPARCworks debugger.  It works very well and I use it all the
4563 time.
4564
4565 @email{cthomp@@xemacs.org, Chuck Thompson} writes:
4566
4567 @quotation
4568 Era stood for "Emacs Rewritten Again".  It was what we were calling the
4569 modified version of Lucid Emacs for Sun when I was dragged, er, allowed
4570 to work on this wonderful editor.
4571 @end quotation
4572
4573 @email{martin@@xemacs.org, Martin Buchholz} writes:
4574
4575 @quotation
4576 EOS is being replaced with a new graphical development environment
4577 called Sun WorkShop.  For more details, check out
4578 @iftex
4579 @*
4580 @end iftex
4581 @uref{http://www.sun.com/software/Products/Developer-products}.
4582 @end quotation
4583
4584
4585 @node Q4.5.1
4586 @unnumberedsec 4.5: Energize
4587 @unnumberedsec Q4.5.1: What is/was Energize?
4588
4589 @email{gray@@meteor.harlequin.com, David N Gray} writes:
4590 @quotation
4591 The files in @file{lisp/energize} are to enable Emacs to interface with
4592 the "Energize Programming System", a C and C++ development environment,
4593 which was a product of Lucid, Inc.  Tragically, Lucid went out of
4594 business in 1994, so although Energize is still a great system, if you
4595 don't already have it, there isn't any way to get it now.  (Unless you
4596 happen to be in Japan; INS Engineering may still be selling it there.
4597 Tartan bought the rights to sell it in the rest of the world, but never
4598 did so.)
4599 @end quotation
4600
4601
4602 @node Q4.6.1
4603 @unnumberedsec 4.6: Infodock
4604 @unnumberedsec Q4.6.1: What is Infodock?
4605
4606 @uref{http://sourceforge.net/projects/infodock/, InfoDock} is an
4607 integrated productivity toolset, mainly aimed at technical people,
4608 hosted at SourceForge.
4609
4610 InfoDock is built atop SXEmacs and so has all of the power of an
4611 Emacs, but with an easier to use and more comprehensive menu-based
4612 user interface.  The bottom portion of this text describes how it
4613 differs from SXEmacs/XEmacs and GNU Emacs from the Free Software
4614 Foundation.
4615
4616 InfoDock is aimed at people who want a free, turn-key productivity
4617 environment.  Although InfoDock is customizable, it is not intended for
4618 people who like basic versions of Emacs which need to be customized
4619 extensively for local use; standard Emacs distributions are better for
4620 such uses.  InfoDock is for those people who want a complete,
4621 pre-customized environment in one package, which they need not touch
4622 more than once or twice a year to update to new revisions.
4623
4624 InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX,
4625 and Intel Linux systems.  It is intended for use on a color display,
4626 although most features will work on monochrome monitors.  Simply unpack
4627 InfoDock according to the instructions in the ID-INSTALL file and you
4628 are ready to run.
4629
4630 The InfoDock Manual is concise, yet sufficient as a user guide for users
4631 who have never used an Emacs-type editor before.  For users who are
4632 already familiar with Emacs, it supplements the information in the GNU
4633 Emacs Manual.
4634
4635 InfoDock menus are much more extensive and more mature than standard
4636 Emacs menus.  Each menu offers a @samp{Manual} item which displays
4637 documentation associated with the menu's functions.
4638
4639 @noindent
4640 Four types of menubars are provided:
4641 @enumerate
4642 @item
4643 An extensive menubar providing access to global InfoDock commands.
4644 @item
4645 Mode-specific menubars tailored to the current major mode.
4646 @item
4647 A simple menubar for basic editing to help novices get started with InfoDock.
4648 @item
4649 The standard SXEmacs menubar.
4650 @end enumerate
4651
4652 Most modes also include mode-specific popup menus.  Additionally, region and
4653 rectangle popup menus are included.
4654
4655 @samp{Hyperbole}, the everyday information manager, is a core part of
4656 InfoDock.  This provides context-sensitive mouse keys, a rolodex-type
4657 contact manager, programmable hypertext buttons, and an autonumbered
4658 outliner with embedded hyperlink anchors.
4659
4660 The @samp{OO-Browser}, a multi-language object-oriented code browser, is a
4661 standard part of InfoDock.
4662
4663 InfoDock saves a more extensive set of user options than other Emacs
4664 versions.
4665
4666 InfoDock inserts a useful file header in many file types, showing the
4667 author, summary, and last modification time of each file.  A summary
4668 program can then be used to summarize all of the files in a directory,
4669 for easy MANIFEST file creation.
4670
4671 Your working set of buffers is automatically saved and restored (if you
4672 answer yes to a prompt) between InfoDock sessions.
4673
4674 Refined color choices for code highlighting are provided for both dark and
4675 light background display frames.
4676
4677 The @kbd{C-z} key prefix performs frame-based commands which parallel the
4678 @kbd{C-x} key prefix for window-based commands.
4679
4680 The Smart Menu system is included for producing command menus on dumb
4681 terminals.
4682
4683 Lisp libraries are better categorized according to function.
4684
4685 Extensions and improvements to many areas of Emacs are included, such as:
4686 paragraph filling, mail reading with Rmail, shell handling, outlining, code
4687 highlighting and browsing, and man page browsing.
4688
4689 InfoDock questions, answers and discussion should go to the mail list
4690 @iftex
4691 @*
4692 @end iftex
4693 @email{infodock@@infodock.com}.  Use
4694 @email{infodock-request@@infodock.com} to be added or removed from the
4695 list.  Always include your InfoDock version number when sending help
4696 requests.
4697
4698 InfoDock is available across the Internet via anonymous FTP.  To get
4699 it, first move to a directory into which you want the InfoDock archive
4700 files placed.  We will call this <DIST-DIR>.
4701
4702 @example
4703    cd <DIST-DIR>
4704 @end example
4705
4706 Ftp to ftp.xemacs.org  (Internet Host ID = 128.174.252.16):
4707
4708 @example
4709    prompt> ftp ftp.xemacs.org
4710 @end example
4711
4712 Login as @samp{anonymous} with your own <user-id>@@<site-name> as a password.
4713
4714 @example
4715    Name (ftp.xemacs.org): anonymous
4716    331 Guest login ok, send your complete e-mail address as password.
4717    Password: -<your-user-id>@@<your-domain>
4718    230 Guest login ok, access restrictions apply.
4719 @end example
4720
4721 Move to the location of the InfoDock archives:
4722
4723 @example
4724    ftp> cd pub/infodock
4725 @end example
4726
4727 Set your transfer mode to binary:
4728
4729 @example
4730    ftp> bin
4731    200 Type set to I.
4732 @end example
4733
4734 Turn off prompting:
4735
4736 @example
4737    ftp> prompt
4738    Interactive mode off.
4739 @end example
4740
4741 Retrieve the InfoDock archives that you want, either by using a
4742 @samp{get <file>} for each file you want or by using the following to
4743 get a complete distribution, including all binaries:
4744
4745 @example
4746    ftp> mget ID-INSTALL
4747    ftp> mget id-*
4748 @end example
4749
4750 Close the FTP connection:
4751
4752 @example
4753    ftp> quit
4754    221 Goodbye.
4755 @end example
4756
4757 Read the @file{ID-INSTALL} file which you just retrieved for
4758 step-by-step installation instructions.
4759
4760
4761 @node Q4.7.1
4762 @unnumberedsec 4.7: Other Unbundled Packages
4763 @unnumberedsec Q4.7.1: What is AUC TeX?  Where do you get it?
4764
4765 AUC TeX is an extensible package written by
4766 @email{abraham@@dina.kvl.dk, Per Abrahamsen} that supports writing and
4767 formatting TeX files for most Emacsen. Many different macro packages
4768 are supported, including AMS TeX, LaTeX, and TeXinfo.
4769
4770 The most recent version is always available by ftp at
4771 @iftex
4772 @*
4773 @end iftex
4774 @uref{ftp://sunsite.dk/packages/auctex/auctex.tar.gz}.
4775
4776 In case you don't have access to anonymous ftp, you can get it by an
4777 email request to @email{ftpmail@@decwrl.dec.com}.
4778
4779 WWW users may want to check out the AUC TeX page at
4780 @iftex
4781 @*
4782 @end iftex
4783 @uref{http://sunsite.dk/auctex/}.
4784
4785
4786 @node Q4.7.2
4787 @unnumberedsec Q4.7.2: Are there any Emacs Lisp Spreadsheets?
4788
4789 Yes.  Check out @dfn{dismal} (which stands for Dis' Mode Ain't Lotus) at
4790 @iftex
4791 @*
4792 @end iftex
4793 @uref{ftp://cs.nyu.edu/pub/local/fox/dismal/}.
4794
4795
4796 @node Q4.7.3
4797 @unnumberedsec Q4.7.3: [This question intentionally left blank]
4798
4799
4800 @node Q4.7.4
4801 @unnumberedsec Q4.7.4: Problems installing AUC TeX.
4802
4803 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
4804
4805 @quotation
4806 AUC TeX works fine on both stock Emacs and (S)XEmacs has been doing so
4807 for a very very long time. This is mostly due to the work of
4808 @email{abraham@@dina.kvl.dk, Per Abrahamsen} (clap clap) in particular
4809 his @file{easymenu} package.  Which leads to what is probably the
4810 problem...
4811 @end quotation
4812
4813 Most problems with AUC TeX are one of two things:
4814
4815 @itemize @bullet
4816 @item
4817 The TeX-lisp-directory in @file{tex-site.el} and the makefile don't
4818 match.
4819
4820 Fix: make sure you configure AUC TeX properly @strong{before} installing.
4821
4822 @item
4823 You have an old version of easymenu.el in your path.
4824
4825 Fix: use @code{locate-library} and remove old versions to make sure it
4826 @strong{only} finds the one that came with SXEmacs.
4827 @end itemize
4828
4829
4830 @node Q4.7.5
4831 @unnumberedsec Q4.7.5: Is there a reason for an Emacs package not to be included in SXEmacs?
4832
4833 The reason for an Emacs package not to be included in SXEmacs is
4834 usually one or more of the following:
4835
4836 @enumerate
4837 @item
4838 The package has not been ported to (S)XEmacs.  This will typically happen
4839 when it uses GNU-Emacs-specific features, which make it fail under
4840 (S)XEmacs.
4841
4842 Porting a package to (S)XEmacs can range from a trivial amount of
4843 change to a partial or full rewrite.  Fortunately, the authors of
4844 modern packages usually choose to support all Emacsen themselves.
4845
4846 @item
4847 The package has been decided not to be appropriate for (S)XEmacs.  It
4848 may have an equivalent or better replacement within (S)XEmacs, in
4849 which case the developers may choose not to burden themselves with
4850 supporting an additional package.
4851
4852 Each package bundled with (S)XEmacs means more work for the
4853 maintainers, whether they want it or not.  If you are ready to take
4854 over the maintenance responsibilities for the package you port, be
4855 sure to say so---we will more likely include it.
4856
4857 @item
4858 The package simply hasn't been noted by the (S)XEmacs development.  If
4859 that's the case, the messages like yours are very useful for attracting
4860 our attention.
4861
4862 @item
4863 The package was noted by the developers, but they simply haven't yet
4864 gotten around to including/porting it.  Wait for the next release or,
4865 even better, offer your help.  It will be gladly accepted and
4866 appreciated.
4867 @end enumerate
4868
4869
4870 @node Q4.7.6
4871 @unnumberedsec Q4.7.5: Is there a MatLab mode?
4872
4873 Yes, a matlab mode and other items are available at the
4874 @uref{ftp://ftp.mathworks.com/pub/contrib/emacs_add_ons,
4875 MathWorks' emacs_add_ons ftp directory}.
4876
4877
4878 @node Q4.7.7
4879 @unnumberedsec Q4.7.7: Can I edit files on other hosts?
4880
4881 Yes.  Of course SXEmacs can use any network file system (such as NFS)
4882 you have available, and includes some optimisations and safety
4883 features appropriate to those environments.
4884
4885 It is also possible to transparently edit files via FTP, ssh, or rsh.
4886 That is, SXEmacs makes a local copy using the transport in the
4887 background, and automatically refreshes the remote original from that
4888 copy when you save it.  SXEmacs also is capable of doing file system
4889 manipulations like creating and removing directories and files.  The
4890 FTP interface is provided by the standard @samp{efs} package @ref{Top,
4891 EFS, , efs}.  The ssh/rsh interface is provided by the optional
4892 @samp{tramp} package @ref{Top, TRAMP, , tramp}.
4893
4894 @node Miscellaneous, MS Windows, Subsystems, Top
4895 @unnumbered 5 The Miscellaneous Stuff
4896
4897 This is part 5 of the SXEmacs Frequently Asked Questions list.  This
4898 section is devoted to anything that doesn't fit neatly into the other
4899 sections.
4900
4901 @menu
4902 Major & Minor Modes:
4903 * Q5.0.1::      How can I do source code highlighting using font-lock?
4904 * Q5.0.2::      I do not like cc-mode.  How do I use the old c-mode?
4905 * Q5.0.3::      How do I get @samp{More} Syntax Highlighting on by default?
4906 * Q5.0.4::      How can I enable auto-indent and/or Filladapt?
4907 * Q5.0.5::      How can I get SXEmacs to come up in text/auto-fill mode by default?
4908 * Q5.0.6::      How do I start up a second shell buffer?
4909 * Q5.0.7::      Telnet from shell filters too much.
4910 * Q5.0.8::      Why does edt emulation not work?
4911 * Q5.0.9::      How can I emulate VI and use it as my default mode?
4912 * Q5.0.10::     [This question intentionally left blank]
4913 * Q5.0.11::     [This question intentionally left blank]
4914 * Q5.0.12::     How do I disable gnuserv from opening a new frame?
4915 * Q5.0.13::     How do I start gnuserv so that each subsequent SXEmacs is a client?
4916 * Q5.0.14::     Strange things are happening in Shell Mode.
4917 * Q5.0.15::     Where do I get the latest CC Mode?
4918 * Q5.0.16::     I find auto-show-mode disconcerting.  How do I turn it off?
4919 * Q5.0.17::     How can I get two instances of info?
4920 * Q5.0.18::     [This question intentionally left blank]
4921 * Q5.0.19::     Is there something better than LaTeX mode?
4922 * Q5.0.20::     Is there a way to start a new SXEmacs if there's no
4923                   gnuserv running, and otherwise use gnuclient?
4924
4925 Emacs Lisp Programming Techniques:
4926 * Q5.1.1::      The difference in key sequences between XEmacs/SXEmacs and GNU Emacs?
4927 * Q5.1.2::      Can I generate "fake" keyboard events?
4928 * Q5.1.3::      Could you explain @code{read-kbd-macro} in more detail?
4929 * Q5.1.4::      What is the performance hit of @code{let}?
4930 * Q5.1.5::      What is the recommended use of @code{setq}?
4931 * Q5.1.6::      What is the typical misuse of @code{setq} ?
4932 * Q5.1.7::      I like the @code{do} form of cl, does it slow things down?
4933 * Q5.1.8::      I like recursion, does it slow things down?
4934 * Q5.1.9::      How do I put a glyph as annotation in a buffer?
4935 * Q5.1.10::     @code{map-extents} won't traverse all of my extents!
4936 * Q5.1.11::     My elisp program is horribly slow.  Is there an easy way to
4937                   find out where it spends time?
4938
4939 Sound:
4940 * Q5.2.1::      How do I turn off the sound?
4941 * Q5.2.2::      How do I get funky sounds instead of a boring beep?
4942 * Q5.2.3::      What's NAS, how do I get it?
4943 * Q5.2.4::      Sunsite sounds don't play.
4944 @c extend me
4945
4946 Miscellaneous:
4947 * Q5.3.1::      How do you make SXEmacs indent CL if-clauses correctly?
4948 * Q5.3.2::      [This question intentionally left blank]
4949 * Q5.3.3::      How can I print WYSIWYG a font-locked buffer?
4950 * Q5.3.4::      Getting @kbd{M-x lpr} to work with postscript printer.
4951 * Q5.3.5::      How do I specify the paths that SXEmacs uses for finding files?
4952 * Q5.3.6::      [This question intentionally left blank]
4953 * Q5.3.7::      Can I have the end of the buffer delimited in some way?
4954 * Q5.3.8::      How do I insert today's date into a buffer?
4955 * Q5.3.9::      Are only certain syntactic character classes available for abbrevs?
4956 * Q5.3.10::     How can I get those oh-so-neat X-Face lines?
4957 * Q5.3.11::     How do I add new Info directories?
4958 * Q5.3.12::     What do I need to change to make printing work?
4959 @end menu
4960
4961
4962 @node Q5.0.1
4963 @unnumberedsec 5.0: Major & Minor Modes
4964 @unnumberedsec Q5.0.1: How can I do source code highlighting using font-lock?
4965
4966 For most modes, font-lock is already set up and just needs to be turned
4967 on.  This can be done by adding the line:
4968
4969 @lisp
4970 (require 'font-lock)
4971 @end lisp
4972
4973 to your @file{init.el}.  You can turn it on for the current buffer and
4974 session only by @kbd{M-x font-lock-mode}.  See the file
4975 @file{etc/sample.init.el} for more information.
4976
4977 @c the old way:
4978 @c     (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
4979 @c     (add-hook 'dired-mode-hook      'turn-on-font-lock)
4980
4981 See also @code{Syntax Highlighting} from the @code{Options} menu.
4982 Remember to save options.
4983
4984
4985 @node Q5.0.2
4986 @unnumberedsec Q5.0.2: I do not like cc-mode.  How do I use the old c-mode?
4987
4988 Well, first off, consider if you really want to do this.  cc-mode is
4989 much more powerful than the old c-mode.  If you're having trouble
4990 getting your old offsets to work, try using @code{c-set-offset} instead.
4991 You might also consider using the package @code{cc-compat}.
4992
4993 But, if you still insist, add the following lines to your @file{init.el}:
4994
4995 @lisp
4996 (fmakunbound 'c-mode)
4997 (makunbound 'c-mode-map)
4998 (fmakunbound 'c++-mode)
4999 (makunbound 'c++-mode-map)
5000 (makunbound 'c-style-alist)
5001 (load-library "old-c-mode")
5002 (load-library "old-c++-mode")
5003 @end lisp
5004
5005 This must be done before any other reference is made to either c-mode or
5006 c++-mode.
5007
5008
5009 @node Q5.0.3
5010 @unnumberedsec Q5.0.3: How do I get @samp{More} Syntax Highlighting on by default?
5011
5012 Use the following code in your @file{init.el}:
5013
5014 @lisp
5015 (setq-default font-lock-maximum-decoration t)
5016 @end lisp
5017
5018 See also @code{Syntax Highlighting} from the @code{Options} menu.
5019 Remember to save options.
5020
5021
5022 @node Q5.0.4
5023 @unnumberedsec Q5.0.4: How can I enable auto-indent and/or Filladapt?
5024
5025 Put the following line in your @file{init.el}:
5026
5027 @lisp
5028 (setq indent-line-function 'indent-relative-maybe)
5029 @end lisp
5030
5031 If you want to get fancy, try the @code{filladapt} package available
5032 standard with SXEmacs.  Put this into your @file{init.el}:
5033
5034 @lisp
5035 (require 'filladapt)
5036 (setq-default filladapt-mode t)
5037 (add-hook 'c-mode-hook 'turn-off-filladapt-mode)
5038 @end lisp
5039
5040 This will enable Filladapt for all modes except C mode, where it doesn't
5041 work well.  To turn Filladapt on only in particular major modes, remove
5042 the @code{(setq-default ...)} line and use
5043 @code{turn-on-filladapt-mode}, like this:
5044
5045 @lisp
5046 (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
5047 @end lisp
5048
5049 You can customize filling and adaptive filling with Customize.
5050 Select from the @code{Options} menu
5051 @code{Advanced (Customize)->Emacs->Editing->Fill->Fill...}
5052 or type @kbd{M-x customize @key{RET} fill @key{RET}}.
5053
5054 Note that well-behaving text-lookalike modes will run
5055 @code{text-mode-hook} by default (e.g. that's what Message does).  For
5056 the nasty ones, you'll have to provide the @code{add-hook}s yourself.
5057
5058 Please note that the @code{fa-extras} package is no longer useful.
5059
5060
5061 @node Q5.0.5
5062 @unnumberedsec Q5.0.5: How can I get SXEmacs to come up in text/auto-fill mode by default?
5063
5064 Try the following lisp in your @file{init.el}:
5065
5066 @lisp
5067 (setq default-major-mode 'text-mode)
5068 (setq text-mode-hook 'turn-on-auto-fill)
5069 @end lisp
5070
5071 @strong{WARNING}: note that changing the value of
5072 @code{default-major-mode} from @code{fundamental-mode} can break a large
5073 amount of built-in code that expects newly created buffers to be in
5074 @code{fundamental-mode}.  (Changing from @code{fundamental-mode} to
5075 @code{text-mode} might not wreak too much havoc, but changing to
5076 something more exotic like a lisp-mode would break many Emacs packages).
5077
5078 Note that Emacs by default starts up in buffer @code{*scratch*} in
5079 @code{initial-major-mode}, which defaults to
5080 @code{lisp-interaction-mode}. Thus adding the following form to your
5081 Emacs init file will cause the initial @code{*scratch*} buffer to be put
5082 into auto-fill'ed @code{text-mode}:
5083
5084 @lisp
5085 (setq initial-major-mode
5086       (lambda ()
5087         (text-mode)
5088         (turn-on-auto-fill)))
5089 @end lisp
5090
5091 Note that after your init file is loaded, if
5092 @code{inhibit-startup-message} is @code{nil} (the default) and the
5093 startup buffer is @code{*scratch*} then the startup message will be
5094 inserted into @code{*scratch*}; it will be removed after a timeout by
5095 erasing the entire @code{*scratch*} buffer.  Keep in mind this default
5096 usage of @code{*scratch*} if you desire any prior manipulation of
5097 @code{*scratch*} from within your Emacs init file. In particular,
5098 anything you insert into @code{*scratch*} from your init file will be
5099 later erased. Also, if you change the mode of the @code{*scratch*}
5100 buffer, be sure that this will not interfere with possible later
5101 insertion of the startup message (e.g. if you put @code{*scratch*} into
5102 a nonstandard mode that has automatic font lock rules, then the startup
5103 message might get fontified in a strange foreign manner, e.g. as code in
5104 some programming language).
5105
5106
5107 @node Q5.0.6
5108 @unnumberedsec Q5.0.6: How do I start up a second shell buffer?
5109
5110 In the @code{*shell*} buffer:
5111
5112 @lisp
5113 M-x rename-buffer @key{RET} *shell-1* @key{RET}
5114 M-x shell RET
5115 @end lisp
5116
5117 This will then start a second shell.  The key is that no buffer named
5118 @samp{*shell*} can exist.  It might be preferable to use @kbd{M-x
5119 rename-uniquely} to rename the @code{*shell*} buffer instead of @kbd{M-x
5120 rename-buffer}.
5121
5122 Alternately, you can set the variable @code{shell-multiple-shells}.
5123 If the value of this variable is non-nil, each time shell mode is invoked,
5124 a new shell is made
5125
5126
5127 @node Q5.0.7
5128 @unnumberedsec Q5.0.7: Telnet from shell filters too much
5129
5130 I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke
5131 and use a telnet session within it.  Everything works fine except that
5132 now all @samp{^M}'s are filtered out by Emacs.  Fixes?
5133
5134 Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather
5135 than doing rsh or telnet within the local shell buffer.  You can also
5136 use @kbd{M-x ssh} to open secure remote session if you have @code{ssh}
5137 installed.
5138
5139
5140 @node Q5.0.8
5141 @unnumberedsec Q5.0.8: Why does edt emulation not work?
5142
5143 We don't know, but you can use tpu-edt emulation instead, which works
5144 fine and is a little fancier than the standard edt emulation.  To do
5145 this, add the following line to your @file{init.el}:
5146
5147 @lisp
5148 (tpu-edt)
5149 @end lisp
5150
5151 If you don't want it to replace @kbd{C-h} with an edt-style help menu
5152 add this as well:
5153
5154 @lisp
5155 (global-set-key [(control h)] 'help-for-help)
5156 @end lisp
5157
5158
5159 @node Q5.0.9
5160 @unnumberedsec Q5.0.9: How can I emulate VI and use it as my default mode?
5161
5162 Our recommended VI emulator is viper. To make viper-mode the default,
5163 add this to your @file{init.el}:
5164
5165 @lisp
5166 (viper-mode)
5167 @end lisp
5168
5169 @email{kifer@@CS.SunySB.EDU, Michael Kifer} writes:
5170
5171 @quotation
5172 This should be added as close to the top of @file{init.el} as you can get
5173 it, otherwise some minor modes may not get viper-ized.
5174 @end quotation
5175
5176
5177 @node Q5.0.10
5178 @unnumberedsec Q5.0.10: [This question intentionally left blank]
5179
5180 Obsolete question, left blank to avoid renumbering
5181
5182
5183 @node Q5.0.11
5184 @unnumberedsec Q5.0.11: [This question intentionally left blank]
5185
5186 Obsolete question, left blank to avoid renumbering
5187
5188
5189 @node Q5.0.12
5190 @unnumberedsec Q5.0.12: How do I disable gnuserv from opening a new frame?
5191
5192 If you set the @code{gnuserv-frame} variable to the frame that should be
5193 used to display buffers that are pulled up, a new frame will not be
5194 created. For example, you could put
5195
5196 @lisp
5197 (setq gnuserv-frame (selected-frame))
5198 @end lisp
5199
5200 early on in your @file{init.el}, to ensure that the first frame created
5201 is the one used for your gnuserv buffers.
5202
5203 There is an option to set the gnuserv target to the current frame.  See
5204 @code{Options->Display->"Other Window" Location->Make Current Frame Gnuserv Target}
5205
5206 You can also change this with Customize.  Select from the
5207 @code{Options} menu @code{Advanced
5208 (Customize)->Emacs->Environment->Gnuserv->Gnuserv Frame...}  or type
5209 @kbd{M-x customize @key{RET} gnuserv @key{RET}}.
5210
5211
5212 @node Q5.0.13
5213 @unnumberedsec Q5.0.13: How do I start gnuserv so that each subsequent SXEmacs is a client?
5214
5215 Put the following in your @file{init.el} file to start the server:
5216
5217 @lisp
5218 (gnuserv-start)
5219 @end lisp
5220
5221 Start your first SXEmacs as usual.  After that, you can do:
5222
5223 @example
5224 gnuclient randomfilename
5225 @end example
5226
5227 from the command line to get your existing SXEmacs process to open a
5228 new frame and visit randomfilename in that window. When you're done
5229 editing randomfilename, hit @kbd{C-x #} to kill the buffer and get rid
5230 of the frame.
5231
5232 See also man page of gnuclient.
5233
5234
5235 @node Q5.0.14
5236 @unnumberedsec Q5.0.14: Strange things are happening in Shell Mode.
5237
5238 Sometimes (i.e. it's not repeatable, and I can't work out why it
5239 happens) when I'm typing into shell mode, I hit return and only a
5240 portion of the command is given to the shell, and a blank prompt is
5241 returned.  If I hit return again, the rest of the previous command is
5242 given to the shell.
5243
5244 @email{martin@@xemacs.org, Martin Buchholz} writes:
5245
5246 @quotation
5247 There is a known problem with interaction between @code{csh} and the
5248 @code{filec} option and SXEmacs.  You should add the following to your
5249 @file{.cshrc}:
5250
5251 @example
5252 if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
5253 @end example
5254 @end quotation
5255
5256
5257 @node Q5.0.15
5258 @unnumberedsec Q5.0.15: Where do I get the latest CC Mode?
5259
5260 See @uref{http://cc-mode.sourceforge.net/}.
5261
5262
5263 @node Q5.0.16
5264 @unnumberedsec Q5.0.16: I find auto-show-mode disconcerting.  How do I turn it off?
5265
5266 @code{auto-show-mode} controls whether or not a horizontal scrollbar
5267 magically appears when a line is too long to be displayed.  This is
5268 enabled by default.  To turn it off, put the following in your
5269 @file{init.el}:
5270
5271 @lisp
5272 (setq auto-show-mode nil)
5273 (setq-default auto-show-mode nil)
5274 @end lisp
5275
5276
5277 @node Q5.0.17
5278 @unnumberedsec Q5.0.17: How can I get two instances of info?
5279
5280 Good question.
5281
5282
5283 @node Q5.0.18
5284 @unnumberedsec Q5.0.18: [This question intentionally left blank]
5285
5286
5287 @node Q5.0.19
5288 @unnumberedsec Q5.0.19: Is there something better than LaTeX mode?
5289
5290 @email{dak@@fsnif.neuroinformatik.ruhr-uni-bochum.de, David Kastrup} writes:
5291
5292 @quotation
5293 The standard TeX modes leave much to be desired, and are somewhat
5294 leniently maintained.  Serious TeX users use AUC TeX (@pxref{Q4.7.1}).
5295 @end quotation
5296
5297
5298 @node Q5.0.20
5299 @unnumberedsec Q5.0.20: Is there a way to start a new SXEmacs if there's no gnuserv running, and otherwise use gnuclient?
5300
5301 @email{vroonhof@@math.ethz.ch, Jan Vroonhof} writes:
5302 @quotation
5303 Here is one of the solutions, we have this in a script called
5304 @file{etc/editclient.sh}.
5305 @example
5306  #!/bin/sh
5307  if gnuclient -batch -eval t >/dev/null 2>&1
5308  then
5309    exec gnuclient $@{1+"$@@"@}
5310  else
5311    sxemacs -unmapped -f gnuserv-start &
5312    until gnuclient -batch -eval t >/dev/null 2>&1
5313    do
5314       sleep 1
5315    done
5316    exec gnuclient $@{1+"$@@"@}
5317  fi
5318 @end example
5319
5320 Note that there is a known problem when running SXEmacs and
5321 @samp{gnuclient -nw} on the same TTY.
5322 @end quotation
5323
5324
5325 @node Q5.1.1
5326 @unnumberedsec 5.1: Emacs Lisp Programming Techniques
5327 @unnumberedsec Q5.1.1: What is the difference in key sequences between XEmacs/SXEmacs and GNU Emacs?
5328
5329 @email{clerik@@naggum.no, Erik Naggum} writes;
5330
5331 @quotation
5332 Emacs has a legacy of keyboards that produced characters with modifier
5333 bits, and therefore map a variety of input systems into this scheme even
5334 today.  XEmacs is instead optimized for X events.  This causes an
5335 incompatibility in the way key sequences are specified, but both Emacs
5336 and XEmacs will accept a key sequence as a vector of lists of modifiers
5337 that ends with a key, e.g., to bind @kbd{M-C-a}, you would say
5338 @code{[(meta control a)]} in both Emacsen.  XEmacs has an abbreviated
5339 form for a single key, just (meta control a).  Emacs has an abbreviated
5340 form for the Control and the Meta modifiers to string-characters (the
5341 ASCII characters), as in @samp{\M-\C-a}.  XEmacs users need to be aware
5342 that the abbreviated form works only for one-character key sequences,
5343 while Emacs users need to be aware that the string-character is rather
5344 limited.  Specifically, the string-character can accommodate only 256
5345 different values, 128 of which have the Meta modifier and 128 of which
5346 have not.  In each of these blocks, only 32 characters have the Control
5347 modifier.  Whereas @code{[(meta control A)]} differs from @code{[(meta
5348 control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A}
5349 do not.  Programmers are advised to use the full common form, both
5350 because it is more readable and less error-prone, and because it is
5351 supported by both Emacsen.
5352 @end quotation
5353
5354 Another (even safer) way to be sure of the key-sequences is to use the
5355 @code{read-kbd-macro} function, which takes a string like @samp{C-c
5356 <up>}, and converts it to the internal key representation of the Emacs
5357 you use.  The function is available under all Emacsen.
5358
5359
5360 @node Q5.1.2
5361 @unnumberedsec Q5.1.2: Can I generate "fake" keyboard events?
5362
5363 I wonder if there is an interactive function that can generate
5364 @dfn{fake} keyboard events.  This way, I could simply map them inside
5365 SXEmacs.
5366
5367 This seems to work:
5368
5369 @lisp
5370 (defun cg--generate-char-event (ch)
5371   "Generate an event, as if ch has been typed"
5372   (dispatch-event (character-to-event ch)))
5373
5374 ;;  Backspace and Delete stuff
5375 (global-set-key [backspace]
5376   (lambda () (interactive) (cg--generate-char-event 127)))
5377 (global-set-key [unknown_keysym_0x4]
5378   (lambda () (interactive) (cg--generate-char-event 4)))
5379 @end lisp
5380
5381
5382 @node Q5.1.3
5383 @unnumberedsec Q5.1.3: Could you explain @code{read-kbd-macro} in more detail?
5384
5385 The @code{read-kbd-macro} function returns the internal Emacs
5386 representation of a human-readable string (which is its argument).
5387 Thus:
5388
5389 @lisp
5390 (read-kbd-macro "C-c C-a")
5391 @result{} [(control ?c) (control ?a)]
5392
5393 (read-kbd-macro "C-c C-. <up>")
5394 @result{} [(control ?c) (control ?.) up]
5395 @end lisp
5396
5397 In GNU Emacs the same forms will be evaluated to what GNU Emacs
5398 understands internally---the sequences @code{"\C-x\C-c"} and @code{[3
5399 67108910 up]}, respectively.
5400
5401 The exact @dfn{human-readable} syntax is defined in the docstring of
5402 @code{edmacro-mode}.  I'll repeat it here, for completeness.
5403
5404 @quotation
5405 Format of keyboard macros during editing:
5406
5407 Text is divided into @dfn{words} separated by whitespace.  Except for
5408 the words described below, the characters of each word go directly as
5409 characters of the macro.  The whitespace that separates words is
5410 ignored.  Whitespace in the macro must be written explicitly, as in
5411 @kbd{foo @key{SPC} bar @key{RET}}.
5412
5413 @itemize @bullet
5414 @item
5415 The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD},
5416 @kbd{ESC}, and @kbd{NUL} represent special control characters.  The
5417 words must be written in uppercase.
5418
5419 @item
5420 A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or
5421 @code{<f1>}, represents a function key.  (Note that in the standard
5422 configuration, the function key @code{<return>} and the control key
5423 @key{RET} are synonymous.)  You can use angle brackets on the words
5424 @key{RET}, @key{SPC}, etc., but they are not required there.
5425
5426 @item
5427 Keys can be written by their @sc{ascii} code, using a backslash followed
5428 by up to six octal digits.  This is the only way to represent keys with
5429 codes above \377.
5430
5431 @item
5432 One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-}
5433 (shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may
5434 precede a character or key notation.  For function keys, the prefixes
5435 may go inside or outside of the brackets: @code{C-<down>} @equiv{}
5436 @code{<C-down>}.  The prefixes may be written in any order: @kbd{M-C-x}
5437 @equiv{} @kbd{C-M-x}.
5438
5439 Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except
5440 that the Meta prefix is allowed on a sequence of digits and optional
5441 minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}.
5442
5443 @item
5444 The @code{^} notation for control characters also works: @kbd{^M}
5445 @equiv{} @kbd{C-m}.
5446
5447 @item
5448 Double angle brackets enclose command names: @code{<<next-line>>} is
5449 shorthand for @kbd{M-x next-line @key{RET}}.
5450
5451 @item
5452 Finally, @code{REM} or @code{;;} causes the rest of the line to be
5453 ignored as a comment.
5454 @end itemize
5455
5456 Any word may be prefixed by a multiplier in the form of a decimal number
5457 and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>},
5458 and @code{10*foo} @equiv{}
5459 @iftex
5460 @*
5461 @end iftex
5462 @code{foofoofoofoofoofoofoofoofoofoo}.
5463
5464 Multiple text keys can normally be strung together to form a word, but
5465 you may need to add whitespace if the word would look like one of the
5466 above notations: @code{; ; ;} is a keyboard macro with three semicolons,
5467 but @code{;;;} is a comment.  Likewise, @code{\ 1 2 3} is four keys but
5468 @code{\123} is a single key written in octal, and @code{< right >} is
5469 seven keys but @code{<right>} is a single function key.  When in doubt,
5470 use whitespace.
5471 @end quotation
5472
5473
5474 @node Q5.1.4
5475 @unnumberedsec Q5.1.4: What is the performance hit of @code{let}?
5476
5477 In most cases, not noticeable.  Besides, there's no avoiding
5478 @code{let}---you have to bind your local variables, after all.  Some
5479 pose a question whether to nest @code{let}s, or use one @code{let} per
5480 function.  I think because of clarity and maintenance (and possible
5481 future implementation), @code{let}-s should be used (nested) in a way to
5482 provide the clearest code.
5483
5484
5485 @node Q5.1.5
5486 @unnumberedsec Q5.1.5: What is the recommended use of @code{setq}?
5487
5488 @itemize @bullet
5489 @item Global variables
5490
5491 You will typically @code{defvar} your global variable to a default
5492 value, and use @code{setq} to set it later.
5493
5494 It is never a good practice to @code{setq} user variables (like
5495 @code{case-fold-search}, etc.), as it ignores the user's choice
5496 unconditionally.  Note that @code{defvar} doesn't change the value of a
5497 variable if it was bound previously.  If you wish to change a
5498 user-variable temporarily, use @code{let}:
5499
5500 @lisp
5501 (let ((case-fold-search nil))
5502   ...                                   ; code with searches that must be case-sensitive
5503   ...)
5504 @end lisp
5505
5506 You will notice the user-variables by their docstrings beginning with an
5507 asterisk (a convention).
5508
5509 @item Local variables
5510
5511 Bind them with @code{let}, which will unbind them (or restore their
5512 previous value, if they were bound) after exiting from the @code{let}
5513 form.  Change the value of local variables with @code{setq} or whatever
5514 you like (e.g. @code{incf}, @code{setf} and such).  The @code{let} form
5515 can even return one of its local variables.
5516
5517 Typical usage:
5518
5519 @lisp
5520 ;; iterate through the elements of the list returned by
5521 ;; `hairy-function-that-returns-list'
5522 (let ((l (hairy-function-that-returns-list)))
5523   (while l
5524     ... do something with (car l) ...
5525     (setq l (cdr l))))
5526 @end lisp
5527
5528 Another typical usage includes building a value simply to work with it.
5529
5530 @lisp
5531 ;; Build the mode keymap out of the key-translation-alist
5532 (let ((inbox (file-truename (expand-file-name box)))
5533       (i 0))
5534   ... code dealing with inbox ...
5535   inbox)
5536 @end lisp
5537
5538 This piece of code uses the local variable @code{inbox}, which becomes
5539 unbound (or regains old value) after exiting the form.  The form also
5540 returns the value of @code{inbox}, which can be reused, for instance:
5541
5542 @lisp
5543 (setq foo-processed-inbox
5544       (let .....))
5545 @end lisp
5546 @end itemize
5547
5548
5549 @node Q5.1.6
5550 @unnumberedsec Q5.1.6: What is the typical misuse of @code{setq} ?
5551
5552 A typical misuse is probably @code{setq}ing a variable that was meant to
5553 be local.  Such a variable will remain bound forever, never to be
5554 garbage-collected.  For example, the code doing:
5555
5556 @lisp
5557 (defun my-function (whatever)
5558   (setq a nil)
5559   ... build a large list ...
5560   ... and exit ...)
5561 @end lisp
5562
5563 does a bad thing, as @code{a} will keep consuming memory, never to be
5564 unbound.  The correct thing is to do it like this:
5565
5566 @lisp
5567 (defun my-function (whatever)
5568   (let (a)                              ; default initialisation is to nil
5569     ... build a large list ...
5570     ... and exit, unbinding `a' in the process  ...)
5571 @end lisp
5572
5573 Not only is this prettier syntactically, but it makes it possible for
5574 Emacs to garbage-collect the objects which @code{a} used to reference.
5575
5576 Note that even global variables should not be @code{setq}ed without
5577 @code{defvar}ing them first, because the byte-compiler issues warnings.
5578 The reason for the warning is the following:
5579
5580 @lisp
5581 (defvar flurgoze nil)                   ; ok, global internal variable
5582 ...
5583
5584 (setq flurghoze t)                      ; ops!  a typo, but semantically correct.
5585                                         ; however, the byte-compiler warns.
5586
5587 While compiling toplevel forms:
5588 ** assignment to free variable flurghoze
5589 @end lisp
5590
5591
5592 @node Q5.1.7
5593 @unnumberedsec Q5.1.7: I like the @code{do} form of cl, does it slow things down?
5594
5595 It shouldn't.  Here is what Dave Gillespie has to say about cl.el
5596 performance:
5597
5598 @quotation
5599 Many of the advanced features of this package, such as @code{defun*},
5600 @code{loop}, and @code{setf}, are implemented as Lisp macros.  In
5601 byte-compiled code, these complex notations will be expanded into
5602 equivalent Lisp code which is simple and efficient.  For example, the
5603 forms
5604
5605 @lisp
5606 (incf i n)
5607 (push x (car p))
5608 @end lisp
5609
5610 are expanded at compile-time to the Lisp forms
5611
5612 @lisp
5613 (setq i (+ i n))
5614 (setcar p (cons x (car p)))
5615 @end lisp
5616
5617 which are the most efficient ways of doing these respective operations
5618 in Lisp.  Thus, there is no performance penalty for using the more
5619 readable @code{incf} and @code{push} forms in your compiled code.
5620
5621 @emph{Interpreted} code, on the other hand, must expand these macros
5622 every time they are executed.  For this reason it is strongly
5623 recommended that code making heavy use of macros be compiled.  (The
5624 features labelled @dfn{Special Form} instead of @dfn{Function} in this
5625 manual are macros.)  A loop using @code{incf} a hundred times will
5626 execute considerably faster if compiled, and will also garbage-collect
5627 less because the macro expansion will not have to be generated, used,
5628 and thrown away a hundred times.
5629
5630 You can find out how a macro expands by using the @code{cl-prettyexpand}
5631 function.
5632 @end quotation
5633
5634
5635 @node Q5.1.8
5636 @unnumberedsec Q5.1.8: I like recursion, does it slow things down?
5637
5638 Yes.  Emacs byte-compiler cannot do much to optimize recursion.  But
5639 think well whether this is a real concern in Emacs.  Much of the Emacs
5640 slowness comes from internal mechanisms such as redisplay, or from the
5641 fact that it is an interpreter.
5642
5643 Please try not to make your code much uglier to gain a very small speed
5644 gain.  It's not usually worth it.
5645
5646
5647 @node Q5.1.9
5648 @unnumberedsec Q5.1.9: How do I put a glyph as annotation in a buffer?
5649
5650 Here is a solution that will insert the glyph annotation at the
5651 beginning of buffer:
5652
5653 @lisp
5654 (make-annotation (make-glyph '([FORMAT :file FILE]
5655                                [string :data "fallback-text"]))
5656                  (point-min)
5657                  'text
5658                  (current-buffer))
5659 @end lisp
5660
5661 Replace @samp{FORMAT} with an unquoted symbol representing the format of
5662 the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.)
5663 Instead of @samp{FILE}, use the image file name
5664 (e.g.
5665 @iftex
5666 @*
5667 @end iftex
5668 @file{/usr/local/lib/sxemacs-22.1.4/etc/recycle.xpm}).
5669
5670 You can turn this to a function (that optionally prompts you for a file
5671 name), and inserts the glyph at @code{(point)} instead of
5672 @code{(point-min)}.
5673
5674
5675 @node Q5.1.10
5676 @unnumberedsec Q5.1.10: @code{map-extents} won't traverse all of my extents!
5677
5678 I tried to use @code{map-extents} to do an operation on all the extents
5679 in a region.  However, it seems to quit after processing a random number
5680 of extents.  Is it buggy?
5681
5682 No.  The documentation of @code{map-extents} states that it will iterate
5683 across the extents as long as @var{function} returns @code{nil}.
5684 Unexperienced programmers often forget to return @code{nil} explicitly,
5685 which results in buggy code.  For instance, the following code is
5686 supposed to delete all the extents in a buffer, and issue as many
5687 @samp{fubar!} messages.
5688
5689 @lisp
5690 (map-extents (lambda (ext ignore)
5691                (delete-extent ext)
5692                (message "fubar!")))
5693 @end lisp
5694
5695 Instead, it will delete only the first extent, and stop right there --
5696 because @code{message} will return a non-nil value.  The correct code
5697 is:
5698
5699 @lisp
5700 (map-extents (lambda (ext ignore)
5701                (delete-extent ext)
5702                (message "fubar!")
5703                nil))
5704 @end lisp
5705
5706
5707 @node Q5.1.11
5708 @unnumberedsec Q5.1.11: My elisp program is horribly slow.  Is there
5709 an easy way to find out where it spends time?
5710 @c New
5711
5712 @email{hniksic@@xemacs.org, Hrvoje Niksic} writes:
5713 @quotation
5714 Under XEmacs 20.4 and later you can use @kbd{M-x profile-key-sequence},
5715 press a key (say @key{RET} in the Gnus Group buffer), and get the
5716 results using @kbd{M-x profile-results}.  It should give you an idea of
5717 where the time is being spent.
5718 @end quotation
5719
5720
5721 @node Q5.2.1
5722 @unnumberedsec Q5.2.1: How do I turn off the sound?
5723 @c hehe, this is neat
5724 @c should i mention that if nothing's done, sound is off entirely?
5725
5726 Add the following line to your @file{init.el}:
5727
5728 @lisp
5729 (setq bell-volume 0)
5730 (setq sound-alist nil)
5731 @end lisp
5732
5733 That will make your SXEmacs totally silent---even the default ding sound
5734 (TTY beep on TTY-s) will be gone.
5735
5736 You can also change these with Customize.  Select from the
5737 @code{Options} menu @code{Advanced
5738 (Customize)->Emacs->Environment->Sound->Sound...} or type @kbd{M-x
5739 customize @key{RET} sound @key{RET}}.
5740
5741
5742 @node Q5.2.2
5743 @unnumberedsec Q5.2.2: How do I get funky sounds instead of a boring beep?
5744
5745 Make sure your SXEmacs was compiled with audio and media support, and
5746 then put this in your @file{init.el}:
5747
5748 @lisp
5749 (load-default-sounds)
5750 @end lisp
5751
5752
5753 @node Q5.2.3
5754 @unnumberedsec Q5.2.3: What's NAS, how do I get it?
5755
5756 @xref{Q2.0.3}, for an explanation of the @dfn{Network Audio System}.
5757
5758
5759 @node Q5.2.4
5760 @unnumberedsec Q5.2.4: Sunsite sounds don't play.
5761
5762 I'm having some trouble with sounds I've downloaded from sunsite.  They
5763 play when I run them through @code{showaudio} or cat them directly to
5764 @file{/dev/audio}, but SXEmacs refuses to play them.
5765
5766 @email{gutschk@@uni-muenster.de, Markus Gutschke} writes:
5767
5768 @quotation
5769 [Many of] These files have an (erroneous) 24byte header that tells about
5770 the format that they have been recorded in. If you cat them to
5771 @file{/dev/audio}, the header will be ignored and the default behavior
5772 for /dev/audio will be used. This happens to be 8kHz uLaw. It is
5773 probably possible to fix the header by piping through @code{sox} and
5774 passing explicit parameters for specifying the sampling format; you then
5775 need to perform a 'null' conversion from SunAudio to SunAudio.
5776 @end quotation
5777
5778
5779 @node Q5.3.1
5780 @unnumberedsec 5.3: Miscellaneous
5781 @unnumberedsec Q5.3.1: How do you make SXEmacs indent CL if-clauses correctly?
5782
5783 I'd like SXEmacs to indent all the clauses of a Common Lisp @code{if} the
5784 same amount instead of indenting the 3rd clause differently from the
5785 first two.
5786
5787 One way is to add, to @file{init.el}:
5788
5789 @lisp
5790 (put 'if 'lisp-indent-function nil)
5791 @end lisp
5792
5793 However, note that the package @code{cl-indent} that comes with
5794 SXEmacs sets up this kind of indentation by default.  @code{cl-indent}
5795 also knows about many other CL-specific forms.  To use @code{cl-indent},
5796 one can do this:
5797
5798 @lisp
5799 (load "cl-indent")
5800 (setq lisp-indent-function (function common-lisp-indent-function))
5801 @end lisp
5802
5803 One can also customize @file{cl-indent.el} so it mimics the default
5804 @code{if} indentation @code{then} indented more than the @code{else}.
5805 Here's how:
5806
5807 @lisp
5808 (put 'if 'common-lisp-indent-function '(nil nil &body))
5809 @end lisp
5810
5811
5812 @node Q5.3.2
5813 @unnumberedsec Q5.3.2: [This question intentionally left blank]
5814
5815 Obsolete question, left blank to avoid renumbering.
5816
5817
5818 @node Q5.3.3
5819 @unnumberedsec Q5.3.3: How can I print WYSIWYG a font-locked buffer?
5820
5821 Font-lock looks nice.  How can I print (WYSIWYG) the highlighted
5822 document?
5823
5824 The package @code{ps-print}, which is now included with SXEmacs, provides
5825 the ability to do this.  The source code contains complete instructions
5826 on its use, in
5827 @file{$prefix/lib/sxemacs/xemacs-packages/lisp/ps-print/ps-print.el},
5828 being the default location of an installed ps-print package.
5829
5830
5831 @node Q5.3.4
5832 @unnumberedsec Q5.3.4: Getting @kbd{M-x lpr} to work with postscript printer.
5833
5834 My printer is a Postscript printer and @code{lpr} only works for
5835 Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x
5836 lpr-buffer} to work?
5837
5838 Put something like this in your @file{init.el}:
5839
5840 @lisp
5841 (setq lpr-command "a2ps")
5842 (setq lpr-switches '("-p" "-1"))
5843 @end lisp
5844
5845 If you don't use a2ps to convert ASCII to postscript (why not, it's
5846 free?), replace with the command you do use.  Note also that some
5847 versions of a2ps require a @samp{-Pprinter} to ensure spooling.
5848
5849
5850 @node Q5.3.5
5851 @unnumberedsec Q5.3.5: How do I specify the paths that SXEmacs uses for finding files?
5852
5853 You can specify what paths to use by using a number of different flags
5854 when running configure.  See the section MAKE VARIABLES in the top-level
5855 file INSTALL in the SXEmacs distribution for a listing of those flags.
5856
5857 Most of the time, however, the simplest fix is: @strong{do not} specify
5858 paths as you might for GNU Emacs.  SXEmacs can generally determine the
5859 necessary paths dynamically at run time.  The only path that generally
5860 needs to be specified is the root directory to install into.  That can
5861 be specified by passing the @code{--prefix} flag to configure.  For a
5862 description of the SXEmacs install tree, please consult the @file{NEWS}
5863 file.
5864
5865
5866 @node Q5.3.6
5867 @unnumberedsec Q5.3.6: [This question intentionally left blank]
5868
5869 Obsolete question, left blank to avoid renumbering.
5870
5871
5872 @node Q5.3.7
5873 @unnumberedsec Q5.3.7: Can I have the end of the buffer delimited in some way?
5874
5875 Say, with: @samp{[END]}?
5876
5877 Try this:
5878
5879 @lisp
5880 (let ((ext (make-extent (point-min) (point-max))))
5881   (set-extent-property ext 'start-closed t)
5882   (set-extent-property ext 'end-closed t)
5883   (set-extent-property ext 'detachable nil)
5884   (set-extent-end-glyph ext (make-glyph [string :data "[END]"])))
5885 @end lisp
5886
5887 Since this is SXEmacs, you can specify an icon to be shown on
5888 window-system devices.  To do so, change the @code{make-glyph} call to
5889 something like this:
5890
5891 @lisp
5892 (make-glyph '([xpm :file "~/something.xpm"]
5893               [string :data "[END]"]))
5894 @end lisp
5895
5896 You can inline the @sc{xpm} definition yourself by specifying
5897 @code{:data} instead of @code{:file}.  Here is such a full-featured
5898 version that works on both X and TTY devices:
5899
5900 @lisp
5901 (let ((ext (make-extent (point-min) (point-max))))
5902   (set-extent-property ext 'start-closed t)
5903   (set-extent-property ext 'end-closed t)
5904   (set-extent-property ext 'detachable nil)
5905   (set-extent-end-glyph ext (make-glyph '([xpm :data "\
5906 /* XPM */
5907 static char* eye = @{
5908 \"20 11 7 2\",
5909 \"__ c None\"
5910 \"_` c #7f7f7f\",
5911 \"_a c #fefefe\",
5912 \"_b c #7f0000\",
5913 \"_c c #fefe00\",
5914 \"_d c #fe0000\",
5915 \"_e c #bfbfbf\",
5916 \"___________`_`_`___b_b_b_b_________`____\",
5917 \"_________`_`_`___b_c_c_c_b_b____________\",
5918 \"_____`_`_`_e___b_b_c_c_c___b___b_______`\",
5919 \"___`_`_e_a___b_b_d___b___b___b___b______\",
5920 \"_`_`_e_a_e___b_b_d_b___b___b___b___b____\",
5921 \"_`_`_a_e_a___b_b_d___b___b___b___b___b__\",
5922 \"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\",
5923 \"___`_`_e_a___b_b_b_d_c___b___b___d_b____\",
5924 \"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\",
5925 \"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\",
5926 \"___`_____`_`_`_`___b_b_b_b_b_b__________\",
5927 @} ;"]
5928                                           [string :data "[END]"]))))
5929 @end lisp
5930
5931 Note that you might want to make this a function, and put it to a hook.
5932 We leave that as an exercise for the reader.
5933
5934
5935 @node Q5.3.8
5936 @unnumberedsec Q5.3.8: How do I insert today's date into a buffer?
5937
5938 Like this:
5939
5940 @lisp
5941 (insert (current-time-string))
5942 @end lisp
5943
5944
5945 @node Q5.3.9
5946 @unnumberedsec Q5.3.9: Are only certain syntactic character classes available for abbrevs?
5947
5948 @c @email{gutschk@@uni-muenster.de, Markus Gutschke} writes:
5949 @c
5950 @c @quotation
5951 @c Yes, abbrevs only expands word-syntax strings. While XEmacs does not
5952 @c prevent you from defining (e.g. with @kbd{C-x a g} or @kbd{C-x a l})
5953 @c abbrevs that contain special characters, it will refuse to expand
5954 @c them. So you need to ensure, that the abbreviation contains letters and
5955 @c digits only. This means that @samp{xd}, @samp{d5}, and @samp{5d} are
5956 @c valid abbrevs, but @samp{&d}, and @samp{x d} are not.
5957 @c
5958 @c If this sounds confusing to you, (re-)read the online documentation for
5959 @c abbrevs (@kbd{C-h i m XEmacs @key{RET} m Abbrevs @key{RET}}), and then come back and
5960 @c read this question/answer again.
5961 @c @end quotation
5962 @c
5963 @c Starting with XEmacs 20.3 this restriction has been lifted.
5964
5965 Does not apply anymore.
5966
5967
5968 @node Q5.3.10
5969 @unnumberedsec Q5.3.10: How can I get those oh-so-neat X-Face lines?
5970
5971 Firstly there is an ftp site which describes X-faces and has the
5972 associated tools mentioned below, at
5973 @uref{ftp://ftp.cs.indiana.edu:/pub/faces/}.
5974
5975 Then the steps are
5976
5977 @enumerate
5978 @item
5979 Create 48x48x1 bitmap with your favorite tool
5980
5981 @item
5982 Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc.,
5983 and then compile the face.
5984
5985 @item
5986 @example
5987 cat file.xbm | xbm2ikon |compface > file.face
5988 @end example
5989
5990 @item
5991 Then be sure to quote things that are necessary for emacs strings:
5992
5993 @example
5994 cat ./file.face | sed 's/\\/\\\\/g'
5995 @iftex
5996 \ @*
5997 @end iftex
5998 | sed 's/\"/\\\"/g' > ./file.face.quoted
5999 @end example
6000
6001 @item
6002 Then set up emacs to include the file as a mail header - there were a
6003 couple of suggestions here---either something like:
6004
6005 @lisp
6006 (setq  mail-default-headers
6007        "X-Face:  @email{Ugly looking text string here}")
6008 @end lisp
6009
6010 Or, alternatively, as:
6011
6012 @lisp
6013 (defun mail-insert-x-face ()
6014   (save-excursion
6015     (goto-char (point-min))
6016     (search-forward mail-header-separator)
6017     (beginning-of-line)
6018     (insert "X-Face:")
6019     (insert-file-contents "~/.face")))
6020
6021 (add-hook 'mail-setup-hook 'mail-insert-x-face)
6022 @end lisp
6023 @end enumerate
6024
6025 However, 2 things might be wrong:
6026
6027 Some versions of pbmtoicon produces some header lines that is not
6028 expected by the version of compface that I grabbed. So I found I had to
6029 include a @code{tail +3} in the pipeline like this:
6030
6031 @example
6032 cat file.xbm | xbm2ikon | tail +3 |compface > file.face
6033 @end example
6034
6035 Some people have also found that if one uses the @code{(insert-file)}
6036 method, one should NOT quote the face string using the sed script .
6037
6038 It might also be helpful to use @email{stig@@hackvan.com, Stig's} script
6039 (included in the compface distribution at XEmacs.org) to do the
6040 conversion.
6041 @comment For convenience xbm2xface is available for anonymous FTP at
6042 @comment @uref{ftp://ftp.miranova.com/pub/xemacs/xbm2xface.pl}.
6043
6044 Contributors for this item:
6045
6046 Paul Emsley,
6047 Ricardo Marek,
6048 Amir J. Katz,
6049 Glen McCort,
6050 Heinz Uphoff,
6051 Peter Arius,
6052 Paul Harrison, and
6053 Vegard Vesterheim
6054
6055
6056 @node Q5.3.11
6057 @unnumberedsec Q5.3.11: How do I add new Info directories?
6058
6059 You use something like:
6060
6061 @lisp
6062 (setq Info-directory-list (cons
6063                            (expand-file-name "~/info")
6064                            Info-default-directory-list))
6065 @end lisp
6066
6067 @email{davidm@@prism.kla.com, David Masterson} writes:
6068
6069 @quotation
6070 Emacs Info and (S)XEmacs Info do many things differently.  If you're
6071 trying to support a number of versions of Emacs, here are some notes
6072 to remember:
6073
6074 @enumerate
6075 @item
6076 Emacs Info scans @code{Info-directory-list} from right-to-left while
6077 SXEmacs Info reads it from left-to-right, so append to the @emph{correct}
6078 end of the list.
6079
6080 @item
6081 Use @code{Info-default-directory-list} to initialize
6082 @code{Info-directory-list} @emph{if} it is available at startup, but not
6083 all Emacsen define it.
6084
6085 @item
6086 Emacs Info looks for a standard @file{dir} file in each of the
6087 directories scanned from #1 and magically concatenates them together.
6088
6089 @item
6090 SXEmacs Info looks for a @file{localdir} file (which consists of just the
6091 menu entries from a @file{dir} file) in each of the directories scanned
6092 from #1 (except the first), does a simple concatenation of them, and
6093 magically attaches the resulting list to the end of the menu in the
6094 @file{dir} file in the first directory.
6095 @end enumerate
6096
6097 Another alternative is to convert the documentation to HTML with
6098 texi2html and read it from a web browser like Lynx or W3.
6099 @end quotation
6100
6101
6102 @node Q5.3.12
6103 @unnumberedsec Q5.3.12: What do I need to change to make printing work?
6104
6105 For regular printing there are two variables that can be customized.
6106
6107 @table @code
6108 @item lpr-command
6109 This should be set to a command that takes standard input and sends
6110 it to a printer.  Something like:
6111
6112 @lisp
6113 (setq lpr-command "lp")
6114 @end lisp
6115
6116 @item lpr-switches
6117 This should be set to a list that contains whatever the print command
6118 requires to do its job.  Something like:
6119
6120 @lisp
6121 (setq lpr-switches '("-depson"))
6122 @end lisp
6123 @end table
6124
6125 For postscript printing there are three analogous variables to
6126 customize.
6127
6128 @table @code
6129 @item ps-lpr-command
6130 This should be set to a command that takes postscript on standard input
6131 and directs it to a postscript printer.
6132
6133 @item ps-lpr-switches
6134 This should be set to a list of switches required for
6135 @code{ps-lpr-command} to do its job.
6136
6137 @item ps-print-color-p
6138 This boolean variable should be set @code{t} if printing will be done in
6139 color, otherwise it should be set to @code{nil}.
6140 @end table
6141
6142 NOTE: It is an undocumented limitation in SXEmacs that postscript
6143 printing (the @code{Pretty Print Buffer} menu item) @strong{requires} a
6144 window system environment.  It cannot be used outside of X11.
6145
6146
6147 @node MS Windows, Current Events, Miscellaneous, Top
6148 @unnumbered 6 XEmacs on MS Windows
6149
6150 This is part 6 of the SXEmacs Frequently Asked Questions list, written
6151 by Sebastian Freundt and others.
6152
6153 @menu
6154 * Q6.0.1::      Why did SXEmacs cut all support for Windows?
6155 @end menu
6156
6157 @node Q6.0.1
6158 @unnumberedsec Q6.0.1: Why did SXEmacs cut all support for Windows?
6159
6160 Short answer:
6161 MS Windows is not Posix conform.
6162
6163 Flame answer:
6164 MS Windows steenks.
6165
6166 Long answer:
6167 Maintaining code for a platform that @strong{none} of the developers
6168 use is a little hairy.  Besides, even if that were case, writing
6169 POSIX-conform code while simultaneously regarding the madnesses (yes,
6170 there are many of them) from Redmond, and preferrably sustaining the
6171 perfomance is absolutely impossible.  There is much code which has not
6172 been optimised (or sometimes even de-optimised) merely to take some
6173 windows concept into account.
6174
6175
6176 @node Current Events, , MS Windows, Top
6177 @unnumbered 7 What the Future Holds
6178
6179 This is part 7 of the SXEmacs Frequently Asked Questions list.  This
6180 section will change frequently, and (in theory) should contain any
6181 interesting items that have transpired recently. (But in practice it's
6182 not getting updated like this.)
6183
6184 This section also contains descriptions of the new features in all the
6185 recent releases of SXEmacs.  For the most part, the information below is
6186 a synopsis of the more complete information that can be found in the
6187 file @file{NEWS} in the @file{etc} directory of the SXEmacs distribution.
6188 You can view this file in SXEmacs using @kbd{C-h n} or the @samp{Help}
6189 menu.
6190
6191 Information on older versions of SXEmacs can be found in @file{ONEWS}
6192 in the same directory, or @file{OONEWS} for really old versions.
6193
6194 @menu
6195 * Q7.0.1::      What new features will be in SXEmacs soon?
6196 * Q7.0.2::      What's new in SXEmacs 22.1.0?
6197 * Q7.0.3::      What's new in SXEmacs 22.1.1?
6198 * Q7.0.4::      What's new in SXEmacs 22.1.2?
6199 * Q7.0.5::      What's new in SXEmacs 22.1.3?
6200 * Q7.0.6::      What's new in SXEmacs 22.1.4?
6201 @end menu
6202
6203 @node Q7.0.1
6204 @unnumberedsec Q7.0.1: What new features will be in SXEmacs soon?
6205
6206 @strong{YOU} tell @strong{ME}!
6207
6208
6209 @node Q7.0.2
6210 @unnumberedsec Q7.0.2: What's new in SXEmacs 22.1.0?
6211
6212 This is the first release of SXEmacs.  It is a fork of XEmacs
6213 21.4.16.  The vast majority of the changes between SXEmacs 22.1.0 and
6214 the code it descended from, XEmacs 21.4.16, are purely renaming
6215 "XEmacs" to "SXEmacs".
6216
6217 @node Q7.0.3
6218 @unnumberedsec Q7.0.3: What's new in SXEmacs 22.1.1?
6219
6220 @itemize @bullet
6221 @item
6222 @var{user-init-directory} set to @file{~/.sxemacs} -- Youngs.
6223
6224 Symlinking this to your old @file{~/.xemacs} directory is enough to
6225 get up and running with SXEmacs.
6226
6227 @item
6228 Packages hierarchy default set to @file{$prefix/lib/sxemacs} -- Youngs.
6229
6230 Symlinking this to your old @file{$prefix/lib/xemacs} directory is
6231 enough to get up and running with SXEmacs.  SXEmacs will do this for
6232 you when you do @code{make install}.
6233
6234 @item
6235 Rename items in the menubar -- Slusar, Youngs.
6236
6237 @item
6238 Beginnings of FFI -- Zajcev.
6239
6240 FFI is @dfn{Foreign Function Interface} and will allow access to functions
6241 and libraries outside of SXEmacs from within lisp.  Not completed yet,
6242 but the basic infrastructure is in place.
6243
6244 @item
6245 FreeBSD build fixes -- Slusar.
6246
6247 @item
6248 @code{M-x report-sxemacs-bug} -- Youngs.
6249
6250 For now, this is just a wrapper around report-xemacs-bug with the
6251 appropriate variables set to SXEmacs values.
6252
6253 @item
6254 Fix etags.c -- Slusar.
6255
6256 Avoid a segv.
6257
6258 @item
6259 @code{M-x build-report} -- Youngs.
6260
6261 Make it work for SXEmacs.
6262
6263 @item
6264 Fix major bug in regex.c
6265
6266 This fixed a whole swag of crashes involving regexps and
6267 syntax-tables.
6268
6269 @item
6270 Sync up with XEmacs 21.4 -- Various Developers.
6271 @end itemize
6272
6273
6274 @node Q7.0.4
6275 @unnumberedsec Q7.0.4: What's new in SXEmacs 22.1.2?
6276
6277 @itemize @bullet
6278 @item
6279 autoconf 2.59 compatible configure scripts -- Youngs, Purvis.
6280
6281 Many configure options have changed.  Please run @code{./configure --help}
6282 to see what the new options are.
6283
6284 @item
6285 Most win32 code is now gone -- Youngs, Freundt.
6286
6287 @item
6288 @code{describe-installation} report libc version on Slackware -- Youngs.
6289
6290 @item
6291 etags.c updated to Francesco's version 17.11 -- Youngs.
6292
6293 @item
6294 Support @code{ls --dired} properly -- Sperber.
6295
6296 @item
6297 FFI (Foreign Function Interface) updates -- Zajcev.
6298
6299 One of the most exciting things is that this version of SXEmacs can
6300 download files from the internet _without_ the need of any XEmacs
6301 packages being installed.  If you have libcurl and enable FFI in
6302 SXEmacs at build time, you can:
6303
6304 @example
6305 (require 'ffi-curl)
6306 (curl:download "http://www.somedomain.com/path/file"
6307                "/tmp/file")
6308 @end example
6309
6310 To put your mind at ease, libcurl is @strong{NOT} needed to build SXEmacs.
6311 The above will work even if you install libcurl after
6312 building/installing SXEmacs.
6313
6314 @item
6315 Don't echo GC messages for non-string GC'ing -- Zajcev.
6316
6317 This drastically reduces the number of "Garbage Collecting" messages
6318 that you see in the echo area.  Garbage collection is still happening,
6319 it is just not in your face as much.
6320
6321 @item
6322 movemail.c security fixes -- Oskarsson.
6323
6324 @item
6325 PUI's *packages* buffer enhancements -- Koch.
6326
6327 @item
6328 Saner fallbacks for `backup-buffer' -- Youngs.
6329
6330 Based on an idea from JWZ, if the backup can't be written, try in
6331 `auto-save-directory', and if that fails, fall back to $HOME.
6332
6333 @item
6334 OpenSSL support -- Freundt.
6335
6336 Of course. The OpenSSL library itself is actually separated into two
6337 libraries: libcrypto and libssl.  libcrypto is the part which comes to
6338 elisp with the current API.  libssl is planned for the near future.
6339
6340 With this interface/gateway we now have access to the wonderful world
6341 of static cryptography (static here means no handshake/protocols/etc.).
6342
6343 The API contains:
6344
6345 @itemize @bullet
6346 @item
6347 the OpenSSL PRNG = (pseudo) random number generator to provide
6348 generating cryptographically secure randomness
6349
6350 @item
6351 the OpenSSL MDs (message digests) to provide all sorts of hashing
6352 (we had an md5 implementation already)
6353
6354 @item
6355 the HMAC aka keyed hashing aka message authentication code to provide
6356 hashes secured by a password
6357
6358 @item
6359 the CIPHER engine (i.e. symmetric crypto systems) to provide
6360 encryption/decryption routines secured by a password
6361
6362 @item
6363 the PKEY engine (i.e. asymmetric crypto systems) to provide generation
6364 and distribution of private/public key pairs (as probably known by
6365 gpg)
6366
6367 @item
6368 the HYBRIDe engine aka PKCS aka public key crypto systems to provide
6369 encryption based on (foreign) public keys and decryption with own
6370 private keys to provide also digital signatures and verification (as
6371 probably known by gpg)
6372 @end itemize
6373
6374 @item
6375 Remove most of the generated files from the repo -- Youngs, Freundt.
6376
6377 @item
6378 Allow suppression of WM decorations -- Turnbull.
6379
6380 This makes balloon-help windows infinitely better behaved.  Thank you
6381 very much, Steve T.
6382
6383 @item
6384 Fontify *scratch* buffer according to user's settings -- Kehoe.
6385
6386 @item
6387 Fix bug hanging SXEmacs when yanking > 260kb -- Kehoe.
6388
6389 @item
6390 lispref manual updated for SXEmacs -- Freundt.
6391
6392 @item
6393 PostgreSQL updates (mainly doc updates) -- Frenudt.
6394 @end itemize
6395
6396
6397 @node Q7.0.5
6398 @unnumberedsec Q7.0.5: What's new in SXEmacs 22.1.3?
6399
6400 @itemize @bullet
6401 @item
6402 OpenSSL updates, improvements, and fixes -- Freundt.
6403
6404 @item
6405 FFI updates, and fixes -- Zajcev.
6406
6407 FFI now defaults to "on" if libffi can be found at configure time.  It
6408 you don't want this, use: `--disable-ffi'.
6409
6410 FTP downloads with `curl:download' is working properly now.  And with
6411 HTTP transfers you can transfer just the HTTP header for a file if you
6412 wish.
6413
6414 @item
6415 Extent/glyph fixes -- Sidwell, Kuehl.
6416
6417 @item
6418 32 mouse buttons supported -- Youngs.
6419
6420 (global-set-key [(button32)] 'some-function) is valid in SXEmacs.
6421
6422 @item
6423 Modeline tweaks -- Ferreira.
6424
6425 Move line/column number indicators to left side (aka XE 21.5)
6426
6427 @item
6428 @code{M-x uptime} -- Youngs.
6429
6430 Every good OS has an uptime util, SXEmacs is no exception.  Reports
6431 uptime in various formats.
6432
6433 @item
6434 ia64 build fixes -- Lesjak.
6435
6436 @item
6437 @kbd{C-h n} will no longer find NEWS files from packages -- Youngs.
6438
6439 @item
6440 List of package mirrors updated -- Aichner, Skyttä.
6441
6442 @item
6443 Bootstrappable PUI -- Youngs.
6444
6445 SXEmacs no longer needs to have _any_ packages pre-installed before
6446 PUI can be used.  See (Info-goto-node "(sxemacs)Bootstrapping PUI").
6447
6448 @item
6449 Bignums, and a whole swag of sexy new number goodness -- Freundt.
6450
6451 Bignums, bigfloats, and ratios that you may know from XEmacs 21.5 are
6452 now in SXEmacs.  That and a whole lot more...
6453
6454 Features provided when all of the library demands are met:
6455
6456 @example
6457   (featurep 'bigz) and
6458   (featurep 'bignum)       <=> if MPZ from GMP or BSD MP is present
6459
6460   (featurep 'bigq) and
6461   (featurep 'ratio)        <=> if MPQ from GMP is present
6462
6463   (featurep 'bigf) and
6464   (featurep 'bigfloat)     <=> if MPF from GMP is present
6465
6466   (featurep 'bigfr)        <=> if MPFR is present
6467
6468   (featurep 'bigc)         <=> if MPC is present
6469
6470   (featurep 'number-types) <=> if one of the above features is
6471   provided
6472 @end example
6473
6474 For complete details see: (Info-goto-node "(lispref)Enhanced Number Types")
6475
6476 @item
6477 Raw strings -- Kuehl.
6478
6479 SXEmacs tries to relieve backslashitis by implementing raw strings.
6480 You'll imediately notice the benefit of raw strings when use them for
6481 those hairy regexps.  Consider the regular expression (from
6482 font-latex.el)...
6483
6484 @example
6485   "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(\\\\[@@A-Za-z]+\\)"
6486
6487 As a raw string it could be written as...
6488
6489   #r"\(?:^\|[^\]\)\(?:\)*\(\\[@@A-Za-z]+\)"
6490 @end example
6491
6492 Most of the SXEmacs core lisp code has been converted over to using
6493 raw strings whereever appropriate.
6494
6495 @item
6496 Improved font-locking in a TTY -- Ferreira.
6497
6498 To illustrate this...
6499
6500 @example
6501   $ sxemacs -nw -vanilla
6502
6503 ...and look at the modeline.  Now open a .c file and turn on
6504 font-lock...
6505
6506   C-x C-f /path/to/file.c RET
6507   M-x font-lock-mode RET
6508 @end example
6509
6510 @item
6511 Compiler fixes -- Zajcev.
6512
6513 @item
6514 SXEmacs can no longer be built with a C++ compiler -- Youngs.
6515
6516 To build SXEmacs you will need a C compiler at least the equivalent of
6517 GCC 2.95.3.  Building with a C++ compiler is no longer supported.
6518
6519 @item
6520 Autoconf fixes, updates -- Freundt, Kuehl, Youngs.
6521
6522 All autoconf options now have a help string (for ./configure --help)
6523 and the default setting for each option is noted.
6524
6525 @item
6526 PostgreSQL auto-detection improved -- Youngs.
6527
6528 If pg_config is in your $PATH, SXEmacs will add PostgreSQL support at
6529 configure/build time.
6530
6531 @item
6532 Documentation (Texinfo) updates -- Freundt, Youngs.
6533
6534 The SXEmacs manual is now called "sxemacs" instead of "xemacs".  C-h
6535 C-i sxemacs RET to read it.
6536
6537 Most of the Texinfo docs now have been updated to say "SXEmacs"
6538 whereever appropriate instead of "XEmacs".
6539
6540 @item
6541 GTK (version 1.2) build fixes -- Youngs.
6542 @end itemize
6543
6544
6545 @node Q7.0.6
6546 @unnumberedsec Q7.0.6: What's new in SXEmacs 22.1.4?
6547
6548 @itemize @bullet
6549 @item
6550 Many more image formats via FFI/libWand -- Freundt.
6551
6552 FFI-enabled SXEmacs can load up libWand and thus display any image
6553 format that libWand (ImageMagick) supports.
6554
6555 @item
6556 Lots of updates to the ENT (Enhanced Number Types) code -- Freundt.
6557
6558 @item
6559 Mule is on by default -- Youngs.
6560
6561 @item
6562 Embeddable keyboard macros -- Kuehl.
6563
6564 This means that the following sort of thing is possible:
6565
6566 @example
6567 C-x ( bar C-x )
6568 C-x ( foo C-x e C-x )
6569
6570 C-x e
6571 => foo bar
6572 @end example
6573
6574 @item
6575 Default widgets/dialogs to Athena instead of Motif -- Youngs.
6576
6577 @item
6578 OpenSSL updates -- Freundt.
6579
6580 Digest, encryption, and decryption routines that operate on files has
6581 been added.  Previously this was only available for buffers.
6582
6583 @item
6584 Build reports have been revamped -- Youngs, Freundt.
6585
6586 The SXEmacs build report no longer conflicts with the XEmacs
6587 build-report.el.  Plus ours also reports on shared lib dependencies
6588 and config.h stuff.  Sending from Gnus is also supported.
6589
6590 @item
6591 FFI updates/fixes -- Youngs, Zajcev, Freundt.
6592
6593 @item
6594 Ability to build postscript, pdf, and html docs -- Ferreira.
6595
6596 @item
6597 Double linked lists and bloom filters implemented -- Freundt.
6598
6599 Bloom filters are a space and time-efficient way to decide about the
6600 membership of an element to a given set. Using lisp-lists or vectors,
6601 one usually has to traverse the entire list or vector, before
6602 membership can be decided.  Using hash tables, membership decision is
6603 in O(1) (bloom filters also decide in O(1)), but the hash-table's size
6604 grows proportionally with the number n of elements, thus its space
6605 complexity is O(n), whereas Bloom filters take a constant amount of
6606 space regardless how many elements are in it.
6607
6608 @item
6609 Lightning fast recursive version of directory-files -- Freundt.
6610
6611 It's called `directory-files-recur' and in some situations it is even
6612 faster than GNU's find(1).
6613
6614 @item
6615 Portuguese added to etc/HELLO -- Ferreira.
6616
6617 @item
6618 Massive improvements, enhancements for multimedia (audio) -- Freundt.
6619
6620 SXEmacs supports several "sound servers" like: OSS, NAS, ESD, Polypaudio,
6621 ALSA, aRts, and Jack.  And media streams can be handled by sndfile, ffmpeg,
6622 sox, mad, xine, gstreamer.  The SXEmacs developers recommend Polyp/ffmpeg
6623 whenever possible.
6624
6625 And yes, SXEmacs @emph{can} play mp3 files. :-)
6626
6627 @item
6628 Autoconf fixes/updates -- Youngs, Freundt.
6629
6630 All of the enable/disable options have been converted to with/without
6631 options.  This allows us to sort them into groups.
6632
6633 Also fixes were made to allow building on FreeBSD and NetBSD.
6634
6635 @item
6636 Big update for the FAQ -- Youngs, Freundt.
6637
6638 @item
6639 Server Sockets! -- Ferreira.
6640
6641 SXEmacs now has server sockets (Yay!).  See
6642 `open-network-server-stream'.
6643
6644 @item
6645 Compiler fixes (gcc 2.95) -- Freundt.
6646
6647 @item
6648 bug-reporter update -- Youngs.
6649
6650 `report-sxemacs-bug' now directs people to our BugZilla installation
6651 at @url{http://issues.sxemacs.org/}
6652
6653 @item
6654 Documentation updates/fixes/improvements -- Youngs, Ferreira, Freundt.
6655 @end itemize
6656
6657 @bye