From d3d8244867ef099dce810c17112749fa938c2f90 Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Tue, 29 Jul 2014 00:48:01 +1000 Subject: [PATCH] Re: [PATCH v2 08/10] cli: add insert --must-index option --- 25/f76696bcd806f0b07e7667058351d47a78a357 | 99 +++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 25/f76696bcd806f0b07e7667058351d47a78a357 diff --git a/25/f76696bcd806f0b07e7667058351d47a78a357 b/25/f76696bcd806f0b07e7667058351d47a78a357 new file mode 100644 index 000000000..f09783966 --- /dev/null +++ b/25/f76696bcd806f0b07e7667058351d47a78a357 @@ -0,0 +1,99 @@ +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 158A1431FB6 + for ; Mon, 28 Jul 2014 07:48:17 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +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 C48eXVUFip-F for ; + Mon, 28 Jul 2014 07:48:09 -0700 (PDT) +Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com + [209.85.192.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id D8E3E431FAE + for ; Mon, 28 Jul 2014 07:48:08 -0700 (PDT) +Received: by mail-pd0-f175.google.com with SMTP id r10so10013361pdi.20 + for ; Mon, 28 Jul 2014 07:48:07 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=date:message-id:from:to:cc:subject:in-reply-to:references + :mime-version:content-type:content-disposition + :content-transfer-encoding; + bh=GjakIT4xHsdQ1k0myv7X011SlRLwo96RvsIO+PaIcOY=; + b=urHtqR3VtZk4RXfB1091Y4Ialih0FYRuXMyP55kfFy9Wcyv+G6aWqctRHD527Ga1yG + Z6XrHm+zy1Iha5Dj8DETAcv4+lSrF2bmvf7/eCrh59nBRwdQdSgLvq5NgRoksO4BD97N + 01ALpDO0KESqHNQYSHXFsZBq7ykBvbJOrLPCBb+DMe1+JY0Wpyq6ADR7wZJWAmdICmKW + Jcs1Aqca6xZCjn/VJ34mskpinCyA4u23Utf4ODMlPzZiHx2uWqQ1dyQHymMalgSgZe8c + G10pRO/FChqJnhPCKhvFQPrUfurdVGnxUAdJ7BmH9P6fWy/A7BPOjJ+9JLgS/dKfheOF + O2UQ== +X-Received: by 10.66.118.71 with SMTP id kk7mr2799671pab.147.1406558886704; + Mon, 28 Jul 2014 07:48:06 -0700 (PDT) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPSA id kp7sm6958905pdb.73.2014.07.28.07.48.04 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Mon, 28 Jul 2014 07:48:05 -0700 (PDT) +Date: Tue, 29 Jul 2014 00:48:01 +1000 +Message-ID: <20140729004801.GF18000@hili.localdomain> +From: Peter Wang +To: David Bremner +Subject: Re: [PATCH v2 08/10] cli: add insert --must-index option +In-Reply-To: <87wqbm86ha.fsf@maritornes.cs.unb.ca> +References: <1397653165-15620-1-git-send-email-novalazy@gmail.com> + <1397653165-15620-9-git-send-email-novalazy@gmail.com> + <87wqbm86ha.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +Cc: notmuch@notmuchmail.org +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: Mon, 28 Jul 2014 14:48:17 -0000 + +On Wed, 09 Jul 2014 20:20:17 -0300, David Bremner wrote: +> Peter Wang writes: +> +> > This option causes notmuch insert to fail (with exit code 3) on failure +> > to index the message, or failure to set the tags on the message, or if +> > closing (flushing) the database fails. Failure to sync tags to flags +> > has no effect. +> +> I don't really understand why it's OK to ignore failure to sync +> flags. Can you explain? Or point to a previous discussion if we already +> went through this? + +It wasn't really discussed. Only Mark expressed that he didn't really +mind in id:87hadtxfrr.fsf@qmul.ac.uk + +It might be justified that, unlike a failure to index, the message will +still be found though the notmuch interface, with the tags intact. +Running notmuch new will not lose those tags either (I think). +It's only when you view the message through another interface that there +will be an inconsistency in the small subset of tags which can be mapped +to maildir flags. + +If we were strict about failure to sync flags, then presumably the +newly-added message would need to be deleted from disk and removed from +the database. I'm not sure it's worthwhile to avoid that (minor) +inconsistency. + +Peter -- 2.26.2