Re: Recent Bad Habits

2020-06-12 Thread Mark Frank
On Fri, Jun 12, 2020 at 11:04 AM Kevin Monceaux 
wrote:

> I've recently noticed Mutt develop a couple of bad habits.


Never anthropomorphize software packages, they don't like that.


Re: Recent Bad Habits

2020-06-12 Thread Kevin Monceaux
Kevin,

On Fri, Jun 12, 2020 at 12:54:00PM -0700, Kevin J. McCarthy wrote:
 
> This is most likely from libidn2.  If that's the case you could try one of:
> 1) build with libidn instead
> 2) unset idn_encode

It looks like that was it.  The Gentoo Mutt ebuild has an idn use flag.  By
turning off that use flag I was able to build Mutt without libidn or
libidn2.





-- 

Kevin
http://www.RawFedDogs.net
http://www.Lassie.xyz
http://www.WacoAgilityGroup.org
Bruceville, TX

What's the definition of a legacy system? One that works!
Errare humanum est, ignoscere caninum.


Re: Odd problem with filename passed to browser, underscores replace spaces

2020-06-12 Thread Chris Green
On Fri, Jun 12, 2020 at 12:41:00PM -0700, Kevin J. McCarthy wrote:
> On Fri, Jun 12, 2020 at 11:53:24AM +0100, Chris Green wrote:
> > I have a small script to handle PDF (among other) attachments which is
> > called via mailcap.
> > 
> > The mailcap entry is simply:-
> > 
> >application/pdf;  /home/chris/bin/muttfox %s
> > 
> > The muttfox script gives the PDF file to firefox to be viewed.
> > 
> > This works fine *except* when there are spaces in the filename,
> > something is changing the spaces in the filename to underscores before
> > the name is handed to muttfox in the %s parameter.
> 
> Mutt does this for received email attachments automatically, but the
> filename itself should have underscores too.  What do you mean by it not
> "working"?
> 
> > So what is changing the spaces to underscores?  Does mutt do it and,
> > if so, is there a parameter setting to change what it does?
> 
> $mailcap_sanitize appears to be applied to %{} and %t expandos, but %s is
> always sanitized regardless of the setting.
> 
Ah, thank you, that "%s is always sanitised" helps somewhat.  It at
least explains why I don't get the expected filename.

It turned out that my issue was a bit further down the line in the way
Firefox handled it (misconfiguration on my part basically).  The
change of spaces to underscores was just confusing me.

-- 
Chris Green


Re: Recent Bad Habits

2020-06-12 Thread Kevin J. McCarthy

On Fri, Jun 12, 2020 at 10:04:25AM -0500, Kevin Monceaux wrote:
Mutt seems to be down casing my CamelCased domain names.  Is there a 
setting I can change to stop it from doing that?  It's driving the 
CamelCase OCD obsessed side of me crazy.


This is most likely from libidn2.  If that's the case you could try one of:
1) build with libidn instead
2) unset idn_encode

Also, from time to time it displays "New mail in this mailbox." when I 
open a mailbox that doesn't have any new mail.  And sometimes I open a 
mailbox with new mail and it doesn't display that message.  The 
mailboxes in question are being accessed via Dovecot IMAP.


The message should display when new (read or unread) messages arrive in 
an already open mailbox.  It shouldn't indicate the state of a just 
opened mailbox (that is, whether the just opened mailbox has unread 
messages or not).


First, please try 1.14.2 if possible.  There was a problem fixed at the 
tail end of 1.14.0 development that might relate to this.


Another possibility is that new mail appears in the mailbox while 
message headers are being downloaded.  Mutt handles them after the 
header download, but will emit this message noting the messages that 
arrived (in this case, just after initial header downloading).


If it's neither of those, feel free to open a ticket, perhaps there is a 
bug involved.


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


signature.asc
Description: PGP signature


Re: Odd problem with filename passed to browser, underscores replace spaces

2020-06-12 Thread Kevin J. McCarthy

On Fri, Jun 12, 2020 at 11:53:24AM +0100, Chris Green wrote:

I have a small script to handle PDF (among other) attachments which is
called via mailcap.

The mailcap entry is simply:-

   application/pdf;  /home/chris/bin/muttfox %s

The muttfox script gives the PDF file to firefox to be viewed.

This works fine *except* when there are spaces in the filename,
something is changing the spaces in the filename to underscores before
the name is handed to muttfox in the %s parameter.


Mutt does this for received email attachments automatically, but the 
filename itself should have underscores too.  What do you mean by it not 
"working"?



So what is changing the spaces to underscores?  Does mutt do it and,
if so, is there a parameter setting to change what it does?


$mailcap_sanitize appears to be applied to %{} and %t expandos, but %s 
is always sanitized regardless of the setting.


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


signature.asc
Description: PGP signature


Re: Recent Bad Habits

2020-06-12 Thread Kevin Monceaux
On Fri, Jun 12, 2020 at 11:10:58AM -0400, Dan Ritter wrote:
 
