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 466F2431FAF for ; Tue, 10 Sep 2013 01:06:16 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 qXebqebHUenb for ; Tue, 10 Sep 2013 01:06:10 -0700 (PDT) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 02190431FAE for ; Tue, 10 Sep 2013 01:06:09 -0700 (PDT) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1VJIxV-0004vI-LT; Tue, 10 Sep 2013 09:06:02 +0100 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) (envelope-from ) id 1VJIxV-0002eL-Bq; Tue, 10 Sep 2013 09:06:01 +0100 From: Mark Walters To: Peter Wang Subject: Re: [PATCH 1/3] cli: add insert --must-index option In-Reply-To: <20130727151510.GA13750@hili.localdomain> References: <1374365254-13227-1-git-send-email-novalazy@gmail.com> <87ip048gbj.fsf@qmul.ac.uk> <20130727151510.GA13750@hili.localdomain> User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Tue, 10 Sep 2013 09:06:00 +0100 Message-ID: <87hadtxfrr.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 93.97.24.31 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: ae989e6c2e9253499f409b45db0e9ed2 (of first 20000 bytes) X-SpamAssassin-Score: 0.0 X-SpamAssassin-SpamBar: / X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored 0.0 points. Summary of the scoring: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * 0.0 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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: Tue, 10 Sep 2013 08:06:16 -0000 Hi >> Do you have a particular use case where indexing is required but tagging >> is not? For my uses I would prefer failing if either indexing or tagging >> failed. (My use being postponing messages; If they don't get the >> postponed tag they could be hard to find) > > You're right. > > What about a failure to sync tags to maildir flags? Personally, I wouldn't mind ignoring this failure: it should be relatively easy to fix after the fact (but others may disagree). > I now noticed that database modifications aren't flushed until the > notmuch_database_destroy call (right?), which has no return value and > failure of which is silently ignored. That's acceptable in the default > mode, but with --must-index the failure should be reported (and the > file deleted). Yes I think you are right: flushed by notmuch_database_close which is called by notmuch_database_destroy. Perhaps the easiest would be to add a notmuch_database_flush with a return value and then you can call that (and then call notmuch_database_destroy)? Alternatively maybe add notmuch_database_destroy_with_flush or something which does give a return value. notmuch_database_close is only called 3 times and notmuch_database_destroy lots of times so changing close is much less intrusive than changing destroy. But I don't know whether we would break any bindings or external programs etc. What do you think? Best wishes Mark