[notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages
Carl Worth
cworth at cworth.org
Sun Nov 22 04:19:57 PST 2009
[quick reply to the text without looking at the patch yet]
On Sun, 22 Nov 2009 10:33:53 +0100, Michiel Buddingh' <michiel at michielbuddingh.net> wrote:
> Thanks, and apologies for the accidental base64 encoding.
Thanks for noticing. That would have been a tricky patch to reply to to
comment on.
> On the positive side, this allows us to map these flags onto tags,
> at least for indexing (the patch at the bottom implements this), and,
> if I can pry you away from your principles, later for modification
> as well.
Yes, we might end up doing this. We'll see.
> I respect your desire to stick to that principle. But I also know
> that purity and simplicity, generally speaking, are unattainable
> luxuries for most applications that handle mail.
Hehe. Thanks for the entertainment. You sound like someone who's already
got some of the battle scars from trying to write mail-handling
software. One is certainly forced to see an awful lot of awfully strange
things.
> Another thing; notmuch currently indexes by message-id (or SHA-1 hash
> if that is not present). Maildir, on the other hand, uses file names
> as stable (when stripped of the parts trailing the colon) unique
> (knock on wood) identifiers. A Maildir-aware notmuch could incorporate
> this to be far more resistant to bulk mail moves done by other clients,
> by using filename lookups to avoid accessing and parsing the mail
> files themselves.
I don't think opening a file to read out a message ID will ever be a
bottleneck. But yes, we could take advantage of the unique name if we
insisted that the storage have it.
Personally, I still regularly end up indexing stuff that's not in proper
maildir format, (like just manually copying a mail file "foo" down into
a directory that I know isn't being delivered to by any MDA but that I
want notmuch to index.) Maybe that's just me, because I'm always
bringing up little things for debugging, etc. But it is convenient at
least.
So I think I'd like to be careful to avoid notmuch ever *requiring*
maildir storage. (But yes, it should obviously support maildir well
since it's so common.)
> I should re-iterate that I'm new to notmuch, and it's obvious that I'm
> trying to beat it into becoming something it was never intended to be;
Actually, I don't think that's true at all. Notmuch is definitely
intended to become a lot more than it is right now. And if it's not
making it easy for you to deal with mail the way you'd like to, then
we definitely do want to look into expanding notmuch to be able to
address that.
> on the other hand, I'd like people to chime in on this.
I've got the patch tagged to give a closer look at it later.
Thanks again,
-Carl
More information about the notmuch
mailing list