Re: Two questions regarding header display

2022-06-06 Thread raf
On Mon, Jun 06, 2022 at 09:53:35AM -0700, "Kevin J. McCarthy"  
wrote:

> On Tue, Jun 07, 2022 at 12:37:59AM +1000, raf wrote:
> > On Sun, Jun 05, 2022 at 07:02:24PM -0700, "Kevin J. McCarthy" 
> >  wrote:
> > > TERM=xterm-mono might work for you
> > 
> > Thanks, but that didn't change it.
> 
> Interesting.  It works for me, at least on Debian in an xterm.
> 
> You may want to check your terminfo entries, e.g. what do "infocmp xterm |
> grep color" and "infocmp xterm-mono | grep color" return?
> 
> -- 
> Kevin J. McCarthy
> GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

I always assumed that xterm was mono because of the
existence of xterm-color. I should mention that I run
xterm with the resource XTerm*colorMode: False

  > infocmp xterm-color | grep color
colors#8, cols#80, it#8, lines#24, ncv@, pairs#64,
  > infocmp xterm | grep color
colors#8, cols#80, it#8, lines#24, pairs#64,
  > infocmp xterm-mono | grep color

I can see what's breaking it for me. I always run mutt
with -n via an alias. If I don't use -n then bold in
xterm-mono works. But if I do use -n then the currently
selected message doesn't appear in reverse video in the
index, so I can't easily tell which one is selected. If
I comment out everything in /etc/Muttrc.d/colors.rc
(this is on Debian11), then it's fine, and the reverse
video and bold work.

But the screen program is also (mostly) to blame. I
thought it odd that color directives in the system
config would affect xterm-mono, and when I uncommented
them again, it still worked (unlike my original
report). But my alias is actually alias m='screen mutt
-n', and within screen, the TERM variable is set to
"screen". That's the real reason that setting
TERM=xterm-mono didn't work - it was being discarded by
screen.

And I'm not sure I can do anything about it. If I
create a script to set TERM=xterm-mono and then run
mutt, and then run that script via screen, screen
terminates immediately. It must really want
TERM=screen.

It's OK. screen is more important to me than bold
headers.

Thanks.

cheers,
raf



Re: Coloring signature information

2022-06-06 Thread Kevin J. McCarthy

On Mon, Jun 06, 2022 at 08:05:51PM +0100, Chris Narkiewicz via Mutt-users wrote:

On Sun, Jun 05, 2022 at 06:56:51PM -0700, Kevin J. McCarthy wrote:

Those are included in the 'attachment' color object.


I tried color attachment bg fg
but it colors '[-- Begin signature information --]' string.

What I'm trying to achieve, is to use green color for good
signatures, gray for unknown and red for bad signatures.


Ah, sorry I didn't read your question closely enough.

No, there isn't a built-in way to do that.  You might be able to code 
something yourself with $display_filter and $allow_ansi, but you'd need 
to be extra careful about spoofing.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Coloring signature information

2022-06-06 Thread Chris Narkiewicz via Mutt-users
On Sun, Jun 05, 2022 at 06:56:51PM -0700, Kevin J. McCarthy wrote:
> > [-- Begin signature information --]
> > Good signature from: Kevin J. McCarthy 
> >created: Sun Jun  5 20:45:27 2022
> > [-- End signature information --]
> > 
> > Is there a way to set the color of this block of text?
> 
> Those are included in the 'attachment' color object.

I tried color attachment bg fg
but it colors '[-- Begin signature information --]' string.

What I'm trying to achieve, is to use green color for good
signatures, gray for unknown and red for bad signatures.

So I want to color the text in between
'[ -- Begin signature from ... --]'
and '[-- End signature information --]'

Best regards,
Chris Narkiewicz



signature.asc
Description: PGP signature


Re: Two questions regarding header display

2022-06-06 Thread Kevin J. McCarthy

On Tue, Jun 07, 2022 at 12:37:59AM +1000, raf wrote:

On Sun, Jun 05, 2022 at 07:02:24PM -0700, "Kevin J. McCarthy"  
wrote:

TERM=xterm-mono might work for you


Thanks, but that didn't change it.


Interesting.  It works for me, at least on Debian in an xterm.

You may want to check your terminfo entries, e.g. what do 
"infocmp xterm | grep color" and "infocmp xterm-mono | grep color" 
return?


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Two questions regarding header display

2022-06-06 Thread raf
On Sun, Jun 05, 2022 at 07:02:24PM -0700, "Kevin J. McCarthy"  
wrote:

> On Mon, Jun 06, 2022 at 10:57:47AM +1000, raf wrote:
> > And there's also the "mono" directive for terminals that
> > don't support colour, e.g.:
> > 
> >  mono header bold ^(Subject|From|To|Cc|Date):
> > 
> > But it doesn't work for me anymore (with TERM=xterm).
> 
> TERM=xterm-mono might work for you

Thanks, but that didn't change it.

> > And it would bold entire headers, not just their names.
> 
> "color header bold default default ^(Subject|From|To|Cc|Date):"
> will work the same, with $header_color_partial unset (the default).
> 
> -- 
> Kevin J. McCarthy
> GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA