| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Emacs manual lists some common kinds of trouble users could get into, see section `Dealing with Emacs Trouble' in The GNU Emacs Manual, so you might look there if the problem you encounter isn't described in this chapter. If you decide you've discovered a bug, see section `Reporting Bugs' in The GNU Emacs Manual, for instructions how to do that.
The file `etc/PROBLEMS' in the Emacs distribution lists various known problems with building and using Emacs on specific platforms; type C-h P to read it.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Old versions (i.e., anything before 19.29) of Emacs had problems editing files larger than 8 megabytes. As of version 19.29, the maximum buffer size is at least 2^27-1, or 134,217,727 bytes, or 132 MBytes. Emacs 20 can be compiled on some 64-bit systems in a way that enlarges the buffer size up to 576,460,752,303,423,487 bytes, or 549,755,813 GBytes.
If you are using a version of Emacs older than 19.29 and cannot upgrade, you will have to recompile. Leonard N. Zubkoff suggests putting the following two lines in `src/config.h' before compiling Emacs to allow for 26-bit integers and pointers (and thus file sizes of up to 33,554,431 bytes):
#define VALBITS 26 #define GCTYPEBITS 5 |
This method may result in "ILLEGAL DATATYPE" and other random errors on some machines.
David Gillespie explains how this problems crops up; while his numbers are true only for pre-19.29 versions of Emacs, the theory remains the same with current versions.
Emacs is largely written in a dialect of Lisp; Lisp is a freely-typed language in the sense that you can put any value of any type into any variable, or return it from a function, and so on. So each value must carry a tag along with it identifying what kind of thing it is, e.g., integer, pointer to a list, pointer to an editing buffer, and so on. Emacs uses standard 32-bit integers for data objects, taking the top 8 bits for the tag and the bottom 24 bits for the value. So integers (and pointers) are somewhat restricted compared to true C integers and pointers.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Try typing M-x shell-strip-ctrl-m RET while in shell-mode to
make them go away. If that doesn't work, you have several options:
For tcsh, put this in your `.cshrc' (or `.tcshrc')
file:
if ($?EMACS) then
if ("$EMACS" == t) then
if ($?tcsh) unset edit
stty nl
endif
endif
|
Or put this in your `.emacs_tcsh' file:
unset edit stty nl |
Alternatively, use csh in your shell buffers instead of
tcsh. One way is:
(setq explicit-shell-file-name "/bin/csh") |
and another is to do this in your `.cshrc' (or `.tcshrc') file:
setenv ESHELL /bin/csh |
(You must start Emacs over again with the environment variable properly set for this to take effect.)
You can also set the ESHELL environment variable in Emacs Lisp
with the following Lisp form,
(setenv "ESHELL" "/bin/csh") |
The above solutions try to prevent the shell from producing the `^M' characters in the first place. If this is not possible (e.g., if you use a Windows shell), you can get Emacs to remove these characters from the buffer by adding this to your `.emacs' init file:
(add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m) |
On a related note: If your shell is echoing your input line in the shell buffer, you might want to try the following command in your shell start-up file:
stty -icrnl -onlcr -echo susp ^Z |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The most likely reason for this message is that the `env' program
is not properly installed. Compile this program for your architecture,
and install it with `a+x' permission in the architecture-dependent
Emacs program directory. (You can find what this directory is at your
site by inspecting the value of the variable exec-directory by
typing C-h v exec-directory RET.)
You should also check for other programs named `env' in your path (e.g., SunOS has a program named `/usr/bin/env'). We don't understand why this can cause a failure and don't know a general solution for working around the problem in this case.
The `make clean' command will remove `env' and other vital programs, so be careful when using it.
It has been reported that this sometimes happened when Emacs was started as an X client from an xterm window (i.e., had a controlling tty) but the xterm was later terminated.
See also `PROBLEMS' (in the `etc' subdirectory of the top-level directory when you unpack the Emacs source) for other possible causes of this message.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
On MS-Windows, this might happen because Emacs tries to look for the
shell in a wrong place. The default file name `/bin/sh' is
usually incorrect for non-Unix systems. If you know where your shell
executable is, set the variable explicit-shell-file-name in
your `.emacs' file to point to its full file name, like this:
(setq explicit-shell-file-name "d:/shells/bash.exe") |
If you don't know what shell does Emacs use, try the M-! command; if that works, put the following line into your `.emacs':
(setq explicit-shell-file-name shell-file-name) |
Some people have trouble with Shell Mode because of intrusive antivirus software; disabling the resident antivirus program solves the problems in those cases.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The termcap entry for terminal type `emacs' is ordinarily put in the `TERMCAP' environment variable of subshells. It may help in certain situations (e.g., using rlogin from shell buffer) to add an entry for `emacs' to the system-wide termcap file. Here is a correct termcap entry for `emacs':
emacs:tc=unknown: |
To make a terminfo entry for `emacs', use tic or
captoinfo. You need to generate
`/usr/lib/terminfo/e/emacs'. It may work to simply copy
`/usr/lib/terminfo/d/dumb' to `/usr/lib/terminfo/e/emacs'.
Having a termcap/terminfo entry will not enable the use of full screen programs in shell buffers. Use M-x terminal-emulator for that instead.
A workaround to the problem of missing termcap/terminfo entries is to
change terminal type `emacs' to type `dumb' or `unknown'
in your shell start up file. csh users could put this in their
`.cshrc' files:
if ("$term" == emacs) set term=dumb
|
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Your terminal (or something between your terminal and the computer) is
sending C-s and C-q for flow control, and Emacs is receiving
these characters and interpreting them as commands. (The C-s
character normally invokes the isearch-forward command.) For
possible solutions, see 10.7 How do I handle C-s and C-q being used for flow control?.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The problem may be that Emacs is linked with a wimpier version of
gethostbyname than the rest of the programs on the machine. This
is often manifested as a message on startup of "X server not responding.
Check your `DISPLAY' environment variable." or a message of
"Unknown host" from open-network-stream.
On a Sun, this may be because Emacs had to be linked with the static C
library. The version of gethostbyname in the static C library
may only look in `/etc/hosts' and the NIS (YP) maps, while the
version in the dynamic C library may be smart enough to check DNS in
addition to or instead of NIS. On a Motorola Delta running System V
R3.6, the version of gethostbyname in the standard library works,
but the one that works with NIS doesn't (the one you get with -linet).
Other operating systems have similar problems.
Try these options:
#define LIBS_SYSTEM -lresolv |
gethostbyname and friends in `libc.a' with more
useful versions such as the ones in `libresolv.a'. Then relink
Emacs.
ypbind is
properly told to do DNS lookups with the correct command line switch.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
An error occurred while loading either your `.emacs' file or the system-wide file `lisp/default.el'. Emacs 21.1 and later pops the `*Messages*' buffer, and puts there some additional information about the error, to provide some hints for debugging.
For information on how to debug your `.emacs' file, see 5.3 How do I debug a `.emacs' file?.
It may be the case that you need to load some package first, or use a hook that will be evaluated after the package is loaded. A common case of this is explained in 10.3 Why doesn't this [terminal or window-system setup] code work in my `.emacs' file, but it works just fine after Emacs starts up?.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As of version 19, Emacs searches for X resources in the files specified by the following environment variables:
XFILESEARCHPATH
XUSERFILESEARCHPATH
XAPPLRESDIR
This emulates the functionality provided by programs written using the Xt toolkit.
XFILESEARCHPATH and XUSERFILESEARCHPATH should be a list
of file names separated by colons. XAPPLRESDIR should be a list
of directory names separated by colons.
Emacs searches for X resources:
LANG
environment variable), if the `LANG' environment variable is set,
LANG environment variable
is set),
XFILESEARCHPATH.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This probably happens because you have set the frame parameters in the
variable initial-frame-alist. That variable holds parameters
used only for the first frame created when Emacs starts. To customize
the parameters of all frames, change the variable
default-frame-alist instead.
These two variables exist because many users customize the initial frame in a special way. For example, you could determine the position and size of the initial frame, but would like to control the geometry of the other frames by individually positioning each one of them.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Old versions of Emacs (i.e., versions before Emacs 20.x) often encountered this when the master lock file, `!!!SuperLock!!!', has been left in the lock directory somehow. Delete it.
Mark Meuer says that NeXT NFS has a bug
where an exclusive create succeeds but returns an error status. This
can cause the same problem. Since Emacs's file locking doesn't work
over NFS anyway, the best solution is to recompile Emacs with
CLASH_DETECTION undefined.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When entering a file name in the minibuffer, Emacs will attempt to expand a `$' followed by a word as an environment variable. To suppress this behavior, type $$ instead.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Emacs has no way of knowing when the shell actually changes its directory. This is an intrinsic limitation of Unix. So it tries to guess by recognizing `cd' commands. If you type cd followed by a directory name with a variable reference (cd $HOME/bin) or with a shell metacharacter (cd ../lib*), Emacs will fail to correctly guess the shell's new current directory. A huge variety of fixes and enhancements to shell mode for this problem have been written to handle this problem. Check the Lisp Code Directory (see section 8.2 How do I find a Emacs Lisp package that does XXX?).
You can tell Emacs the shell's current directory with the command M-x dirs.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In his book The Cuckoo's Egg, Cliff Stoll describes this in
chapter 4. The site at LBL had installed the `/etc/movemail'
program setuid root. (As of version 19, `movemail' is in your
architecture-specific directory; type C-h v exec-directory
RET to see what it is.) Since movemail had not been
designed for this situation, a security hole was created and users could
get root privileges.
movemail has since been changed so that this security hole will
not exist, even if it is installed setuid root. However,
movemail no longer needs to be installed setuid root, which
should eliminate this particular risk.
We have heard unverified reports that the 1988 Internet worm took advantage of this configuration problem.
file-local-variable feature. (Yes, a risk, but easy to
change.)
There is an Emacs feature that allows the setting of local values for variables when editing a file by including specially formatted text near the end of the file. This feature also includes the ability to have arbitrary Emacs Lisp code evaluated when the file is visited. Obviously, there is a potential for Trojan horses to exploit this feature.
Emacs 18 allowed this feature by default; users could disable it by
setting the variable inhibit-local-variables to a non-nil value.
As of Emacs 19, Emacs has a list of local variables that create a
security risk. If a file tries to set one of them, it asks the user to
confirm whether the variables should be set. You can also tell Emacs
whether to allow the evaluation of Emacs Lisp code found at the bottom
of files by setting the variable enable-local-eval.
For more information, See Info file `emacs', node `File Variables'.
Emacs accepts synthetic X events generated by the SendEvent
request as though they were regular events. As a result, if you are
using the trivial host-based authentication, other users who can open X
connections to your X workstation can make your Emacs process do
anything, including run other processes with your privileges.
The only fix for this is to prevent other users from being able to open
X connections. The standard way to prevent this is to use a real
authentication mechanism, such as `MIT-MAGIC-COOKIE-1'. If using
the xauth program has any effect, then you are probably using
`MIT-MAGIC-COOKIE-1'. Your site may be using a superior
authentication method; ask your system administrator.
If real authentication is not a possibility, you may be satisfied by just allowing hosts access for brief intervals while you start your X programs, then removing the access. This reduces the risk somewhat by narrowing the time window when hostile users would have access, but does not eliminate the risk.
On most computers running Unix and X, you enable and disable
access using the xhost command. To allow all hosts access to
your X server, use
xhost + |
at the shell prompt, which (on an HP machine, at least) produces the following message:
access control disabled, clients can connect from any host |
To deny all hosts access to your X server (except those explicitly allowed by name), use
xhost - |
On the test HP computer, this command generated the following message:
access control enabled, only authorized clients can connect |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Chances are you're using a localized version of Unix that doesn't use US date format in dired listings. You can check this by looking at dired listings or by typing ls -l to a shell and looking at the dates that come out.
Dired uses a regular expression to find the beginning of a file name. In a long Unix-style directory listing (`ls -l'), the file name starts after the date. The regexp has thus been written to look for the date, the format of which can vary on non-US systems.
There are two approaches to solving this. The first one involves setting things up so that `ls -l' outputs US date format. This can be done by setting the locale. See your OS manual for more information.
The second approach involves changing the regular expression used by
dired, dired-move-to-filename-regexp.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |