This is ../info/xemacs-faq.info, produced by makeinfo version 4.0 from xemacs-faq.texi. INFO-DIR-SECTION XEmacs Editor START-INFO-DIR-ENTRY * FAQ: (xemacs-faq). XEmacs FAQ. END-INFO-DIR-ENTRY  File: xemacs-faq.info, Node: Q2.0.4, Next: Q2.0.5, Prev: Q2.0.3, Up: Installation Q2.0.4: Problems with Linux and ncurses. ---------------------------------------- On Linux 1.3.98 with termcap 2.0.8 and the ncurses that came with libc 5.2.18, XEmacs 20.0b20 is unable to open a tty device: src/xemacs -nw -q Initialization error: Terminal type `xterm' undefined (or can't access database?) Ben Wing writes: Your ncurses configuration is messed up. Your /usr/lib/terminfo is a bad pointer, perhaps to a CD-ROM that is not inserted.  File: xemacs-faq.info, Node: Q2.0.5, Next: Q2.0.6, Prev: Q2.0.4, Up: Installation Q2.0.5: Do I need X11 to run XEmacs? ------------------------------------ No. The name "XEmacs" is unfortunate in the sense that it is *not* an X Window System-only version of Emacs. XEmacs has full color support on a color-capable character terminal.  File: xemacs-faq.info, Node: Q2.0.6, Next: Q2.0.7, Prev: Q2.0.5, Up: Installation Q2.0.6: I'm having strange crashes. What do I do? -------------------------------------------------- There have been a variety of reports of crashes due to compilers with buggy optimizers. Please see the `PROBLEMS' file that comes with XEmacs to read what it says about your platform.  File: xemacs-faq.info, Node: Q2.0.7, Next: Q2.0.8, Prev: Q2.0.6, Up: Installation Q2.0.7: Libraries in non-standard locations ------------------------------------------- I have x-faces, jpeg, xpm etc. all in different places. I've tried space-separated, comma-separated, several -site-libraries, all to no avail. --site-libraries='/path/one /path/two /path/etc'  File: xemacs-faq.info, Node: Q2.0.8, Next: Q2.0.9, Prev: Q2.0.7, Up: Installation Q2.0.8: can't resolve symbol _h_errno ------------------------------------- You are using the Linux/ELF distribution of XEmacs 19.14, and your ELF libraries are out of date. You have the following options: 1. Upgrade your libc to at least 5.2.16 (better is 5.2.18, 5.3.12, or 5.4.10). 2. Patch the XEmacs binary by replacing all occurrences of `_h_errno^@' with `h_errno^@^@'. Any version of Emacs will suffice. If you don't understand how to do this, don't do it. 3. Rebuild XEmacs yourself--any working ELF version of libc should be O.K. Hrvoje Niksic writes: Why not use a Perl one-liner for No. 2? perl -pi -e 's/_h_errno\0/h_errno\0\0/g' \ /usr/local/bin/xemacs-19.14 NB: You _must_ patch `/usr/local/bin/xemacs-19.14', and not `xemacs' because `xemacs' is a link to `xemacs-19.14'; the Perl `-i' option will cause unwanted side-effects if applied to a symbolic link. SL Baur writes: If you build against a recent libc-5.4 (late enough to have caused problems earlier in the beta cycle) and then run with an earlier version of libc, you get a $ xemacs xemacs: can't resolve symbol '__malloc_hook' zsh: 7942 segmentation fault (core dumped) xemacs (Example binary compiled against libc-5.4.23 and run with libc-5.4.16). The solution is to upgrade to at least libc-5.4.23. Sigh. Drat.  File: xemacs-faq.info, Node: Q2.0.9, Next: Q2.0.10, Prev: Q2.0.8, Up: Installation Q2.0.9: Where do I find external libraries? ------------------------------------------- All external libraries used by XEmacs can be found at the XEmacs FTP site `ftp://ftp.xemacs.org/pub/xemacs/aux/'. The canonical locations (at the time of this writing) are as follows: JPEG `ftp://ftp.uu.net/graphics/jpeg/'. Version 6a is current. XPM `ftp://ftp.x.org/contrib/libraries/'. Version 3.4j is current. Older versions of this package are known to cause XEmacs crashes. TIFF `ftp://ftp.sgi.com/graphics/tiff/'. v3.4 is current. The latest beta is v3.4b035. There is a HOWTO here. PNG `ftp://ftp.uu.net/graphics/png/'. 0.89c is current. XEmacs requires a fairly recent version to avoid using temporary files. `ftp://swrinde.nde.swri.edu/pub/png/src/' Compface `ftp://ftp.cs.indiana.edu/pub/faces/compface/'. This library has been frozen for about 6 years, and is distributed without version numbers. _It should be compiled with the same options that X11 was compiled with on your system_. The version of this library at XEmacs.org includes the `xbm2xface.pl' script, written by , which may be useful when generating your own xface. NAS `ftp://ftp.x.org/contrib/audio/nas/'. Version 1.2p5 is current. There is a FAQ here.  File: xemacs-faq.info, Node: Q2.0.10, Next: Q2.0.11, Prev: Q2.0.9, Up: Installation Q2.0.10: After I run configure I find a core dump, is something wrong? ---------------------------------------------------------------------- Not necessarily. If you have GNU sed 3.0 you should downgrade it to 2.05. From the `README' at prep.ai.mit.edu: sed 3.0 has been withdrawn from distribution. It has major revisions, which mostly seem to be improvements; but it turns out to have bugs too which cause trouble in some common cases. Tom Lord won't be able to work fixing the bugs until May. So in the mean time, we've decided to withdraw sed 3.0 from distribution and make version 2.05 once again the recommended version. It has also been observed that the vfork test on Solaris will leave a core dump.  File: xemacs-faq.info, Node: Q2.0.11, Next: Q2.0.12, Prev: Q2.0.10, Up: Installation Q2.0.11: XEmacs doesn't resolve hostnames. ------------------------------------------ This is the result of a long-standing problem with SunOS and the fact that stock SunOS systems do not ship with DNS resolver code in libc. Christopher Davis writes: That's correct [The SunOS 4.1.3 precompiled binaries don't do name lookup]. Since Sun figured that everyone used NIS to do name lookups (that DNS thing was apparently only a passing fad, right?), the stock SunOS 4.x systems don't have DNS-based name lookups in libc. This is also why Netscape ships two binaries for SunOS 4.1.x. The best solution is to compile it yourself; the configure script will check to see if you've put DNS in the shared libc and will then proceed to link against the DNS resolver library code.  File: xemacs-faq.info, Node: Q2.0.12, Next: Q2.0.13, Prev: Q2.0.11, Up: Installation Q2.0.12: Why can't I strip XEmacs? ---------------------------------- Richard Cognot writes: Because of the way XEmacs (and every other Emacsen, AFAIK) is built. The link gives you a bare-boned emacs (called temacs). temacs is then run, preloading some of the lisp files. The result is then dumped into a new executable, named xemacs, which will contain all of the preloaded lisp functions and data. Now, during the dump itself, the executable (code+data+symbols) is written on disk using a special unexec() function. This function is obviously heavily system dependent. And on some systems, it leads to an executable which, although valid, cannot be stripped without damage. If memory serves, this is especially the case for AIX binaries. On other architecture it might work OK. The Right Way to strip the emacs binary is to strip temacs prior to dumping xemacs. This will always work, although you can do that only if you install from sources (as temacs is `not' part of the binary kits). Nat Makarevitch writes: Here is the trick: 1. [ ./configure; make ] 2. rm src/xemacs 3. strip src/temacs 4. make 5. cp src/xemacs /usr/local/bin/xemacs 6. cp lib-src/DOC-19.16-XEmacs /usr/local/lib/xemacs-19.16/i586-unknown-linuxaout  File: xemacs-faq.info, Node: Q2.0.13, Next: Q2.0.14, Prev: Q2.0.12, Up: Installation Q2.0.13: I don't need no steenkin' packages. Do I? (NEW) --------------------------------------------------------- Strictly speaking, no. XEmacs will build and install just fine without any packages installed. However, only the most basic editing functions will be available with no packages installed, so installing packages is an essential part of making your installed XEmacs _useful_.  File: xemacs-faq.info, Node: Q2.0.14, Next: Q2.1.1, Prev: Q2.0.13, Up: Installation Q2.0.12: How do I figure out which packages to install? (NEW) ------------------------------------------------------------- Many people really liked the old way that packages were bundled and do not want to mess with packages at all. You can grab all the packages at once like you used to with old XEmacs versions. Download the file `xemacs-sumo.tar.gz' For an XEmacs compiled with Mule you also need `xemacs-mule-sumo.tar.gz' from the `packages' directory on your XEmacs mirror archive. N.B. They are called 'Sumo Tarballs' for good reason. They are currently about 15MB and 2.3MB (gzipped) respectively. Install them by `cd $prefix/lib/xemacs ; gunzip -c | tar xf -' See README.packages for more detailed installation instructions. As the Sumo tarballs are not regenerated as often as the individual packages, it is recommended that you use the automatic package tools afterwards to pick up any recent updates.  File: xemacs-faq.info, Node: Q2.1.1, Next: Q2.1.2, Prev: Q2.0.14, Up: Installation 2.1: Trouble Shooting ===================== Q2.1.1: Help! XEmacs just crashed on me! ----------------------------------------- First of all, don't panic. Whenever XEmacs crashes, it tries extremely hard to auto-save all of your files before dying. (The main time that this will not happen is if the machine physically lost power or if you killed the XEmacs process using `kill -9'). The next time you try to edit those files, you will be informed that a more recent auto-save file exists. You can use `M-x recover-file' to retrieve the auto-saved version of the file. Starting with 19.14, you may use the command `M-x recover-session' after a crash to pick up where you left off. Now, XEmacs is not perfect, and there may occasionally be times, or particular sequences of actions, that cause it to crash. If you can come up with a reproducible way of doing this (or even if you have a pretty good memory of exactly what you were doing at the time), the maintainers would be very interested in knowing about it. Post a message to comp.emacs.xemacs or send mail to . Please note that the `crashes' address is exclusively for crash reports. If at all possible, include a stack backtrace of the core dump that was produced. This shows where exactly things went wrong, and makes it much easier to diagnose problems. To do this, you need to locate the core file (it's called `core', and is usually sitting in the directory that you started XEmacs from, or your home directory if that other directory was not writable). Then, go to that directory and execute a command like: gdb `which xemacs` core and then issue the command `where' to get the stack backtrace. You might have to use `dbx' or some similar debugger in place of `gdb'. If you don't have any such debugger available, complain to your system administrator. It's possible that a core file didn't get produced, in which case you're out of luck. Go complain to your system administrator and tell him not to disable core files by default. Also *Note Q2.1.15::, for tips and techniques for dealing with a debugger. When making a problem report make sure that: 1. Report *all* of the information output by XEmacs during the crash. 2. You mention what O/S & Hardware you are running XEmacs on. 3. What version of XEmacs you are running. 4. What build options you are using. 5. If the problem is related to graphics, we will also need to know what version of the X Window System you are running, and what window manager you are using. 6. If the problem happened on a tty, please include the terminal type.  File: xemacs-faq.info, Node: Q2.1.2, Next: Q2.1.3, Prev: Q2.1.1, Up: Installation Q2.1.2: Cryptic Minibuffer messages. ------------------------------------ When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer. If you can't figure out what's going on, select Options/General Options/Debug on Error from the Menubar and then try and make the error happen again. This will give you a backtrace that may be enlightening. If not, try reading through this FAQ; if that fails, you could try posting to comp.emacs.xemacs (making sure to include the backtrace) and someone may be able to help. If you can identify which Emacs lisp source file the error is coming from you can get a more detailed stack backtrace by doing the following: 1. Visit the .el file in an XEmacs buffer. 2. Issue the command `M-x eval-current-buffer'. 3. Reproduce the error. Depending on the version of XEmacs, you may either select Edit->Show Messages (19.13 and earlier) or Help->Recent Keystrokes/Messages (19.14 and later) from the menubar to see the most recent messages. This command is bound to `C-h l' by default.  File: xemacs-faq.info, Node: Q2.1.3, Next: Q2.1.4, Prev: Q2.1.2, Up: Installation Q2.1.3: Translation Table Syntax messages at Startup ---------------------------------------------------- I get tons of translation table syntax error messages during startup. How do I get rid of them? There are two causes of this problem. The first usually only strikes people using the prebuilt binaries. The culprit in both cases is the file `XKeysymDB'. * The binary cannot find the `XKeysymDB' file. The location is hardcoded at compile time so if the system the binary was built on puts it a different place than your system does, you have problems. To fix, set the environment variable XKEYSYMDB to the location of the `XKeysymDB' file on your system or to the location of the one included with XEmacs which should be at `/lib/xemacs-19.16/etc/XKeysymDB'. * The binary is finding the XKeysymDB but it is out-of-date on your system and does not contain the necessary lines. Either ask your system administrator to replace it with the one which comes with XEmacs (which is the stock R6 version and is backwards compatible) or set your XKEYSYMDB variable to the location of XEmacs's described above.  File: xemacs-faq.info, Node: Q2.1.4, Next: Q2.1.5, Prev: Q2.1.3, Up: Installation Q2.1.4: Startup warnings about deducing proper fonts? ----------------------------------------------------- How can I avoid the startup warnings about deducing proper fonts? This is highly dependent on your installation, but try with the following font as your base font for XEmacs and see what it does: -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1 More precisely, do the following in your resource file: Emacs.default.attributeFont: \ -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1 If you just don't want to see the `*Warnings*' buffer at startup time, you can set this: (setq display-warning-minimum-level 'error) The buffer still exists; it just isn't in your face.  File: xemacs-faq.info, Node: Q2.1.5, Next: Q2.1.6, Prev: Q2.1.4, Up: Installation Q2.1.5: XEmacs cannot connect to my X Terminal! ----------------------------------------------- Help! I can not get XEmacs to display on my Envizex X-terminal! Try setting the DISPLAY variable using the numeric IP address of the host you are running XEmacs from.  File: xemacs-faq.info, Node: Q2.1.6, Next: Q2.1.7, Prev: Q2.1.5, Up: Installation Q2.1.6: XEmacs just locked up my Linux X server! ------------------------------------------------ There have been several reports of the X server locking up under Linux. In all reported cases removing speedo and scaled fonts from the font path corrected the problem. This can be done with the command `xset'. It is possible that using a font server may also solve the problem.  File: xemacs-faq.info, Node: Q2.1.7, Next: Q2.1.8, Prev: Q2.1.6, Up: Installation Q2.1.7: HP Alt key as Meta. --------------------------- How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key? Put the following line into a file and load it with xmodmap(1) before starting XEmacs: remove Mod1 = Mode_switch  File: xemacs-faq.info, Node: Q2.1.8, Next: Q2.1.9, Prev: Q2.1.7, Up: Installation Q2.1.8: got (wrong-type-argument color-instance-p nil) ------------------------------------------------------ Natalie Kershaw writes: I am trying to run xemacs 19.13 under X11R4. Whenever I move the mouse I get the following error. Has anyone seen anything like this? This doesn't occur on X11R5. Signalling: (error "got (wrong-type-argument color-instance-p nil) and I don't know why!") dinos writes: I think this is due to undefined resources; You need to define color backgrounds and foregrounds into your `.../app-defaults/Emacs' like: *Foreground: Black ;everything will be of black on grey95, *Background: Grey95 ;unless otherwise specified. *cursorColor: Red3 ;red3 cursor with grey95 border. *pointerColor: Red3 ;red3 pointer with grey95 border. Natalie Kershaw adds: What fixed the problem was adding some more colors to the X color database (copying the X11R5 colors over), and also defining the following resources: xemacs*cursorColor: black xemacs*pointerColor: black With the new colors installed the problem still occurs if the above resources are not defined. If the new colors are not present then an additional error occurs on XEmacs startup, which says `Color Red3' not defined.  File: xemacs-faq.info, Node: Q2.1.9, Next: Q2.1.10, Prev: Q2.1.8, Up: Installation Q2.1.9: XEmacs causes my OpenWindows 3.0 server to crash. --------------------------------------------------------- The OpenWindows 3.0 server is incredibly buggy. Your best bet is to replace it with one from the generic MIT X11 release. You might also try disabling parts of your `.emacs', like enabling background pixmaps.  File: xemacs-faq.info, Node: Q2.1.10, Next: Q2.1.11, Prev: Q2.1.9, Up: Installation Q2.1.10: Warnings from incorrect key modifiers. ----------------------------------------------- The following information comes from the `PROBLEMS' file that comes with XEmacs. If you're having troubles with HP/UX it is because HP/UX defines the modifiers wrong in X. Here is a shell script to fix the problem; be sure that it is run after VUE configures the X server. #! /bin/sh xmodmap 2> /dev/null - << EOF keysym Alt_L = Meta_L keysym Alt_R = Meta_R EOF xmodmap - << EOF clear mod1 keysym Mode_switch = NoSymbol add mod1 = Meta_L keysym Meta_R = Mode_switch add mod2 = Mode_switch EOF  File: xemacs-faq.info, Node: Q2.1.11, Next: Q2.1.12, Prev: Q2.1.10, Up: Installation Q2.1.11: `Can't instantiate image error...' in toolbar ------------------------------------------------------ Dr. Ram Samudrala writes: I just installed the XEmacs (20.4-2) RPMS that I downloaded from `http://www.xemacs.org/'. Everything works fine, except that when I place my mouse over the toolbar, it beeps and gives me this message: Can't instantiate image (probably cached): [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data (16 16 ... Kyle Jones writes: This is problem specific to some Chips and Technologies video chips, when running XFree86. Putting `Option "sw_cursor"' in `XF86Config' gets rid of the problem.  File: xemacs-faq.info, Node: Q2.1.12, Next: Q2.1.13, Prev: Q2.1.11, Up: Installation Q2.1.12: Problems with Regular Expressions on DEC OSF1. ------------------------------------------------------- I have xemacs 19.13 running on an alpha running OSF1 V3.2 148 and ispell would not run because it claimed the version number was incorrect although it was indeed OK. I traced the problem to the regular expression handler. Douglas Kosovic writes: Actually it's a DEC cc optimization bug that screws up the regexp handling in XEmacs. Rebuilding using the `-migrate' switch for DEC cc (which uses a different sort of optimization) works fine. See `xemacs-19_13-dunix-3_2c.patch' at the following URL on how to build with the `-migrate' flag: `http://www-digital.cern.ch/carney/emacs/emacs.html' NOTE: There have been a variety of other problems reported that are fixed in this fashion.  File: xemacs-faq.info, Node: Q2.1.13, Next: Q2.1.14, Prev: Q2.1.12, Up: Installation Q2.1.13: HP/UX 10.10 and `create_process' failure. -------------------------------------------------- Dave Carrigan writes: With XEmacs 19.13 and HP/UX 10.10, anything that relies on the `create_process' function fails. This breaks a lot of things (shell-mode, compile, ange-ftp, to name a few). Phil Johnson writes: This is a problem specific to HP-UX 10.10. It only occurs when XEmacs is compiled for shared libraries (the default), so you can work around it by compiling a statically-linked binary (run configure with `--dynamic=no'). I'm not sure whether the problem is with a particular shared library or if it's a kernel problem which crept into 10.10. Richard Cognot writes: I had a few problems with 10.10. Apparently, some of them were solved by forcing a static link of libc (manually).  File: xemacs-faq.info, Node: Q2.1.14, Next: Q2.1.15, Prev: Q2.1.13, Up: Installation Q2.1.14: `C-g' doesn't work for me. Is it broken? -------------------------------------------------- Ben Wing writes: `C-g' does work for most people in most circumstances. If it doesn't, there are only two explanations: 1. The code is wrapped with a binding of `inhibit-quit' to `t'. `Ctrl-Shift-G' should still work, I think. 2. SIGIO is broken on your system, but BROKEN_SIGIO isn't defined. To test #2, try executing `(while t)' from the `*scratch*' buffer. If `C-g' doesn't interrupt, then you're seeing #2. Morten Welinder writes: On some (but _not_ all) machines a hung XEmacs can be revived by `kill -FPE '. This is a hack, of course, not a solution. This technique works on a Sun4 running 4.1.3_U1. To see if it works for you, start another XEmacs and test with that first. If you get a core dump the method doesn't work and if you get `Arithmetic error' then it does.  File: xemacs-faq.info, Node: Q2.1.15, Next: Q2.1.16, Prev: Q2.1.14, Up: Installation Q2.1.15: How to Debug an XEmacs problem with a debugger ------------------------------------------------------- If XEmacs does crash on you, one of the most productive things you can do to help get the bug fixed is to poke around a bit with the debugger. Here are some hints: * First of all, if the crash is at all reproducible, consider very strongly recompiling your XEmacs with debugging symbols, with no optimization, and with the configure options `--debug=yes' and `--error-checking=all'. This will make your XEmacs run somewhat slower but make it a lot more likely to catch the problem earlier (closer to its source), and a lot easier to determine what's going on with a debugger. * If you're able to run XEmacs under a debugger and reproduce the crash (if it's inconvenient to do this because XEmacs is already running or is running in batch mode as part of a bunch of scripts, consider attaching to the existing process with your debugger; most debuggers let you do this by substituting the process ID for the core file when you invoke the debugger from the command line, or by using the `attach' command or something similar), here are some things you can do: * If XEmacs is hitting an assertion failure, put a breakpoint on `assert_failed()'. * If XEmacs is hitting some weird Lisp error that's causing it to crash (e.g. during startup), put a breakpoint on `signal_1()'--this is declared static in eval.c. * Internally, you will probably see lots of variables that hold objects of type `Lisp_Object'. These are exactly what they appear to be, i.e. references to Lisp objects. Printing them out with the debugger probably won't be too useful--you'll likely just see a number. To decode them, do this: call debug_print (OBJECT) where OBJECT is whatever you want to decode (it can be a variable, a function call, etc.). This will print out a readable representation on the TTY from which the xemacs process was invoked. * If you want to get a Lisp backtrace showing the Lisp call stack, do this: call debug_backtrace () * Using `debug_print' and `debug_backtrace' has two disadvantages - it can only be used with a running xemacs process, and it cannot display the internal C structure of a Lisp Object. Even if all you've got is a core dump, all is not lost. If you're using GDB, there are some macros in the file `src/.gdbinit' in the XEmacs source distribution that should make it easier for you to decode Lisp objects. This file is automatically read by gdb if gdb is run in the directory where xemacs was built, and contains these useful macros to inspect the state of xemacs: `pobj' Usage: pobj lisp_object Print the internal C representation of a lisp object. `xtype' Usage: xtype lisp_object Print the Lisp type of a lisp object. `lbt' Usage: lbt Print the current Lisp stack trace. Requires a running xemacs process. `ldp' Usage: ldp lisp_object Print a Lisp Object value using the Lisp printer. Requires a running xemacs process. `run-temacs' Usage: run-temacs Run temacs interactively, like xemacs. Use this with debugging tools (like purify) that cannot deal with dumping, or when temacs builds successfully, but xemacs does not. `dump-temacs' Usage: dump-temacs Run the dumping part of the build procedure. Use when debugging temacs, not xemacs! Use this when temacs builds successfully, but xemacs does not. `check-xemacs' Usage: check-xemacs Run the test suite. Equivalent to 'make check'. `check-temacs' Usage: check-temacs Run the test suite on temacs. Equivalent to 'make check-temacs'. Use this with debugging tools (like purify) that cannot deal with dumping, or when temacs builds successfully, but xemacs does not. If you are using Sun's `dbx' debugger, there is an equivalent file `src/.dbxrc', which defines the same commands for dbx. * If you're using a debugger to get a C stack backtrace and you're seeing stack traces with some of the innermost frames mangled, it may be due to dynamic linking. (This happens especially under Linux.) Consider reconfiguring with `--dynamic=no'. Also, sometimes (again under Linux), stack backtraces of core dumps will have the frame where the fatal signal occurred mangled; if you can obtain a stack trace while running the XEmacs process under a debugger, the stack trace should be clean. Curtiss <1CMC3466@ibm.mtsac.edu> suggests upgrading to ld.so version 1.8 if dynamic linking and debugging is a problem on Linux. * If you're using a debugger to get a C stack backtrace and you're getting a completely mangled and bogus stack trace, it's probably due to one of the following: a. Your executable has been stripped. Bad news. Tell your sysadmin not to do this--it doesn't accomplish anything except to save a bit of disk space, and makes debugging much much harder. b. Your stack is getting trashed. Debugging this is hard; you have to do a binary-search type of narrowing down where the crash occurs, until you figure out exactly which line is causing the problem. Of course, this only works if the bug is highly reproducible. c. If your stack trace has exactly one frame in it, with address 0x0, this could simply mean that XEmacs attempted to execute code at that address, e.g. through jumping to a null function pointer. Unfortunately, under those circumstances, GDB under Linux doesn't know how to get a stack trace. (Yes, this is the third Linux-related problem I've mentioned. I have no idea why GDB under Linux is so bogus. Complain to the GDB authors, or to comp.os.linux.development.system). Again, you'll have to use the narrowing-down process described above. d. If you compiled 19.14 with `--debug' (or by default in later versions), you will get a Lisp backtrace output when XEmacs crashes, so you'll have something useful. * If you compile with the newer gcc variants gcc-2.8 or egcs, you will also need gdb 4.17 or above. Earlier releases of gdb can't handle the debug information generated by the newer compilers. * In versions of XEmacs before 21.2.27, `src/.gdbinit' was named `src/gdbinit'. This had the disadvantage of not being sourced automatically by gdb, so you had to set that up yourself.  File: xemacs-faq.info, Node: Q2.1.16, Next: Q2.1.17, Prev: Q2.1.15, Up: Installation Q2.1.16: XEmacs crashes in `strcat' on HP/UX 10 ----------------------------------------------- From the problems database (through the former address http://support.mayfield.hp.com/): Problem Report: 5003302299 Status: Open System/Model: 9000/700 Product Name: HPUX S800 10.0X Product Vers: 9245XB.10.00 Description: strcat(3C) may read beyond end of source string, can cause SIGSEGV *** PROBLEM TEXT *** strcat(3C) may read beyond the source string onto an unmapped page, causing a segmentation violation.  File: xemacs-faq.info, Node: Q2.1.17, Next: Q2.1.18, Prev: Q2.1.16, Up: Installation Q2.1.17: `Marker does not point anywhere' ----------------------------------------- As with other errors, set `debug-on-error' to `t' to get the backtrace when the error occurs. Specifically, two problems have been reported (and fixed). 1. A problem with line-number-mode in XEmacs 19.14 affected a large number of other packages. If you see this error message, turn off line-number-mode. 2. A problem with some early versions of Gnus 5.4 caused this error. Upgrade your Gnus.  File: xemacs-faq.info, Node: Q2.1.18, Next: Q2.1.19, Prev: Q2.1.17, Up: Installation Q2.1.18: removed ----------------  File: xemacs-faq.info, Node: Q2.1.19, Next: Q2.1.20, Prev: Q2.1.18, Up: Installation Q2.1.19: XEmacs does not follow the local timezone. --------------------------------------------------- When using one of the prebuilt binaries many users have observed that XEmacs uses the timezone under which it was built, but not the timezone under which it is running. The solution is to add: (set-time-zone-rule "MET") to your `.emacs' or the `site-start.el' file if you can. Replace `MET' with your local timezone.  File: xemacs-faq.info, Node: Q2.1.20, Next: Q2.1.21, Prev: Q2.1.19, Up: Installation Q2.1.20: `Symbol's function definition is void: hkey-help-show.' ---------------------------------------------------------------- This is a problem with a partially loaded hyperbole. Try adding: (require 'hmouse-drv) where you load hyperbole and the problem should go away.  File: xemacs-faq.info, Node: Q2.1.21, Next: Q2.1.22, Prev: Q2.1.20, Up: Installation Q2.1.21: [This question intentionally left blank] -------------------------------------------------  File: xemacs-faq.info, Node: Q2.1.22, Next: Q2.1.23, Prev: Q2.1.21, Up: Installation Q2.1.22: XEmacs seems to take a really long time to do some things ------------------------------------------------------------------ David Moore writes: Two things you can do: 1) C level: When you see it going mad like this, you might want to use gdb from an 'xterm' to attach to the running process and get a stack trace. To do this just run: gdb /path/to/xemacs/xemacs #### Where `####' is the process id of your xemacs, instead of specifying the core. When gdb attaches, the xemacs will stop [1] and you can type `where' in gdb to get a stack trace as usual. To get things moving again, you can just type `quit' in gdb. It'll tell you the program is running and ask if you want to quit anyways. Say 'y' and it'll quit and have your emacs continue from where it was at. 2) Lisp level: Turn on debug-on-quit early on. When you think things are going slow hit C-g and it may pop you in the debugger so you can see what routine is running. Press `c' to get going again. debug-on-quit doesn't work if something's turned on inhibit-quit or in some other strange cases.  File: xemacs-faq.info, Node: Q2.1.23, Next: Q2.1.24, Prev: Q2.1.22, Up: Installation Q2.1.23: Movemail on Linux does not work for XEmacs 19.15 and later. --------------------------------------------------------------------- Movemail used to work fine in 19.14 but has stopped working in 19.15 and 20.x. I am using Linux. SL Baur writes: Movemail on Linux used to default to using flock file locking. With 19.15 and later versions it now defaults to using `.lock' file locking. If this is not appropriate for your system, edit src/s/linux.h and uncomment the line that reads: #define MAIL_USE_FLOCK  File: xemacs-faq.info, Node: Q2.1.24, Next: Q2.1.25, Prev: Q2.1.23, Up: Installation Q2.1.24: XEmacs won't start without network. (NEW) --------------------------------------------------- If XEmacs starts when you're on the network, but fails when you're not on the network, you may be missing a "localhost" entry in your `/etc/hosts' file. The file should contain an entry like: 127.0.0.1 localhost Add that line, and XEmacs will be happy.  File: xemacs-faq.info, Node: Q2.1.25, Prev: Q2.1.24, Up: Installation Q2.1.25:: After upgrading, XEmacs won't do `foo' any more! (NEW) ----------------------------------------------------------------- You have been used to doing `foo', but now when you invoke it (or click the toolbar button or select the menu item), nothing (or an error) happens. The simplest explanation is that you are missing a package that is essential to you. You can either track it down and install it (there is a list of packages and brief descriptions of their contents in `etc/PACKAGES'), or install the `Sumo Tarball' (see *note Q2.0.14::).  File: xemacs-faq.info, Node: Customization, Next: Subsystems, Prev: Installation, Up: Top 3 Customization and Options *************************** This is part 3 of the XEmacs Frequently Asked Questions list. This section is devoted to Customization and screen settings. * Menu: Customization---Emacs Lisp and `.emacs': * Q3.0.1:: What version of Emacs am I running? * Q3.0.2:: How do I evaluate Elisp expressions? * Q3.0.3:: `(setq tab-width 6)' behaves oddly. * Q3.0.4:: How can I add directories to the `load-path'? * Q3.0.5:: How to check if a lisp function is defined? * Q3.0.6:: Can I force the output of `(face-list)' to a buffer? * Q3.0.7:: Font selections don't get saved after `Save Options'. * Q3.0.8:: How do I make a single minibuffer frame? * Q3.0.9:: What is `Customize'? X Window System & Resources: * Q3.1.1:: Where is a list of X resources? * Q3.1.2:: How can I detect a color display? * Q3.1.3:: [This question intentionally left blank] * Q3.1.4:: [This question intentionally left blank] * Q3.1.5:: How can I get the icon to just say `XEmacs'? * Q3.1.6:: How can I have the window title area display the full path? * Q3.1.7:: `xemacs -name junk' doesn't work? * Q3.1.8:: `-iconic' doesn't work. Textual Fonts & Colors: * Q3.2.1:: How can I set color options from `.emacs'? * Q3.2.2:: How do I set the text, menu and modeline fonts? * Q3.2.3:: How can I set the colors when highlighting a region? * Q3.2.4:: How can I limit color map usage? * Q3.2.5:: My tty supports color, but XEmacs doesn't use them. * Q3.2.6:: Can I have pixmap backgrounds in XEmacs? The Modeline: * Q3.3.1:: How can I make the modeline go away? * Q3.3.2:: How do you have XEmacs display the line number in the modeline? * Q3.3.3:: How do I get XEmacs to put the time of day on the modeline? * Q3.3.4:: How do I turn off current chapter from AUC TeX modeline? * Q3.3.5:: How can one change the modeline color based on the mode used? 3.4 Multiple Device Support: * Q3.4.1:: How do I open a frame on another screen of my multi-headed display? * Q3.4.2:: Can I really connect to a running XEmacs after calling up over a modem? How? 3.5 The Keyboard: * Q3.5.1:: How can I bind complex functions (or macros) to keys? * Q3.5.2:: How can I stop down-arrow from adding empty lines to the bottom of my buffers? * Q3.5.3:: How do I bind C-. and C-; to scroll one line up and down? * Q3.5.4:: Globally binding Delete? * Q3.5.5:: Scrolling one line at a time. * Q3.5.6:: How to map Help key alone on Sun type4 keyboard? * Q3.5.7:: How can you type in special characters in XEmacs? * Q3.5.8:: Why does `(global-set-key [delete-forward] 'delete-char)' complain? * Q3.5.9:: How do I make the Delete key delete forward? * Q3.5.10:: Can I turn on "sticky" modifier keys? * Q3.5.11:: How do I map the arrow keys? The Cursor: * Q3.6.1:: Is there a way to make the bar cursor thicker? * 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? * Q3.6.3:: Can I make the cursor blink? The Mouse and Highlighting: * Q3.7.1:: How can I turn off Mouse pasting? * Q3.7.2:: How do I set control/meta/etc modifiers on mouse buttons? * Q3.7.3:: Clicking the left button does not do anything in buffer list. * Q3.7.4:: How can I get a list of buffers when I hit mouse button 3? * Q3.7.5:: Why does cut-and-paste not work between XEmacs and a cmdtool? * Q3.7.6:: How I can set XEmacs up so that it pastes where the text cursor is? * Q3.7.7:: How do I select a rectangular region? * Q3.7.8:: Why does M-w take so long? The Menubar and Toolbar: * Q3.8.1:: How do I get rid of the menu (or menubar)? * Q3.8.2:: Can I customize the basic menubar? * Q3.8.3:: How do I control how many buffers are listed in the menu `Buffers' list? * Q3.8.4:: Resources like `Emacs*menubar*font' are not working? * Q3.8.5:: How can I bind a key to a function to toggle the toolbar? Scrollbars: * Q3.9.1:: How can I disable the scrollbar? * Q3.9.2:: How can one use resources to change scrollbar colors? * Q3.9.3:: Moving the scrollbar can move the point; can I disable this? * Q3.9.4:: How can I get automatic horizontal scrolling? Text Selections: * Q3.10.1:: How can I turn off or change highlighted selections? * Q3.10.2:: How do I get that typing on an active region removes it? * Q3.10.3:: Can I turn off the highlight during isearch? * Q3.10.4:: How do I turn off highlighting after C-x C-p (mark-page)? * Q3.10.5:: The region disappears when I hit the end of buffer while scrolling.  File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Customization, Up: Customization 3.0: Customization - Emacs Lisp and .emacs ========================================== Q3.0.1: What version of Emacs am I running? ------------------------------------------- How can `.emacs' determine which of the family of Emacsen I am using? To determine if you are currently running GNU Emacs 18, GNU Emacs 19, XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the example given in `etc/sample.emacs'. There are other nifty things in there as well! For all new code, all you really need to do is: (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))  File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Customization Q3.0.2: How can I evaluate Emacs-Lisp expressions? -------------------------------------------------- I know I can evaluate Elisp expressions from `*scratch*' buffer with `C-j' after the expression. How do I do it from another buffer? Press `M-:' (the default binding of `eval-expression'), and enter the expression to the minibuffer. In XEmacs prior to 19.15 `eval-expression' used to be a disabled command by default. If this is the case, upgrade your XEmacs.  File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Customization Q3.0.3: `(setq tab-width 6)' behaves oddly. ------------------------------------------- If you put `(setq tab-width 6)' in your `.emacs' file it does not work! Is there a reason for this? If you do it at the EVAL prompt it works fine!! How strange. Use `setq-default' instead, since `tab-width' is all-buffer-local.  File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Customization Q3.0.4: How can I add directories to the `load-path'? ----------------------------------------------------- Here are two ways to do that, one that puts your directories at the front of the load-path, the other at the end: ;;; Add things at the beginning of the load-path, do not add ;;; duplicate directories: (pushnew "bar" load-path :test 'equal) (pushnew "foo" load-path :test 'equal) ;;; Add things at the end, unconditionally (setq load-path (nconc load-path '("foo" "bar"))) keith (k.p.) hanlan writes: To add directories using Unix shell metacharacters use `expand-file-name' like this: (push (expand-file-name "~keithh/.emacsdir") load-path)  File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Customization Q3.0.5: How to check if a lisp function is defined? --------------------------------------------------- Use the following elisp: (fboundp 'foo) It's almost always a mistake to test `emacs-version' or any similar variables. Instead, use feature-tests, such as `featurep', `boundp', `fboundp', or even simple behavioral tests, eg.: (defvar foo-old-losing-code-p (condition-case nil (progn (losing-code t) nil) (wrong-number-of-arguments t))) There is an incredible amount of broken code out there which could work much better more often in more places if it did the above instead of trying to divine its environment from the value of one variable.  File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Customization Q3.0.6: Can I force the output of `(face-list)' to a buffer? ------------------------------------------------------------ It would be good having it in a buffer, as the output of `(face-list)' is too wide to fit to a minibuffer. Evaluate the expression in the `*scratch*' buffer with point after the rightmost paren and typing `C-j'. If the minibuffer smallness is the only problem you encounter, you can simply press `C-h l' to get the former minibuffer contents in a buffer.  File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Customization Q3.0.7: Font selections in don't get saved after `Save Options'. ---------------------------------------------------------------- For XEmacs 19.14 and previous: John Mann writes: You have to go to Options->Frame Appearance and unselect `Frame-Local Font Menu'. If this option is selected, font changes are only applied to the _current_ frame and do _not_ get saved when you save options. For XEmacs 19.15 and later: Implement the above as well as set the following in your `.emacs' (setq options-save-faces t)  File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Customization Q3.0.8: How do I get a single minibuffer frame? ----------------------------------------------- Vin Shelton writes: (setq initial-frame-plist '(minibuffer nil)) (setq default-frame-plist '(minibuffer nil)) (setq default-minibuffer-frame (make-frame '(minibuffer only width 86 height 1 menubar-visible-p nil default-toolbar-visible-p nil name "minibuffer" top -2 left -2 has-modeline-p nil))) (frame-notice-user-settings) *Please note:* The single minibuffer frame may not be to everyone's taste, and there any number of other XEmacs options settings that may make it difficult or inconvenient to use.  File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.1.1, Prev: Q3.0.8, Up: Customization Q3.0.9: What is `Customize'? ---------------------------- Starting with XEmacs 20.2 there is new system 'Customize' for customizing XEmacs options. You can access `Customize' from the `Options' menu or invoking one of customize commands by typing eg. `M-x customize', `M-x customize-face', `M-x customize-variable' or `M-x customize-apropos'. Starting with XEmacs 20.3 there is also new `browser' mode for Customize. Try it out with `M-x customize-browse'  File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.9, Up: Customization 3.1: X Window System & Resources ================================ Q3.1.1: Where is a list of X resources? --------------------------------------- Search through the `NEWS' file for `X Resources'. A fairly comprehensive list is given after it. In addition, an `app-defaults' file is supplied, `etc/Emacs.ad' listing the defaults. The file `etc/sample.Xdefaults' gives a set of defaults that you might consider. It is essentially the same as `etc/Emacs.ad' but some entries are slightly altered. Be careful about installing the contents of this file into your `.Xdefaults' or `.Xresources' file if you use GNU Emacs under X11 as well.  File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Customization Q3.1.2: How can I detect a color display? ----------------------------------------- You can test the return value of the function `(device-class)', as in: (when (eq (device-class) 'color) (set-face-foreground 'font-lock-comment-face "Grey") (set-face-foreground 'font-lock-string-face "Red") .... )  File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Customization Q3.1.3: [This question intentionally left blank] ------------------------------------------------  File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Customization Q3.1.4: [This question intentionally left blank] ------------------------------------------------  File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.1.6, Prev: Q3.1.4, Up: Customization Q3.1.5: How can I get the icon to just say `XEmacs'? ---------------------------------------------------- I'd like the icon to just say `XEmacs', and not include the name of the current file in it. Add the following line to your `.emacs': (setq frame-icon-title-format "XEmacs")  File: xemacs-faq.info, Node: Q3.1.6, Next: Q3.1.7, Prev: Q3.1.5, Up: Customization Q3.1.6: How can I have the window title area display the full path? ------------------------------------------------------------------- I'd like to have the window title area display the full directory/name of the current buffer file and not just the name. Add the following line to your `.emacs': (setq frame-title-format "%S: %f") A more sophisticated title might be: (setq frame-title-format '("%S: " (buffer-file-name "%f" (dired-directory dired-directory "%b")))) That is, use the file name, or the dired-directory, or the buffer name.