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.5, Next: Q2.0.6, Prev: Q2.0.4, Up: Installation
12 Q2.0.5: Do I need X11 to run XEmacs?
13 ------------------------------------
15 No. The name "XEmacs" is unfortunate in the sense that it is *not*
16 an X Window System-only version of Emacs. XEmacs has full color
17 support on a color-capable character terminal.
20 File: xemacs-faq.info, Node: Q2.0.6, Next: Q2.0.7, Prev: Q2.0.5, Up: Installation
22 Q2.0.6: I'm having strange crashes. What do I do?
23 --------------------------------------------------
25 There have been a variety of reports of crashes due to compilers with
26 buggy optimizers. Please see the `PROBLEMS' file that comes with
27 XEmacs to read what it says about your platform.
30 File: xemacs-faq.info, Node: Q2.0.7, Next: Q2.0.8, Prev: Q2.0.6, Up: Installation
32 Q2.0.7: Libraries in non-standard locations
33 -------------------------------------------
35 I have x-faces, jpeg, xpm etc. all in different places. I've tried
36 space-separated, comma-separated, several -site-libraries, all to no
39 --site-libraries='/path/one /path/two /path/etc'
42 File: xemacs-faq.info, Node: Q2.0.8, Next: Q2.0.9, Prev: Q2.0.7, Up: Installation
44 Q2.0.8: can't resolve symbol _h_errno
45 -------------------------------------
47 You are using the Linux/ELF distribution of XEmacs 19.14, and your
48 ELF libraries are out of date. You have the following options:
50 1. Upgrade your libc to at least 5.2.16 (better is 5.2.18, 5.3.12, or
53 2. Patch the XEmacs binary by replacing all occurrences of
54 `_h_errno^@' with `h_errno^@^@'. Any version of Emacs will
55 suffice. If you don't understand how to do this, don't do it.
57 3. Rebuild XEmacs yourself--any working ELF version of libc should be
60 Hrvoje Niksic <hniksic@xemacs.org> writes:
62 Why not use a Perl one-liner for No. 2?
64 perl -pi -e 's/_h_errno\0/h_errno\0\0/g' \
65 /usr/local/bin/xemacs-19.14
67 NB: You _must_ patch `/usr/local/bin/xemacs-19.14', and not
68 `xemacs' because `xemacs' is a link to `xemacs-19.14'; the Perl
69 `-i' option will cause unwanted side-effects if applied to a
72 SL Baur <steve@xemacs.org> writes:
74 If you build against a recent libc-5.4 (late enough to have caused
75 problems earlier in the beta cycle) and then run with an earlier
76 version of libc, you get a
79 xemacs: can't resolve symbol '__malloc_hook'
80 zsh: 7942 segmentation fault (core dumped) xemacs
82 (Example binary compiled against libc-5.4.23 and run with
85 The solution is to upgrade to at least libc-5.4.23. Sigh. Drat.
88 File: xemacs-faq.info, Node: Q2.0.9, Next: Q2.0.10, Prev: Q2.0.8, Up: Installation
90 Q2.0.9: Where do I find external libraries?
91 -------------------------------------------
93 All external libraries used by XEmacs can be found at the XEmacs FTP
94 site `ftp://ftp.xemacs.org/pub/xemacs/aux/'.
96 The canonical locations (at the time of this writing) are as follows:
99 `ftp://ftp.uu.net/graphics/jpeg/'. Version 6a is current.
102 `ftp://ftp.x.org/contrib/libraries/'. Version 3.4j is current.
103 Older versions of this package are known to cause XEmacs crashes.
106 `ftp://ftp.sgi.com/graphics/tiff/'. v3.4 is current. The latest
107 beta is v3.4b035. There is a HOWTO here.
110 `ftp://ftp.uu.net/graphics/png/'. 0.89c is current. XEmacs
111 requires a fairly recent version to avoid using temporary files.
113 `ftp://swrinde.nde.swri.edu/pub/png/src/'
116 `ftp://ftp.cs.indiana.edu/pub/faces/compface/'. This library has
117 been frozen for about 6 years, and is distributed without version
118 numbers. _It should be compiled with the same options that X11 was
119 compiled with on your system_. The version of this library at
120 XEmacs.org includes the `xbm2xface.pl' script, written by
121 <stig@hackvan.com>, which may be useful when generating your own
125 `ftp://ftp.x.org/contrib/audio/nas/'. Version 1.2p5 is current.
129 File: xemacs-faq.info, Node: Q2.0.10, Next: Q2.0.11, Prev: Q2.0.9, Up: Installation
131 Q2.0.10: After I run configure I find a core dump, is something wrong?
132 ----------------------------------------------------------------------
134 Not necessarily. If you have GNU sed 3.0 you should downgrade it to
135 2.05. From the `README' at prep.ai.mit.edu:
137 sed 3.0 has been withdrawn from distribution. It has major
138 revisions, which mostly seem to be improvements; but it turns out
139 to have bugs too which cause trouble in some common cases.
141 Tom Lord won't be able to work fixing the bugs until May. So in
142 the mean time, we've decided to withdraw sed 3.0 from distribution
143 and make version 2.05 once again the recommended version.
145 It has also been observed that the vfork test on Solaris will leave a
149 File: xemacs-faq.info, Node: Q2.0.11, Next: Q2.0.12, Prev: Q2.0.10, Up: Installation
151 Q2.0.11: XEmacs doesn't resolve hostnames.
152 ------------------------------------------
154 This is the result of a long-standing problem with SunOS and the fact
155 that stock SunOS systems do not ship with DNS resolver code in libc.
157 Christopher Davis <ckd@loiosh.kei.com> writes:
159 That's correct [The SunOS 4.1.3 precompiled binaries don't do name
160 lookup]. Since Sun figured that everyone used NIS to do name
161 lookups (that DNS thing was apparently only a passing fad,
162 right?), the stock SunOS 4.x systems don't have DNS-based name
165 This is also why Netscape ships two binaries for SunOS 4.1.x.
167 The best solution is to compile it yourself; the configure script
168 will check to see if you've put DNS in the shared libc and will
169 then proceed to link against the DNS resolver library code.
172 File: xemacs-faq.info, Node: Q2.0.12, Next: Q2.1.1, Prev: Q2.0.11, Up: Installation
174 Q2.0.12: Why can't I strip XEmacs?
175 ----------------------------------
177 Richard Cognot <cognot@fronsac.ensg.u-nancy.fr> writes:
179 Because of the way XEmacs (and every other Emacsen, AFAIK) is
180 built. The link gives you a bare-boned emacs (called temacs).
181 temacs is then run, preloading some of the lisp files. The result
182 is then dumped into a new executable, named xemacs, which will
183 contain all of the preloaded lisp functions and data.
185 Now, during the dump itself, the executable (code+data+symbols) is
186 written on disk using a special unexec() function. This function is
187 obviously heavily system dependent. And on some systems, it leads
188 to an executable which, although valid, cannot be stripped without
189 damage. If memory serves, this is especially the case for AIX
190 binaries. On other architecture it might work OK.
192 The Right Way to strip the emacs binary is to strip temacs prior to
193 dumping xemacs. This will always work, although you can do that
194 only if you install from sources (as temacs is `not' part of the
197 Nat Makarevitch <nat@nataa.fr.eu.org> writes:
201 1. [ ./configure; make ]
209 5. cp src/xemacs /usr/local/bin/xemacs
211 6. cp lib-src/DOC-19.16-XEmacs
212 /usr/local/lib/xemacs-19.16/i586-unknown-linuxaout
215 File: xemacs-faq.info, Node: Q2.1.1, Next: Q2.1.2, Prev: Q2.0.12, Up: Installation
217 2.1: Trouble Shooting
218 =====================
220 Q2.1.1: Help! XEmacs just crashed on me!
221 -----------------------------------------
223 First of all, don't panic. Whenever XEmacs crashes, it tries
224 extremely hard to auto-save all of your files before dying. (The main
225 time that this will not happen is if the machine physically lost power
226 or if you killed the XEmacs process using `kill -9'). The next time
227 you try to edit those files, you will be informed that a more recent
228 auto-save file exists. You can use `M-x recover-file' to retrieve the
229 auto-saved version of the file.
231 Starting with 19.14, you may use the command `M-x recover-session'
232 after a crash to pick up where you left off.
234 Now, XEmacs is not perfect, and there may occasionally be times, or
235 particular sequences of actions, that cause it to crash. If you can
236 come up with a reproducible way of doing this (or even if you have a
237 pretty good memory of exactly what you were doing at the time), the
238 maintainers would be very interested in knowing about it. Post a
239 message to comp.emacs.xemacs or send mail to <crashes@xemacs.org>.
240 Please note that the `crashes' address is exclusively for crash reports.
242 If at all possible, include a stack backtrace of the core dump that
243 was produced. This shows where exactly things went wrong, and makes it
244 much easier to diagnose problems. To do this, you need to locate the
245 core file (it's called `core', and is usually sitting in the directory
246 that you started XEmacs from, or your home directory if that other
247 directory was not writable). Then, go to that directory and execute a
250 gdb `which xemacs` core
252 and then issue the command `where' to get the stack backtrace. You
253 might have to use `dbx' or some similar debugger in place of `gdb'. If
254 you don't have any such debugger available, complain to your system
257 It's possible that a core file didn't get produced, in which case
258 you're out of luck. Go complain to your system administrator and tell
259 him not to disable core files by default. Also *Note Q2.1.15::, for
260 tips and techniques for dealing with a debugger.
262 When making a problem report make sure that:
264 1. Report *all* of the information output by XEmacs during the crash.
266 2. You mention what O/S & Hardware you are running XEmacs on.
268 3. What version of XEmacs you are running.
270 4. What build options you are using.
272 5. If the problem is related to graphics, we will also need to know
273 what version of the X Window System you are running, and what
274 window manager you are using.
276 6. If the problem happened on a tty, please include the terminal type.
279 File: xemacs-faq.info, Node: Q2.1.2, Next: Q2.1.3, Prev: Q2.1.1, Up: Installation
281 Q2.1.2: Cryptic Minibuffer messages.
282 ------------------------------------
284 When I try to use some particular option of some particular package,
285 I get a cryptic error in the minibuffer.
287 If you can't figure out what's going on, select Options/General
288 Options/Debug on Error from the Menubar and then try and make the error
289 happen again. This will give you a backtrace that may be enlightening.
290 If not, try reading through this FAQ; if that fails, you could try
291 posting to comp.emacs.xemacs (making sure to include the backtrace) and
292 someone may be able to help. If you can identify which Emacs lisp
293 source file the error is coming from you can get a more detailed stack
294 backtrace by doing the following:
296 1. Visit the .el file in an XEmacs buffer.
298 2. Issue the command `M-x eval-current-buffer'.
300 3. Reproduce the error.
302 Depending on the version of XEmacs, you may either select Edit->Show
303 Messages (19.13 and earlier) or Help->Recent Keystrokes/Messages (19.14
304 and later) from the menubar to see the most recent messages. This
305 command is bound to `C-h l' by default.
308 File: xemacs-faq.info, Node: Q2.1.3, Next: Q2.1.4, Prev: Q2.1.2, Up: Installation
310 Q2.1.3: Translation Table Syntax messages at Startup
311 ----------------------------------------------------
313 I get tons of translation table syntax error messages during startup.
314 How do I get rid of them?
316 There are two causes of this problem. The first usually only strikes
317 people using the prebuilt binaries. The culprit in both cases is the
320 * The binary cannot find the `XKeysymDB' file. The location is
321 hardcoded at compile time so if the system the binary was built on
322 puts it a different place than your system does, you have
323 problems. To fix, set the environment variable XKEYSYMDB to the
324 location of the `XKeysymDB' file on your system or to the location
325 of the one included with XEmacs which should be at
326 `<xemacs_root_directory>/lib/xemacs-19.16/etc/XKeysymDB'.
328 * The binary is finding the XKeysymDB but it is out-of-date on your
329 system and does not contain the necessary lines. Either ask your
330 system administrator to replace it with the one which comes with
331 XEmacs (which is the stock R6 version and is backwards compatible)
332 or set your XKEYSYMDB variable to the location of XEmacs's
336 File: xemacs-faq.info, Node: Q2.1.4, Next: Q2.1.5, Prev: Q2.1.3, Up: Installation
338 Q2.1.4: Startup warnings about deducing proper fonts?
339 -----------------------------------------------------
341 How can I avoid the startup warnings about deducing proper fonts?
343 This is highly dependent on your installation, but try with the
344 following font as your base font for XEmacs and see what it does:
346 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
348 More precisely, do the following in your resource file:
350 Emacs.default.attributeFont: \
351 -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
353 If you just don't want to see the `*Warnings*' buffer at startup
354 time, you can set this:
356 (setq display-warning-minimum-level 'error)
358 The buffer still exists; it just isn't in your face.
361 File: xemacs-faq.info, Node: Q2.1.5, Next: Q2.1.6, Prev: Q2.1.4, Up: Installation
363 Q2.1.5: XEmacs cannot connect to my X Terminal!
364 -----------------------------------------------
366 Help! I can not get XEmacs to display on my Envizex X-terminal!
368 Try setting the DISPLAY variable using the numeric IP address of the
369 host you are running XEmacs from.
372 File: xemacs-faq.info, Node: Q2.1.6, Next: Q2.1.7, Prev: Q2.1.5, Up: Installation
374 Q2.1.6: XEmacs just locked up my Linux X server!
375 ------------------------------------------------
377 There have been several reports of the X server locking up under
378 Linux. In all reported cases removing speedo and scaled fonts from the
379 font path corrected the problem. This can be done with the command
382 It is possible that using a font server may also solve the problem.
385 File: xemacs-faq.info, Node: Q2.1.7, Next: Q2.1.8, Prev: Q2.1.6, Up: Installation
387 Q2.1.7: HP Alt key as Meta.
388 ---------------------------
390 How can I make XEmacs recognize the Alt key of my HP workstation as a
393 Put the following line into a file and load it with xmodmap(1) before
396 remove Mod1 = Mode_switch
399 File: xemacs-faq.info, Node: Q2.1.8, Next: Q2.1.9, Prev: Q2.1.7, Up: Installation
401 Q2.1.8: got (wrong-type-argument color-instance-p nil)
402 ------------------------------------------------------
404 Natalie Kershaw <nataliek@rd.scitec.com.au> writes:
406 I am trying to run xemacs 19.13 under X11R4. Whenever I move the
407 mouse I get the following error. Has anyone seen anything like
408 this? This doesn't occur on X11R5.
411 (error "got (wrong-type-argument color-instance-p nil)
412 and I don't know why!")
414 dinos <map01kd@gold.ac.uk> writes:
416 I think this is due to undefined resources; You need to define
417 color backgrounds and foregrounds into your
418 `.../app-defaults/Emacs' like:
420 *Foreground: Black ;everything will be of black on grey95,
421 *Background: Grey95 ;unless otherwise specified.
422 *cursorColor: Red3 ;red3 cursor with grey95 border.
423 *pointerColor: Red3 ;red3 pointer with grey95 border.
425 Natalie Kershaw adds:
427 What fixed the problem was adding some more colors to the X color
428 database (copying the X11R5 colors over), and also defining the
431 xemacs*cursorColor: black
432 xemacs*pointerColor: black
434 With the new colors installed the problem still occurs if the above
435 resources are not defined.
437 If the new colors are not present then an additional error occurs
438 on XEmacs startup, which says `Color Red3' not defined.
441 File: xemacs-faq.info, Node: Q2.1.9, Next: Q2.1.10, Prev: Q2.1.8, Up: Installation
443 Q2.1.9: XEmacs causes my OpenWindows 3.0 server to crash.
444 ---------------------------------------------------------
446 The OpenWindows 3.0 server is incredibly buggy. Your best bet is to
447 replace it with one from the generic MIT X11 release. You might also
448 try disabling parts of your `.emacs', like enabling background pixmaps.
451 File: xemacs-faq.info, Node: Q2.1.10, Next: Q2.1.11, Prev: Q2.1.9, Up: Installation
453 Q2.1.10: Warnings from incorrect key modifiers.
454 -----------------------------------------------
456 The following information comes from the `PROBLEMS' file that comes
459 If you're having troubles with HP/UX it is because HP/UX defines the
460 modifiers wrong in X. Here is a shell script to fix the problem; be
461 sure that it is run after VUE configures the X server.
464 xmodmap 2> /dev/null - << EOF
465 keysym Alt_L = Meta_L
466 keysym Alt_R = Meta_R
471 keysym Mode_switch = NoSymbol
473 keysym Meta_R = Mode_switch
474 add mod2 = Mode_switch
478 File: xemacs-faq.info, Node: Q2.1.11, Next: Q2.1.12, Prev: Q2.1.10, Up: Installation
480 Q2.1.11: `Can't instantiate image error...' in toolbar
481 ------------------------------------------------------
483 Dr. Ram Samudrala <expt@alanine.ram.org> writes:
485 I just installed the XEmacs (20.4-2) RPMS that I downloaded from
486 `http://www.xemacs.org/'. Everything works fine, except that when I
487 place my mouse over the toolbar, it beeps and gives me this message:
489 Can't instantiate image (probably cached):
490 [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
491 (16 16 <strange control characters> ...
493 Kyle Jones <kyle_jones@wonderworks.com> writes:
494 This is problem specific to some Chips and Technologies video
495 chips, when running XFree86. Putting
499 in `XF86Config' gets rid of the problem.
502 File: xemacs-faq.info, Node: Q2.1.12, Next: Q2.1.13, Prev: Q2.1.11, Up: Installation
504 Q2.1.12: Problems with Regular Expressions on DEC OSF1.
505 -------------------------------------------------------
507 I have xemacs 19.13 running on an alpha running OSF1 V3.2 148 and
508 ispell would not run because it claimed the version number was incorrect
509 although it was indeed OK. I traced the problem to the regular
512 Douglas Kosovic <douglask@dstc.edu.au> writes:
514 Actually it's a DEC cc optimization bug that screws up the regexp
517 Rebuilding using the `-migrate' switch for DEC cc (which uses a
518 different sort of optimization) works fine.
520 See `xemacs-19_13-dunix-3_2c.patch' at the following URL on how to
521 build with the `-migrate' flag:
523 `http://www-digital.cern.ch/carney/emacs/emacs.html'
525 NOTE: There have been a variety of other problems reported that are
526 fixed in this fashion.
529 File: xemacs-faq.info, Node: Q2.1.13, Next: Q2.1.14, Prev: Q2.1.12, Up: Installation
531 Q2.1.13: HP/UX 10.10 and `create_process' failure.
532 --------------------------------------------------
534 Dave Carrigan <Dave.Carrigan@ipl.ca> writes:
536 With XEmacs 19.13 and HP/UX 10.10, anything that relies on the
537 `create_process' function fails. This breaks a lot of things
538 (shell-mode, compile, ange-ftp, to name a few).
540 Phil Johnson <johnson@dtc.hp.com> writes:
542 This is a problem specific to HP-UX 10.10. It only occurs when
543 XEmacs is compiled for shared libraries (the default), so you can
544 work around it by compiling a statically-linked binary (run
545 configure with `--dynamic=no').
547 I'm not sure whether the problem is with a particular shared
548 library or if it's a kernel problem which crept into 10.10.
550 Richard Cognot <cognot@ensg.u-nancy.fr> writes:
552 I had a few problems with 10.10. Apparently, some of them were
553 solved by forcing a static link of libc (manually).
556 File: xemacs-faq.info, Node: Q2.1.14, Next: Q2.1.15, Prev: Q2.1.13, Up: Installation
558 Q2.1.14: `C-g' doesn't work for me. Is it broken?
559 --------------------------------------------------
561 Ben Wing <ben@xemacs.org> writes:
563 `C-g' does work for most people in most circumstances. If it
564 doesn't, there are only two explanations:
566 1. The code is wrapped with a binding of `inhibit-quit' to `t'.
567 `Ctrl-Shift-G' should still work, I think.
569 2. SIGIO is broken on your system, but BROKEN_SIGIO isn't
572 To test #2, try executing `(while t)' from the `*scratch*' buffer.
573 If `C-g' doesn't interrupt, then you're seeing #2.
575 Morten Welinder <terra@diku.dk> writes:
577 On some (but _not_ all) machines a hung XEmacs can be revived by
578 `kill -FPE <pid>'. This is a hack, of course, not a solution.
579 This technique works on a Sun4 running 4.1.3_U1. To see if it
580 works for you, start another XEmacs and test with that first. If
581 you get a core dump the method doesn't work and if you get
582 `Arithmetic error' then it does.
585 File: xemacs-faq.info, Node: Q2.1.15, Next: Q2.1.16, Prev: Q2.1.14, Up: Installation
587 Q2.1.15: How to Debug an XEmacs problem with a debugger
588 -------------------------------------------------------
590 If XEmacs does crash on you, one of the most productive things you
591 can do to help get the bug fixed is to poke around a bit with the
592 debugger. Here are some hints:
594 * First of all, if the crash is at all reproducible, consider very
595 strongly recompiling your XEmacs with debugging symbols, with no
596 optimization, and with the configure options `--debug=yes' and
597 `--error-checking=all'. This will make your XEmacs run somewhat
598 slower but make it a lot more likely to catch the problem earlier
599 (closer to its source), and a lot easier to determine what's going
602 * If you're able to run XEmacs under a debugger and reproduce the
603 crash (if it's inconvenient to do this because XEmacs is already
604 running or is running in batch mode as part of a bunch of scripts,
605 consider attaching to the existing process with your debugger;
606 most debuggers let you do this by substituting the process ID for
607 the core file when you invoke the debugger from the command line,
608 or by using the `attach' command or something similar), here are
609 some things you can do:
611 * If XEmacs is hitting an assertion failure, put a breakpoint on
614 * If XEmacs is hitting some weird Lisp error that's causing it to
615 crash (e.g. during startup), put a breakpoint on
616 `signal_1()'--this is declared static in eval.c.
618 * Internally, you will probably see lots of variables that hold
619 objects of type `Lisp_Object'. These are exactly what they appear
620 to be, i.e. references to Lisp objects. Printing them out with
621 the debugger probably won't be too useful--you'll likely just see
622 a number. To decode them, do this:
624 call debug_print (OBJECT)
626 where OBJECT is whatever you want to decode (it can be a variable,
627 a function call, etc.). This will print out a readable
628 representation on the TTY from which the xemacs process was
631 * If you want to get a Lisp backtrace showing the Lisp call stack,
634 call debug_backtrace ()
636 * Using `debug_print' and `debug_backtrace' has two disadvantages -
637 it can only be used with a running xemacs process, and it cannot
638 display the internal C structure of a Lisp Object. Even if all
639 you've got is a core dump, all is not lost.
641 If you're using GDB, there are some macros in the file
642 `src/.gdbinit' in the XEmacs source distribution that should make
643 it easier for you to decode Lisp objects. This file is
644 automatically read by gdb if gdb is run in the directory where
645 xemacs was built, and contains these useful macros to inspect the
649 Usage: pobj lisp_object
650 Print the internal C representation of a lisp object.
653 Usage: xtype lisp_object
654 Print the Lisp type of a lisp object.
658 Print the current Lisp stack trace. Requires a running
662 Usage: ldp lisp_object
663 Print a Lisp Object value using the Lisp printer. Requires a
664 running xemacs process.
668 Run temacs interactively, like xemacs. Use this with
669 debugging tools (like purify) that cannot deal with dumping,
670 or when temacs builds successfully, but xemacs does not.
674 Run the dumping part of the build procedure. Use when
675 debugging temacs, not xemacs! Use this when temacs builds
676 successfully, but xemacs does not.
680 Run the test suite. Equivalent to 'make check'.
684 Run the test suite on temacs. Equivalent to 'make
685 check-temacs'. Use this with debugging tools (like purify)
686 that cannot deal with dumping, or when temacs builds
687 successfully, but xemacs does not.
689 If you are using Sun's `dbx' debugger, there is an equivalent file
690 `src/.dbxrc', which defines the same commands for dbx.
692 * If you're using a debugger to get a C stack backtrace and you're
693 seeing stack traces with some of the innermost frames mangled, it
694 may be due to dynamic linking. (This happens especially under
695 Linux.) Consider reconfiguring with `--dynamic=no'. Also,
696 sometimes (again under Linux), stack backtraces of core dumps will
697 have the frame where the fatal signal occurred mangled; if you can
698 obtain a stack trace while running the XEmacs process under a
699 debugger, the stack trace should be clean.
701 Curtiss <1CMC3466@ibm.mtsac.edu> suggests upgrading to ld.so
702 version 1.8 if dynamic linking and debugging is a problem on Linux.
704 * If you're using a debugger to get a C stack backtrace and you're
705 getting a completely mangled and bogus stack trace, it's probably
706 due to one of the following:
708 a. Your executable has been stripped. Bad news. Tell your
709 sysadmin not to do this--it doesn't accomplish anything
710 except to save a bit of disk space, and makes debugging much
713 b. Your stack is getting trashed. Debugging this is hard; you
714 have to do a binary-search type of narrowing down where the
715 crash occurs, until you figure out exactly which line is
716 causing the problem. Of course, this only works if the bug
717 is highly reproducible.
719 c. If your stack trace has exactly one frame in it, with address
720 0x0, this could simply mean that XEmacs attempted to execute
721 code at that address, e.g. through jumping to a null function
722 pointer. Unfortunately, under those circumstances, GDB under
723 Linux doesn't know how to get a stack trace. (Yes, this is
724 the third Linux-related problem I've mentioned. I have no
725 idea why GDB under Linux is so bogus. Complain to the GDB
726 authors, or to comp.os.linux.development.system). Again,
727 you'll have to use the narrowing-down process described above.
729 d. If you compiled 19.14 with `--debug' (or by default in later
730 versions), you will get a Lisp backtrace output when XEmacs
731 crashes, so you'll have something useful.
734 * If you compile with the newer gcc variants gcc-2.8 or egcs, you
735 will also need gdb 4.17 or above. Earlier releases of gdb can't
736 handle the debug information generated by the newer compilers.
738 * In versions of XEmacs before 21.2.27, `src/.gdbinit' was named
739 `src/gdbinit'. This had the disadvantage of not being sourced
740 automatically by gdb, so you had to set that up yourself.
744 File: xemacs-faq.info, Node: Q2.1.16, Next: Q2.1.17, Prev: Q2.1.15, Up: Installation
746 Q2.1.16: XEmacs crashes in `strcat' on HP/UX 10
747 -----------------------------------------------
749 From the problems database (through the former address
750 http://support.mayfield.hp.com/):
752 Problem Report: 5003302299
755 System/Model: 9000/700
756 Product Name: HPUX S800 10.0X
757 Product Vers: 9245XB.10.00
759 Description: strcat(3C) may read beyond
760 end of source string, can cause SIGSEGV
764 strcat(3C) may read beyond the source string onto an unmapped page,
765 causing a segmentation violation.
768 File: xemacs-faq.info, Node: Q2.1.17, Next: Q2.1.18, Prev: Q2.1.16, Up: Installation
770 Q2.1.17: `Marker does not point anywhere'
771 -----------------------------------------
773 As with other errors, set `debug-on-error' to `t' to get the
774 backtrace when the error occurs. Specifically, two problems have been
775 reported (and fixed).
777 1. A problem with line-number-mode in XEmacs 19.14 affected a large
778 number of other packages. If you see this error message, turn off
781 2. A problem with some early versions of Gnus 5.4 caused this error.
785 File: xemacs-faq.info, Node: Q2.1.18, Next: Q2.1.19, Prev: Q2.1.17, Up: Installation
791 File: xemacs-faq.info, Node: Q2.1.19, Next: Q2.1.20, Prev: Q2.1.18, Up: Installation
793 Q2.1.19: XEmacs does not follow the local timezone.
794 ---------------------------------------------------
796 When using one of the prebuilt binaries many users have observed that
797 XEmacs uses the timezone under which it was built, but not the timezone
798 under which it is running. The solution is to add:
800 (set-time-zone-rule "MET")
802 to your `.emacs' or the `site-start.el' file if you can. Replace
803 `MET' with your local timezone.
806 File: xemacs-faq.info, Node: Q2.1.20, Next: Q2.1.21, Prev: Q2.1.19, Up: Installation
808 Q2.1.20: `Symbol's function definition is void: hkey-help-show.'
809 ----------------------------------------------------------------
811 This is a problem with a partially loaded hyperbole. Try adding:
813 (require 'hmouse-drv)
815 where you load hyperbole and the problem should go away.
818 File: xemacs-faq.info, Node: Q2.1.21, Next: Q2.1.22, Prev: Q2.1.20, Up: Installation
820 Q2.1.21: [This question intentionally left blank]
821 -------------------------------------------------
824 File: xemacs-faq.info, Node: Q2.1.22, Next: Q2.1.23, Prev: Q2.1.21, Up: Installation
826 Q2.1.22: XEmacs seems to take a really long time to do some things
827 ------------------------------------------------------------------
829 David Moore <dmoore@ucsd.edu> writes:
831 Two things you can do:
835 When you see it going mad like this, you might want to use gdb
836 from an 'xterm' to attach to the running process and get a stack
837 trace. To do this just run:
839 gdb /path/to/xemacs/xemacs ####
841 Where `####' is the process id of your xemacs, instead of
842 specifying the core. When gdb attaches, the xemacs will stop [1]
843 and you can type `where' in gdb to get a stack trace as usual. To
844 get things moving again, you can just type `quit' in gdb. It'll
845 tell you the program is running and ask if you want to quit
846 anyways. Say 'y' and it'll quit and have your emacs continue from
851 Turn on debug-on-quit early on. When you think things are going
852 slow hit C-g and it may pop you in the debugger so you can see
853 what routine is running. Press `c' to get going again.
855 debug-on-quit doesn't work if something's turned on inhibit-quit
856 or in some other strange cases.
859 File: xemacs-faq.info, Node: Q2.1.23, Next: Q2.1.24, Prev: Q2.1.22, Up: Installation
861 Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later.
862 ---------------------------------------------------------------------
864 Movemail used to work fine in 19.14 but has stopped working in 19.15
865 and 20.x. I am using Linux.
867 SL Baur <steve@xemacs.org> writes:
869 Movemail on Linux used to default to using flock file locking.
870 With 19.15 and later versions it now defaults to using `.lock' file
871 locking. If this is not appropriate for your system, edit
872 src/s/linux.h and uncomment the line that reads:
874 #define MAIL_USE_FLOCK
877 File: xemacs-faq.info, Node: Q2.1.24, Prev: Q2.1.23, Up: Installation
879 Q2.1.24: XEmacs won't start without network. (NEW)
880 ---------------------------------------------------
882 If XEmacs starts when you're on the network, but fails when you're
883 not on the network, you may be missing a "localhost" entry in your
884 `/etc/hosts' file. The file should contain an entry like:
888 Add that line, and XEmacs will be happy.
891 File: xemacs-faq.info, Node: Customization, Next: Subsystems, Prev: Installation, Up: Top
893 3 Customization and Options
894 ***************************
896 This is part 3 of the XEmacs Frequently Asked Questions list. This
897 section is devoted to Customization and screen settings.
901 Customization---Emacs Lisp and `.emacs':
902 * Q3.0.1:: What version of Emacs am I running?
903 * Q3.0.2:: How do I evaluate Elisp expressions?
904 * Q3.0.3:: `(setq tab-width 6)' behaves oddly.
905 * Q3.0.4:: How can I add directories to the `load-path'?
906 * Q3.0.5:: How to check if a lisp function is defined?
907 * Q3.0.6:: Can I force the output of `(face-list)' to a buffer?
908 * Q3.0.7:: Font selections don't get saved after `Save Options'.
909 * Q3.0.8:: How do I make a single minibuffer frame?
910 * Q3.0.9:: What is `Customize'?
912 X Window System & Resources:
913 * Q3.1.1:: Where is a list of X resources?
914 * Q3.1.2:: How can I detect a color display?
915 * Q3.1.3:: [This question intentionally left blank]
916 * Q3.1.4:: [This question intentionally left blank]
917 * Q3.1.5:: How can I get the icon to just say `XEmacs'?
918 * Q3.1.6:: How can I have the window title area display the full path?
919 * Q3.1.7:: `xemacs -name junk' doesn't work?
920 * Q3.1.8:: `-iconic' doesn't work.
922 Textual Fonts & Colors:
923 * Q3.2.1:: How can I set color options from `.emacs'?
924 * Q3.2.2:: How do I set the text, menu and modeline fonts?
925 * Q3.2.3:: How can I set the colors when highlighting a region?
926 * Q3.2.4:: How can I limit color map usage?
927 * Q3.2.5:: My tty supports color, but XEmacs doesn't use them.
928 * Q3.2.6:: Can I have pixmap backgrounds in XEmacs?
931 * Q3.3.1:: How can I make the modeline go away?
932 * Q3.3.2:: How do you have XEmacs display the line number in the modeline?
933 * Q3.3.3:: How do I get XEmacs to put the time of day on the modeline?
934 * Q3.3.4:: How do I turn off current chapter from AUC TeX modeline?
935 * Q3.3.5:: How can one change the modeline color based on the mode used?
937 3.4 Multiple Device Support:
938 * Q3.4.1:: How do I open a frame on another screen of my multi-headed display?
939 * Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
942 * Q3.5.1:: How can I bind complex functions (or macros) to keys?
943 * Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers?
944 * Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down?
945 * Q3.5.4:: Globally binding Delete?
946 * Q3.5.5:: Scrolling one line at a time.
947 * Q3.5.6:: How to map Help key alone on Sun type4 keyboard?
948 * Q3.5.7:: How can you type in special characters in XEmacs?
949 * Q3.5.8:: Why does `(global-set-key [delete-forward] 'delete-char)' complain?
950 * Q3.5.9:: How do I make the Delete key delete forward?
951 * Q3.5.10:: Can I turn on "sticky" modifier keys?
952 * Q3.5.11:: How do I map the arrow keys?
955 * Q3.6.1:: Is there a way to make the bar cursor thicker?
956 * 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?
957 * Q3.6.3:: Can I make the cursor blink?
959 The Mouse and Highlighting:
960 * Q3.7.1:: How can I turn off Mouse pasting?
961 * Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons?
962 * Q3.7.3:: Clicking the left button does not do anything in buffer list.
963 * Q3.7.4:: How can I get a list of buffers when I hit mouse button 3?
964 * Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool?
965 * Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is?
966 * Q3.7.7:: How do I select a rectangular region?
967 * Q3.7.8:: Why does M-w take so long?
969 The Menubar and Toolbar:
970 * Q3.8.1:: How do I get rid of the menu (or menubar)?
971 * Q3.8.2:: Can I customize the basic menubar?
972 * Q3.8.3:: How do I control how many buffers are listed in the menu `Buffers' list?
973 * Q3.8.4:: Resources like `Emacs*menubar*font' are not working?
974 * Q3.8.5:: How can I bind a key to a function to toggle the toolbar?
977 * Q3.9.1:: How can I disable the scrollbar?
978 * Q3.9.2:: How can one use resources to change scrollbar colors?
979 * Q3.9.3:: Moving the scrollbar can move the point; can I disable this?
980 * Q3.9.4:: How can I get automatic horizontal scrolling?
983 * Q3.10.1:: How can I turn off or change highlighted selections?
984 * Q3.10.2:: How do I get that typing on an active region removes it?
985 * Q3.10.3:: Can I turn off the highlight during isearch?
986 * Q3.10.4:: How do I turn off highlighting after C-x C-p (mark-page)?
987 * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.
990 File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Customization, Up: Customization
992 3.0: Customization - Emacs Lisp and .emacs
993 ==========================================
995 Q3.0.1: What version of Emacs am I running?
996 -------------------------------------------
998 How can `.emacs' determine which of the family of Emacsen I am using?
1000 To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
1001 XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
1002 example given in `etc/sample.emacs'. There are other nifty things in
1005 For all new code, all you really need to do is:
1007 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
1010 File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Customization
1012 Q3.0.2: How can I evaluate Emacs-Lisp expressions?
1013 --------------------------------------------------
1015 I know I can evaluate Elisp expressions from `*scratch*' buffer with
1016 `C-j' after the expression. How do I do it from another buffer?
1018 Press `M-:' (the default binding of `eval-expression'), and enter
1019 the expression to the minibuffer. In XEmacs prior to 19.15
1020 `eval-expression' used to be a disabled command by default. If this is
1021 the case, upgrade your XEmacs.
1024 File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Customization
1026 Q3.0.3: `(setq tab-width 6)' behaves oddly.
1027 -------------------------------------------
1029 If you put `(setq tab-width 6)' in your `.emacs' file it does not
1030 work! Is there a reason for this? If you do it at the EVAL prompt it
1031 works fine!! How strange.
1033 Use `setq-default' instead, since `tab-width' is all-buffer-local.
1036 File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization
1038 Q3.0.4: How can I add directories to the `load-path'?
1039 -----------------------------------------------------
1041 Here are two ways to do that, one that puts your directories at the
1042 front of the load-path, the other at the end:
1044 ;;; Add things at the beginning of the load-path, do not add
1045 ;;; duplicate directories:
1046 (pushnew "bar" load-path :test 'equal)
1048 (pushnew "foo" load-path :test 'equal)
1050 ;;; Add things at the end, unconditionally
1051 (setq load-path (nconc load-path '("foo" "bar")))
1053 keith (k.p.) hanlan <keithh@nortel.ca> writes:
1055 To add directories using Unix shell metacharacters use
1056 `expand-file-name' like this:
1058 (push (expand-file-name "~keithh/.emacsdir") load-path)
1061 File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization
1063 Q3.0.5: How to check if a lisp function is defined?
1064 ---------------------------------------------------
1066 Use the following elisp:
1070 It's almost always a mistake to test `emacs-version' or any similar
1073 Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
1074 or even simple behavioral tests, eg.:
1076 (defvar foo-old-losing-code-p
1077 (condition-case nil (progn (losing-code t) nil)
1078 (wrong-number-of-arguments t)))
1080 There is an incredible amount of broken code out there which could
1081 work much better more often in more places if it did the above instead
1082 of trying to divine its environment from the value of one variable.
1085 File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Customization
1087 Q3.0.6: Can I force the output of `(face-list)' to a buffer?
1088 ------------------------------------------------------------
1090 It would be good having it in a buffer, as the output of
1091 `(face-list)' is too wide to fit to a minibuffer.
1093 Evaluate the expression in the `*scratch*' buffer with point after
1094 the rightmost paren and typing `C-j'.
1096 If the minibuffer smallness is the only problem you encounter, you
1097 can simply press `C-h l' to get the former minibuffer contents in a
1101 File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Customization
1103 Q3.0.7: Font selections in don't get saved after `Save Options'.
1104 ----------------------------------------------------------------
1106 For XEmacs 19.14 and previous:
1108 John Mann <mannj@ll.mit.edu> writes:
1110 You have to go to Options->Frame Appearance and unselect
1111 `Frame-Local Font Menu'. If this option is selected, font changes
1112 are only applied to the _current_ frame and do _not_ get saved
1113 when you save options.
1115 For XEmacs 19.15 and later:
1117 Implement the above as well as set the following in your `.emacs'
1119 (setq options-save-faces t)
1122 File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Customization
1124 Q3.0.8: How do I get a single minibuffer frame?
1125 -----------------------------------------------
1127 Vin Shelton <acs@acm.org> writes:
1129 (setq initial-frame-plist '(minibuffer nil))
1130 (setq default-frame-plist '(minibuffer nil))
1131 (setq default-minibuffer-frame
1136 menubar-visible-p nil
1137 default-toolbar-visible-p nil
1141 has-modeline-p nil)))
1142 (frame-notice-user-settings)
1144 *Please note:* The single minibuffer frame may not be to everyone's
1145 taste, and there any number of other XEmacs options settings that may
1146 make it difficult or inconvenient to use.
1149 File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.1.1, Prev: Q3.0.8, Up: Customization
1151 Q3.0.9: What is `Customize'?
1152 ----------------------------
1154 Starting with XEmacs 20.2 there is new system 'Customize' for
1155 customizing XEmacs options.
1157 You can access `Customize' from the `Options' menu or invoking one
1158 of customize commands by typing eg. `M-x customize', `M-x
1159 customize-face', `M-x customize-variable' or `M-x customize-apropos'.
1161 Starting with XEmacs 20.3 there is also new `browser' mode for
1162 Customize. Try it out with `M-x customize-browse'
1165 File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.9, Up: Customization
1167 3.1: X Window System & Resources
1168 ================================
1170 Q3.1.1: Where is a list of X resources?
1171 ---------------------------------------
1173 Search through the `NEWS' file for `X Resources'. A fairly
1174 comprehensive list is given after it.
1176 In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
1177 listing the defaults. The file `etc/sample.Xdefaults' gives a set of
1178 defaults that you might consider. It is essentially the same as
1179 `etc/Emacs.ad' but some entries are slightly altered. Be careful about
1180 installing the contents of this file into your `.Xdefaults' or
1181 `.Xresources' file if you use GNU Emacs under X11 as well.
1184 File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Customization
1186 Q3.1.2: How can I detect a color display?
1187 -----------------------------------------
1189 You can test the return value of the function `(device-class)', as
1192 (when (eq (device-class) 'color)
1193 (set-face-foreground 'font-lock-comment-face "Grey")
1194 (set-face-foreground 'font-lock-string-face "Red")
1199 File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization
1201 Q3.1.3: [This question intentionally left blank]
1202 ------------------------------------------------
1205 File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization
1207 Q3.1.4: [This question intentionally left blank]
1208 ------------------------------------------------
1211 File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.1.6, Prev: Q3.1.4, Up: Customization
1213 Q3.1.5: How can I get the icon to just say `XEmacs'?
1214 ----------------------------------------------------
1216 I'd like the icon to just say `XEmacs', and not include the name of
1217 the current file in it.
1219 Add the following line to your `.emacs':
1221 (setq frame-icon-title-format "XEmacs")
1224 File: xemacs-faq.info, Node: Q3.1.6, Next: Q3.1.7, Prev: Q3.1.5, Up: Customization
1226 Q3.1.6: How can I have the window title area display the full path?
1227 -------------------------------------------------------------------
1229 I'd like to have the window title area display the full
1230 directory/name of the current buffer file and not just the name.
1232 Add the following line to your `.emacs':
1234 (setq frame-title-format "%S: %f")
1236 A more sophisticated title might be:
1238 (setq frame-title-format
1239 '("%S: " (buffer-file-name "%f"
1240 (dired-directory dired-directory "%b"))))
1242 That is, use the file name, or the dired-directory, or the buffer
1246 File: xemacs-faq.info, Node: Q3.1.7, Next: Q3.1.8, Prev: Q3.1.6, Up: Customization
1248 Q3.1.7: `xemacs -name junk' doesn't work?
1249 -----------------------------------------
1251 When I run `xterm -name junk', I get an xterm whose class name
1252 according to xprop, is `junk'. This is the way it's supposed to work,
1253 I think. When I run `xemacs -name junk' the class name is not set to
1254 `junk'. It's still `emacs'. What does `xemacs -name' really do? The
1255 reason I ask is that my window manager (fvwm) will make a window sticky
1256 and I use XEmacs to read my mail. I want that XEmacs window to be
1257 sticky, without having to use the window manager's function to set the
1258 window sticky. What gives?
1260 `xemacs -name' sets the application name for the program (that is,
1261 the thing which normally comes from `argv[0]'). Using `-name' is the
1262 same as making a copy of the executable with that new name. The
1263 `WM_CLASS' property on each frame is set to the frame-name, and the
1264 application-class. So, if you did `xemacs -name FOO' and then created
1265 a frame named BAR, you'd get an X window with WM_CLASS = `( "BAR",
1266 "Emacs")'. However, the resource hierarchy for this widget would be:
1268 Name: FOO .shell .container .BAR
1269 Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
1271 instead of the default
1273 Name: xemacs.shell .container .emacs
1274 Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
1276 It is arguable that the first element of WM_CLASS should be set to
1277 the application-name instead of the frame-name, but I think that's less
1278 flexible, since it does not give you the ability to have multiple frames
1279 with different WM_CLASS properties. Another possibility would be for
1280 the default frame name to come from the application name instead of
1281 simply being `emacs'. However, at this point, making that change would
1282 be troublesome: it would mean that many users would have to make yet
1283 another change to their resource files (since the default frame name
1284 would suddenly change from `emacs' to `xemacs', or whatever the
1285 executable happened to be named), so we'd rather avoid it.
1287 To make a frame with a particular name use:
1289 (make-frame '((name . "the-name")))
1292 File: xemacs-faq.info, Node: Q3.1.8, Next: Q3.2.1, Prev: Q3.1.7, Up: Customization
1294 Q3.1.8: `-iconic' doesn't work.
1295 -------------------------------
1297 When I start up XEmacs using `-iconic' it doesn't work right. Using
1298 `-unmapped' on the command line, and setting the `initiallyUnmapped' X
1299 Resource don't seem to help much either...
1301 Ben Wing <ben@xemacs.org> writes:
1303 Ugh, this stuff is such an incredible mess that I've about given up
1304 getting it to work. The principal problem is numerous
1305 window-manager bugs...