The very unofficial .emacs home EMacro - Solutions
what is this all about ?
customization basics
special topics
local dotfiles
dotfiles on the web
new and updated pages
useful sites and pages
search locally
OS/2 Emacs
Additional Resources
Installation Docs
Release Notes
To Do
Latest Additions
local files:
John J. Glynn
David Jolley

linked files:


The Emacs wiki

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


.emacs - Where Does It Go?

Your ".emacs" file might also be called "_emacs" on MS Windows. You should set the environment variable "HOME" (Skip this, if you run classic Mac OS v8-9). You can inspect this variable by entering at a prompt:
This is your home directory. EMacro is kicked off by a file called ".emacs". You can see this hidden file on Linux compatible systems by entering
cd; ls -a

Bug/Problem Checklist

  • Know the 'Control G' (C-G) keys. This is your escape key for exiting commands in the minibuffer (status line). Hitting the Esc key 3 times works similarly.
  • Life in XEmacs is better, when you download the latest sumo tarball from
  • Check resources.html for answers to FAQs (Frequently Asked Questions) and for the latest version of any *.el elisp file. Note that resources.html may be more up-to-date than the links that EMacro generates in *cache.el.
  • Be sure to check the PROBLEMS file in your site's emacs directory. release_notes.html may also help.
  • Check resources.html for the latest versions of all software
  • EMacro's source code is neatly organized. You may find commented code that fixes your solution. Try the following:
    M-x grep [return]
    grep -n "problem keyword" ~/emacs/emacro/*.el or
    grep -n "problem keyword" ~/emacs/programmer/*.el
    Emacro should have already loaded the grep.el or igrep.el library.
  • Try running
    cd %HOME%\emacs\bin\w32 #For Microsoft Windows
    cd ~/emacs/bin/unix/ #For all other systems

Finally, if you still need help with EMacro, be sure to provide me with the following:
Version of EMacro   C-h v
Version and Name of operating system
uname -a (on unix)
Version and Emacs or XEmacs
M-x version
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 JDE. 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:
telnet nntp

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

Key Bindings

Keys don't work? Try turning off your Caps Lock!

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 (EMacro) and shared init files, respectively.
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: ~/emacro.el and ~/emacro.el.gz or ~/emacro.elc

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. On Windows NT, this might be 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.
EMacro will check the web for upgrades. If you told EMacro that you have a fast connection, and a suitable tool, such as lynx is in the PATH, then EMacro will attempt this check. You can turn off this check (perhaps you are using a laptop on the road) by editing ~/emacs/preferences/e-prefs.el

Printing Remotely On MS Windows

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 emacro.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

Be sure to also take a look at ~/emacs/contrib/lpr. For more details, see the FAQ at

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

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

  • Check from the shell, that you can FTP to the remote site
  • Check that the shell you use (e.g. /bin/zsh) is in the host's /etc/shells
  • Is the server running ftpd daemon/service? If it runs rlogin/rcp or is secured with ssh/scp then get TRAMP from

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.


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

Tweaking: Changing Emacs Options

In Emacs, you can enter M-x customize or, more simply, choose Options->Customize Emacs from the menu.


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
All content copyright by the contributors. Website maintained with Emacs , wsmake and html-helper-mode
Emacs community logo by Daniel Lundin Last updated on Sat Jan 22 14:57:04 2005 by Ingo Koch