Re: emacs / ncurses - problem somewhere

1999-10-30 Thread Kevin Street

"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.origSat 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



Re: emacs / ncurses - problem somewhere

1999-10-29 Thread Russell L. Carter

|"Russell L. Carter" <[EMAIL PROTECTED]> writes:
|
|> Yup!  And also for 19.34b...  I've searched all over for the
|> source of this problem, glad to know I'm not alone.  However, 
|> it only affects one of my three -current boxes, so apparently there is 
|> bit of cruft lying around,  but I haven't been able to find 
|> the sucker causing this.  (mergemaster'd repeatedly)
|
|Are the ones that work linked with an old version of libtermcap.so that
|was lying around or are they linked with the new libncurses.so.5 ?

ldd emacs on -current with the bug:

libncurses.so.5 => /usr/lib/libncurses.so.5 (0x2824a000)

ldd emacs on -current without the bug (different system):

libtermcap.so.2 => /usr/lib/libtermcap.so.2 (0x1828c000)

Russell

|
|-- 
|Kevin Street
|[EMAIL PROTECTED]
|


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



Re: emacs / ncurses - problem somewhere

1999-10-29 Thread Peter S. Housel

> 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.
> 
> This is emacs 20.4, by the way on current as of yesterday.  I've tried
> emacs from packages as well as a freshly built one from the ports and
> both exhibit the problem.
> 
> Note that emacs works fine when it brings up is own window due to
> DISPLAY being set.
> 
> Has anyone else seen this and already have a fix or know for sure
> whether this is an emacs bug or a FreeBSD bug?

I filed a bug report for this.  I fixed it in Emacs with the following
patch.  I think it's a FreeBSD bug, though.

-Peter- [EMAIL PROTECTED]


--- /tmp/tparam.c   Fri Oct 29 12:27:03 1999
+++ tparam.cThu Oct  7 23:07:24 1999
@@ -290,6 +290,9 @@
case 'D':   /* %D means weird Delta Data transformation.  */
  argp[0] -= 2 * (tem % 16);
  break;
+   case 'p':   /* from terminfo */
+ p++;
+ break;
}
}
   else



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



Re: emacs / ncurses - problem somewhere

1999-10-29 Thread Kevin Street

"Russell L. Carter" <[EMAIL PROTECTED]> writes:

> Yup!  And also for 19.34b...  I've searched all over for the
> source of this problem, glad to know I'm not alone.  However, 
> it only affects one of my three -current boxes, so apparently there is 
> bit of cruft lying around,  but I haven't been able to find 
> the sucker causing this.  (mergemaster'd repeatedly)

Are the ones that work linked with an old version of libtermcap.so that
was lying around or are they linked with the new libncurses.so.5 ?

-- 
Kevin Street
[EMAIL PROTECTED]


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



Re: emacs / ncurses - problem somewhere

1999-10-29 Thread Russell L. Carter

|Hi,
|
|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.
|
|This is emacs 20.4, by the way on current as of yesterday.  I've tried
|emacs from packages as well as a freshly built one from the ports and
|both exhibit the problem.
|
|Note that emacs works fine when it brings up is own window due to
|DISPLAY being set.
|
|Has anyone else seen this and already have a fix or know for sure
|whether this is an emacs bug or a FreeBSD bug?

Yup!  And also for 19.34b...  I've searched all over for the
source of this problem, glad to know I'm not alone.  However, 
it only affects one of my three -current boxes, so apparently there is 
bit of cruft lying around,  but I haven't been able to find 
the sucker causing this.  (mergemaster'd repeatedly)

Russell



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


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



emacs / ncurses - problem somewhere

1999-10-29 Thread Brian Dean

Hi,

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.

This is emacs 20.4, by the way on current as of yesterday.  I've tried
emacs from packages as well as a freshly built one from the ports and
both exhibit the problem.

Note that emacs works fine when it brings up is own window due to
DISPLAY being set.

Has anyone else seen this and already have a fix or know for sure
whether this is an emacs bug or a FreeBSD bug?

Thanks,
-Brian
-- 
Brian Dean  [EMAIL PROTECTED]


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