Solutions: Common Problem Guide

In order to view this from EMacro's help menu, you must install the full tarball, in particular, browse-url.el, advice.el, term.el and thingatpt.el


FAQ: Frequently Asked Questions

Check resources.html for links to FAQs.

.emacs - Where Does It Go?

Your ".emacs" file might also be called "_emacs" on MS Windows. You should set the environment variable "HOME" You can inspect this variable by entering at a prompt:
This is your home directory. You can see this hidden file on Linux compatible systems by entering
cd; ls -a

Bug/Problem Checklist

Finally, if you still need help with EMacro, be sure to provide me with the following:

C-h v
Version of EMacro
uname -a (on unix) Version and Name of operating system
M-x version Version and Emacs or XEmacs

Ideally, you should be able to reproduce any error with a freshly logged in system, and should have the latest stable release of everything.

Byte Compile Errors

I recommend against bytecompiling EMacro, unless you are trying to track down a bug. This is because *.elc files are less portable, and offer EMacro no increase in speed. Bytecompiling is useful for some other programs, such as semantic, which is used in JDEE. EMacro goes to great lengths to avoid byte-compiler warnings. In general, errors marked by !! are serious, warnings are not. Try running the e-refresh script, to remove *cache.el files.

If you see the error
!! End of stream ((#<buffer " *Compiler Input*">))
this means that you have an unbalanced parenthesis or quote. You can generally, and easily find an unbalaced quote, by refreshing font-lock, choosing Tools menu -> Refresh colors, or with
M-x font-lock-fontify-buffer
You can find an unbalanced parenthesis with
(top of file). Repeat by holding
until Emacs complains with a beep. Note that an unbalanced single quote is often proper in lisp.

Check How Emacs Was Compiled

M-x describe-installation

Clashing Libraries

Show duplicate libraries in multiple directories:
M-x list-load-path-shadows
You can hit 'C-x e' at the end of
(member (format "%semacs/packages/" use-home) load-path)
or simply,
(member "/home/my-login/emacs/packages/" load-path)
to see if that directory is in your load-path. Of course, you can also do
C-h v
and search the results.

Copy, Cut & Paste

You really should visit the FAQs (Frequently Asked Questions) for problems like these. This one is common enough to annoy many new users. Download CUA-mode.el, run e-refresh to remove *cache.el. If you are running GNU Emacs, you should be pleased with the results. You cannot use native Emacs shortcuts on selected text, such as C-x C-l to lowercase a region. Instead, you would have to use long commands, such as M-x downcase-region . EMacro does not support the older, buggy version of cua-mode for XEmacs.
Emacs supports the true CUA standard: ('C-' means Control key; 'S-' means Shift)


Microsoft, Motif, IBM & others adhere to this standard. Microsoft, however, has been steering users to C-c, C-x, C-v keybindings.


If you are in text mode, and the display looks wierd, hit C-l

There appears to be a bug in older XEmacs, in X window, where the right side does not display. This goes away when you generate a refresh event, such as resizing. You probably need to choose a smaller "use-height" in configure.el

Some adjustments must be done through your operating system. You may need to edit ~/.Xdefaults, on Linux compatible OSes. You can view the system resources with xrdb -query and for emacs with appres emacs. Check also the environment variables XUSERFILESEARCHPATH, XAPPLRESDIR, XFILESEARCHPATH for Xdefaults. Also look at ~/.Xresources

Here is some sample .Xdefault entries, to change the menubar font:
#Emacs only?
Emacs*menubar*Font: -*-helvetica-bold-r-*-*-*-60-80-80-*-*-*-*
#XEmacs only?
Emacs*XlwMenu.Font: -*-arial-bold-i-normal--*-120-*-*-*-*-iso8859-*

Dos/Mac ^M End Of Lines

C-x RET f undecided-dos RET
Your best bet is to call dos2unix. This is available on Solaris, and as a contributed package at or at
You can also remove them with

C-%(shortcut for M-x query-replace)
C-q C-m(literally insert a ^M)
RET (hit enter again to replace with nothing)
!(replace all)

Emacs Together With XEmacs

If you use both Gnu Emacs & [Gnu] XEmacs or even 2 versions on the same system, do not bytecompile your .el files.

Environment Variables

These are optional, but may help in running Emacs remotely. I include some example paths.


Feature Does Not Work!

EMacro probes your system for libraries & programs, as each .el file is loaded. If you move or add such files, you'd do best to run the e-refresh script, to remove *.elc and *cache.el, then restart Emacs or XEmacs.

General Errors

If you get wierd, unexplained errors, try increasing the following elisp limits. Use C-h v to inspect them:

Gnus News

Try this to debug your connection, also in M-x shell:
telnet nntp

Hanging / Stuck

If Emacs is not responding, type C-g or Esc three times.

Gzip Error

If you see this error message:

Searching for program: no such file or directory, gzip

This means that you have a compressed library (e.g. cua-base.el.gz) in your Emacs load-path, and that gzip is not in a directory in your PATH environment variable.

Height Is Wrong

EMacro tries to guess the maximum height of your desktop. In X Window, this is difficult. EMacro assumes that you are running Emacs locally, and that any panels or menus are at the default top or bottom of the desktop, and at default size. If you run X Window remotely with a different desktop setup, than locally, or if you resized your Gnome panel or KDE kicker, or similar menu, or even moved them to the side, then Emacs height will be off.

You can change the height of Emacs, by editing ~/emacs/preferences/e-prefs.el. The default of zero is for automatic maximum desktop height.

Help Browsing In Text Mode

You should install the Emacs W3 HTML browser from If you have lynx in your PATH then you can edit ~/preferences/e-prefs.el with this line:
(defconst use-browser 'lynx)
The line should be entered exactly as above, including the single unbalanced single quote. To restore your graphical mode browser, you can remove or comment out this line, by preceding it with a ; semicolon.

Indenting Code

See "Code Indentation/Formatting Styles" in programmer.el


EMacro supports i18n / internationalization, but more help from the community, on testing files in the contrib directory is needed. See also tips.html.

Make sure, that not every one character is part of the latin-1 encoding. For example, saving certain web pages that use \240 as a space character will cause problems. Results will vary between console and X Window modes.

You can insert international chars, by entering into international encoding mode:
C-u C-\
hit enter for default of latin-1-prefix
Note that this literal ^ caret appears underlined. This creates the © copyright symbol.
C-x 8
puts your buffer into international character set encoding mode. Note that this keeps you in this mode, until you close the buffer, or exit the mode, by hitting
Note that this mode makes it harder to use keys such as ~ as they are now prefix keys.
You may find it useful to save your file as, say Latin1:
C-x C-m f latin-1

If you are still having trouble, you must compile Emacs with MULE (Multi User Language Environment) support, and read through ~emacs/etc/PROBLEMS & ~emacs/etc/MORE.STUFF.

CJK: Chinese Japanese Korean

This section is incomplete. Please send any of your tests or updates to the maintainer of EMacro
M-x customize-option

M-x utf-translate-cjk-mode
C-h C-\ chinese- TAB

MS Windows & Other Issues

This section has not been tested.Please send any of your tests or updates to the maintainer of EMacro
M-x load-library utf-16 M-x customize-option

Key Bindings

You can view what keys were just pressed, with C-h l. Also, try M-: (read-key-sequence "") before pressing a key, to see what is generated.

Fixing X window key bindings. Get XKeycaps from or see resources.html. Also check unix style help: man -s1 xmodmap or man -s1 xev

Another keyboard project is Linux Easy Access Keyboard at

Keybindings are annoying with Classic Mac OS 9.x. I have not done enough testing on Mac OS X, to see if it works better. For example, the 'end' key generates a control-d, which works well as an existing Emacs standard for delete-char (forward). This will not improve, without help from the Mac community.

For international use, also see about turning off dead keys.

Load Errors

Running emacs -debug-init or xemacs -debug-init from the command line will help you track down problems. The -q --no-site-file flags will allow you turn off your .emacs and shared init files (EMacro), respectively.
Make sure that you have run e-refresh, which, in particular, deletes ~/emacs/preferences/e-*cache.el. This will stop many library loading errors.
Do not try to run an older version of Emacs with *.elc files that have been byte-compiled by a newer version. Sometimes it helps to remove ~/emacs/*.elc files then restart, which will recompile them.
Also, make sure that you do not have compressed files or compiled of the same name, especially in the same directory, eg: ~/emacs/e-macro.el and ~/emacs/e-macro.el.gz or ~/emacs/e-macro.elc
It may help to increase the size of max-specpdl-size and max-lisp-eval-depth. See the top of e-config.el for suggested sizes to uncomment.

Missing Packages

Visit the Emacs Lisp List. See resources.html
e-refresh in the bin directory may help.

Network Warnings / Slow Loading

Emacs may be waiting for the network to time out, to get info. Put a fully qualified domain name for your machine in /etc/hosts, and tell the /etc/resolv routines to look in /etc/hosts before looking at the network. Check that your host name is /etc/hostname. On Microsoft Windows, look at c:\winnt\system32\drivers\etc\hosts or c:\winnt\system32\drivers\etc\lmhosts

If you are running XEmacs, try upgrading to at least 21.4.4 and rebuild using --with-ipv6-cname=no.


Flushing Postscript jobs

Try printing a quit job, to eject the last page. Ghostscript provides this default location: /usr/local/share/ghostscript/7.05/lib/

MS Windows Printing Remotely Over a LAN

The first step to problems with any third party program is to get it to work from the command line. If you use MS Windows's SMB networking, try this:
print -d\\printer\portName e-macro.el

Graphical Approach:

Where emacro.el is a plain text file in the current directory, and \\printer\portName comes from Control Panel -> Printers -> default printer -> Printer -> Properties -> Ports -> Port

Command Line:

NET HELP will list the networking commands. If you know your server name, 'NET VIEW SERVER' will list its printer(s). NET USE LPT1: \\servername\sharename will map your printer to the default local port

EMacro prompts, creates and stores this printer name in ~/emacs/preferences/e-prefs.el. You can see how it is used in ~/emacs/emacro/e-w32.el

Check the Emacs Customize options:

Wp group
LPR group
printer name option = LPT1:
PS print group
ps printer name option = LPT1:

Be sure to also take a look at ~/emacs/contrib/lpr. Below is another useful reference. See also the FAQs

Remote Editing: Ange-FTP(Gnu Emacs) EFS([Gnu] XEmacs)

See tips.html on opening a command line shell in Emacs.

For older versions on MS Windows you need to download a patched ftp.exe. First, do a
M-x shell [return]
then run ftp (or telnet, etc to check these, instead). Older emacs have a bug that reveals your password to the screen. If this does not work, try
M-x eshell
Switching from wu-ftpd to ProFTPd may also help.

If you have problems with TRAMP, try a normal logon, if you are using SSH, for example. TRAMP does have a debug flag; EMacro may have some code in the contrib directory. If you are getting multiple prompts like
otp-md5 123 wp8507 ext S/Key Password:
before you get the actual password prompt, try switching to SSH version one:
ssh -1

If you want Tramp to use port 123 (for example), try this syntax for Emacs: C-x f
Or, for XEmacs: C-x f

RPM (Red Hat) Install of XEmacs

Here are the minimal steps to install XEmacs on Red Hat versions 7.x. This assumes that you've downloaded files from or that you mounted into the appropriate directories in your CD ROM. You may wish to install addtional files, such as xemacs-info. You may need to adjust filenames for your particular version.

  1. su #log in as root
  2. rpm -Uvh Canna-libs*.i386.rpm
  3. rpm -Uvh xemacs-2*.i386.rpm


EMacro will work in a TTY text terminal, such as emacs -nw'. However, keybindings may not work very well. You may need to try a console, or other stty or termcap settings. See also tips.html


If Watson does not work, resulting in timer warnings in the minibuffer, try disabling Tiny Tools (see section).


Thanks to Max Polk for his solution to get browse-url() to open only one Netscape 6 window. Note that Netscape 6 has nonstandard MS Windows Registry settings.
WARNING: Do not attempt the following, if you are unfamiliar with editing the registry! Note that some versions of Microsoft Windows mistake restoring a backed up copy of the registry for a license violation and will not allow recovery!! You (and Microsoft) take full responsiblity, if you attempt the following. Back up your data before proceeding. This also has not had recent testing, and may have changed.
For starters, Netscape does not support DDE, so you will likely do well to remove all Netscape references to DDE. You should leave just the command entry in
to only
C:\path\NETSCP6.EXE -url "%1"

Xmodmap Keyboard Sample

From: Johan Kullstam
Xfree86 with 101 key mapping uses alt for meta. Xfree86 with 104 key mapping uses alt for alt and windows key for meta. Note that sometimes only your right alt key is the meta key.
Use this to make alt-key meta-modifier and windows-key the super-modifier.

$ cat /etc/xmodmap 

keycode 64 = Meta_L
keycode 113 = Meta_R
keycode 115 = Super_L
keycode 116 = Super_R
add mod4 = Super_L Super_R
keycode 117 = Menu

XML or HTML problems

If you are seeing something like

External entity html not found
  Public identifier -//W3C//DTD XHTML 1.0 Strict//EN
  System identifier

This is because you are running some variation of sgml-mode (xml, psgml). The parser has problems getting your remote DTD or schema. One solution is to download a local copy of the DTD, and change your XML (or HTML/SGML) code. EMacro does support remote references to DTDs, and can fix this, without changing your XML code. You can see the conditions for this to work, in the code at the bottom of ~/emacs/programmer/e-xml.el . I recommend html-helper-mode, anyway. Also required is w3. See resources.html to get these files. Finally, you must tell EMacro in ~/emacs/preferences/e-prefs.el that use-modem is nil (false) and that use-net is t. In other words, you told the EMacro startup wizard that you have a fast internet connection.

Valid XHTML 1.1! Valid CSS!