home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / lemacs-19.6 / PROBLEMS < prev    next >
Encoding:
Text File  |  1993-02-18  |  35.9 KB  |  861 lines

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