Re: Two questions regarding header display

2022-06-05 Thread Kevin J. McCarthy

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


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


signature.asc
Description: PGP signature


Re: Coloring signature information

2022-06-05 Thread Kevin J. McCarthy

On Sun, Jun 05, 2022 at 10:32:34PM +0100, Chris Narkiewicz via Mutt-users wrote:

When receiving email with GPG signature, mutt puts a status
at the top of the message pager:

[-- 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.

--
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-05 Thread raf
On Sun, Jun 05, 2022 at 09:33:43AM -0700, "Kevin J. McCarthy"  
wrote:

> On Sun, Jun 05, 2022 at 10:24:47AM -0400, Jason Franklin wrote:
> > On Sun, Jun 05, 2022 at 09:26:04AM +0200, Jakub Jindra wrote:
> > > set header_color_partial = yes
> > > color hdrdefault FG  BG
> > > color header FG  BG  "REGEX"
> > > color header FG1 BG1 "REGEX1"
> > > 
> > > tune the colors FG, BG and REGEX to your needs.
> > 
> > I came across that option in the manual, but I couldn't make it work at
> > the time. I will have to play around with it a bit.
> 
> See http://www.mutt.org/relnotes/1.9/ for a sample usage.
> 
> Also note, starting with 1.12 you can add attributes before the color name.
> 
> For example, to *only* make the headers bold:
> 
> set header_color_partial
> color header bold default default '^[^[:blank:]:]*:'
> 
> -- 
> Kevin J. McCarthy
> GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

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).
I don't know why that is. I think it must have worked in the
past. I just "ignore" the headers I don't want to see so
it's not really a problem.

And it would bold entire headers, not just their names.

cheers,
raf



Coloring signature information

2022-06-05 Thread Chris Narkiewicz via Mutt-users
When receiving email with GPG signature, mutt puts a status
at the top of the message pager:

[-- 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?
There are some examples based on regexp, such as

color body green black "^Good signature.*"

but that covers a signle line only.

Best regards,
Chris Narkiewicz



signature.asc
Description: PGP signature


Re: mutt 2.2.6 released

2022-06-05 Thread Ranjan Maitra
Kevin,

My (our) deepest appreciation for these bug-fix releases, even at a time when 
you can no longer give as much time to mutt as you did previously.

Best wishes,
Ranjan

On Sun Jun05'22 12:45:27PM, Kevin J. McCarthy wrote:
> From: "Kevin J. McCarthy" 
> Date: Sun, 5 Jun 2022 12:45:27 -0700
> To: mutt-announce 
> Subject: mutt 2.2.6 released
>
> Hello Mutt Users,
>
> I've just released version 2.2.6.  Instructions for downloading are
> available at , or the tarball can be
> directly downloaded from .  Please take the
> time to verify the signature file against my public key[1].
>
> This is a bug-fix release, fixing a variety of small issues.
>
> Thanks to everyone who reported issues and helped test.
>
> -Kevin
>
> [1]
> My public key is available at:
>   - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
>   - the mutt website: http://www.mutt.org/keys/kevin.key
>   - The keys.openpgp.org network
> 
> https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA
>




mutt 2.2.6 released

2022-06-05 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.2.6.  Instructions for downloading are 
available at , or the tarball can be 
directly downloaded from .  Please take 
the time to verify the signature file against my public key[1].


This is a bug-fix release, fixing a variety of small issues.

Thanks to everyone who reported issues and helped test.

-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA



signature.asc
Description: PGP signature


Re: Two questions regarding header display

2022-06-05 Thread Kevin J. McCarthy

On Sun, Jun 05, 2022 at 10:24:47AM -0400, Jason Franklin wrote:

On Sun, Jun 05, 2022 at 09:26:04AM +0200, Jakub Jindra wrote:

set header_color_partial = yes
color hdrdefault FG  BG
color header FG  BG  "REGEX"
color header FG1 BG1 "REGEX1"

tune the colors FG, BG and REGEX to your needs.


I came across that option in the manual, but I couldn't make it work at
the time. I will have to play around with it a bit.


See http://www.mutt.org/relnotes/1.9/ for a sample usage.

Also note, starting with 1.12 you can add attributes before the color 
name.


For example, to *only* make the headers bold:

set header_color_partial
color header bold default default '^[^[:blank:]:]*:'

--
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-05 Thread Jason Franklin
On Sun, Jun 05, 2022 at 09:26:04AM +0200, Jakub Jindra wrote:
> Hi Jason,
> 
> You're looking for config option [1]header_color_partial
> 
> 1. http://www.mutt.org/doc/manual/#header-color-partial
> 
> set header_color_partial = yes
> color hdrdefault FG  BG
> color header FG  BG  "REGEX"
> color header FG1 BG1 "REGEX1"
> 
> tune the colors FG, BG and REGEX to your needs.

I came across that option in the manual, but I couldn't make it work at
the time. I will have to play around with it a bit.

At least I was looking in the right place.

Thanks, Jakub!

-- 
Jason


Re: Two questions regarding header display

2022-06-05 Thread Jason Franklin
On Sun, Jun 05, 2022 at 09:51:29PM +1000, raf wrote:
> On Sun, Jun 05, 2022 at 11:32:34AM +0200, Anton Sharonov 
>  wrote:
> > Will usage of display_filter option with your perl script below not be
> > already sufficient solution even without procmail?
> 
> Good thinking. I just tried it and it works great.
> 
>  set display_filter = /home/me/bin/fix-mail-headers-filter

This is really helpful!

Many thanks to Anton and raf. :)

