1 This is ../info/xemacs-faq.info, produced by makeinfo version 4.0b from
4 INFO-DIR-SECTION XEmacs Editor
6 * FAQ: (xemacs-faq). XEmacs FAQ.
10 File: xemacs-faq.info, Node: Q2.0.4, Next: Q2.0.5, Prev: Q2.0.3, Up: Installation
12 Q2.0.4: Problems with Linux and ncurses.
13 ----------------------------------------
15 On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with
16 libc 5.2.18, XEmacs 20.0b20 is unable to open a tty device:
20 Terminal type `xterm' undefined (or can't access database?)
22 Ben Wing <ben@xemacs.org> writes:
24 Your ncurses configuration is messed up. Your /usr/lib/terminfo
25 is a bad pointer, perhaps to a CD-ROM that is not inserted.
28 File: xemacs-faq.info, Node: Q2.0.5, Next: Q2.0.6, Prev: Q2.0.4, Up: Installation
30 Q2.0.5: Do I need X11 to run XEmacs?
31 ------------------------------------
33 No. The name "XEmacs" is unfortunate in the sense that it is *not*
34 an X Window System-only version of Emacs. XEmacs has full color
35 support on a color-capable character terminal.
38 File: xemacs-faq.info, Node: Q2.0.6, Next: Q2.0.7, Prev: Q2.0.5, Up: Installation
40 Q2.0.6: I'm having strange crashes. What do I do?
41 --------------------------------------------------
43 There have been a variety of reports of crashes due to compilers with
44 buggy optimizers. Please see the `PROBLEMS' file that comes with
45 XEmacs to read what it says about your platform.
48 File: xemacs-faq.info, Node: Q2.0.7, Next: Q2.0.8, Prev: Q2.0.6, Up: Installation
50 Q2.0.7: Libraries in non-standard locations
51 -------------------------------------------
53 I have x-faces, jpeg, xpm etc. all in different places. I've tried
54 space-separated, comma-separated, several -site-libraries, all to no
57 --site-libraries='/path/one /path/two /path/etc'
60 File: xemacs-faq.info, Node: Q2.0.8, Next: Q2.0.9, Prev: Q2.0.7, Up: Installation
62 Q2.0.8: can't resolve symbol _h_errno
63 -------------------------------------
65 You are using the Linux/ELF distribution of XEmacs 19.14, and your
66 ELF libraries are out of date. You have the following options:
68 1. Upgrade your libc to at least 5.2.16 (better is 5.2.18, 5.3.12, or
71 2. Patch the XEmacs binary by replacing all occurrences of
72 `_h_errno^@' with `h_errno^@^@'. Any version of Emacs will
73 suffice. If you don't understand how to do this, don't do it.
75 3. Rebuild XEmacs yourself--any working ELF version of libc should be
78 Hrvoje Niksic <hniksic@xemacs.org> writes:
80 Why not use a Perl one-liner for No. 2?
82 perl -pi -e 's/_h_errno\0/h_errno\0\0/g' \
83 /usr/local/bin/xemacs-19.14
85 NB: You _must_ patch `/usr/local/bin/xemacs-19.14', and not
86 `xemacs' because `xemacs' is a link to `xemacs-19.14'; the Perl
87 `-i' option will cause unwanted side-effects if applied to a
90 SL Baur <steve@xemacs.org> writes:
92 If you build against a recent libc-5.4 (late enough to have caused
93 problems earlier in the beta cycle) and then run with an earlier
94 version of libc, you get a
97 xemacs: can't resolve symbol '__malloc_hook'
98 zsh: 7942 segmentation fault (core dumped) xemacs
100 (Example binary compiled against libc-5.4.23 and run with
103 The solution is to upgrade to at least libc-5.4.23. Sigh. Drat.
106 File: xemacs-faq.info, Node: Q2.0.9, Next: Q2.0.10, Prev: Q2.0.8, Up: Installation
108 Q2.0.9: Where do I find external libraries?
109 -------------------------------------------
111 All external libraries used by XEmacs can be found at the XEmacs FTP
112 site `ftp://ftp.xemacs.org/pub/xemacs/aux/'.
114 The canonical locations (at the time of this writing) are as follows:
117 `ftp://ftp.uu.net/graphics/jpeg/'. Version 6a is current.
120 `ftp://ftp.x.org/contrib/libraries/'. Version 3.4j is current.
121 Older versions of this package are known to cause XEmacs crashes.
124 `ftp://ftp.sgi.com/graphics/tiff/'. v3.4 is current. The latest
125 beta is v3.4b035. There is a HOWTO here.
128 `ftp://ftp.uu.net/graphics/png/'. 0.89c is current. XEmacs
129 requires a fairly recent version to avoid using temporary files.
131 `ftp://swrinde.nde.swri.edu/pub/png/src/'
134 `ftp://ftp.cs.indiana.edu/pub/faces/compface/'. This library has
135 been frozen for about 6 years, and is distributed without version
136 numbers. _It should be compiled with the same options that X11 was
137 compiled with on your system_. The version of this library at
138 XEmacs.org includes the `xbm2xface.pl' script, written by
139 <stig@hackvan.com>, which may be useful when generating your own
143 `ftp://ftp.x.org/contrib/audio/nas/'. Version 1.2p5 is current.
147 File: xemacs-faq.info, Node: Q2.0.10, Next: Q2.0.11, Prev: Q2.0.9, Up: Installation
149 Q2.0.10: After I run configure I find a core dump, is something wrong?
150 ----------------------------------------------------------------------
152 Not necessarily. If you have GNU sed 3.0 you should downgrade it to
153 2.05. From the `README' at prep.ai.mit.edu:
155 sed 3.0 has been withdrawn from distribution. It has major
156 revisions, which mostly seem to be improvements; but it turns out
157 to have bugs too which cause trouble in some common cases.
159 Tom Lord won't be able to work fixing the bugs until May. So in
160 the mean time, we've decided to withdraw sed 3.0 from distribution
161 and make version 2.05 once again the recommended version.
163 It has also been observed that the vfork test on Solaris will leave a
167 File: xemacs-faq.info, Node: Q2.0.11, Next: Q2.0.12, Prev: Q2.0.10, Up: Installation
169 Q2.0.11: XEmacs doesn't resolve hostnames.
170 ------------------------------------------
172 This is the result of a long-standing problem with SunOS and the fact
173 that stock SunOS systems do not ship with DNS resolver code in libc.
175 Christopher Davis <ckd@loiosh.kei.com> writes:
177 That's correct [The SunOS 4.1.3 precompiled binaries don't do name
178 lookup]. Since Sun figured that everyone used NIS to do name
179 lookups (that DNS thing was apparently only a passing fad,
180 right?), the stock SunOS 4.x systems don't have DNS-based name
183 This is also why Netscape ships two binaries for SunOS 4.1.x.
185 The best solution is to compile it yourself; the configure script
186 will check to see if you've put DNS in the shared libc and will
187 then proceed to link against the DNS resolver library code.
190 File: xemacs-faq.info, Node: Q2.0.12, Next: Q2.0.13, Prev: Q2.0.11, Up: Installation
192 Q2.0.12: Why can't I strip XEmacs?
193 ----------------------------------
195 Richard Cognot <cognot@fronsac.ensg.u-nancy.fr> writes:
197 Because of the way XEmacs (and every other Emacsen, AFAIK) is
198 built. The link gives you a bare-boned emacs (called temacs).
199 temacs is then run, preloading some of the lisp files. The result
200 is then dumped into a new executable, named xemacs, which will
201 contain all of the preloaded lisp functions and data.
203 Now, during the dump itself, the executable (code+data+symbols) is
204 written on disk using a special unexec() function. This function is
205 obviously heavily system dependent. And on some systems, it leads
206 to an executable which, although valid, cannot be stripped without
207 damage. If memory serves, this is especially the case for AIX
208 binaries. On other architecture it might work OK.
210 The Right Way to strip the emacs binary is to strip temacs prior to
211 dumping xemacs. This will always work, although you can do that
212 only if you install from sources (as temacs is `not' part of the
215 Nat Makarevitch <nat@nataa.fr.eu.org> writes:
219 1. [ ./configure; make ]
227 5. cp src/xemacs /usr/local/bin/xemacs
229 6. cp lib-src/DOC-19.16-XEmacs
230 /usr/local/lib/xemacs-19.16/i586-unknown-linuxaout
233 File: xemacs-faq.info, Node: Q2.0.13, Next: Q2.0.14, Prev: Q2.0.12, Up: Installation
235 Q2.0.13: I don't need no steenkin' packages. Do I? (NEW)
236 ---------------------------------------------------------
238 Strictly speaking, no. XEmacs will build and install just fine
239 without any packages installed. However, only the most basic editing
240 functions will be available with no packages installed, so installing
241 packages is an essential part of making your installed XEmacs _useful_.
244 File: xemacs-faq.info, Node: Q2.0.14, Next: Q2.1.1, Prev: Q2.0.13, Up: Installation
246 Q2.0.12: How do I figure out which packages to install? (NEW)
247 -------------------------------------------------------------
249 Many people really liked the old way that packages were bundled and
250 do not want to mess with packages at all. You can grab all the
251 packages at once like you used to with old XEmacs versions. Download
256 For an XEmacs compiled with Mule you also need
258 `xemacs-mule-sumo.tar.gz'
260 from the `packages' directory on your XEmacs mirror archive. N.B.
261 They are called 'Sumo Tarballs' for good reason. They are currently
262 about 15MB and 2.3MB (gzipped) respectively.
266 `cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -'
268 See README.packages for more detailed installation instructions.
270 As the Sumo tarballs are not regenerated as often as the individual
271 packages, it is recommended that you use the automatic package tools
272 afterwards to pick up any recent updates.
275 File: xemacs-faq.info, Node: Q2.1.1, Next: Q2.1.2, Prev: Q2.0.14, Up: Installation
277 2.1: Trouble Shooting
278 =====================
280 Q2.1.1: Help! XEmacs just crashed on me!
281 -----------------------------------------
283 First of all, don't panic. Whenever XEmacs crashes, it tries
284 extremely hard to auto-save all of your files before dying. (The main
285 time that this will not happen is if the machine physically lost power
286 or if you killed the XEmacs process using `kill -9'). The next time
287 you try to edit those files, you will be informed that a more recent
288 auto-save file exists. You can use `M-x recover-file' to retrieve the
289 auto-saved version of the file.
291 Starting with 19.14, you may use the command `M-x recover-session'
292 after a crash to pick up where you left off.
294 Now, XEmacs is not perfect, and there may occasionally be times, or
295 particular sequences of actions, that cause it to crash. If you can
296 come up with a reproducible way of doing this (or even if you have a
297 pretty good memory of exactly what you were doing at the time), the
298 maintainers would be very interested in knowing about it. Post a
299 message to comp.emacs.xemacs or send mail to <crashes@xemacs.org>.
300 Please note that the `crashes' address is exclusively for crash reports.
302 If at all possible, include a stack backtrace of the core dump that
303 was produced. This shows where exactly things went wrong, and makes it
304 much easier to diagnose problems. To do this, you need to locate the
305 core file (it's called `core', and is usually sitting in the directory
306 that you started XEmacs from, or your home directory if that other
307 directory was not writable). Then, go to that directory and execute a
310 gdb `which xemacs` core
312 and then issue the command `where' to get the stack backtrace. You
313 might have to use `dbx' or some similar debugger in place of `gdb'. If
314 you don't have any such debugger available, complain to your system
317 It's possible that a core file didn't get produced, in which case
318 you're out of luck. Go complain to your system administrator and tell
319 him not to disable core files by default. Also *Note Q2.1.15::, for
320 tips and techniques for dealing with a debugger.
322 When making a problem report make sure that:
324 1. Report *all* of the information output by XEmacs during the crash.
326 2. You mention what O/S & Hardware you are running XEmacs on.
328 3. What version of XEmacs you are running.
330 4. What build options you are using.
332 5. If the problem is related to graphics, we will also need to know
333 what version of the X Window System you are running, and what
334 window manager you are using.
336 6. If the problem happened on a tty, please include the terminal type.
339 File: xemacs-faq.info, Node: Q2.1.2, Next: Q2.1.3, Prev: Q2.1.1, Up: Installation
341 Q2.1.2: Cryptic Minibuffer messages.
342 ------------------------------------
344 When I try to use some particular option of some particular package,
345 I get a cryptic error in the minibuffer.
347 If you can't figure out what's going on, select Options/General
348 Options/Debug on Error from the Menubar and then try and make the error
349 happen again. This will give you a backtrace that may be enlightening.
350 If not, try reading through this FAQ; if that fails, you could try
351 posting to comp.emacs.xemacs (making sure to include the backtrace) and
352 someone may be able to help. If you can identify which Emacs lisp
353 source file the error is coming from you can get a more detailed stack
354 backtrace by doing the following:
356 1. Visit the .el file in an XEmacs buffer.
358 2. Issue the command `M-x eval-current-buffer'.
360 3. Reproduce the error.
362 Depending on the version of XEmacs, you may either select Edit->Show
363 Messages (19.13 and earlier) or Help->Recent Keystrokes/Messages (19.14
364 and later) from the menubar to see the most recent messages. This
365 command is bound to `C-h l' by default.
368 File: xemacs-faq.info, Node: Q2.1.3, Next: Q2.1.4, Prev: Q2.1.2, Up: Installation
370 Q2.1.3: Translation Table Syntax messages at Startup
371 ----------------------------------------------------
373 I get tons of translation table syntax error messages during startup.
374 How do I get rid of them?
376 There are two causes of this problem. The first usually only strikes
377 people using the prebuilt binaries. The culprit in both cases is the
380 * The binary cannot find the `XKeysymDB' file. The location is
381 hardcoded at compile time so if the system the binary was built on
382 puts it a different place than your system does, you have
383 problems. To fix, set the environment variable XKEYSYMDB to the
384 location of the `XKeysymDB' file on your system or to the location
385 of the one included with XEmacs which should be at
386 `<xemacs_root_directory>/lib/xemacs-19.16/etc/XKeysymDB'.
388 * The binary is finding the XKeysymDB but it is out-of-date on your
389 system and does not contain the necessary lines. Either ask your
390 system administrator to replace it with the one which comes with
391 XEmacs (which is the stock R6 version and is backwards compatible)
392 or set your XKEYSYMDB variable to the location of XEmacs's
396 File: xemacs-faq.info, Node: Q2.1.4, Next: Q2.1.5, Prev: Q2.1.3, Up: Installation
398 Q2.1.4: Startup warnings about deducing proper fonts?
399 -----------------------------------------------------
401 How can I avoid the startup warnings about deducing proper fonts?
403 This is highly dependent on your installation, but try with the
404 following font as your base font for XEmacs and see what it does:
406 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
408 More precisely, do the following in your resource file:
410 Emacs.default.attributeFont: \
411 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
413 If you just don't want to see the `*Warnings*' buffer at startup
414 time, you can set this:
416 (setq display-warning-minimum-level 'error)
418 The buffer still exists; it just isn't in your face.
421 File: xemacs-faq.info, Node: Q2.1.5, Next: Q2.1.6, Prev: Q2.1.4, Up: Installation
423 Q2.1.5: XEmacs cannot connect to my X Terminal!
424 -----------------------------------------------
426 Help! I can not get XEmacs to display on my Envizex X-terminal!
428 Try setting the DISPLAY variable using the numeric IP address of the
429 host you are running XEmacs from.
432 File: xemacs-faq.info, Node: Q2.1.6, Next: Q2.1.7, Prev: Q2.1.5, Up: Installation
434 Q2.1.6: XEmacs just locked up my Linux X server!
435 ------------------------------------------------
437 There have been several reports of the X server locking up under
438 Linux. In all reported cases removing speedo and scaled fonts from the
439 font path corrected the problem. This can be done with the command
442 It is possible that using a font server may also solve the problem.
445 File: xemacs-faq.info, Node: Q2.1.7, Next: Q2.1.8, Prev: Q2.1.6, Up: Installation
447 Q2.1.7: HP Alt key as Meta.
448 ---------------------------
450 How can I make XEmacs recognize the Alt key of my HP workstation as a
453 Put the following line into a file and load it with xmodmap(1) before
456 remove Mod1 = Mode_switch
459 File: xemacs-faq.info, Node: Q2.1.8, Next: Q2.1.9, Prev: Q2.1.7, Up: Installation
461 Q2.1.8: got (wrong-type-argument color-instance-p nil)
462 ------------------------------------------------------
464 Natalie Kershaw <nataliek@rd.scitec.com.au> writes:
466 I am trying to run xemacs 19.13 under X11R4. Whenever I move the
467 mouse I get the following error. Has anyone seen anything like
468 this? This doesn't occur on X11R5.
471 (error "got (wrong-type-argument color-instance-p nil)
472 and I don't know why!")
474 dinos <map01kd@gold.ac.uk> writes:
476 I think this is due to undefined resources; You need to define
477 color backgrounds and foregrounds into your
478 `.../app-defaults/Emacs' like:
480 *Foreground: Black ;everything will be of black on grey95,
481 *Background: Grey95 ;unless otherwise specified.
482 *cursorColor: Red3 ;red3 cursor with grey95 border.
483 *pointerColor: Red3 ;red3 pointer with grey95 border.
485 Natalie Kershaw adds:
487 What fixed the problem was adding some more colors to the X color
488 database (copying the X11R5 colors over), and also defining the
491 xemacs*cursorColor: black
492 xemacs*pointerColor: black
494 With the new colors installed the problem still occurs if the above
495 resources are not defined.
497 If the new colors are not present then an additional error occurs
498 on XEmacs startup, which says `Color Red3' not defined.
501 File: xemacs-faq.info, Node: Q2.1.9, Next: Q2.1.10, Prev: Q2.1.8, Up: Installation
503 Q2.1.9: XEmacs causes my OpenWindows 3.0 server to crash.
504 ---------------------------------------------------------
506 The OpenWindows 3.0 server is incredibly buggy. Your best bet is to
507 replace it with one from the generic MIT X11 release. You might also
508 try disabling parts of your `.emacs', like enabling background pixmaps.
511 File: xemacs-faq.info, Node: Q2.1.10, Next: Q2.1.11, Prev: Q2.1.9, Up: Installation
513 Q2.1.10: Warnings from incorrect key modifiers.
514 -----------------------------------------------
516 The following information comes from the `PROBLEMS' file that comes
519 If you're having troubles with HP/UX it is because HP/UX defines the
520 modifiers wrong in X. Here is a shell script to fix the problem; be
521 sure that it is run after VUE configures the X server.
524 xmodmap 2> /dev/null - << EOF
525 keysym Alt_L = Meta_L
526 keysym Alt_R = Meta_R
531 keysym Mode_switch = NoSymbol
533 keysym Meta_R = Mode_switch
534 add mod2 = Mode_switch
538 File: xemacs-faq.info, Node: Q2.1.11, Next: Q2.1.12, Prev: Q2.1.10, Up: Installation
540 Q2.1.11: `Can't instantiate image error...' in toolbar
541 ------------------------------------------------------
543 Dr. Ram Samudrala <expt@alanine.ram.org> writes:
545 I just installed the XEmacs (20.4-2) RPMS that I downloaded from
546 `http://www.xemacs.org/'. Everything works fine, except that when I
547 place my mouse over the toolbar, it beeps and gives me this message:
549 Can't instantiate image (probably cached):
550 [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
551 (16 16 <strange control characters> ...
553 Kyle Jones <kyle_jones@wonderworks.com> writes:
554 This is problem specific to some Chips and Technologies video
555 chips, when running XFree86. Putting
559 in `XF86Config' gets rid of the problem.
562 File: xemacs-faq.info, Node: Q2.1.12, Next: Q2.1.13, Prev: Q2.1.11, Up: Installation
564 Q2.1.12: Problems with Regular Expressions on DEC OSF1.
565 -------------------------------------------------------
567 I have xemacs 19.13 running on an alpha running OSF1 V3.2 148 and
568 ispell would not run because it claimed the version number was incorrect
569 although it was indeed OK. I traced the problem to the regular
572 Douglas Kosovic <douglask@dstc.edu.au> writes:
574 Actually it's a DEC cc optimization bug that screws up the regexp
577 Rebuilding using the `-migrate' switch for DEC cc (which uses a
578 different sort of optimization) works fine.
580 See `xemacs-19_13-dunix-3_2c.patch' at the following URL on how to
581 build with the `-migrate' flag:
583 `http://www-digital.cern.ch/carney/emacs/emacs.html'
585 NOTE: There have been a variety of other problems reported that are
586 fixed in this fashion.
589 File: xemacs-faq.info, Node: Q2.1.13, Next: Q2.1.14, Prev: Q2.1.12, Up: Installation
591 Q2.1.13: HP/UX 10.10 and `create_process' failure.
592 --------------------------------------------------
594 Dave Carrigan <Dave.Carrigan@ipl.ca> writes:
596 With XEmacs 19.13 and HP/UX 10.10, anything that relies on the
597 `create_process' function fails. This breaks a lot of things
598 (shell-mode, compile, ange-ftp, to name a few).
600 Phil Johnson <johnson@dtc.hp.com> writes:
602 This is a problem specific to HP-UX 10.10. It only occurs when
603 XEmacs is compiled for shared libraries (the default), so you can
604 work around it by compiling a statically-linked binary (run
605 configure with `--dynamic=no').
607 I'm not sure whether the problem is with a particular shared
608 library or if it's a kernel problem which crept into 10.10.
610 Richard Cognot <cognot@ensg.u-nancy.fr> writes:
612 I had a few problems with 10.10. Apparently, some of them were
613 solved by forcing a static link of libc (manually).
616 File: xemacs-faq.info, Node: Q2.1.14, Next: Q2.1.15, Prev: Q2.1.13, Up: Installation
618 Q2.1.14: `C-g' doesn't work for me. Is it broken?
619 --------------------------------------------------
621 Ben Wing <ben@xemacs.org> writes:
623 `C-g' does work for most people in most circumstances. If it
624 doesn't, there are only two explanations:
626 1. The code is wrapped with a binding of `inhibit-quit' to `t'.
627 `Ctrl-Shift-G' should still work, I think.
629 2. SIGIO is broken on your system, but BROKEN_SIGIO isn't
632 To test #2, try executing `(while t)' from the `*scratch*' buffer.
633 If `C-g' doesn't interrupt, then you're seeing #2.
635 Morten Welinder <terra@diku.dk> writes:
637 On some (but _not_ all) machines a hung XEmacs can be revived by
638 `kill -FPE <pid>'. This is a hack, of course, not a solution.
639 This technique works on a Sun4 running 4.1.3_U1. To see if it
640 works for you, start another XEmacs and test with that first. If
641 you get a core dump the method doesn't work and if you get
642 `Arithmetic error' then it does.
645 File: xemacs-faq.info, Node: Q2.1.15, Next: Q2.1.16, Prev: Q2.1.14, Up: Installation
647 Q2.1.15: How to Debug an XEmacs problem with a debugger
648 -------------------------------------------------------
650 If XEmacs does crash on you, one of the most productive things you
651 can do to help get the bug fixed is to poke around a bit with the
652 debugger. Here are some hints:
654 * First of all, if the crash is at all reproducible, consider very
655 strongly recompiling your XEmacs with debugging symbols, with no
656 optimization, and with the configure options `--debug=yes' and
657 `--error-checking=all'. This will make your XEmacs run somewhat
658 slower but make it a lot more likely to catch the problem earlier
659 (closer to its source), and a lot easier to determine what's going
662 * If you're able to run XEmacs under a debugger and reproduce the
663 crash (if it's inconvenient to do this because XEmacs is already
664 running or is running in batch mode as part of a bunch of scripts,
665 consider attaching to the existing process with your debugger;
666 most debuggers let you do this by substituting the process ID for
667 the core file when you invoke the debugger from the command line,
668 or by using the `attach' command or something similar), here are
669 some things you can do:
671 * If XEmacs is hitting an assertion failure, put a breakpoint on
674 * If XEmacs is hitting some weird Lisp error that's causing it to
675 crash (e.g. during startup), put a breakpoint on
676 `signal_1()'--this is declared static in eval.c.
678 * Internally, you will probably see lots of variables that hold
679 objects of type `Lisp_Object'. These are exactly what they appear
680 to be, i.e. references to Lisp objects. Printing them out with
681 the debugger probably won't be too useful--you'll likely just see
682 a number. To decode them, do this:
684 call debug_print (OBJECT)
686 where OBJECT is whatever you want to decode (it can be a variable,
687 a function call, etc.). This will print out a readable
688 representation on the TTY from which the xemacs process was
691 * If you want to get a Lisp backtrace showing the Lisp call stack,
694 call debug_backtrace ()
696 * Using `debug_print' and `debug_backtrace' has two disadvantages -
697 it can only be used with a running xemacs process, and it cannot
698 display the internal C structure of a Lisp Object. Even if all
699 you've got is a core dump, all is not lost.
701 If you're using GDB, there are some macros in the file
702 `src/.gdbinit' in the XEmacs source distribution that should make
703 it easier for you to decode Lisp objects. This file is
704 automatically read by gdb if gdb is run in the directory where
705 xemacs was built, and contains these useful macros to inspect the
709 Usage: pobj lisp_object
710 Print the internal C representation of a lisp object.
713 Usage: xtype lisp_object
714 Print the Lisp type of a lisp object.
718 Print the current Lisp stack trace. Requires a running
722 Usage: ldp lisp_object
723 Print a Lisp Object value using the Lisp printer. Requires a
724 running xemacs process.
728 Run temacs interactively, like xemacs. Use this with
729 debugging tools (like purify) that cannot deal with dumping,
730 or when temacs builds successfully, but xemacs does not.
734 Run the dumping part of the build procedure. Use when
735 debugging temacs, not xemacs! Use this when temacs builds
736 successfully, but xemacs does not.
740 Run the test suite. Equivalent to 'make check'.
744 Run the test suite on temacs. Equivalent to 'make
745 check-temacs'. Use this with debugging tools (like purify)
746 that cannot deal with dumping, or when temacs builds
747 successfully, but xemacs does not.
749 If you are using Sun's `dbx' debugger, there is an equivalent file
750 `src/.dbxrc', which defines the same commands for dbx.
752 * If you're using a debugger to get a C stack backtrace and you're
753 seeing stack traces with some of the innermost frames mangled, it
754 may be due to dynamic linking. (This happens especially under
755 Linux.) Consider reconfiguring with `--dynamic=no'. Also,
756 sometimes (again under Linux), stack backtraces of core dumps will
757 have the frame where the fatal signal occurred mangled; if you can
758 obtain a stack trace while running the XEmacs process under a
759 debugger, the stack trace should be clean.
761 Curtiss <1CMC3466@ibm.mtsac.edu> suggests upgrading to ld.so
762 version 1.8 if dynamic linking and debugging is a problem on Linux.
764 * If you're using a debugger to get a C stack backtrace and you're
765 getting a completely mangled and bogus stack trace, it's probably
766 due to one of the following:
768 a. Your executable has been stripped. Bad news. Tell your
769 sysadmin not to do this--it doesn't accomplish anything
770 except to save a bit of disk space, and makes debugging much
773 b. Your stack is getting trashed. Debugging this is hard; you
774 have to do a binary-search type of narrowing down where the
775 crash occurs, until you figure out exactly which line is
776 causing the problem. Of course, this only works if the bug
777 is highly reproducible.
779 c. If your stack trace has exactly one frame in it, with address
780 0x0, this could simply mean that XEmacs attempted to execute
781 code at that address, e.g. through jumping to a null function
782 pointer. Unfortunately, under those circumstances, GDB under
783 Linux doesn't know how to get a stack trace. (Yes, this is
784 the third Linux-related problem I've mentioned. I have no
785 idea why GDB under Linux is so bogus. Complain to the GDB
786 authors, or to comp.os.linux.development.system). Again,
787 you'll have to use the narrowing-down process described above.
789 d. If you compiled 19.14 with `--debug' (or by default in later
790 versions), you will get a Lisp backtrace output when XEmacs
791 crashes, so you'll have something useful.
794 * If you compile with the newer gcc variants gcc-2.8 or egcs, you
795 will also need gdb 4.17 or above. Earlier releases of gdb can't
796 handle the debug information generated by the newer compilers.
798 * In versions of XEmacs before 21.2.27, `src/.gdbinit' was named
799 `src/gdbinit'. This had the disadvantage of not being sourced
800 automatically by gdb, so you had to set that up yourself.
804 File: xemacs-faq.info, Node: Q2.1.16, Next: Q2.1.17, Prev: Q2.1.15, Up: Installation
806 Q2.1.16: XEmacs crashes in `strcat' on HP/UX 10
807 -----------------------------------------------
809 From the problems database (through the former address
810 http://support.mayfield.hp.com/):
812 Problem Report: 5003302299
815 System/Model: 9000/700
816 Product Name: HPUX S800 10.0X
817 Product Vers: 9245XB.10.00
819 Description: strcat(3C) may read beyond
820 end of source string, can cause SIGSEGV
824 strcat(3C) may read beyond the source string onto an unmapped page,
825 causing a segmentation violation.
828 File: xemacs-faq.info, Node: Q2.1.17, Next: Q2.1.18, Prev: Q2.1.16, Up: Installation
830 Q2.1.17: `Marker does not point anywhere'
831 -----------------------------------------
833 As with other errors, set `debug-on-error' to `t' to get the
834 backtrace when the error occurs. Specifically, two problems have been
835 reported (and fixed).
837 1. A problem with line-number-mode in XEmacs 19.14 affected a large
838 number of other packages. If you see this error message, turn off
841 2. A problem with some early versions of Gnus 5.4 caused this error.
845 File: xemacs-faq.info, Node: Q2.1.18, Next: Q2.1.19, Prev: Q2.1.17, Up: Installation
851 File: xemacs-faq.info, Node: Q2.1.19, Next: Q2.1.20, Prev: Q2.1.18, Up: Installation
853 Q2.1.19: XEmacs does not follow the local timezone.
854 ---------------------------------------------------
856 When using one of the prebuilt binaries many users have observed that
857 XEmacs uses the timezone under which it was built, but not the timezone
858 under which it is running. The solution is to add:
860 (set-time-zone-rule "MET")
862 to your `.emacs' or the `site-start.el' file if you can. Replace
863 `MET' with your local timezone.
866 File: xemacs-faq.info, Node: Q2.1.20, Next: Q2.1.21, Prev: Q2.1.19, Up: Installation
868 Q2.1.20: `Symbol's function definition is void: hkey-help-show.'
869 ----------------------------------------------------------------
871 This is a problem with a partially loaded hyperbole. Try adding:
873 (require 'hmouse-drv)
875 where you load hyperbole and the problem should go away.
878 File: xemacs-faq.info, Node: Q2.1.21, Next: Q2.1.22, Prev: Q2.1.20, Up: Installation
880 Q2.1.21: [This question intentionally left blank]
881 -------------------------------------------------
884 File: xemacs-faq.info, Node: Q2.1.22, Next: Q2.1.23, Prev: Q2.1.21, Up: Installation
886 Q2.1.22: XEmacs seems to take a really long time to do some things
887 ------------------------------------------------------------------
889 David Moore <dmoore@ucsd.edu> writes:
891 Two things you can do:
895 When you see it going mad like this, you might want to use gdb
896 from an 'xterm' to attach to the running process and get a stack
897 trace. To do this just run:
899 gdb /path/to/xemacs/xemacs ####
901 Where `####' is the process id of your xemacs, instead of
902 specifying the core. When gdb attaches, the xemacs will stop [1]
903 and you can type `where' in gdb to get a stack trace as usual. To
904 get things moving again, you can just type `quit' in gdb. It'll
905 tell you the program is running and ask if you want to quit
906 anyways. Say 'y' and it'll quit and have your emacs continue from
911 Turn on debug-on-quit early on. When you think things are going
912 slow hit C-g and it may pop you in the debugger so you can see
913 what routine is running. Press `c' to get going again.
915 debug-on-quit doesn't work if something's turned on inhibit-quit
916 or in some other strange cases.
919 File: xemacs-faq.info, Node: Q2.1.23, Next: Q2.1.24, Prev: Q2.1.22, Up: Installation
921 Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later.
922 ---------------------------------------------------------------------
924 Movemail used to work fine in 19.14 but has stopped working in 19.15
925 and 20.x. I am using Linux.
927 SL Baur <steve@xemacs.org> writes:
929 Movemail on Linux used to default to using flock file locking.
930 With 19.15 and later versions it now defaults to using `.lock' file
931 locking. If this is not appropriate for your system, edit
932 src/s/linux.h and uncomment the line that reads:
934 #define MAIL_USE_FLOCK
937 File: xemacs-faq.info, Node: Q2.1.24, Next: Q2.1.25, Prev: Q2.1.23, Up: Installation
939 Q2.1.24: XEmacs won't start without network. (NEW)
940 ---------------------------------------------------
942 If XEmacs starts when you're on the network, but fails when you're
943 not on the network, you may be missing a "localhost" entry in your
944 `/etc/hosts' file. The file should contain an entry like:
948 Add that line, and XEmacs will be happy.
951 File: xemacs-faq.info, Node: Q2.1.25, Prev: Q2.1.24, Up: Installation
953 Q2.1.25:: After upgrading, XEmacs won't do `foo' any more! (NEW)
954 -----------------------------------------------------------------
956 You have been used to doing `foo', but now when you invoke it (or
957 click the toolbar button or select the menu item), nothing (or an error)
958 happens. The simplest explanation is that you are missing a package
959 that is essential to you. You can either track it down and install it
960 (there is a list of packages and brief descriptions of their contents in
961 `etc/PACKAGES'), or install the `Sumo Tarball' (see *note Q2.0.14::).
964 File: xemacs-faq.info, Node: Customization, Next: Subsystems, Prev: Installation, Up: Top
966 3 Customization and Options
967 ***************************
969 This is part 3 of the XEmacs Frequently Asked Questions list. This
970 section is devoted to Customization and screen settings.
974 Customization---Emacs Lisp and `.emacs':
975 * Q3.0.1:: What version of Emacs am I running?
976 * Q3.0.2:: How do I evaluate Elisp expressions?
977 * Q3.0.3:: `(setq tab-width 6)' behaves oddly.
978 * Q3.0.4:: How can I add directories to the `load-path'?
979 * Q3.0.5:: How to check if a lisp function is defined?
980 * Q3.0.6:: Can I force the output of `(face-list)' to a buffer?
981 * Q3.0.7:: Font selections don't get saved after `Save Options'.
982 * Q3.0.8:: How do I make a single minibuffer frame?
983 * Q3.0.9:: What is `Customize'?
985 X Window System & Resources:
986 * Q3.1.1:: Where is a list of X resources?
987 * Q3.1.2:: How can I detect a color display?
988 * Q3.1.3:: [This question intentionally left blank]
989 * Q3.1.4:: [This question intentionally left blank]
990 * Q3.1.5:: How can I get the icon to just say `XEmacs'?
991 * Q3.1.6:: How can I have the window title area display the full path?
992 * Q3.1.7:: `xemacs -name junk' doesn't work?
993 * Q3.1.8:: `-iconic' doesn't work.
995 Textual Fonts & Colors:
996 * Q3.2.1:: How can I set color options from `.emacs'?
997 * Q3.2.2:: How do I set the text, menu and modeline fonts?
998 * Q3.2.3:: How can I set the colors when highlighting a region?
999 * Q3.2.4:: How can I limit color map usage?
1000 * Q3.2.5:: My tty supports color, but XEmacs doesn't use them.
1001 * Q3.2.6:: Can I have pixmap backgrounds in XEmacs?
1004 * Q3.3.1:: How can I make the modeline go away?
1005 * Q3.3.2:: How do you have XEmacs display the line number in the modeline?
1006 * Q3.3.3:: How do I get XEmacs to put the time of day on the modeline?
1007 * Q3.3.4:: How do I turn off current chapter from AUC TeX modeline?
1008 * Q3.3.5:: How can one change the modeline color based on the mode used?
1010 3.4 Multiple Device Support:
1011 * Q3.4.1:: How do I open a frame on another screen of my multi-headed display?
1012 * Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
1015 * Q3.5.1:: How can I bind complex functions (or macros) to keys?
1016 * Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
1017 * Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down?
1018 * Q3.5.4:: Globally binding Delete?
1019 * Q3.5.5:: Scrolling one line at a time.
1020 * Q3.5.6:: How to map Help key alone on Sun type4 keyboard?
1021 * Q3.5.7:: How can you type in special characters in XEmacs?
1022 * Q3.5.8:: Why does `(global-set-key [delete-forward] 'delete-char)' complain?
1023 * Q3.5.9:: How do I make the Delete key delete forward?
1024 * Q3.5.10:: Can I turn on "sticky" modifier keys?
1025 * Q3.5.11:: How do I map the arrow keys?
1028 * Q3.6.1:: Is there a way to make the bar cursor thicker?
1029 * 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?
1030 * Q3.6.3:: Can I make the cursor blink?
1032 The Mouse and Highlighting:
1033 * Q3.7.1:: How can I turn off Mouse pasting?
1034 * Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons?
1035 * Q3.7.3:: Clicking the left button does not do anything in buffer list.
1036 * Q3.7.4:: How can I get a list of buffers when I hit mouse button 3?
1037 * Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool?
1038 * Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is?
1039 * Q3.7.7:: How do I select a rectangular region?
1040 * Q3.7.8:: Why does M-w take so long?
1042 The Menubar and Toolbar:
1043 * Q3.8.1:: How do I get rid of the menu (or menubar)?
1044 * Q3.8.2:: Can I customize the basic menubar?
1045 * Q3.8.3:: How do I control how many buffers are listed in the menu `Buffers' list?
1046 * Q3.8.4:: Resources like `Emacs*menubar*font' are not working?
1047 * Q3.8.5:: How can I bind a key to a function to toggle the toolbar?
1050 * Q3.9.1:: How can I disable the scrollbar?
1051 * Q3.9.2:: How can one use resources to change scrollbar colors?
1052 * Q3.9.3:: Moving the scrollbar can move the point; can I disable this?
1053 * Q3.9.4:: How can I get automatic horizontal scrolling?
1056 * Q3.10.1:: How can I turn off or change highlighted selections?
1057 * Q3.10.2:: How do I get that typing on an active region removes it?
1058 * Q3.10.3:: Can I turn off the highlight during isearch?
1059 * Q3.10.4:: How do I turn off highlighting after C-x C-p (mark-page)?
1060 * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.
1063 File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Customization, Up: Customization
1065 3.0: Customization - Emacs Lisp and .emacs
1066 ==========================================
1068 Q3.0.1: What version of Emacs am I running?
1069 -------------------------------------------
1071 How can `.emacs' determine which of the family of Emacsen I am using?
1073 To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
1074 XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
1075 example given in `etc/sample.emacs'. There are other nifty things in
1078 For all new code, all you really need to do is:
1080 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
1083 File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Customization
1085 Q3.0.2: How can I evaluate Emacs-Lisp expressions?
1086 --------------------------------------------------
1088 I know I can evaluate Elisp expressions from `*scratch*' buffer with
1089 `C-j' after the expression. How do I do it from another buffer?
1091 Press `M-:' (the default binding of `eval-expression'), and enter
1092 the expression to the minibuffer. In XEmacs prior to 19.15
1093 `eval-expression' used to be a disabled command by default. If this is
1094 the case, upgrade your XEmacs.
1097 File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Customization
1099 Q3.0.3: `(setq tab-width 6)' behaves oddly.
1100 -------------------------------------------
1102 If you put `(setq tab-width 6)' in your `.emacs' file it does not
1103 work! Is there a reason for this? If you do it at the EVAL prompt it
1104 works fine!! How strange.
1106 Use `setq-default' instead, since `tab-width' is all-buffer-local.
1109 File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization
1111 Q3.0.4: How can I add directories to the `load-path'?
1112 -----------------------------------------------------
1114 Here are two ways to do that, one that puts your directories at the
1115 front of the load-path, the other at the end:
1117 ;;; Add things at the beginning of the load-path, do not add
1118 ;;; duplicate directories:
1119 (pushnew "bar" load-path :test 'equal)
1121 (pushnew "foo" load-path :test 'equal)
1123 ;;; Add things at the end, unconditionally
1124 (setq load-path (nconc load-path '("foo" "bar")))
1126 keith (k.p.) hanlan <keithh@nortel.ca> writes:
1128 To add directories using Unix shell metacharacters use
1129 `expand-file-name' like this:
1131 (push (expand-file-name "~keithh/.emacsdir") load-path)
1134 File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization
1136 Q3.0.5: How to check if a lisp function is defined?
1137 ---------------------------------------------------
1139 Use the following elisp:
1143 It's almost always a mistake to test `emacs-version' or any similar
1146 Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
1147 or even simple behavioral tests, eg.:
1149 (defvar foo-old-losing-code-p
1150 (condition-case nil (progn (losing-code t) nil)
1151 (wrong-number-of-arguments t)))
1153 There is an incredible amount of broken code out there which could
1154 work much better more often in more places if it did the above instead
1155 of trying to divine its environment from the value of one variable.
1158 File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Customization
1160 Q3.0.6: Can I force the output of `(face-list)' to a buffer?
1161 ------------------------------------------------------------
1163 It would be good having it in a buffer, as the output of
1164 `(face-list)' is too wide to fit to a minibuffer.
1166 Evaluate the expression in the `*scratch*' buffer with point after
1167 the rightmost paren and typing `C-j'.
1169 If the minibuffer smallness is the only problem you encounter, you
1170 can simply press `C-h l' to get the former minibuffer contents in a
1174 File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Customization
1176 Q3.0.7: Font selections in don't get saved after `Save Options'.
1177 ----------------------------------------------------------------
1179 For XEmacs 19.14 and previous:
1181 John Mann <mannj@ll.mit.edu> writes:
1183 You have to go to Options->Frame Appearance and unselect
1184 `Frame-Local Font Menu'. If this option is selected, font changes
1185 are only applied to the _current_ frame and do _not_ get saved
1186 when you save options.
1188 For XEmacs 19.15 and later:
1190 Implement the above as well as set the following in your `.emacs'
1192 (setq options-save-faces t)
1195 File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Customization
1197 Q3.0.8: How do I get a single minibuffer frame?
1198 -----------------------------------------------
1200 Vin Shelton <acs@acm.org> writes:
1202 (setq initial-frame-plist '(minibuffer nil))
1203 (setq default-frame-plist '(minibuffer nil))
1204 (setq default-minibuffer-frame
1209 menubar-visible-p nil
1210 default-toolbar-visible-p nil
1214 has-modeline-p nil)))
1215 (frame-notice-user-settings)
1217 *Please note:* The single minibuffer frame may not be to everyone's
1218 taste, and there any number of other XEmacs options settings that may
1219 make it difficult or inconvenient to use.
1222 File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.1.1, Prev: Q3.0.8, Up: Customization
1224 Q3.0.9: What is `Customize'?
1225 ----------------------------
1227 Starting with XEmacs 20.2 there is new system 'Customize' for
1228 customizing XEmacs options.
1230 You can access `Customize' from the `Options' menu or invoking one
1231 of customize commands by typing eg. `M-x customize', `M-x
1232 customize-face', `M-x customize-variable' or `M-x customize-apropos'.
1234 Starting with XEmacs 20.3 there is also new `browser' mode for
1235 Customize. Try it out with `M-x customize-browse'
1238 File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.9, Up: Customization
1240 3.1: X Window System & Resources
1241 ================================
1243 Q3.1.1: Where is a list of X resources?
1244 ---------------------------------------
1246 Search through the `NEWS' file for `X Resources'. A fairly
1247 comprehensive list is given after it.
1249 In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
1250 listing the defaults. The file `etc/sample.Xdefaults' gives a set of
1251 defaults that you might consider. It is essentially the same as
1252 `etc/Emacs.ad' but some entries are slightly altered. Be careful about
1253 installing the contents of this file into your `.Xdefaults' or
1254 `.Xresources' file if you use GNU Emacs under X11 as well.
1257 File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Customization
1259 Q3.1.2: How can I detect a color display?
1260 -----------------------------------------
1262 You can test the return value of the function `(device-class)', as
1265 (when (eq (device-class) 'color)
1266 (set-face-foreground 'font-lock-comment-face "Grey")
1267 (set-face-foreground 'font-lock-string-face "Red")
1272 File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization
1274 Q3.1.3: [This question intentionally left blank]
1275 ------------------------------------------------
1278 File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization
1280 Q3.1.4: [This question intentionally left blank]
1281 ------------------------------------------------
1284 File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.1.6, Prev: Q3.1.4, Up: Customization
1286 Q3.1.5: How can I get the icon to just say `XEmacs'?
1287 ----------------------------------------------------
1289 I'd like the icon to just say `XEmacs', and not include the name of
1290 the current file in it.
1292 Add the following line to your `.emacs':
1294 (setq frame-icon-title-format "XEmacs")
1297 File: xemacs-faq.info, Node: Q3.1.6, Next: Q3.1.7, Prev: Q3.1.5, Up: Customization
1299 Q3.1.6: How can I have the window title area display the full path?
1300 -------------------------------------------------------------------
1302 I'd like to have the window title area display the full
1303 directory/name of the current buffer file and not just the name.
1305 Add the following line to your `.emacs':
1307 (setq frame-title-format "%S: %f")
1309 A more sophisticated title might be:
1311 (setq frame-title-format
1312 '("%S: " (buffer-file-name "%f"
1313 (dired-directory dired-directory "%b"))))
1315 That is, use the file name, or the dired-directory, or the buffer