<<< Date Index >>>     <<< Thread Index >>>

Re: Mutt tty problems on Mac OS X 10.5.4 and mutt 1.5.18



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, August 19 at 03:02 PM, quoth felix@xxxxxxxxxxx:
> Using a standard Terminal with the default TERM value of xterm

Ugh! Don't do that. Apple's Terminal is NOT an xterm, so telling your 
applications that it IS an xterm is going to produce bad results (as 
you've seen).

> 1.  Re: Subject: headers show up in the summary display as lots of 
> ~T with a few other line noise chars thrown in for good measure.  
> The original message which starts the thread has its Subject: 
> displayed properly.  I don't think it is the replies being garbled 
> or in some other character set because all Subject: headers look 
> fine when I read the actual message.  This is always repeatable.

Sounds like mutt's trying to use the line-drawing characters, and your 
Terminal settings aren't allowing you to.

First, in your Terminal Preferences, you need to make sure that it's 
allowed to "Use bold fonts" and is allowed to "Display ANSI colors". 
Second, check out what encoding you're using, make sure your LANG 
environment variable is correct.

And finally, set TERM to something useful. "xterm-color" is better, so 
is "dtterm", both of which can be selected from the pop-up in the 
Advanced tab of your terminal settings panel, but the best TERM 
setting for Apple's Terminal is one of the nsterms (get it? NeXTStep 
Term = nsterm). I use nsterm-16color, and I have a custom 
nsterm-16color termcap file (search the archives, I posted how to 
create and install just such a beast).

If that's all a bit much for you (and I wouldn't blame you if it is), 
then you should probably just use a real xterm (install X11 from 
Apple's install CDs if you haven't already).

> 2.  When you hit SPACE to read the body of a message, then finish and 
>    "q" back to the summary listing, sometimes the previous message 
>    display does not clear first and the summary is simply written on 
>    top of it, requiring ^L to clean up the summary listing.  This is 
>    only sometimes, not always, and I have tried changing TERM to 
>    vt100 with no effect (it is the default xterm).

Yeah - those are all essentially symptoms of the same problem.

The issue here is this: every terminal uses different "commands" for 
manipulating its display. Most basic Unix users will never notice 
because they don't use anything more complicated than "less" (even 
programs like vi and emacs often default to using slower, more basic 
terminal commands), but applications like mutt really take advantage 
of the more advanced terminal features. If mutt thinks your terminal 
is an xterm (because of your TERM setting), it's going to use the 
advanced xterm commands defined in your xterm termcap file (or, more 
accurately, the curses library that mutt was linked to when it was 
compiled will do that). Most terminals accept the basic xterm 
commands, just to be useful, but usually have their own ways of doing 
the advanced tricks (like selective redisplay or scrolling certain 
areas of the terminal, and so forth). If your terminal isn't actually 
an xterm, those advanced commands (that mutt uses a LOT) probably 
won't work like they're supposed to. In order for such things to work 
"right", you need a termcap file that describes your terminal's 
capabilities *accurately*. Does that make sense?

But take heart! The beast is conquerable! I've been using Apple's 
Terminal with mutt for a while now, and (after a fair bit of fiddling 
to get it just right) it behaves itself just fine.

Try setting your TERM to nsterm-16color, and that should help a lot. 
There are a few things that are still not *quite* right that way, 
because the nsterm termcap files that Apple ships are a little 
incomplete, but they can be fixed (see the mutt archives for details).

Hope that helps,
~Kyle
- -- 
Always forgive your enemies; nothing annoys them so much.
                                                         -- Oscar Wilde
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkirS30ACgkQBkIOoMqOI14QfQCg1aX+JD9QukIVYGiSGSvTKL8T
yFMAn1Z7jwGyKSiA4modEmZRWPgXPwiR
=CJIL
-----END PGP SIGNATURE-----