annotate =PROBLEMS @ 1949:a81c98f793b6

Formerly PROBLEMS.~2~
author Richard M. Stallman <rms@gnu.org>
date Wed, 24 Feb 1993 17:56:09 +0000
parents 794bd24d1415
children 049a892e6398
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1858
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 This file describes various problems that have been encountered
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 in compiling, installing and running GNU Emacs.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
1949
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
4 * `expand-file-name' fails to work on any but the machine you dumped Emacs on.
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
5
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
6 On some systems, if you use any of the functions which look up
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
7 information in the passwd database before dumping Emacs (say, by using
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
8 expand-file-name in site-init.el), then those functions will not work
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
9 in the dumped Emacs on any host but the one Emacs was dumped on.
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
10
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
11 Apparently, the Yellow Pages (or Network Information Service)
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
12 functions cache information the first time they are called in the
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
13 undumped emacs, this information gets included in the dumped
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
14 executable, and it is then inaccurate if the executable is used on
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
15 another host.
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
16
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
17 The solution? Don't use expand-file-name in site-init.el, or in
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
18 anything it loads. Yuck.
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
19
1858
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 * On some variants of SVR4, Emacs does not work at all with X.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 Try defining BROKEN_FIONREAD in your config.h file. If this solves
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 the problem, please send a bug report to tell us this is needed; be
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 sure to say exactly what type of machine and system you are using.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 * Linking says that the functions insque and remque are undefined.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 Change oldXMenu/Makefile by adding insque.o to the variable OBJS.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 * Emacs fails to understand most Internet host names, even though
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 the names work properly with other programs on the same system.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 This typically happens on Suns and other systems that use shared
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 libraries. The cause is that the site has installed a version of the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 shared library which uses a name server--but has not installed a
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 similiar version of the unshared library which Emacs uses.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 The result is that most programs, using the shared library, work with
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 the nameserver, but Emacs does not.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 The fix is to install an unshared library that corresponds to what you
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 installed in the shared library, and then relink Emacs.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 * On a Sun running SunOS 4.1.1, you get this error message from GNU ld:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 The problem is in the Sun shared C library, not in GNU ld.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 The solution is to install Patch-ID# 100267-03 from Sun.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 * Self documentation messages are garbled.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 This means that the file `etc/DOC-...' doesn't properly correspond
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 with the Emacs executable. Redumping Emacs and then installing the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 corresponding pair of files should fix the problem.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 * M-x shell immediately responds "Process shell exited abnormally with code 1".
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 This is often due to inability to run the program `env'.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 This should be in the `etc' subdirectory of the directory
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 where Emacs is installed, and it should be marked executable.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 * Trouble using ptys on AIX.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 People often instll the pty devices on AIX incorrectly.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 Use `smit pty' to reinstall them properly.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 * Shell mode on HP/UX gives the message, "`tty`: Ambiguous".
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 christos@theory.tn.cornell.edu says:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 The problem is that in your .cshrc you have something that tries to
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74 execute `tty`. If you are not running the shell on a real tty then
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 tty will print "not a tty". Csh expects one word in some places,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 but tty is giving it back 3.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 The solution is to add a pair of quotes around `tty` to make it a single
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 word:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 if (`tty` == "/dev/console")
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83 should be changed to:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 if ("`tty`" == "/dev/console")
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 Even better, move things that set up terminal sections out of .cshrc
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 and into .login.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 * Using X Windows, control-shift-leftbutton makes Emacs hang.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 Use the shell command `xset bc' to make the old X Menu package work.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 * Emacs running under X Windows does not handle mouse clicks.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 * `emacs -geometry 80x20' finds a file named `80x20'.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 One cause of such problems is having (setq term-file-prefix nil) in
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 your .emacs file. Another cause is a bad value of EMACSLOADPATH in
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 the environment.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 * Emacs starts in a directory other than the one that is current in the shell.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 If the PWD environment variable exists, Emacs uses this variable as
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 the initial working directory.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 Some shells automatically update this variable, while other shells fail
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107 to do so. If you use two such shells in combination, the variable can
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 end up wrong. This confuses Emacs.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 The solution is to put something in the start-up file for the shell
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 that does not update PWD, to get rid of that environment variable.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 For example, in csh, use `unsetenv PWD'.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 * Emacs gets error message from linker on Sun.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 If the error message says that a symbol such as `f68881_used' or
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 `ffpa_used' or `start_float' is undefined, this probably indicates
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118 that you have compiled some libraries, such as the X libraries,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 with a floating point option other than the default.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 It's not terribly hard to make this work with small changes in
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 crt0.c together with linking with Fcrt1.o, Wcrt1.o or Mcrt1.o.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 However, the easiest approach is to build Xlib with the default
1949
a81c98f793b6 Formerly PROBLEMS.~2~
Richard M. Stallman <rms@gnu.org>
parents: 1858
diff changeset
124 floating point option: -fsoft.
1858
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
126 * Emacs fails to get default settings from X Windows server.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
127
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128 The X library in X11R4 has a bug; it interchanges the 2nd and 3rd
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 arguments to XGetDefaults. Define the macro XBACKWARDS in config.h to
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 tell Emacs to compensate for this.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132 I don't believe there is any way Emacs can determine for itself
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133 whether this problem is present on a given system.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 * Keyboard input gets confused after a beep when using a DECserver
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 as a concentrator.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 This problem seems to be a matter of configuring the DECserver to use
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 7 bit characters rather than 8 bit characters.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 * M-x shell persistently reports "Process shell exited abnormally with code 1".
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 This happened on Suns as a result of what is said to be a bug in Sunos
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 version 4.0.x. The only fix was to reboot the machine.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 * Programs running under terminal emulator do not recognize `emacs'
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 terminal type.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 The cause of this is a shell startup file that sets the TERMCAP
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 environment variable. The terminal emulator uses that variable to
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 provide the information on the special terminal type that Emacs
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 emulates.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 Rewrite your shell startup file so that it does not change TERMCAP
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155 in such a case. You could use the following conditional which sets
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 it only if it is undefined.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158 if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 Or you could set TERMCAP only when you set TERM--which should not
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 happen in a non-login shell.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 * Error compiling sysdep.c, "sioctl.h: no such file or directory".
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 Among USG systems with TIOCGWINSZ, some require sysdep.c to include
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 the file sioctl.h; on others, sioctl.h does not exist. We don't know
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 how to distinguish these two kind of systems, so currently we try to
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 include sioctl.h on all of them. If this #include gets an error, just
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 delete it.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 * X Windows doesn't work if DISPLAY uses a hostname.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 People have reported kernel bugs in certain systems that cause Emacs
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174 not to work with X Windows if DISPLAY is set using a host name. But
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 the problem does not occur if DISPLAY is set to `unix:0.0'. I think
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 the bug has to do with SIGIO or FIONREAD.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 You may be able to compensate for the bug by doing (set-input-mode nil nil).
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179 However, that has the disadvantage of turning off interrupts, so that
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 you are unable to quit out of a Lisp program by typing C-g.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 The easy way to do this is to put
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 (setq x-sigio-bug t)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 in your site-init.el file.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
188 * Problem with remote X server on Suns.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
190 On a Sun, running Emacs on one machine with the X server on another
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
191 may not work if you have used the unshared system libraries. This
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
192 is because the unshared libraries fail to use YP for host name lookup.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 As a result, the host name you specify may not be recognized.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 * Watch out for .emacs files and EMACSLOADPATH environment vars
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 These control the actions of Emacs.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198 ~/.emacs is your Emacs init file.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199 EMACSLOADPATH overrides which directories the function
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 "load" will search.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202 If you observe strange problems, check for these and get rid
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 of them, then try again.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 * Shell mode ignores interrupts on Apollo Domain
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 You may find that M-x shell prints the following message:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 Warning: no access to tty; thus no job control in this shell...
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 This can happen if there are not enough ptys on your system.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212 Here is how to make more of them.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214 % cd /dev
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
215 % ls pty*
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
216 # shows how many pty's you have. I had 8, named pty0 to pty7)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
217 % /etc/crpty 8
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
218 # creates eight new pty's
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
219
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
220 * Fatal signal in the command temacs -l loadup inc dump
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
221
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 This command is the final stage of building Emacs. It is run by the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223 Makefile in the src subdirectory, or by build.com on VMS.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225 It has been known to get fatal errors due to insufficient swapping
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 space available on the machine.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 On 68000's, it has also happened because of bugs in the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 subroutine `alloca'. Verify that `alloca' works right, even
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 for large blocks (many pages).
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232 * test-distrib says that the distribution has been clobbered
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
233 * or, temacs prints "Command key out of range 0-127"
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 * or, temacs runs and dumps xemacs, but xemacs totally fails to work.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 * or, temacs gets errors dumping xemacs
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 This can be because the .elc files have been garbled. Do not be
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 fooled by the fact that most of a .elc file is text: these are
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239 binary files and can contain all 256 byte values.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 In particular `shar' cannot be used for transmitting GNU Emacs.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 It typically truncates "lines". What appear to be "lines" in
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 a binary file can of course be of any length. Even once `shar'
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 itself is made to work correctly, `sh' discards null characters
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245 when unpacking the shell archive.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 I have also seen character \177 changed into \377. I do not know
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 what transfer means caused this problem. Various network
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249 file transfer programs are suspected of clobbering the high bit.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251 The only verified ways to transfer GNU Emacs are `tar', kermit (in
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252 binary mode on Unix), and rcp or internet ftp between two Unix systems,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 or chaosnet cftp using raw mode.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
254
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
255 If you have a copy of Emacs that has been damaged in its
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
256 nonprinting characters, you can fix them:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
257
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
258 1) Record the names of all the .elc files.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259 2) Delete all the .elc files.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 3) Recompile alloc.c with a value of PURESIZE twice as large.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 You might as well save the old alloc.o.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
262 4) Remake xemacs. It should work now.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 5) Running xemacs, do Meta-x byte-compile-file repeatedly
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264 to recreate all the .elc files that used to exist.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
265 You may need to increase the value of the variable
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
266 max-lisp-eval-depth to succeed in running the compiler interpreted
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267 on certain .el files. 400 was sufficient as of last report.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268 6) Reinstall the old alloc.o (undoing changes to alloc.c if any)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
269 and remake temacs.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
270 7) Remake xemacs. It should work now, with valid .elc files.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
271
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
272 * temacs prints "Pure Lisp storage exhausted"
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
273
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
274 This means that the Lisp code loaded from the .elc and .el
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
275 files during temacs -l loadup inc dump took up more
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
276 space than was allocated.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
277
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
278 This could be caused by
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
279 1) adding code to the preloaded Lisp files
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
280 2) adding more preloaded files in loadup.el
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
281 3) having a site-init.el or site-load.el which loads files.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
282 Note that ANY site-init.el or site-load.el is nonstandard;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
283 if you have received Emacs from some other site
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
284 and it contains a site-init.el or site-load.el file, consider
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
285 deleting that file.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
286 4) getting the wrong .el or .elc files
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
287 (not from the directory you expected).
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
288 5) deleting some .elc files that are supposed to exist.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
289 This would cause the source files (.el files) to be
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
290 loaded instead. They take up more room, so you lose.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
291 6) a bug in the Emacs distribution which underestimates
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
292 the space required.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
293
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
294 If the need for more space is legitimate, change the definition
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
295 of PURESIZE in puresize.h.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
296
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
297 But in some of the cases listed above, this problem is a consequence
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
298 of something else that is wrong. Be sure to check and fix the real
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
299 problem.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
300
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
301 * Changes made to .el files do not take effect.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
302
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
303 You may have forgotten to recompile them into .elc files.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
304 Then the old .elc files will be loaded, and your changes
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
305 will not be seen. To fix this, do M-x byte-recompile-directory
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
306 and specify the directory that contains the Lisp files.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
307
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
308 * The dumped Emacs (xemacs) crashes when run, trying to write pure data.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
309
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
310 Two causes have been seen for such problems.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
311
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
312 1) On a system where getpagesize is not a system call, it is defined
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
313 as a macro. If the definition (in both unexec.c and malloc.c) is wrong,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
314 it can cause problems like this. You might be able to find the correct
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
315 value in the man page for a.out (5).
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
316
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
317 2) Some systems allocate variables declared static among the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
318 initialized variables. Emacs makes all initialized variables in most
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
319 of its files pure after dumping, but the variables declared static and
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
320 not initialized are not supposed to be pure. On these systems you
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
321 may need to add "#define static" to the m- or the s- file.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
322
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
323 * Compilation errors on VMS.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
324
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
325 You will get warnings when compiling on VMS because there are
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
326 variable names longer than 32 (or whatever it is) characters.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
327 This is not an error. Ignore it.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
328
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
329 VAX C does not support #if defined(foo). Uses of this construct
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
330 were removed, but some may have crept back in. They must be rewritten.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
331
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
332 There is a bug in the C compiler which fails to sign extend characters
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
333 in conditional expressions. The bug is:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
334 char c = -1, d = 1;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
335 int i;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
336
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
337 i = d ? c : d;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
338 The result is i == 255; the fix is to typecast the char in the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
339 conditional expression as an (int). Known occurrences of such
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
340 constructs in Emacs have been fixed.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
341
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
342 * rmail gets error getting new mail
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
343
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
344 rmail gets new mail from /usr/spool/mail/$USER using a program
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345 called `movemail'. This program interlocks with /bin/mail using
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
346 the protocol defined by /bin/mail.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
347
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
348 There are two different protocols in general use. One of them uses
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
349 the `flock' system call. The other involves creating a lock file;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
350 `movemail' must be able to write in /usr/spool/mail in order to do
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
351 this. You control which one is used by defining, or not defining,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
352 the macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
353 IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354 SYSTEM, YOU CAN LOSE MAIL!
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
355
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
356 If your system uses the lock file protocol, and fascist restrictions
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
357 prevent ordinary users from writing the lock files in /usr/spool/mail,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
358 you may need to make `movemail' setgid to a suitable group such as
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 `mail'. You can use these commands (as root):
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
360
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
361 chgrp mail movemail
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 chmod 2755 movemail
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364 * Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365 * GNUs can't make contact with the specified host for nntp.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
367 Some people have found that Emacs was unable to connect to the local
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
368 host by name, as in DISPLAY=prep:0 if you are running on prep, but
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
369 could handle DISPLAY=unix:0. Here is what tale@rpi.edu said:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
370
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
371 Seems as
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
372 though gethostbyname was bombing somewhere along the way. Well, we
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
373 had just upgrade from SunOS 3.5 (which X11 was built under) to SunOS
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
374 4.0.1. Any new X applications which tried to be built with the pre
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
375 OS-upgrade libraries had the same problems which Emacs was having.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
376 Missing /etc/resolv.conf for a little while (when one of the libraries
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
377 was built?) also might have had a hand in it.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
378
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
379 The result of all of this (with some speculation) was that we rebuilt
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
380 X and then rebuilt Emacs with the new libraries. Works as it should
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
381 now. Hoorah.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
382
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
383 If you have already installed the name resolver in the file libresolv.a,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
384 then you need to compile Emacs to use that library. The easiest way to
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
385 do this is to add to config.h a definition of LIBS_SYSTEM, LIBS_MACHINE
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
386 or LIB_STANDARD which uses -lresolv. Watch out! If you redefine a macro
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
387 that is already in use in your configuration to supply some other libraries,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
388 be careful not to lose the others.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
389
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
390 Thus, you could start by adding this to config.h:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
391
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
392 #define LIBS_SYSTEM -lresolv
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
393
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
394 Then if this gives you an error for redefining a macro, and you see that
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
395 the s- file defines LIBS_SYSTEM as -lfoo -lbar, you could change config.h
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
396 again to say this:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
397
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
398 #define LIBS_SYSTEM -lresolv -lfoo -lbar
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
399
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
400 * Emacs spontaneously displays "I-search: " at the bottom of the screen.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
401
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
402 This means that Control-S/Control-Q "flow control" is being used.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
403 C-s/C-q flow control is bad for Emacs editors because it takes away
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
404 C-s and C-q as user commands. Since editors do not output long streams
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
405 of text without user commands, there is no need for a user-issuable
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
406 "stop output" command in an editor; therefore, a properly designed
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
407 flow control mechanism would transmit all possible input characters
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
408 without interference. Designing such a mechanism is easy, for a person
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
409 with at least half a brain.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
410
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
411 There are three possible reasons why flow control could be taking place:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
412
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
413 1) Terminal has not been told to disable flow control
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
414 2) Insufficient padding for the terminal in use
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
415 3) Some sort of terminal concentrator or line switch is responsible
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
416
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
417 First of all, many terminals have a set-up mode which controls
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
418 whether they generate flow control characters. This must be
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
419 set to "no flow control" in order for Emacs to work. Sometimes
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
420 there is an escape sequence that the computer can send to turn
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
421 flow control off and on. If so, perhaps the termcap `ti' string
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
422 should turn flow control off, and the `te' string should turn it on.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
423
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
424 Once the terminal has been told "no flow control", you may find it
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
425 needs more padding. The amount of padding Emacs sends is controlled
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
426 by the termcap entry for the terminal in use, and by the output baud
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
427 rate as known by the kernel. The shell command `stty' will print
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
428 your output baud rate; `stty' with suitable arguments will set it if
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
429 it is wrong. Setting to a higher speed causes increased padding. If
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
430 the results are wrong for the correct speed, there is probably a
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
431 problem in the termcap entry. You must speak to a local Unix wizard
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
432 to fix this. Perhaps you are just using the wrong terminal type.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
433
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
434 For terminals that lack a "no flow control" mode, sometimes just
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
435 giving lots of padding will prevent actual generation of flow control
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
436 codes. You might as well try it.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
437
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
438 If you are really unlucky, your terminal is connected to the computer
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
439 through a concentrator which sends flow control to the computer, or it
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
440 insists on sending flow control itself no matter how much padding you
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
441 give it. You are screwed! You should replace the terminal or
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
442 concentrator with a properly designed one. In the mean time,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
443 some drastic measures can make Emacs semi-work.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
444
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
445 One drastic measure to ignore C-s and C-q, while sending enough
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
446 padding that the terminal will not really lose any output.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
447 Ignoring C-s and C-q can be done by using keyboard-translate-table
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
448 to map them into an undefined character such as C-^ or C-\. Sending
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
449 lots of padding is done by changing the termcap entry. Here is how
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
450 to make such a keyboard-translate-table:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
451
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
452 (let ((the-table (make-string 128 0)))
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
453 ;; Default is to translate each character into itself.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
454 (let ((i 0))
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
455 (while (< i 128)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
456 (aset the-table i i)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
457 (setq i (1+ i))))
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
458 ;; Swap C-s with C-\
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
459 (aset the-table ?\C-\\ ?\C-s)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
460 (aset the-table ?\C-s ?\C-\\)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
461 ;; Swap C-q with C-^
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
462 (aset the-table ?\C-^ ?\C-q)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
463 (aset the-table ?\C-q ?\C-^)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
464 (setq keyboard-translate-table the-table))
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
465
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
466 An even more drastic measure is to make Emacs use flow control.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
467 To do this, evaluate the Lisp expression (set-input-mode nil t).
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
468 Emacs will then interpret C-s and C-q as flow control commands. (More
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
469 precisely, it will allow the kernel to do so as it usually does.) You
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
470 will lose the ability to use them for Emacs commands. Also, as a
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
471 consequence of using CBREAK mode, the terminal's Meta-key, if any,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
472 will not work, and C-g will be liable to cause a loss of output which
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
473 will produce garbage on the screen. (These problems apply to 4.2BSD;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
474 they may not happen in 4.3 or VMS, and I don't know what would happen
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
475 in sysV.) You can use keyboard-translate-table, as shown above,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
476 to map two other input characters (such as C-^ and C-\) into C-s and
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
477 C-q, so that you can still search and quote.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
478
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
479 I have no intention of ever redisigning the Emacs command set for
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
480 the assumption that terminals use C-s/C-q flow control. This
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
481 flow control technique is a bad design, and terminals that need
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
482 it are bad merchandise and should not be purchased. If you can
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
483 get some use out of GNU Emacs on inferior terminals, I am glad,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
484 but I will not make Emacs worse for properly designed systems
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
485 for the sake of inferior systems.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
486
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
487 * Control-S and Control-Q commands are ignored completely.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
488
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
489 For some reason, your system is using brain-damaged C-s/C-q flow
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
490 control despite Emacs's attempts to turn it off. Perhaps your
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
491 terminal is connected to the computer through a concentrator
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
492 that wants to use flow control.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
493
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
494 You should first try to tell the concentrator not to use flow control.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
495 If you succeed in this, try making the terminal work without
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
496 flow control, as described in the preceding section.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
497
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
498 If that line of approach is not successful, map some other characters
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
499 into C-s and C-q using keyboard-translate-table. The example above
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
500 shows how to do this with C-^ and C-\.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
501
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
502 * Control-S and Control-Q commands are ignored completely on a net connection.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
503
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
504 Some versions of rlogin (and possibly telnet) do not pass flow
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
505 control characters to the remote system to which they connect.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
506 On such systems, emacs on the remote system cannot disable flow
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
507 control on the local system.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
508
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
509 One way to cure this is to disable flow control on the local host
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
510 (the one running rlogin, not the one running rlogind) using the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
511 stty command, before starting the rlogin process. On many systems,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
512 "stty start u stop u" will do this.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
513
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
514 Some versions of tcsh will prevent even this from working. One way
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
515 around this is to start another shell before starting rlogin, and
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
516 issue the stty command to disable flow control from that shell.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
517
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
518 * Screen is updated wrong, but only on one kind of terminal.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
519
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
520 This could mean that the termcap entry you are using for that
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
521 terminal is wrong, or it could mean that Emacs has a bug handing
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
522 the combination of features specified for that terminal.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
523
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
524 The first step in tracking this down is to record what characters
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
525 Emacs is sending to the terminal. Execute the Lisp expression
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
526 (open-termscript "./emacs-script") to make Emacs write all
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
527 terminal output into the file ~/emacs-script as well; then do
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
528 what makes the screen update wrong, and look at the file
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
529 and decode the characters using the manual for the terminal.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
530 There are several possibilities:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
531
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
532 1) The characters sent are correct, according to the terminal manual.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
533
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
534 In this case, there is no obvious bug in Emacs, and most likely you
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
535 need more padding, or possibly the terminal manual is wrong.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
536
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
537 2) The characters sent are incorrect, due to an obscure aspect
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
538 of the terminal behavior not described in an obvious way
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
539 by termcap.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
540
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
541 This case is hard. It will be necessary to think of a way for
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
542 Emacs to distinguish between terminals with this kind of behavior
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
543 and other terminals that behave subtly differently but are
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
544 classified the same by termcap; or else find an algorithm for
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
545 Emacs to use that avoids the difference. Such changes must be
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
546 tested on many kinds of terminals.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
547
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
548 3) The termcap entry is wrong.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
549
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
550 See the file etc/TERMS for information on changes
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
551 that are known to be needed in commonly used termcap entries
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
552 for certain terminals.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
553
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
554 4) The characters sent are incorrect, and clearly cannot be
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
555 right for any terminal with the termcap entry you were using.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
556
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
557 This is unambiguously an Emacs bug, and can probably be fixed
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
558 in termcap.c, tparam.c, term.c, scroll.c, cm.c or dispnew.c.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
559
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
560 * Output from Control-V is slow.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
561
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
562 On many bit-map terminals, scrolling operations are fairly slow.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
563 Often the termcap entry for the type of terminal in use fails
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
564 to inform Emacs of this. The two lines at the bottom of the screen
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
565 before a Control-V command are supposed to appear at the top after
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
566 the Control-V command. If Emacs thinks scrolling the lines is fast,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
567 it will scroll them to the top of the screen.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
568
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
569 If scrolling is slow but Emacs thinks it is fast, the usual reason is
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
570 that the termcap entry for the terminal you are using does not
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
571 specify any padding time for the `al' and `dl' strings. Emacs
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
572 concludes that these operations take only as much time as it takes to
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
573 send the commands at whatever line speed you are using. You must
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
574 fix the termcap entry to specify, for the `al' and `dl', as much
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
575 time as the operations really take.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
576
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
577 Currently Emacs thinks in terms of serial lines which send characters
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
578 at a fixed rate, so that any operation which takes time for the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
579 terminal to execute must also be padded. With bit-map terminals
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
580 operated across networks, often the network provides some sort of
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
581 flow control so that padding is never needed no matter how slow
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
582 an operation is. You must still specify a padding time if you want
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
583 Emacs to realize that the operation takes a long time. This will
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
584 cause padding characters to be sent unnecessarily, but they do
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
585 not really cost much. They will be transmitted while the scrolling
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
586 is happening and then discarded quickly by the terminal.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
587
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
588 Most bit-map terminals provide commands for inserting or deleting
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
589 multiple lines at once. Define the `AL' and `DL' strings in the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
590 termcap entry to say how to do these things, and you will have
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
591 fast output without wasted padding characters. These strings should
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
592 each contain a single %-spec saying how to send the number of lines
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
593 to be scrolled. These %-specs are like those in the termcap
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
594 `cm' string.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
595
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
596 You should also define the `IC' and `DC' strings if your terminal
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
597 has a command to insert or delete multiple characters. These
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
598 take the number of positions to insert or delete as an argument.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
599
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
600 A `cs' string to set the scrolling region will reduce the amount
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
601 of motion you see on the screen when part of the screen is scrolled.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
602
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
603 * Your Delete key sends a Backspace to the terminal, using an AIXterm.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
604
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
605 The solution is to include in your .Xdefaults the lines:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
606
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
607 *aixterm.Translations: #override <Key>BackSpace: string(0x7f)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
608 aixterm*ttyModes: erase ^?
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
609
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
610 This makes your Backspace key send DEL (ASCII 127).
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
611
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
612 * You type Control-H (Backspace) expecting to delete characters.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
613
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
614 Put `stty dec' in your .login file and your problems will disappear
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
615 after a day or two.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
616
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
617 The choice of Backspace for erasure was based on confusion, caused by
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
618 the fact that backspacing causes erasure (later, when you type another
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
619 character) on most display terminals. But it is a mistake. Deletion
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
620 of text is not the same thing as backspacing followed by failure to
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
621 overprint. I do not wish to propagate this confusion by conforming
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
622 to it.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
623
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
624 For this reason, I believe `stty dec' is the right mode to use,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
625 and I have designed Emacs to go with that. If there were a thousand
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
626 other control characters, I would define Control-h to delete as well;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
627 but there are not very many other control characters, and I think
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
628 that providing the most mnemonic possible Help character is more
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
629 important than adapting to people who don't use `stty dec'.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
630
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
631 If you are obstinate about confusing buggy overprinting with deletion,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
632 you can redefine Backspace in your .emacs file:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
633 (global-set-key "\b" 'delete-backward-char)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
634 You may then wish to put the function help-command on some
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
635 other key. I leave to you the task of deciding which key.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
636
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
637 * Editing files through RFS gives spurious "file has changed" warnings.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
638 It is possible that a change in Emacs 18.37 gets around this problem,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
639 but in case not, here is a description of how to fix the RFS bug that
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
640 causes it.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
641
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
642 There was a serious pair of bugs in the handling of the fsync() system
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
643 call in the RFS server.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
644
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
645 The first is that the fsync() call is handled as another name for the
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
646 close() system call (!!). It appears that fsync() is not used by very
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
647 many programs; Emacs version 18 does an fsync() before closing files
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
648 to make sure that the bits are on the disk.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
649
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
650 This is fixed by the enclosed patch to the RFS server.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
651
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
652 The second, more serious problem, is that fsync() is treated as a
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
653 non-blocking system call (i.e., it's implemented as a message that
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
654 gets sent to the remote system without waiting for a reply). Fsync is
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
655 a useful tool for building atomic file transactions. Implementing it
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
656 as a non-blocking RPC call (when the local call blocks until the sync
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
657 is done) is a bad idea; unfortunately, changing it will break the RFS
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
658 protocol. No fix was supplied for this problem.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
659
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
660 (as always, your line numbers may vary)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
661
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
662 % rcsdiff -c -r1.2 serversyscall.c
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
663 RCS file: RCS/serversyscall.c,v
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
664 retrieving revision 1.2
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
665 diff -c -r1.2 serversyscall.c
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
666 *** /tmp/,RCSt1003677 Wed Jan 28 15:15:02 1987
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
667 --- serversyscall.c Wed Jan 28 15:14:48 1987
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
668 ***************
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
669 *** 163,169 ****
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
670 /*
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
671 * No return sent for close or fsync!
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
672 */
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
673 ! if (syscall == RSYS_close || syscall == RSYS_fsync)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
674 proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
675 else
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
676 {
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
677 --- 166,172 ----
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
678 /*
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
679 * No return sent for close or fsync!
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
680 */
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
681 ! if (syscall == RSYS_close)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
682 proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
683 else
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
684 {
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
685
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
686 * ld complains because `alloca' is not defined on your system.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
687
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
688 Alloca is a library function in 4.2bsd, which is used very heavily by
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
689 GNU Emacs. Use of malloc instead is very difficult, as you would have
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
690 to arrange for the storage to be freed, and do so even in the case of
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
691 a longjmp happening inside a subroutine. Many subroutines in Emacs
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
692 can do longjmp.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
693
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
694 If your system does not support alloca, try defining the symbol
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
695 C_ALLOCA in the m-...h file for that machine. This will enable the use
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
696 in Emacs of a portable simulation for alloca. But you will find that
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
697 Emacs's performance and memory use improve if you write a true
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
698 alloca in assembler language.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
699
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
700 alloca (N) should return the address of an N-byte block of memory
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
701 added dynamically to the current stack frame.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
702
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
703 * Vax C compiler bugs affecting Emacs.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
704
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
705 You may get one of these problems compiling Emacs:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
706
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
707 foo.c line nnn: compiler error: no table entry for op STASG
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
708 foo.c: fatal error in /lib/ccom
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
709
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
710 These are due to bugs in the C compiler; the code is valid C.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
711 Unfortunately, the bugs are unpredictable: the same construct
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
712 may compile properly or trigger one of these bugs, depending
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
713 on what else is in the source file being compiled. Even changes
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
714 in header files that should not affect the file being compiled
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
715 can affect whether the bug happens. In addition, sometimes files
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
716 that compile correctly on one machine get this bug on another machine.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
717
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
718 As a result, it is hard for me to make sure this bug will not affect
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
719 you. I have attempted to find and alter these constructs, but more
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
720 can always appear. However, I can tell you how to deal with it if it
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
721 should happen. The bug comes from having an indexed reference to an
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
722 array of Lisp_Objects, as an argument in a function call:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
723 Lisp_Object *args;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
724 ...
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
725 ... foo (5, args[i], ...)...
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
726 putting the argument into a temporary variable first, as in
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
727 Lisp_Object *args;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
728 Lisp_Object tem;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
729 ...
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
730 tem = args[i];
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
731 ... foo (r, tem, ...)...
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
732 causes the problem to go away.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
733 The `contents' field of a Lisp vector is an array of Lisp_Objects,
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
734 so you may see the problem happening with indexed references to that.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
735
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
736 * 68000 C compiler problems
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
737
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
738 Various 68000 compilers have different problems.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
739 These are some that have been observed.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
740
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
741 ** Using value of assignment expression on union type loses.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
742 This means that x = y = z; or foo (x = z); does not work
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
743 if x is of type Lisp_Object.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
744
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
745 ** "cannot reclaim" error.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
746
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
747 This means that an expression is too complicated. You get the correct
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
748 line number in the error message. The code must be rewritten with
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
749 simpler expressions.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
750
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
751 ** XCONS, XSTRING, etc macros produce incorrect code.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
752
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
753 If temacs fails to run at all, this may be the cause.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
754 Compile this test program and look at the assembler code:
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
755
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
756 struct foo { char x; unsigned int y : 24; };
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
757
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
758 lose (arg)
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
759 struct foo arg;
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
760 {
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
761 test ((int *) arg.y);
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
762 }
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
763
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
764 If the code is incorrect, your compiler has this problem.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
765 In the XCONS, etc., macros in lisp.h you must replace (a).u.val with
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
766 ((a).u.val + coercedummy) where coercedummy is declared as int.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
767
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
768 This problem will not happen if the m-...h file for your type
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
769 of machine defines NO_UNION_TYPE. That is the recommended setting now.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
770
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
771 * C compilers lose on returning unions
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
772
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
773 I hear that some C compilers cannot handle returning
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
774 a union type. Most of the functions in GNU Emacs return
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
775 type Lisp_Object, which is currently defined as a union.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
776
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
777 This problem will not happen if the m-...h file for your type
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
778 of machine defines NO_UNION_TYPE. That is the recommended setting now.
794bd24d1415 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
779