> Host and domain names are case insensitive across the Internet.

Exactly, so it doesn't hurt to CamelCase them.  Mutt should let me do so if
I'm so inclined.




-- 

Kevin
http://www.RawFedDogs.net
http://www.Lassie.xyz
http://www.WacoAgilityGroup.org
Bruceville, TX

What's the definition of a legacy system? One that works!
Errare humanum est, ignoscere caninum.


Recent Bad Habits

2020-06-12 Thread Kevin Monceaux
Mutt Fans,

I've recently noticed Mutt develop a couple of bad habits.  I'm currently
running 1.13.5, which is the only Gentoo Mutt ebuild currently marked as
"stable."

Mutt seems to be down casing my CamelCased domain names.  Is there a setting
I can change to stop it from doing that?  It's driving the CamelCase OCD
obsessed side of me crazy.

Also, from time to time it displays "New mail in this mailbox." when I open
a mailbox that doesn't have any new mail.  And sometimes I open a mailbox
with new mail and it doesn't display that message.  The mailboxes in
question are being accessed via Dovecot IMAP.





-- 

Kevin
http://www.RawFedDogs.net
http://www.Lassie.xyz
http://www.WacoAgilityGroup.org
Bruceville, TX

What's the definition of a legacy system? One that works!
Errare humanum est, ignoscere caninum.


Re: Odd problem with filename passed to browser, underscores replace spaces

2020-06-12 Thread Chris Green
On Fri, Jun 12, 2020 at 11:53:24AM +0100, Chris Green wrote:
> I have a small script to handle PDF (among other) attachments which is
> called via mailcap.
> 
> The mailcap entry is simply:-
> 
> application/pdf;  /home/chris/bin/muttfox %s
> 
> The muttfox script gives the PDF file to firefox to be viewed. 
> 
> This works fine *except* when there are spaces in the filename,
> something is changing the spaces in the filename to underscores before
> the name is handed to muttfox in the %s parameter.
> 
> I have checked by simply putting "echo $1 >/tmp/mffn" as the first
> line of the script. 
> 
> When I hit 'v' in mutt I see (for example) :-
> 
> -- Mutt: Attachments
> ->   I 1[text/html, quoted, utf-8, 15K]
>  A 2 Your policy documents.pdf  [applica/pdf, base64, 772K]
> 
> 
> But in /tmp/mffn there is:-
> 
> chris$ more /tmp/mffn
> /tmp/Your_policy_documents.pdf
> 
> So what is changing the spaces to underscores?  Does mutt do it and,
> if so, is there a parameter setting to change what it does?
> 
> 
> If I simply s[ave] the PDF file from mutt I get the filename with
> spaces in it, the change is something to do with how mutt and mailcap
> interact (I guess).
> 
Forgot to say, I'm running Mutt 1.10.1 on xubuntu.  

It isn't $mailcap_sanitize doing this is it?

-- 
Chris Green


Odd problem with filename passed to browser, underscores replace spaces

2020-06-12 Thread Chris Green
I have a small script to handle PDF (among other) attachments which is
called via mailcap.

The mailcap entry is simply:-

application/pdf;  /home/chris/bin/muttfox %s

The muttfox script gives the PDF file to firefox to be viewed. 

This works fine *except* when there are spaces in the filename,
something is changing the spaces in the filename to underscores before
the name is handed to muttfox in the %s parameter.

I have checked by simply putting "echo $1 >/tmp/mffn" as the first
line of the script. 

When I hit 'v' in mutt I see (for example) :-

-- Mutt: Attachments
->   I 1[text/html, quoted, utf-8, 15K]
 A 2 Your policy documents.pdf  [applica/pdf, base64, 772K]


But in /tmp/mffn there is:-

chris$ more /tmp/mffn
/tmp/Your_policy_documents.pdf

So what is changing the spaces to underscores?  Does mutt do it and,
if so, is there a parameter setting to change what it does?


If I simply s[ave] the PDF file from mutt I get the filename with
spaces in it, the change is something to do with how mutt and mailcap
interact (I guess).


-- 
Chris Green


Re: conditional index_format

2020-06-12 Thread steve

Hi,

Thanks for your answer.

Le 10-06-2020, à 09:58:05 -0700, Kevin J. McCarthy a écrit :


On Wed, Jun 10, 2020 at 04:11:58PM +0200, steve wrote:

When forwarding a message to recipient R, that message is listed as the
author (me) since I defined $index_format with the %n variable. This is
fine when I create a message or reply to a message, but it would be more
convenient to see the recipient's name when I forward a message.

So is it possible to have $index_format reflect this?


Starting in Mutt 1.11.0, there is index-format-hook and the %@name@ 
expando.  See 



Unfortunately, I'm using mutt version 1.10.1 on Debian Buster. So I'll
have to wait to upgrade to Bullseye to take advantage of this new
feature.

Best

Steve