1 This is ../info/xemacs-faq.info, produced by makeinfo version 4.0 from
4 INFO-DIR-SECTION XEmacs Editor
6 * FAQ: (xemacs-faq). XEmacs FAQ.
10 File: xemacs-faq.info, Node: Q2.0.3, Next: Q2.0.4, Prev: Q2.0.2, Up: Installation
12 Q2.0.3: Compiling XEmacs with Netaudio.
13 ---------------------------------------
15 What is the best way to compile XEmacs with the netaudio system,
16 since I have got the netaudio system compiled but installed at a weird
17 place, I am not root. Also in the READMEs it does not say anything
18 about compiling with the audioserver?
20 You should only need to add some stuff to the configure command line.
21 To tell it to compile in netaudio support: `--with-sound=both', or
22 `--with-sound=nas' if you don't want native sound support for some
23 reason.) To tell it where to find the netaudio includes and libraries:
25 --site-libraries=WHATEVER
26 --site-includes=WHATEVER
28 Then (fingers crossed) it should compile and it will use netaudio if
29 you have a server running corresponding to the X server. The netaudio
30 server has to be there when XEmacs starts. If the netaudio server goes
31 away and another is run, XEmacs should cope (fingers crossed, error
32 handling in netaudio isn't perfect).
34 BTW, netaudio has been renamed as it has a name clash with something
35 else, so if you see references to NAS or Network Audio System, it's the
36 same thing. It also might be found at
37 `ftp://ftp.x.org/contrib/audio/nas/'.
40 File: xemacs-faq.info, Node: Q2.0.4, Next: Q2.0.5, Prev: Q2.0.3, Up: Installation
42 Q2.0.4: Problems with Linux and ncurses.
43 ----------------------------------------
45 On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with
46 libc 5.2.18, XEmacs 20.0b20 is unable to open a tty device:
50 Terminal type `xterm' undefined (or can't access database?)
52 Ben Wing <ben@xemacs.org> writes:
54 Your ncurses configuration is messed up. Your /usr/lib/terminfo
55 is a bad pointer, perhaps to a CD-ROM that is not inserted.
58 File: xemacs-faq.info, Node: Q2.0.5, Next: Q2.0.6, Prev: Q2.0.4, Up: Installation
60 Q2.0.5: Do I need X11 to run XEmacs?
61 ------------------------------------
63 No. The name "XEmacs" is unfortunate in the sense that it is *not*
64 an X Window System-only version of Emacs. XEmacs has full color
65 support on a color-capable character terminal.
68 File: xemacs-faq.info, Node: Q2.0.6, Next: Q2.0.7, Prev: Q2.0.5, Up: Installation
70 Q2.0.6: I'm having strange crashes. What do I do?
71 --------------------------------------------------
73 There have been a variety of reports of crashes due to compilers with
74 buggy optimizers. Please see the `PROBLEMS' file that comes with
75 XEmacs to read what it says about your platform.
78 File: xemacs-faq.info, Node: Q2.0.7, Next: Q2.0.8, Prev: Q2.0.6, Up: Installation
80 Q2.0.7: Libraries in non-standard locations
81 -------------------------------------------
83 I have x-faces, jpeg, xpm etc. all in different places. I've tried
84 space-separated, comma-separated, several -site-libraries, all to no
87 --site-libraries='/path/one /path/two /path/etc'
90 File: xemacs-faq.info, Node: Q2.0.8, Next: Q2.0.9, Prev: Q2.0.7, Up: Installation
92 Q2.0.8: can't resolve symbol _h_errno
93 -------------------------------------
95 You are using the Linux/ELF distribution of XEmacs 19.14, and your
96 ELF libraries are out of date. You have the following options:
98 1. Upgrade your libc to at least 5.2.16 (better is 5.2.18, 5.3.12, or
101 2. Patch the XEmacs binary by replacing all occurrences of
102 `_h_errno^@' with `h_errno^@^@'. Any version of Emacs will
103 suffice. If you don't understand how to do this, don't do it.
105 3. Rebuild XEmacs yourself--any working ELF version of libc should be
108 Hrvoje Niksic <hniksic@xemacs.org> writes:
110 Why not use a Perl one-liner for No. 2?
112 perl -pi -e 's/_h_errno\0/h_errno\0\0/g' \
113 /usr/local/bin/xemacs-19.14
115 NB: You _must_ patch `/usr/local/bin/xemacs-19.14', and not
116 `xemacs' because `xemacs' is a link to `xemacs-19.14'; the Perl
117 `-i' option will cause unwanted side-effects if applied to a
120 SL Baur <steve@xemacs.org> writes:
122 If you build against a recent libc-5.4 (late enough to have caused
123 problems earlier in the beta cycle) and then run with an earlier
124 version of libc, you get a
127 xemacs: can't resolve symbol '__malloc_hook'
128 zsh: 7942 segmentation fault (core dumped) xemacs
130 (Example binary compiled against libc-5.4.23 and run with
133 The solution is to upgrade to at least libc-5.4.23. Sigh. Drat.
136 File: xemacs-faq.info, Node: Q2.0.9, Next: Q2.0.10, Prev: Q2.0.8, Up: Installation
138 Q2.0.9: Where do I find external libraries?
139 -------------------------------------------
141 All external libraries used by XEmacs can be found at the XEmacs FTP
142 site `ftp://ftp.xemacs.org/pub/xemacs/aux/'.
144 The canonical locations (at the time of this writing) are as follows:
147 `ftp://ftp.uu.net/graphics/jpeg/'. Version 6a is current.
150 `ftp://ftp.x.org/contrib/libraries/'. Version 3.4j is current.
151 Older versions of this package are known to cause XEmacs crashes.
154 `ftp://ftp.sgi.com/graphics/tiff/'. v3.4 is current. The latest
155 beta is v3.4b035. There is a HOWTO here.
158 `ftp://ftp.uu.net/graphics/png/'. 0.89c is current. XEmacs
159 requires a fairly recent version to avoid using temporary files.
161 `ftp://swrinde.nde.swri.edu/pub/png/src/'
164 `ftp://ftp.cs.indiana.edu/pub/faces/compface/'. This library has
165 been frozen for about 6 years, and is distributed without version
166 numbers. _It should be compiled with the same options that X11 was
167 compiled with on your system_. The version of this library at
168 XEmacs.org includes the `xbm2xface.pl' script, written by
169 <stig@hackvan.com>, which may be useful when generating your own
173 `ftp://ftp.x.org/contrib/audio/nas/'. Version 1.2p5 is current.
177 File: xemacs-faq.info, Node: Q2.0.10, Next: Q2.0.11, Prev: Q2.0.9, Up: Installation
179 Q2.0.10: After I run configure I find a core dump, is something wrong?
180 ----------------------------------------------------------------------
182 Not necessarily. If you have GNU sed 3.0 you should downgrade it to
183 2.05. From the `README' at prep.ai.mit.edu:
185 sed 3.0 has been withdrawn from distribution. It has major
186 revisions, which mostly seem to be improvements; but it turns out
187 to have bugs too which cause trouble in some common cases.
189 Tom Lord won't be able to work fixing the bugs until May. So in
190 the mean time, we've decided to withdraw sed 3.0 from distribution
191 and make version 2.05 once again the recommended version.
193 It has also been observed that the vfork test on Solaris will leave a
197 File: xemacs-faq.info, Node: Q2.0.11, Next: Q2.0.12, Prev: Q2.0.10, Up: Installation
199 Q2.0.11: XEmacs doesn't resolve hostnames.
200 ------------------------------------------
202 This is the result of a long-standing problem with SunOS and the fact
203 that stock SunOS systems do not ship with DNS resolver code in libc.
205 Christopher Davis <ckd@loiosh.kei.com> writes:
207 That's correct [The SunOS 4.1.3 precompiled binaries don't do name
208 lookup]. Since Sun figured that everyone used NIS to do name
209 lookups (that DNS thing was apparently only a passing fad,
210 right?), the stock SunOS 4.x systems don't have DNS-based name
213 This is also why Netscape ships two binaries for SunOS 4.1.x.
215 The best solution is to compile it yourself; the configure script
216 will check to see if you've put DNS in the shared libc and will
217 then proceed to link against the DNS resolver library code.
220 File: xemacs-faq.info, Node: Q2.0.12, Next: Q2.0.13, Prev: Q2.0.11, Up: Installation
222 Q2.0.12: Why can't I strip XEmacs?
223 ----------------------------------
225 Richard Cognot <cognot@fronsac.ensg.u-nancy.fr> writes:
227 Because of the way XEmacs (and every other Emacsen, AFAIK) is
228 built. The link gives you a bare-boned emacs (called temacs).
229 temacs is then run, preloading some of the lisp files. The result
230 is then dumped into a new executable, named xemacs, which will
231 contain all of the preloaded lisp functions and data.
233 Now, during the dump itself, the executable (code+data+symbols) is
234 written on disk using a special unexec() function. This function is
235 obviously heavily system dependent. And on some systems, it leads
236 to an executable which, although valid, cannot be stripped without
237 damage. If memory serves, this is especially the case for AIX
238 binaries. On other architectures it might work OK.
240 The Right Way to strip the emacs binary is to strip temacs prior to
241 dumping xemacs. This will always work, although you can do that
242 only if you install from sources (as temacs is `not' part of the
245 Nat Makarevitch <nat@nataa.fr.eu.org> writes:
249 1. [ ./configure; make ]
257 5. cp src/xemacs /usr/local/bin/xemacs
259 6. cp lib-src/DOC-19.16-XEmacs
260 /usr/local/lib/xemacs-19.16/i586-unknown-linuxaout
263 File: xemacs-faq.info, Node: Q2.0.13, Next: Q2.0.14, Prev: Q2.0.12, Up: Installation
265 Q2.0.13: I don't need no steenkin' packages. Do I? (NEW)
266 ---------------------------------------------------------
268 Strictly speaking, no. XEmacs will build and install just fine
269 without any packages installed. However, only the most basic editing
270 functions will be available with no packages installed, so installing
271 packages is an essential part of making your installed XEmacs _useful_.
274 File: xemacs-faq.info, Node: Q2.0.14, Next: Q2.1.1, Prev: Q2.0.13, Up: Installation
276 Q2.0.12: How do I figure out which packages to install? (NEW)
277 -------------------------------------------------------------
279 Many people really liked the old way that packages were bundled and
280 do not want to mess with packages at all. You can grab all the
281 packages at once like you used to with old XEmacs versions. Download
286 For an XEmacs compiled with Mule you also need
288 `xemacs-mule-sumo.tar.gz'
290 from the `packages' directory on your XEmacs mirror archive. N.B.
291 They are called 'Sumo Tarballs' for good reason. They are currently
292 about 15MB and 2.3MB (gzipped) respectively.
296 `cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -'
298 See README.packages for more detailed installation instructions.
300 As the Sumo tarballs are not regenerated as often as the individual
301 packages, it is recommended that you use the automatic package tools
302 afterwards to pick up any recent updates.
305 File: xemacs-faq.info, Node: Q2.1.1, Next: Q2.1.2, Prev: Q2.0.14, Up: Installation
307 2.1: Trouble Shooting
308 =====================
310 Q2.1.1: Help! XEmacs just crashed on me!
311 -----------------------------------------
313 First of all, don't panic. Whenever XEmacs crashes, it tries
314 extremely hard to auto-save all of your files before dying. (The main
315 time that this will not happen is if the machine physically lost power
316 or if you killed the XEmacs process using `kill -9'). The next time
317 you try to edit those files, you will be informed that a more recent
318 auto-save file exists. You can use `M-x recover-file' to retrieve the
319 auto-saved version of the file.
321 You can use the command `M-x recover-session' after a crash to pick
322 up where you left off.
324 Now, XEmacs is not perfect, and there may occasionally be times, or
325 particular sequences of actions, that cause it to crash. If you can
326 come up with a reproducible way of doing this (or even if you have a
327 pretty good memory of exactly what you were doing at the time), the
328 maintainers would be very interested in knowing about it. Post a
329 message to comp.emacs.xemacs or send mail to <crashes@xemacs.org>.
330 Please note that the `crashes' address is exclusively for crash reports.
332 If at all possible, include a stack backtrace of the core dump that
333 was produced. This shows where exactly things went wrong, and makes it
334 much easier to diagnose problems. To do this, you need to locate the
335 core file (it's called `core', and is usually sitting in the directory
336 that you started XEmacs from, or your home directory if that other
337 directory was not writable). Then, go to that directory and execute a
340 gdb `which xemacs` core
342 and then issue the command `where' to get the stack backtrace. You
343 might have to use `dbx' or some similar debugger in place of `gdb'. If
344 you don't have any such debugger available, complain to your system
347 It's possible that a core file didn't get produced, in which case
348 you're out of luck. Go complain to your system administrator and tell
349 him not to disable core files by default. Also *Note Q2.1.15::, for
350 tips and techniques for dealing with a debugger.
352 When making a problem report make sure that:
354 1. Report *all* of the information output by XEmacs during the crash.
356 2. You mention what O/S & Hardware you are running XEmacs on.
358 3. What version of XEmacs you are running.
360 4. What build options you are using.
362 5. If the problem is related to graphics, we will also need to know
363 what version of the X Window System you are running, and what
364 window manager you are using.
366 6. If the problem happened on a tty, please include the terminal type.
369 File: xemacs-faq.info, Node: Q2.1.2, Next: Q2.1.3, Prev: Q2.1.1, Up: Installation
371 Q2.1.2: Cryptic Minibuffer messages.
372 ------------------------------------
374 When I try to use some particular option of some particular package,
375 I get a cryptic error in the minibuffer.
377 If you can't figure out what's going on, select Options/General
378 Options/Debug on Error from the Menubar and then try and make the error
379 happen again. This will give you a backtrace that may be enlightening.
380 If not, try reading through this FAQ; if that fails, you could try
381 posting to comp.emacs.xemacs (making sure to include the backtrace) and
382 someone may be able to help. If you can identify which Emacs lisp
383 source file the error is coming from you can get a more detailed stack
384 backtrace by doing the following:
386 1. Visit the .el file in an XEmacs buffer.
388 2. Issue the command `M-x eval-current-buffer'.
390 3. Reproduce the error.
392 Depending on the version of XEmacs, you may either select View->Show
393 Message Log (recent versions), Edit->Show Messages (some earlier
394 versions) or Help->Recent Keystrokes/Messages (other earlier versions)
395 from the menubar to see the most recent messages. This command is bound
396 to `C-h l' by default.
399 File: xemacs-faq.info, Node: Q2.1.3, Next: Q2.1.4, Prev: Q2.1.2, Up: Installation
401 Q2.1.3: Translation Table Syntax messages at Startup
402 ----------------------------------------------------
404 I get tons of translation table syntax error messages during startup.
405 How do I get rid of them?
407 There are two causes of this problem. The first usually only strikes
408 people using the prebuilt binaries. The culprit in both cases is the
411 * The binary cannot find the `XKeysymDB' file. The location is
412 hardcoded at compile time so if the system the binary was built on
413 puts it a different place than your system does, you have
414 problems. To fix, set the environment variable XKEYSYMDB to the
415 location of the `XKeysymDB' file on your system or to the location
416 of the one included with XEmacs which should be at
417 `<xemacs_root_directory>/lib/xemacs-19.16/etc/XKeysymDB'.
419 * The binary is finding the XKeysymDB but it is out-of-date on your
420 system and does not contain the necessary lines. Either ask your
421 system administrator to replace it with the one which comes with
422 XEmacs (which is the stock R6 version and is backwards compatible)
423 or set your XKEYSYMDB variable to the location of XEmacs's
427 File: xemacs-faq.info, Node: Q2.1.4, Next: Q2.1.5, Prev: Q2.1.3, Up: Installation
429 Q2.1.4: Startup warnings about deducing proper fonts?
430 -----------------------------------------------------
432 How can I avoid the startup warnings about deducing proper fonts?
434 This is highly dependent on your installation, but try with the
435 following font as your base font for XEmacs and see what it does:
437 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
439 More precisely, do the following in your resource file:
441 Emacs.default.attributeFont: \
442 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
444 If you just don't want to see the `*Warnings*' buffer at startup
445 time, you can set this:
447 (setq display-warning-minimum-level 'error)
449 The buffer still exists; it just isn't in your face.
452 File: xemacs-faq.info, Node: Q2.1.5, Next: Q2.1.6, Prev: Q2.1.4, Up: Installation
454 Q2.1.5: XEmacs cannot connect to my X Terminal!
455 -----------------------------------------------
457 Help! I can not get XEmacs to display on my Envizex X-terminal!
459 Try setting the DISPLAY variable using the numeric IP address of the
460 host you are running XEmacs from.
463 File: xemacs-faq.info, Node: Q2.1.6, Next: Q2.1.7, Prev: Q2.1.5, Up: Installation
465 Q2.1.6: XEmacs just locked up my Linux X server!
466 ------------------------------------------------
468 There have been several reports of the X server locking up under
469 Linux. In all reported cases removing speedo and scaled fonts from the
470 font path corrected the problem. This can be done with the command
473 It is possible that using a font server may also solve the problem.
476 File: xemacs-faq.info, Node: Q2.1.7, Next: Q2.1.8, Prev: Q2.1.6, Up: Installation
478 Q2.1.7: HP Alt key as Meta.
479 ---------------------------
481 How can I make XEmacs recognize the Alt key of my HP workstation as a
484 Put the following line into a file and load it with xmodmap(1) before
487 remove Mod1 = Mode_switch
490 File: xemacs-faq.info, Node: Q2.1.8, Next: Q2.1.9, Prev: Q2.1.7, Up: Installation
492 Q2.1.8: got (wrong-type-argument color-instance-p nil)
493 ------------------------------------------------------
495 Natalie Kershaw <nataliek@rd.scitec.com.au> writes:
497 I am trying to run xemacs 19.13 under X11R4. Whenever I move the
498 mouse I get the following error. Has anyone seen anything like
499 this? This doesn't occur on X11R5.
502 (error "got (wrong-type-argument color-instance-p nil)
503 and I don't know why!")
505 dinos <map01kd@gold.ac.uk> writes:
507 I think this is due to undefined resources; You need to define
508 color backgrounds and foregrounds into your
509 `.../app-defaults/Emacs' like:
511 *Foreground: Black ;everything will be of black on grey95,
512 *Background: Grey95 ;unless otherwise specified.
513 *cursorColor: Red3 ;red3 cursor with grey95 border.
514 *pointerColor: Red3 ;red3 pointer with grey95 border.
516 Natalie Kershaw adds:
518 What fixed the problem was adding some more colors to the X color
519 database (copying the X11R5 colors over), and also defining the
522 xemacs*cursorColor: black
523 xemacs*pointerColor: black
525 With the new colors installed the problem still occurs if the above
526 resources are not defined.
528 If the new colors are not present then an additional error occurs
529 on XEmacs startup, which says `Color Red3' not defined.
532 File: xemacs-faq.info, Node: Q2.1.9, Next: Q2.1.10, Prev: Q2.1.8, Up: Installation
534 Q2.1.9: XEmacs causes my OpenWindows 3.0 server to crash.
535 ---------------------------------------------------------
537 The OpenWindows 3.0 server is incredibly buggy. Your best bet is to
538 replace it with one from the generic MIT X11 release. You might also
539 try disabling parts of your `init.el'/`.emacs', like those that enable
543 File: xemacs-faq.info, Node: Q2.1.10, Next: Q2.1.11, Prev: Q2.1.9, Up: Installation
545 Q2.1.10: Warnings from incorrect key modifiers.
546 -----------------------------------------------
548 The following information comes from the `PROBLEMS' file that comes
551 If you're having troubles with HP/UX it is because HP/UX defines the
552 modifiers wrong in X. Here is a shell script to fix the problem; be
553 sure that it is run after VUE configures the X server.
556 xmodmap 2> /dev/null - << EOF
557 keysym Alt_L = Meta_L
558 keysym Alt_R = Meta_R
563 keysym Mode_switch = NoSymbol
565 keysym Meta_R = Mode_switch
566 add mod2 = Mode_switch
570 File: xemacs-faq.info, Node: Q2.1.11, Next: Q2.1.12, Prev: Q2.1.10, Up: Installation
572 Q2.1.11: `Can't instantiate image error...' in toolbar
573 ------------------------------------------------------
575 Dr. Ram Samudrala <expt@alanine.ram.org> writes:
577 I just installed the XEmacs (20.4-2) RPMS that I downloaded from
578 `http://www.xemacs.org/'. Everything works fine, except that when I
579 place my mouse over the toolbar, it beeps and gives me this message:
581 Can't instantiate image (probably cached):
582 [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
583 (16 16 <strange control characters> ...
585 Kyle Jones <kyle_jones@wonderworks.com> writes:
586 This is problem specific to some Chips and Technologies video
587 chips, when running XFree86. Putting
591 in `XF86Config' gets rid of the problem.
594 File: xemacs-faq.info, Node: Q2.1.12, Next: Q2.1.13, Prev: Q2.1.11, Up: Installation
596 Q2.1.12: Problems with Regular Expressions on DEC OSF1.
597 -------------------------------------------------------
599 I have xemacs 19.13 running on an alpha running OSF1 V3.2 148 and
600 ispell would not run because it claimed the version number was incorrect
601 although it was indeed OK. I traced the problem to the regular
604 Douglas Kosovic <douglask@dstc.edu.au> writes:
606 Actually it's a DEC cc optimization bug that screws up the regexp
609 Rebuilding using the `-migrate' switch for DEC cc (which uses a
610 different sort of optimization) works fine.
612 See `xemacs-19_13-dunix-3_2c.patch' at the following URL on how to
613 build with the `-migrate' flag:
615 `http://www-digital.cern.ch/carney/emacs/emacs.html'
617 NOTE: There have been a variety of other problems reported that are
618 fixed in this fashion.
621 File: xemacs-faq.info, Node: Q2.1.13, Next: Q2.1.14, Prev: Q2.1.12, Up: Installation
623 Q2.1.13: HP/UX 10.10 and `create_process' failure.
624 --------------------------------------------------
626 Dave Carrigan <Dave.Carrigan@ipl.ca> writes:
628 With XEmacs 19.13 and HP/UX 10.10, anything that relies on the
629 `create_process' function fails. This breaks a lot of things
630 (shell-mode, compile, ange-ftp, to name a few).
632 Phil Johnson <johnson@dtc.hp.com> writes:
634 This is a problem specific to HP-UX 10.10. It only occurs when
635 XEmacs is compiled for shared libraries (the default), so you can
636 work around it by compiling a statically-linked binary (run
637 configure with `--dynamic=no').
639 I'm not sure whether the problem is with a particular shared
640 library or if it's a kernel problem which crept into 10.10.
642 Richard Cognot <cognot@ensg.u-nancy.fr> writes:
644 I had a few problems with 10.10. Apparently, some of them were
645 solved by forcing a static link of libc (manually).
648 File: xemacs-faq.info, Node: Q2.1.14, Next: Q2.1.15, Prev: Q2.1.13, Up: Installation
650 Q2.1.14: `C-g' doesn't work for me. Is it broken?
651 --------------------------------------------------
653 Ben Wing <ben@xemacs.org> writes:
655 `C-g' does work for most people in most circumstances. If it
656 doesn't, there are only two explanations:
658 1. The code is wrapped with a binding of `inhibit-quit' to `t'.
659 `Ctrl-Shift-G' should still work, I think.
661 2. SIGIO is broken on your system, but BROKEN_SIGIO isn't
664 To test #2, try executing `(while t)' from the `*scratch*' buffer.
665 If `C-g' doesn't interrupt, then you're seeing #2.
667 Morten Welinder <terra@diku.dk> writes:
669 On some (but _not_ all) machines a hung XEmacs can be revived by
670 `kill -FPE <pid>'. This is a hack, of course, not a solution.
671 This technique works on a Sun4 running 4.1.3_U1. To see if it
672 works for you, start another XEmacs and test with that first. If
673 you get a core dump the method doesn't work and if you get
674 `Arithmetic error' then it does.
677 File: xemacs-faq.info, Node: Q2.1.15, Next: Q2.1.16, Prev: Q2.1.14, Up: Installation
679 Q2.1.15: How to Debug an XEmacs problem with a debugger
680 -------------------------------------------------------
682 If XEmacs does crash on you, one of the most productive things you
683 can do to help get the bug fixed is to poke around a bit with the
684 debugger. Here are some hints:
686 * First of all, if the crash is at all reproducible, consider very
687 strongly recompiling your XEmacs with debugging symbols, with no
688 optimization, and with the configure options `--debug=yes' and
689 `--error-checking=all'. This will make your XEmacs run somewhat
690 slower but make it a lot more likely to catch the problem earlier
691 (closer to its source), and a lot easier to determine what's going
694 * If you're able to run XEmacs under a debugger and reproduce the
695 crash (if it's inconvenient to do this because XEmacs is already
696 running or is running in batch mode as part of a bunch of scripts,
697 consider attaching to the existing process with your debugger;
698 most debuggers let you do this by substituting the process ID for
699 the core file when you invoke the debugger from the command line,
700 or by using the `attach' command or something similar), here are
701 some things you can do:
703 * If XEmacs is hitting an assertion failure, put a breakpoint on
706 * If XEmacs is hitting some weird Lisp error that's causing it to
707 crash (e.g. during startup), put a breakpoint on
708 `signal_1()'--this is declared static in eval.c.
710 * Internally, you will probably see lots of variables that hold
711 objects of type `Lisp_Object'. These are exactly what they appear
712 to be, i.e. references to Lisp objects. Printing them out with
713 the debugger probably won't be too useful--you'll likely just see
714 a number. To decode them, do this:
716 call debug_print (OBJECT)
718 where OBJECT is whatever you want to decode (it can be a variable,
719 a function call, etc.). This will print out a readable
720 representation on the TTY from which the xemacs process was
723 * If you want to get a Lisp backtrace showing the Lisp call stack,
726 call debug_backtrace ()
728 * Using `debug_print' and `debug_backtrace' has two disadvantages -
729 it can only be used with a running xemacs process, and it cannot
730 display the internal C structure of a Lisp Object. Even if all
731 you've got is a core dump, all is not lost.
733 If you're using GDB, there are some macros in the file
734 `src/.gdbinit' in the XEmacs source distribution that should make
735 it easier for you to decode Lisp objects. This file is
736 automatically read by gdb if gdb is run in the directory where
737 xemacs was built, and contains these useful macros to inspect the
741 Usage: pobj lisp_object
742 Print the internal C representation of a lisp object.
745 Usage: xtype lisp_object
746 Print the Lisp type of a lisp object.
750 Print the current Lisp stack trace. Requires a running
754 Usage: ldp lisp_object
755 Print a Lisp Object value using the Lisp printer. Requires a
756 running xemacs process.
760 Run temacs interactively, like xemacs. Use this with
761 debugging tools (like purify) that cannot deal with dumping,
762 or when temacs builds successfully, but xemacs does not.
766 Run the dumping part of the build procedure. Use when
767 debugging temacs, not xemacs! Use this when temacs builds
768 successfully, but xemacs does not.
772 Run the test suite. Equivalent to 'make check'.
776 Run the test suite on temacs. Equivalent to 'make
777 check-temacs'. Use this with debugging tools (like purify)
778 that cannot deal with dumping, or when temacs builds
779 successfully, but xemacs does not.
781 If you are using Sun's `dbx' debugger, there is an equivalent file
782 `src/.dbxrc', which defines the same commands for dbx.
784 * If you're using a debugger to get a C stack backtrace and you're
785 seeing stack traces with some of the innermost frames mangled, it
786 may be due to dynamic linking. (This happens especially under
787 Linux.) Consider reconfiguring with `--dynamic=no'. Also,
788 sometimes (again under Linux), stack backtraces of core dumps will
789 have the frame where the fatal signal occurred mangled; if you can
790 obtain a stack trace while running the XEmacs process under a
791 debugger, the stack trace should be clean.
793 Curtiss <1CMC3466@ibm.mtsac.edu> suggests upgrading to ld.so
794 version 1.8 if dynamic linking and debugging is a problem on Linux.
796 * If you're using a debugger to get a C stack backtrace and you're
797 getting a completely mangled and bogus stack trace, it's probably
798 due to one of the following:
800 a. Your executable has been stripped. Bad news. Tell your
801 sysadmin not to do this--it doesn't accomplish anything
802 except to save a bit of disk space, and makes debugging much
805 b. Your stack is getting trashed. Debugging this is hard; you
806 have to do a binary-search type of narrowing down where the
807 crash occurs, until you figure out exactly which line is
808 causing the problem. Of course, this only works if the bug
809 is highly reproducible.
811 c. If your stack trace has exactly one frame in it, with address
812 0x0, this could simply mean that XEmacs attempted to execute
813 code at that address, e.g. through jumping to a null function
814 pointer. Unfortunately, under those circumstances, GDB under
815 Linux doesn't know how to get a stack trace. (Yes, this is
816 the third Linux-related problem I've mentioned. I have no
817 idea why GDB under Linux is so bogus. Complain to the GDB
818 authors, or to comp.os.linux.development.system). Again,
819 you'll have to use the narrowing-down process described above.
821 d. You will get a Lisp backtrace output when XEmacs crashes, so
822 you'll have something useful.
825 * If you compile with the newer gcc variants gcc-2.8 or egcs, you
826 will also need gdb 4.17 or above. Earlier releases of gdb can't
827 handle the debug information generated by the newer compilers.
829 * In versions of XEmacs before 21.2.27, `src/.gdbinit' was named
830 `src/gdbinit'. This had the disadvantage of not being sourced
831 automatically by gdb, so you had to set that up yourself.
835 File: xemacs-faq.info, Node: Q2.1.16, Next: Q2.1.17, Prev: Q2.1.15, Up: Installation
837 Q2.1.16: XEmacs crashes in `strcat' on HP/UX 10
838 -----------------------------------------------
840 From the problems database (through the former address
841 http://support.mayfield.hp.com/):
843 Problem Report: 5003302299
846 System/Model: 9000/700
847 Product Name: HPUX S800 10.0X
848 Product Vers: 9245XB.10.00
850 Description: strcat(3C) may read beyond
851 end of source string, can cause SIGSEGV
855 strcat(3C) may read beyond the source string onto an unmapped page,
856 causing a segmentation violation.
859 File: xemacs-faq.info, Node: Q2.1.17, Next: Q2.1.18, Prev: Q2.1.16, Up: Installation
861 Q2.1.17: `Marker does not point anywhere'
862 -----------------------------------------
864 As with other errors, set `debug-on-error' to `t' to get the
865 backtrace when the error occurs. Specifically, two problems have been
866 reported (and fixed).
868 1. A problem with line-number-mode in XEmacs 19.14 affected a large
869 number of other packages. If you see this error message, turn off
872 2. A problem with some early versions of Gnus 5.4 caused this error.
876 File: xemacs-faq.info, Node: Q2.1.18, Next: Q2.1.19, Prev: Q2.1.17, Up: Installation
882 File: xemacs-faq.info, Node: Q2.1.19, Next: Q2.1.20, Prev: Q2.1.18, Up: Installation
884 Q2.1.19: XEmacs does not follow the local timezone.
885 ---------------------------------------------------
887 When using one of the prebuilt binaries many users have observed that
888 XEmacs uses the timezone under which it was built, but not the timezone
889 under which it is running. The solution is to add:
891 (set-time-zone-rule "MET")
893 to your `init.el'/`.emacs' or the `site-start.el' file if you can.
894 Replace `MET' with your local timezone.
897 File: xemacs-faq.info, Node: Q2.1.20, Next: Q2.1.21, Prev: Q2.1.19, Up: Installation
899 Q2.1.20: `Symbol's function definition is void: hkey-help-show.'
900 ----------------------------------------------------------------
902 This is a problem with a partially loaded hyperbole. Try adding:
904 (require 'hmouse-drv)
906 where you load hyperbole and the problem should go away.
909 File: xemacs-faq.info, Node: Q2.1.21, Next: Q2.1.22, Prev: Q2.1.20, Up: Installation
911 Q2.1.21: [This question intentionally left blank]
912 -------------------------------------------------
915 File: xemacs-faq.info, Node: Q2.1.22, Next: Q2.1.23, Prev: Q2.1.21, Up: Installation
917 Q2.1.22: XEmacs seems to take a really long time to do some things
918 ------------------------------------------------------------------
920 David Moore <dmoore@ucsd.edu> writes:
922 Two things you can do:
926 When you see it going mad like this, you might want to use gdb
927 from an 'xterm' to attach to the running process and get a stack
928 trace. To do this just run:
930 gdb /path/to/xemacs/xemacs ####
932 Where `####' is the process id of your xemacs, instead of
933 specifying the core. When gdb attaches, the xemacs will stop [1]
934 and you can type `where' in gdb to get a stack trace as usual. To
935 get things moving again, you can just type `quit' in gdb. It'll
936 tell you the program is running and ask if you want to quit
937 anyways. Say 'y' and it'll quit and have your emacs continue from
942 Turn on debug-on-quit early on. When you think things are going
943 slow hit C-g and it may pop you in the debugger so you can see
944 what routine is running. Press `c' to get going again.
946 debug-on-quit doesn't work if something's turned on inhibit-quit
947 or in some other strange cases.
950 File: xemacs-faq.info, Node: Q2.1.23, Next: Q2.1.24, Prev: Q2.1.22, Up: Installation
952 Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later.
953 ---------------------------------------------------------------------
955 Movemail used to work fine in 19.14 but has stopped working in 19.15
956 and 20.x. I am using Linux.
958 SL Baur <steve@xemacs.org> writes:
960 Movemail on Linux used to default to using flock file locking.
961 With 19.15 and later versions it now defaults to using `.lock' file
962 locking. If this is not appropriate for your system, edit
963 src/s/linux.h and uncomment the line that reads:
965 #define MAIL_USE_FLOCK
968 File: xemacs-faq.info, Node: Q2.1.24, Next: Q2.1.25, Prev: Q2.1.23, Up: Installation
970 Q2.1.24: XEmacs won't start without network. (NEW)
971 ---------------------------------------------------
973 If XEmacs starts when you're on the network, but fails when you're
974 not on the network, you may be missing a "localhost" entry in your
975 `/etc/hosts' file. The file should contain an entry like:
979 Add that line, and XEmacs will be happy.
982 File: xemacs-faq.info, Node: Q2.1.25, Prev: Q2.1.24, Up: Installation
984 Q2.1.25:: After upgrading, XEmacs won't do `foo' any more! (NEW)
985 -----------------------------------------------------------------
987 You have been used to doing `foo', but now when you invoke it (or
988 click the toolbar button or select the menu item), nothing (or an error)
989 happens. The simplest explanation is that you are missing a package
990 that is essential to you. You can either track it down and install it
991 (there is a list of packages and brief descriptions of their contents in
992 `etc/PACKAGES'), or install the `Sumo Tarball' (see *note Q2.0.14::).
995 File: xemacs-faq.info, Node: Customization, Next: Subsystems, Prev: Installation, Up: Top
997 3 Customization and Options
998 ***************************
1000 This is part 3 of the XEmacs Frequently Asked Questions list. This
1001 section is devoted to Customization and screen settings.
1005 Customization---Emacs Lisp and `init.el'/`.emacs':
1006 * Q3.0.1:: What version of Emacs am I running?
1007 * Q3.0.2:: How do I evaluate Elisp expressions?
1008 * Q3.0.3:: `(setq tab-width 6)' behaves oddly.
1009 * Q3.0.4:: How can I add directories to the `load-path'?
1010 * Q3.0.5:: How to check if a lisp function is defined?
1011 * Q3.0.6:: Can I force the output of `(face-list)' to a buffer?
1012 * Q3.0.7:: Font selections don't get saved after `Save Options'.
1013 * Q3.0.8:: How do I make a single minibuffer frame?
1014 * Q3.0.9:: What is `Customize'?
1016 X Window System & Resources:
1017 * Q3.1.1:: Where is a list of X resources?
1018 * Q3.1.2:: How can I detect a color display?
1019 * Q3.1.3:: [This question intentionally left blank]
1020 * Q3.1.4:: [This question intentionally left blank]
1021 * Q3.1.5:: How can I get the icon to just say `XEmacs'?
1022 * Q3.1.6:: How can I have the window title area display the full path?
1023 * Q3.1.7:: `xemacs -name junk' doesn't work?
1024 * Q3.1.8:: `-iconic' doesn't work.
1026 Textual Fonts & Colors:
1027 * Q3.2.1:: How can I set color options from `init.el'/`.emacs'?
1028 * Q3.2.2:: How do I set the text, menu and modeline fonts?
1029 * Q3.2.3:: How can I set the colors when highlighting a region?
1030 * Q3.2.4:: How can I limit color map usage?
1031 * Q3.2.5:: My tty supports color, but XEmacs doesn't use them.
1032 * Q3.2.6:: Can I have pixmap backgrounds in XEmacs?
1035 * Q3.3.1:: How can I make the modeline go away?
1036 * Q3.3.2:: How do you have XEmacs display the line number in the modeline?
1037 * Q3.3.3:: How do I get XEmacs to put the time of day on the modeline?
1038 * Q3.3.4:: How do I turn off current chapter from AUC TeX modeline?
1039 * Q3.3.5:: How can one change the modeline color based on the mode used?
1041 3.4 Multiple Device Support:
1042 * Q3.4.1:: How do I open a frame on another screen of my multi-headed display?
1043 * Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
1046 * Q3.5.1:: How can I bind complex functions (or macros) to keys?
1047 * Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
1048 * Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down?
1049 * Q3.5.4:: Globally binding Delete?
1050 * Q3.5.5:: Scrolling one line at a time.
1051 * Q3.5.6:: How to map Help key alone on Sun type4 keyboard?
1052 * Q3.5.7:: How can you type in special characters in XEmacs?
1053 * Q3.5.8:: [This question intentionally left blank]
1054 * Q3.5.9:: How do I make the Delete key delete forward?
1055 * Q3.5.10:: Can I turn on "sticky" modifier keys?
1056 * Q3.5.11:: How do I map the arrow keys?
1059 * Q3.6.1:: Is there a way to make the bar cursor thicker?
1060 * 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?
1061 * Q3.6.3:: Can I make the cursor blink?
1063 The Mouse and Highlighting:
1064 * Q3.7.1:: How can I turn off Mouse pasting?
1065 * Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons?
1066 * Q3.7.3:: Clicking the left button does not do anything in buffer list.
1067 * Q3.7.4:: How can I get a list of buffers when I hit mouse button 3?
1068 * Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool?
1069 * Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is?
1070 * Q3.7.7:: How do I select a rectangular region?
1071 * Q3.7.8:: Why does M-w take so long?
1073 The Menubar and Toolbar:
1074 * Q3.8.1:: How do I get rid of the menu (or menubar)?
1075 * Q3.8.2:: Can I customize the basic menubar?
1076 * Q3.8.3:: How do I control how many buffers are listed in the menu `Buffers' list?
1077 * Q3.8.4:: Resources like `Emacs*menubar*font' are not working?
1078 * Q3.8.5:: How can I bind a key to a function to toggle the toolbar?
1081 * Q3.9.1:: How can I disable the scrollbar?
1082 * Q3.9.2:: How can one use resources to change scrollbar colors?
1083 * Q3.9.3:: Moving the scrollbar can move the point; can I disable this?
1084 * Q3.9.4:: How can I turn off automatic horizontal scrolling in specific modes?
1087 * Q3.10.1:: How can I turn off or change highlighted selections?
1088 * Q3.10.2:: How do I get that typing on an active region removes it?
1089 * Q3.10.3:: Can I turn off the highlight during isearch?
1090 * Q3.10.4:: How do I turn off highlighting after C-x C-p (mark-page)?
1091 * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.
1094 File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Customization, Up: Customization
1096 3.0: Customization - Emacs Lisp and `init.el'/`.emacs'
1097 ======================================================
1099 Q3.0.1: What version of Emacs am I running?
1100 -------------------------------------------
1102 How can `init.el'/`.emacs' determine which of the family of Emacsen
1105 To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
1106 XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
1107 example given in `etc/sample.init.el' (`etc/sample.emacs' in XEmacs
1108 versions prior to 21.4). There are other nifty things in there as well!
1110 For all new code, all you really need to do is:
1112 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
1115 File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Customization
1117 Q3.0.2: How can I evaluate Emacs-Lisp expressions?
1118 --------------------------------------------------
1120 I know I can evaluate Elisp expressions from `*scratch*' buffer with
1121 `C-j' after the expression. How do I do it from another buffer?
1123 Press `M-:' (the default binding of `eval-expression'), and enter
1124 the expression to the minibuffer.
1127 File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Customization
1129 Q3.0.3: `(setq tab-width 6)' behaves oddly.
1130 -------------------------------------------
1132 If you put `(setq tab-width 6)' in your `init.el'/`.emacs' file it
1133 does not work! Is there a reason for this? If you do it at the EVAL
1134 prompt it works fine!! How strange.
1136 Use `setq-default' instead, since `tab-width' is all-buffer-local.
1139 File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization
1141 Q3.0.4: How can I add directories to the `load-path'?
1142 -----------------------------------------------------
1144 Here are two ways to do that, one that puts your directories at the
1145 front of the load-path, the other at the end:
1147 ;;; Add things at the beginning of the load-path, do not add
1148 ;;; duplicate directories:
1149 (pushnew "bar" load-path :test 'equal)
1151 (pushnew "foo" load-path :test 'equal)
1153 ;;; Add things at the end, unconditionally
1154 (setq load-path (nconc load-path '("foo" "bar")))
1156 keith (k.p.) hanlan <keithh@nortel.ca> writes:
1158 To add directories using Unix shell metacharacters use
1159 `expand-file-name' like this:
1161 (push (expand-file-name "~keithh/.emacsdir") load-path)
1164 File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization
1166 Q3.0.5: How to check if a lisp function is defined?
1167 ---------------------------------------------------
1169 Use the following elisp:
1173 It's almost always a mistake to test `emacs-version' or any similar
1176 Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
1177 or even simple behavioral tests, eg.:
1179 (defvar foo-old-losing-code-p
1180 (condition-case nil (progn (losing-code t) nil)
1181 (wrong-number-of-arguments t)))
1183 There is an incredible amount of broken code out there which could
1184 work much better more often in more places if it did the above instead
1185 of trying to divine its environment from the value of one variable.
1188 File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Customization
1190 Q3.0.6: Can I force the output of `(face-list)' to a buffer?
1191 ------------------------------------------------------------
1193 It would be good having it in a buffer, as the output of
1194 `(face-list)' is too wide to fit to a minibuffer.
1196 Evaluate the expression in the `*scratch*' buffer with point after
1197 the rightmost paren and typing `C-j'.
1199 If the minibuffer smallness is the only problem you encounter, you
1200 can simply press `C-h l' to get the former minibuffer contents in a
1204 File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Customization
1206 Q3.0.7: Font selections in don't get saved after `Save Options'.
1207 ----------------------------------------------------------------
1209 John Mann <mannj@ll.mit.edu> writes:
1211 You have to go to Options->Frame Appearance and unselect
1212 `Frame-Local Font Menu'. If this option is selected, font changes
1213 are only applied to the _current_ frame and do _not_ get saved
1214 when you save options.
1216 Also, set the following in your `init.el'/`.emacs':
1218 (setq options-save-faces t)
1221 File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Customization
1223 Q3.0.8: How do I get a single minibuffer frame?
1224 -----------------------------------------------
1226 Vin Shelton <acs@acm.org> writes:
1228 (setq initial-frame-plist '(minibuffer nil))
1229 (setq default-frame-plist '(minibuffer nil))
1230 (setq default-minibuffer-frame
1235 menubar-visible-p nil
1236 default-toolbar-visible-p nil
1240 has-modeline-p nil)))
1241 (frame-notice-user-settings)
1243 *Please note:* The single minibuffer frame may not be to everyone's
1244 taste, and there any number of other XEmacs options settings that may
1245 make it difficult or inconvenient to use.
1248 File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.1.1, Prev: Q3.0.8, Up: Customization
1250 Q3.0.9: What is `Customize'?
1251 ----------------------------
1253 Starting with XEmacs 20.2 there is new system 'Customize' for
1254 customizing XEmacs options.
1256 You can access `Customize' from the `Options' menu or invoking one
1257 of customize commands by typing eg. `M-x customize', `M-x
1258 customize-face', `M-x customize-variable' or `M-x customize-apropos'.
1260 Starting with XEmacs 20.3 there is also new `browser' mode for
1261 Customize. Try it out with `M-x customize-browse'
1264 File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.9, Up: Customization
1266 3.1: X Window System & Resources
1267 ================================
1269 Q3.1.1: Where is a list of X resources?
1270 ---------------------------------------
1272 Search through the `NEWS' file for `X Resources'. A fairly
1273 comprehensive list is given after it.
1275 In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
1276 listing the defaults. The file `etc/sample.Xdefaults' gives a set of
1277 defaults that you might consider. It is essentially the same as
1278 `etc/Emacs.ad' but some entries are slightly altered. Be careful about
1279 installing the contents of this file into your `.Xdefaults' or
1280 `.Xresources' file if you use GNU Emacs under X11 as well.
1283 File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Customization
1285 Q3.1.2: How can I detect a color display?
1286 -----------------------------------------
1288 You can test the return value of the function `(device-class)', as
1291 (when (eq (device-class) 'color)
1292 (set-face-foreground 'font-lock-comment-face "Grey")
1293 (set-face-foreground 'font-lock-string-face "Red")
1298 File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization
1300 Q3.1.3: [This question intentionally left blank]
1301 ------------------------------------------------
1304 File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization
1306 Q3.1.4: [This question intentionally left blank]
1307 ------------------------------------------------