[PATCH 2/2] search --output=files: Output all filenames for each matching message
Carl Worth
cworth at cworth.org
Tue Jun 28 12:12:52 PDT 2011
On Fri, 24 Jun 2011 17:26:55 -0600, Mark Anderson <ma.skies at gmail.com> wrote:
> Messages in the database can have multiple files associated with a
> single message-id, but until now only one filename for each message
> has been reported by "notmuch search --output=files"
Hi Mark,
Thanks for contributing this patch!
I know from a conversation we had in IRC that you needed this feature to
track down a bug you were hitting. Thanks for going the extra mile to
write a new test case and a complete patch for the new feature.
I think the only thing I would like to see in addition is an update to
the documentation to make it explicit that --output=files will emit all
filenames for a message that has more than one filename.
> Perhaps someone can offer a little help making the "separator" code
> tighter, but this works.
It's amazing how painful it is to get the corner cases right here, isn't
it? It's almost enough to make me wish that we allowed trailing
separators as a standard element of style in conventional prose. [*]
-Carl
[*] Though if I had that wish, I'd also want to wish for the abolition
of any distinction for singular and plural nouns. The code to generate
messages like the following is a pain to write:
Processed 1 file in almost no time.
Added 1 new message to the database. Removed 1 message.
(And that's without even adding support for translations which would
further complicate this.) Ah, well, the price we pay to make code with
clean output.
--
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110628/464837b9/attachment.pgp>
More information about the notmuch
mailing list