-- 
Jason


Re: Two questions regarding header display

2022-06-05 Thread raf
On Sun, Jun 05, 2022 at 11:32:34AM +0200, Anton Sharonov 
 wrote:

> raf  schrieb am So., 5. Juni 2022, 07:52:
> 
> > On Sun, Jun 05, 2022 at 12:06:52AM -0400, Jason Franklin 
> > wrote:
> >
> > > Greetings:
> > >
> > > I have two questions regarding header display...
> > >
> > > First, can the pager display header names in bold if the terminal
> > > supports it?
> > >
> > > Second some senders have weird capitalization of headers. Is it possible
> > > to display some canonical representation of any given standard header?
> > >
> > > To clarify, if the header is sent as "reply-to", I would like to always
> > > see "Reply-To" in the pager.
> > >
> > > Thanks!
> > >
> > > --
> > > Jason
> >
> > Hi, I don't know about the first part, but the second part
> > could be done if procmail or similar is used for local
> > delivery, and it passes incoming messages through a filter
> > to "correct" the headers to your liking. But it might
> > be a hassle if you aren't already using procmail.
> >
> 
> Will usage of display_filter option with your perl script below not be
> already sufficient solution even without procmail?

Good thinking. I just tried it and it works great.

 set display_filter = /home/me/bin/fix-mail-headers-filter

But the script needs a fix to prevent changing the From_ mbox header:

/home/me/bin/fix-mail-headers-filter:

  #!/usr/bin/env perl
  use warnings;
  use strict;
  # Modify headers if needed (e.g. "reply-to:" to "Reply-To:")
  while (<>)
  {
# Skip to the following trivial loop after headers
print, last if /^$/;
# Replace lowercase at start of word before colon with uppercase
s/^([^: ]*)\b([a-z])/$1\U$2/ while /^[^: ]*\b[a-z]/;
print;
  }
  # Just print the rest unchanged
  print while (<>);

> > The above was barely tested. Don't use it without testing it on
> > lots of existing mail (one message at a time - see formail(1))
> > until you are sure that it works. And note that it doesn't
> > convert any uppercase to lowercase, only the other way around.
> >
> > cheers,
> > raf


Re: Two questions regarding header display

2022-06-05 Thread Anton Sharonov
raf  schrieb am So., 5. Juni 2022, 07:52:

> On Sun, Jun 05, 2022 at 12:06:52AM -0400, Jason Franklin 
> wrote:
>
> > Greetings:
> >
> > I have two questions regarding header display...
> >
> > First, can the pager display header names in bold if the terminal
> > supports it?
> >
> > Second some senders have weird capitalization of headers. Is it possible
> > to display some canonical representation of any given standard header?
> >
> > To clarify, if the header is sent as "reply-to", I would like to always
> > see "Reply-To" in the pager.
> >
> > Thanks!
> >
> > --
> > Jason
>
> Hi, I don't know about the first part, but the second part
> could be done if procmail or similar is used for local
> delivery, and it passes incoming messages through a filter
> to "correct" the headers to your liking. But it might
> be a hassle if you aren't already using procmail.
>

Will usage of display_filter option with your perl script below not be
already sufficient solution even without procmail?



> ~/.procmailrc:
>
>   :0 fw
>   | /home/me/bin/fix-mail-headers-filter
>
> /home/me/bin/fix-mail-headers-filter:
>
>   #!/usr/bin/env perl
>   use warnings;
>   use strict;
>   # Modify headers if needed (e.g. "reply-to:" to "Reply-To:")
>   while (<>)
>   {
> # Skip to the following trivial loop after headers
> print, last if /^$/;
> # Replace lowercase at start of word before colon with uppercase
> s/^([^:]*)\b([a-z])/$1\U$2/ while /^[^:]*\b[a-z]/;
> print;
>   }
>   # Jut print the rest unchanged
>   print while (<>);
>
> The above was barely tested. Don't use it without testing it on
> lots of existing mail (one message at a time - see formail(1))
> until you are sure that it works. And note that it doesn't
> convert any uppercase to lowercase, only the other way around.
>
> cheers,
> raf
>
>


Re: Two questions regarding header display

2022-06-05 Thread Jakub Jindra

Hi Jason,

You're looking for config option [1]header_color_partial

1. http://www.mutt.org/doc/manual/#header-color-partial

set header_color_partial = yes
color hdrdefault FG  BG
color header FG  BG  "REGEX"
color header FG1 BG1 "REGEX1"

tune the colors FG, BG and REGEX to your needs.

Best,
JJ

On 2022-06-05 00:06, Jason Franklin wrote:

Greetings:

I have two questions regarding header display...

First, can the pager display header names in bold if the terminal
supports it?

Second some senders have weird capitalization of headers. Is it possible
to display some canonical representation of any given standard header?

To clarify, if the header is sent as "reply-to", I would like to always
see "Reply-To" in the pager.

Thanks!

--
Jason


--
Jakub Jindra


signature.asc
Description: PGP signature