Hi Christopher, On Thu, May 07, 2020 at 10:28:38AM +0200, Christopher Zimmermann wrote: > On Thu, May 07, 2020 at 09:52:14AM +1000, Cameron Simpson wrote: > > 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?
Probably nowadays this is a good idea. Although an essential UNIX feature and well known before resp. for longstanding UNIX users, with almost ubiquitous GUI environments relevance dropped drastically. So mentioning it is worth it. > > 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. As you mention other good examples, I wouldn't take it as granted that Mutt should stay in cbreak mode. But, if a user doesn't change configuration, Mutt should behave in a standard way and honor the terminal settings (which most probably can be queried from the device), and not have a fixed setting which need to be adapted for non-standard stty settings. I don't think that raw mode per se changes the terminal configuration. >From my understanding it just means that handling is taken by Mutt then, and if that logic uses alternate configuration sources (if a key is mapped in Mutt, where collisions with stty keys better are shown) the terminal device doesn't care. So one could go on. It is best to trigger owners of exotic platforms to test it then. But personally the stty script approach would be sufficient if I wanted to map a terminal key. Gero