Re: Bug in notmuch-emacs: inconsistent rendering for messages with multiple From: headers

Subject: Re: Bug in notmuch-emacs: inconsistent rendering for messages with multiple From: headers

Date: Sat, 26 Feb 2022 11:10:57 -0400

To: Daniel Kahn Gillmor, Notmuch Mail

Cc:

From: David Bremner


David Bremner <david@tethera.net> writes:

>> But the first message in notmuch-show doesn't show Bob at all:
>> -----------------------
>> Alice <alice@fifthhorseman.net> (8 mins. ago) ()
>> Subject: a test from alice and bob
>> To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
>> Date: Mon, 23 Oct 2017 01:37:56 -0400
>>
>> here we go
>
> This on the other hand seems to be the fault of the emacs front end, as
> both addresses are present in the sexp / json output.

The issue is specifically the function notmuch-clean-address. Evaluate
the following

    (notmuch-clean-address "Alice <alice@fifthhorseman.net>, bob@fifthhorseman.net")
    (notmuch-clean-address "Alice <alice@fifthhorseman.net>, Bob <bob@fifthhorseman.net>")

In my opininion both should fail to parse (which would tell the rest of
the code to use the raw string, afaik. But notmuch-clean-address is
using regex to tackle the problem, so bugs are not exactly a
surprise. On the other hand, I also tried the fancier function
ietf-drums-parse-address, and it does something similarly inconsistent
between the two cases.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: