From owner-freebsd-current Sat Oct 30 14:34:40 1999 Delivered-To: freebsd-current@freebsd.org Received: from mail.rdc2.on.home.com (ha1.rdc2.on.home.com [24.9.0.15]) by hub.freebsd.org (Postfix) with ESMTP id 6E2ED14D59 for ; Sat, 30 Oct 1999 14:34:11 -0700 (PDT) (envelope-from street@iname.com) Received: from mired.eh.local ([24.64.136.188]) by mail.rdc2.on.home.com (InterMail v4.01.01.07 201-229-111-110) with ESMTP id <19991030213410.KPTN3040.mail.rdc2.on.home.com@mired.eh.local>; Sat, 30 Oct 1999 14:34:10 -0700 Received: (from kws@localhost) by mired.eh.local (8.9.3/8.9.3) id RAA27997; Sat, 30 Oct 1999 17:34:10 -0400 (EDT) (envelope-from kws) To: "Peter S. Housel" Cc: Brian Dean , "Russell L. Carter" , freebsd-current@FreeBSD.ORG Subject: Re: emacs / ncurses - problem somewhere References: <199910291929.MAA35072@cx281057-a.irvn1.occa.home.com> From: Kevin Street Date: 30 Oct 1999 16:34:09 -0500 In-Reply-To: "Peter S. Housel"'s message of "Fri, 29 Oct 1999 12:29:05 -0700" Message-ID: <874sf8pm7i.fsf@mired.eh.local> Lines: 49 X-Mailer: Gnus v5.6.45/XEmacs 21.1 - "Biscayne" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Peter S. Housel" 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 street@iname.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message