Re: notmuch-mutt: Use of uninitialized value.

Subject: Re: notmuch-mutt: Use of uninitialized value.

Date: Thu, 14 Feb 2013 09:37:13 +0100

To: Profpatsch

Cc: David Bremner,

From: Stefano Zacchiroli

On Thu, Feb 14, 2013 at 12:36:58AM +0100, Profpatsch wrote:
> On 13-02-13 02:35pm, Kevin J. McCarthy wrote:
> > A more likely idea is to check whether you have $pipe_decode set.
> So much for copying a basic rc from someone else.
> Of course, that was it and I’m officially an idiot.

Neat, thanks Kevin for debugging the issue down to $pipe_decode (which
I've never used, mutt never stops to amaze me :-)).

> And apparently Mail::Internet errors out if there is no Message-ID.
> (Which mentioned in the docs at CPAN…)
> Mystery solved.

Right, but still a more graceful failure model would be nice.

Please find attached a patch that in such cases should 1) give a
supposedly nice error message explaining what's going on and 2) empty
the results dir to avoid showing you unrelated results. It works for me.
But extra checking never hurts, in particular for the tag action, which
I don't personally use.

I guess it would also be nice to actually disable $pipe_decode in the
relevant Mutt macros, but I'm not sure about to do that without
interfering with user desired configuration. Kevin: do you know if there
is a common Mutt trick to store the value of a variable before changing
it, and restoring it a posteriori?  More isolation for this kind of
things in Mutt would definitely be welcome...

Stefano Zacchiroli  . . . . . . . . . . . o . . . o . o
Maître de conférences . . . . . . . . o . . . o o
Debian Project Leader . . . . . . @zack on . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »