[notmuch] [PATCH] notmuch: Add Maildir directory name as tag name for messages
cworth at cworth.org
Fri Nov 27 19:26:57 PST 2009
On Thu, 26 Nov 2009 22:12:02 +0100, Michiel Buddingh' <michiel at michielbuddingh.net> wrote:
> Carl Worth <cworth at cworth.org> wrote:
> I considered that approach; ideally, we could test for the presence of
> all three of cur, tmp and new--but this is rather messy to do in the
> current treewalk structure. Taking any one of them as proof positive of
> a Maildir might lead to unpleasant surprises--it's not all that incon-
> ceivable for someone to name a mail folder 'tmp'.
The auto-detection is just three additional stats (at most) for each
directory, right? That seems cheap enough to me.
> There's another matter; Some mail stores will place (large) index files
> in folder roots, i.e. one level above cur/, tmp/ and new/. Looking
> at the ones dovecot (an IMAP server) uses, I can make out a from header,
> a subject header, and a message-id, as plaintext in the first 100k or
> so. It's not all that inconceivable that notmuch might register it as
> a 'real' email, with unpleasant consequences for the index.
That seems orthogonal to me. Would the dovecot index files be easy to
skip with a pattern-based blacklist?
> I've seen some patches fly by that add support for multiple mail
> stores. Turning on Maildir support on a per-directory basis might
> resolve that problem while still supporting heterogenous mail archives
> to some degree. I am not convinced we can do the right thing
> automatically without causing some grief to a subset of users.
With sup, I had the opposite extreme compared to current notmuch. Every
maildir in the hierarchy had to be configured independently. That was a
lot of pain, and is precisely why notmuch started out by simply taking a
single top-level directory.
> Haven't tested it, but it seems you can put
> whitespace = trailing-space,space-before-tab
Yes. According to the documentation of git-config, those two values are
the default. But the documentation also only says that these will make
"git diff" display the undesired whitespace in red, and "git apply
--whitespace=error" refuse to apply.
I can't find a builtin way to make "git commit" complain, or I would
> I'll be happy to implement them, although I'd like for others to chime
> in on the configure-as-Maildir vs. autodetect-Maildir issue. And thanks
> for your patience in working through my patch.
No problem at all. I'll look forward to the next version of the
patch. Consider mine as a vote for autodetection of maildir rather than
More information about the notmuch