Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8DCF04196F2 for ; Thu, 8 Apr 2010 05:57:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.5 X-Spam-Level: X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5 tests=[BAYES_05=-0.5] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5WUrWn5lkg7M for ; Thu, 8 Apr 2010 05:57:36 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 45AA9431FC1 for ; Thu, 8 Apr 2010 05:57:36 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 9A6DB19F33D5; Thu, 8 Apr 2010 14:57:35 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id CLJbgPehEL83; Thu, 8 Apr 2010 14:57:32 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 0296219F33D4; Thu, 8 Apr 2010 14:57:32 +0200 (CEST) Received: from steelpick.2x.cz (k335-30.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id D216015C062; Thu, 8 Apr 2010 14:57:31 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.71) (envelope-from ) id 1NzrIZ-00056p-C3; Thu, 08 Apr 2010 14:57:31 +0200 From: Michal Sojka To: Carl Worth , Sebastian Spaeth , notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH] notmuch-new: Respect maildir flags when importing a new message In-Reply-To: <878w8zq7yl.fsf@yoom.home.cworth.org> References: <20100216022128.GH22402@flamingspork.com> <1267450136-31749-1-git-send-email-Sebastian@SSpaeth.de> <878w8zq7yl.fsf@yoom.home.cworth.org> Date: Thu, 08 Apr 2010 14:57:31 +0200 Message-ID: <87aate6r0k.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 12:57:37 -0000 On Wed, 07 Apr 2010, Carl Worth wrote: > On Mon, 1 Mar 2010 14:28:56 +0100, Sebastian Spaeth wrote: > > When importing a new mail do check for maildir tags and assign > > corresponding notmuch tags. > > I think this is a useful thing to support, as obviously new users have > *some* state that's interesting to import (which messages have been > "seen" for example), and simply importing their entire email archive > with both the "inbox" and "unread" tags is not helpful. So I'd like to > figure out how to support this. I'm solving this in my mailstore abstraction patches. I'll send the next version in a while. > > Do note that this will only add tags when importing a really new > > message, and will not do anything when detecting a file rename > > (although someone should really make it honor file renames as > > well). Deleteing an existing message in another IMAP client will > > therefore not trigger tagging (as it counts as a file rename). > > But I think we really need to fix that if we're going to claim that > notmuch "supports maildir flags" in any sense. > > It's a fairly tricky issue though since we can have multiple files that > have the same message ID, but then have different maildir flags. And > it's the matter of arbitrary ordering which one of these files appears > as "new" and which one appears as a "rename". Yes, that's a problem. It is not currently solved in my pacthes, but I have one solution in my mind. Let's discuss this with my patch. > It's not obvious to me what we can do here unless we make some > assumptions, (such as "mails always start without the seen flag, and > once it appears it can't be removed" or so). But I'd love some input > From someone who's thought harder about this than I have. -Michal