On 06May2020 11:44, Christopher Zimmermann <christop...@gmerlin.de> wrote:
Hello dear mutt developers,
I prepared a merge request that needs some consideration.
Why? I use mutt on OpenBSD with heavily customized vi-like key
bindings and colouring. Especially I'm used to line-wise scrolling
being bound to \Ce and \Cy. \Cy can not be bound using the ncurses
backend on OpenBSD because the terminal will interpret \Cy as delayed
suspend (stty dsusp).
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).
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.
Those keys can't be bound.
Yes, they can. I just bound \Cy thus:
macro index \Cy :foo
and ran:
stty dsusp undef; mutt -f ~/mail/U
and the ^Y macro works perfectly.
Because users should not need to understand terminal intrinsics to
that depth mutt should maybe rather use the raw mode to interpret
those characters on its own. The merge request[2] does just that and
will switch to use raw instead of cbreak mode.
I am against this. There are several special purpose characters in ther
terminal settings, and they all have their purpose.
If _you_ do not make use of that and want those keys free for use,
adjust your stty settings to either undefine or change the keystrokes.
The "stty -a" command is very helpful, as it lists them all. Have a look
and tune your setup to your liking.
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.
I am not in any way against your use of ^Y for somrthing; I spent years
with custom stty settings for my own foibles. But the place for the
change is your shll config via stty, not mutt.
Cheers,
Cameron Simpson <c...@cskk.id.au>