Hi,
I picked up this discussion between ncurses and slang and I guess
it is a good idea to discuss the ncurses/slang matter publicly
on the list.
Best regards
-- Dago
Anfang der weitergeleiteten E-Mail:
Von: Mantis Bug Tracker <[email protected]>
Datum: 29. April 2009 07:59:07 MESZ
An: [email protected]
Betreff: [bug-notifications] [mutt 0003648]: mutt does not work with
screen's altscreen because it is compiled with slang instead of
ncurses
Antwort an: [email protected]
The following issue has been SUBMITTED.
======================================================================
http://www.opencsw.org/bugtrack/view.php?id=3648
======================================================================
Reported By: meunier
Assigned To:
======================================================================
Project: mutt
Issue ID: 3648
Category: regular use
Reproducibility: always
Severity: block
Priority: normal
Status: new
======================================================================
Date Submitted: 2009-04-29 07:59 CEST
Last Modified: 2009-04-29 07:59 CEST
======================================================================
Summary: mutt does not work with screen's
altscreen because
it is compiled with slang instead of ncurses
Description:
/opt/csw/bin/mutt is compiled with slang, not ncurses, while
/opt/csw/bin/screen is compiled with ncurses, not slang. So if you
use
/opt/csw/bin/screen and start /opt/csw/bin/mutt inside it, it looks
like
the ncurses library used by screen and the slang library used by
mutt fight
each other in a bad way when screen's altscreen feature is enabled.
Here is a way to reproduce the problem:
[after ssh-ing into a Solaris machine from an xterm]
$ export $TERMINFO=/opt/csw/share/terminfo/
$ /opt/csw/bin/infocmp
# Reconstructed via infocmp from file:
/opt/csw/share/terminfo/x/xterm
[blablabla ... so the correct terminfo database is being used]
$ ls
[blablabla]
$ /opt/csw/bin/emacs
[exit emacs, the screen returns to its previous content, including
showing
the output of the previous 'ls' command. Note: this will not work
and the
ouput of the previous 'ls' command will be invisible if your TERMINFO
environment variable is not set correctly]
$ ls
[blablabla]
$ /opt/csw/bin/mutt
[exit mutt, the screen returns to its previous content, including
showing
the output of the previous 'ls' command]
$ /opt/csw/bin/screen
[screen is cleared]
$ ls
[blablabla]
$ /opt/csw/bin/emacs
[exit from emacs, the cursor is at the bottom of the xterm and the
output
of the previous 'ls' is not visible anymore]
$ ls
[blablabla]
$ /opt/csw/bin/mutt
[exit from mutt, the cursor is at the bottom of the xterm and the
output
of the previous 'ls' is not visible anymore]
So far so good. Emacs and mutt normally use xterm's "alternate
screen"
feature which is why the output of the previous 'ls' command is
visible in
the xterm once emacs or mutt has exited. Screen, on the other hand,
does
not provide an alternate screen by default, so emacs and mutt just
use the
"regular screen" and the output of the previous 'ls' command is then
lost
when emacs or mutt exits.
Now type:
Control-A :
to get the interactive prompt from 'screen', then type:
altscreen on
then you should get a 'Will do alternate screen switching' from
'screen'.
This tells 'screen' that it should provide an alternate screen to
applications like emacs or mutt that normally use xterm's alternate
screen
feature.
Now let's try emacs and mutt again:
$ ls
[blablabla]
$ /opt/csw/bin/emacs
[exit emacs, the screen returns to its previous content, including
showing
the output of the previous 'ls' command, just as if emacs were run
from a
normal shell instead of being run from within 'screen'. Great,
that's what
I want.]
$ ls
[blablabla]
$ /opt/csw/bin/mutt
[oops, watch screen and mutt fight for control of the alternate
screen...
You can try to type a quick random combination of
x
and
Control-A "
to tell mutt to exit and screen to give you a list of virtual screens
(rather than fighting with mutt) but good luck with regaining
control of
your window...]
Now, the fact that emacs works fine in combination with screen's
altscreen
feature but that mutt does not tells me that the problem is with
mutt, not
screen. After investigating a little, I've come to the conclusion
that the
problem is not with the code of mutt itself, but with the fact that
/opt/csw/bin/mutt uses slang while /opt/csw/bin/screen uses ncurses.
In
fact I have compiled (with gcc) a version of mutt 1.5.19 with
ncurses 5.7
which works perfectly well in the examples above. On the other hand
the
same version of mutt 1.5.19 compiled with slang 2.1.4 fails just like
/opt/csw/bin/mutt, flashing the screen and all. My /opt/csw/bin/
mutt uses
slang 1.4.8, not slang 2.1.4, but that doesn't seem to make any
difference,
both fail in the same way.
So is there a way to get /opt/csw/bin/screen to be compiled with
ncurses
rather than slang, by any chance?
Thanks,
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-04-29 07:59 meunier New Issue
======================================================================
_______________________________________________
bug-notifications mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/bug-notifications
_______________________________________________
maintainers mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/maintainers