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

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Oct 22 23:06:06 PDT 2017


I'm experimenting with e-mail messages with multiple addresses in the
From: line.  i know, it's dirty, but e-mail is a dirty world.

I noticed that notmuch-emacs renders such messages differently depending
on the order of the recipients, and whether or not they are an addr-spec
or a mail-addr (see https://tools.ietf.org/html/rfc5322#section-3.4).

All three messags below are "From:" both alice and bob, and alice is
always listed first.  the difference in how notmuch-emacs displays them
is in how the sending address shows up.  In notmuch-search, it only
shows the first address:

-----------------------
 1 mins. ago [1/1]   alice at fifthhorseman.net  a final test ()
 5 mins. ago [1/1]   alice at fifthhorseman.net  a third message ()
23 mins. ago [1/1]   Alice                a second test from Alice and Bob ()
24 mins. ago [1/1]   Alice                a test from alice and bob ()
End of search results.
-----------------------

But the first message in notmuch-show doesn't show Bob at all:
-----------------------
Alice <alice at fifthhorseman.net> (8 mins. ago) ()
Subject: a test from alice and bob
To: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Mon, 23 Oct 2017 01:37:56 -0400

here we go
-----------------------
-------------- next part --------------
An embedded message was scrubbed...
From: Alice <alice at fifthhorseman.net>, bob at fifthhorseman.net
Subject: a test from alice and bob
Date: Mon, 23 Oct 2017 01:37:56 -0400
Size: 321
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171023/bd090a19/attachment.mht>
-------------- next part --------------


While the rest of them do:

-----------------------
Alice <alice at fifthhorseman.net>, Bob <bob at fifthhorseman.net> (0 mins. ago) ()
Subject: a second test from Alice and Bob
To: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Mon, 23 Oct 2017 01:38:43 -0400

how about now?
-----------------------
-------------- next part --------------
An embedded message was scrubbed...
From: Alice <alice at fifthhorseman.net>, Bob <bob at fifthhorseman.net>
Subject: a second test from Alice and Bob
Date: Mon, 23 Oct 2017 01:38:43 -0400
Size: 338
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171023/bd090a19/attachment-0001.mht>
-------------- next part --------------

-----------------------
alice at fifthhorseman.net, Bob <bob at fifthhorseman.net> (0 mins. ago) ()
Subject: a third message
To: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Mon, 23 Oct 2017 01:56:46 -0400

another try
-----------------------
-------------- next part --------------
An embedded message was scrubbed...
From: alice at fifthhorseman.net, Bob <bob at fifthhorseman.net>
Subject: a third message
Date: Mon, 23 Oct 2017 01:56:46 -0400
Size: 310
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171023/bd090a19/attachment-0002.mht>
-------------- next part --------------

-----------------------
alice at fifthhorseman.net, bob at fifthhorseman.net (0 mins. ago) ()
Subject: a final test
To: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Mon, 23 Oct 2017 02:00:36 -0400

and where does this leave us?
-----------------------
-------------- next part --------------
An embedded message was scrubbed...
From: alice at fifthhorseman.net, bob at fifthhorseman.net
Subject: a final test
Date: Mon, 23 Oct 2017 02:00:36 -0400
Size: 319
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171023/bd090a19/attachment-0003.mht>
-------------- next part --------------


Maybe someone with better emacs-fu could figure out why the first of the
four is different?

     --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171023/bd090a19/attachment.sig>


More information about the notmuch mailing list