notmuch Digest, Vol 20, Issue 57

Mark Anderson ma.skies at gmail.com
Wed Jun 29 15:19:44 PDT 2011


On Wed, 29 Jun 2011 13:54:40 -0700, Jameson Graef Rollins <jrollins at finestructure.net> wrote:
> On Wed, 29 Jun 2011 14:21:11 -0600, Mark Anderson <ma.skies at gmail.com> wrote:
> > I personally prefer --output=files remain as it was, with one file per
> > mail (even though I submitted the patch to change it).  I suggest that
> > we could add another format to supply all files (perhaps
> > --output=allfiles, or --output=dupfiles).  I don't like my original
> > suggestion of "filelists" because it implies a list of lists to me.  A
> > list of lists would correlate better to the number of messages which
> > match the search terms, but doesn't correlate well to xargs input.
> 
> What's wrong with just outputting all the files matching the search,
> including duplicates?  I can't think of any reason where one would want
> to not include all files matching the search.  I would be curious to
> hear a use case there.

For someone who is using gmail + offlineimap, labels in gmail become
folders in maildir.

The maildir structure can have a large number of copies of each email
corresponding to the labels/tags which have been applied.

To add a label/tag that is visible to the gmail interface, one should
copy a file representing the message to the folder representing the
gmail label, which will then sync to gmail.

Copying more than one file for each message being labeled is more
wasteful of time and storage.

With all files returned, a simple xargs script to add a label by copying
files will end up with many copies of the same file in the new
directory.

The consuming script could hunt for message-id's in files and uniquify,
but since notmuch was doing that implicitly before, and it's fairly
natural, it seems not a big deal to add.

> Since I'm on this kick anyway, I'm going to keep pushing against further
> customizations where there really isn't a need.

With a common use case for the biggest email userbase which makes
labels/tags natural, I think it is worth considering seriously.

There are certainly other namesets which could be used to reprecent the
two categories.  I'm happy to use names that makes the 'allfiles' output
the common case and the "one file/message" the longer string, but I
think we should provide the "one file/message" output category.

The 'allfiles' case is great for deleting all copies of an email, so I
definitely want it to continue being available.

-Mark



More information about the notmuch mailing list