"Peter S. Housel" <[EMAIL PROTECTED]> writes:

> > Ever since the libtermcap / libncurses consolidation, change emacs has
> > problems positioning the cursor and properly updating the screen for
> > character-only devices like the console.  It also affects the display
> > in an xterm in non-X mode, i.e., when DISPLAY is *not* set.
> > ...
 
> I filed a bug report for this.  I fixed it in Emacs with the following
> patch.  I think it's a FreeBSD bug, though.

Good detective work, Peter.  So is the bug in FreeBSD or Emacs?  The
new man page for tgetstr says: 

Bugs
       If you call tgetstr to fetch ca or any other parameterized
       string, be aware that it  will  be  returned  in  terminfo
       notation,  not  the older and not-quite-compatible termcap
       notation.  This won't cause problems if all you do with it
       is  call tgoto or tparm, which both expand terminfo-style.

Emacs tries to expand the string itself rather than by calling tparm
and we've surprised it by returning the string in terminfo style
rather than termcap style.  

Here's an alternative patch that forces Emacs to use the library
versions of tparm and tgoto to do the decoding rather than rolling its
own.  Put this in /usr/ports/editors/emacs20/patches/patch-ce
(although it really should get merged into patch-ca).  It works by
using the module intended for Emacs running on terminfo machines
(ie. it uses terminfo.c rather than tparam.c).  I tried this (briefly)
on -current and -stable and it seems to work ok.

$ cat /usr/ports/editors/emacs20/patches/patch-ce
--- src/Makefile.in.orig        Sat Oct 30 15:52:15 1999
+++ src/Makefile.in     Sat Oct 30 15:55:28 1999
@@ -546,7 +546,7 @@
 #define LIBS_TERMCAP
 termcapobj = termcap.o tparam.o
 #else /* LIBS_TERMCAP */
-termcapobj = tparam.o
+termcapobj = terminfo.o
 #endif /* LIBS_TERMCAP */
 #endif /* ! defined (TERMINFO) */
 

-- 
Kevin Street
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to