On Thu, May 07, 2020 at 09:52:14AM +1000, Cameron Simpson wrote:
I will need to try this on an OpenBSD box, but on a Mac here (also a
BSD descendant), this:
stty dsusp undef; mutt -f /Users/cameron/mail/mutt
lets mutt see ^Y as a keystroke. I would think you should be able to
do the same on OpenBSD (I'll try to check).
I figured that out already, as I wrote in my mail.
So I, personally, am against this change. If you expect to type ^Y as a
regular keystroke, your stty modes should not be using it as a control
function. This seems like basic user side setting stuff, not mutt. For
_you_, ^Y should not be dsusp. So turn it off or change it.
uses cbreak and therefore the terminal will still catch and
interpret \Cc (SIGINT), \034 (SIGQUIT), \Cy (SIGSTOP on next read),
\Cz (SIGSTOP).
That is desirable, so that mutt can act like any other well behaved
terminal programme.
I do consider vi and emacs well behaved terminal programs.
Both use CTRL-Y without me needing to fiddle with terminal settings.
I am against this. There are several special purpose characters in
ther terminal settings, and they all have their purpose.
My point here is that the stty modes affect _all_ terminal programmes,
and users should expect all programmes to honour them without some very
special cause. You're asking for mutt to break that expectation instead
of adjusting your stty modes to match how you routinely use your
terminal.
On Thu, May 07, 2020 at 03:57:37AM +0200, Vincent Lefevre wrote:
On my Mutt pages https://www.vinc17.net/mutt/index.en.html
I mention a little script apptty which I have used with Mutt
in GNU screen for more than 12 years, with in particular:
stty susp undef
stty dsusp undef 2> /dev/null
Like susp (^Z by default) and dsusp (^Y when it exists), you
can normally disable whatever you wish. "stty -a" gives the
current mappings.
I learned about stty only a few days ago and thats what triggered me to
prepare the merge request.
Maybe this information should be put into the mutt manual?
That's bad because it doesn't honor the way the user has configured
his terminal. Moreover, I fear that in case of crash, this may leave
the terminal settings in the altered state (zsh offers protection,
though).
You convinced me with sufficient reasons that mutt should stay in cbreak
mode and therefore I will drop the merge request. But still I believe a
pointer to stty should be put into the manual. It took me several days
to understand why mutt did not manage to use CTRL-Y while vim did.
Thanks for your insights,
Christopher Zimmermann
--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
CB07 DA40 B0B6 571D 35E2 0DEF 87E2 92A7 13E5 DEE1