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 238E0431FBF for ; Wed, 17 Jul 2013 08:23:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 R1UfDXBbnxiG for ; Wed, 17 Jul 2013 08:23:15 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id AC5B5431FBD for ; Wed, 17 Jul 2013 08:23:15 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id A0813100030; Wed, 17 Jul 2013 18:23:07 +0300 (EEST) From: Tomi Ollila To: Adam Wolfe Gordon , notmuch@notmuchmail.org Subject: Re: [PATCH 0/3] Introduce the add command In-Reply-To: <1373762746-22308-1-git-send-email-awg+notmuch@xvx.ca> References: <1373762746-22308-1-git-send-email-awg+notmuch@xvx.ca> User-Agent: Notmuch/0.15.2+193~g7350bd4 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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: Wed, 17 Jul 2013 15:23:23 -0000 On Sun, Jul 14 2013, Adam Wolfe Gordon wrote: > Hi everyone, > > The recent introduction of insert inspired me to finally add a feature I've > been wanting: a command to index a specific file in the maildir. My usecase > for this is that I have an inotify-based script that watches for new mail > and calls notmuch new when new mail shows up. Running notmuch new in this > situation is overkill, since I know exactly what's changed. A faster command > that just adds a single file reduces contention on the database lock. > > This series introduces a new command, "notmuch add", which indexes a file > that already exists in the maildir. It is implemented in notmuch-insert.c > because it uses the basic infrastructure introduced for the insert command. > > Missing man page for now - wanted to get the code out first for review. The code looks good to me. The only issue I noticed when comparing with new is that check for notmuch database upgrade (and actual upgrade) is not done... ... nor is this done in notmuch insert either. Maybe in these cases it is better than the upgrade is not attempted but it might be good to address this in the namual page (here and in insert page) ? Anyway I like the feature and would take it into use sometime in the (distant?) future (i.e. when I'd tune my mail delivery again). > > -- Adam Tomi > > Adam Wolfe Gordon (3): > cli: Return an error code from add_message_to_database > cli: Introduce the add command > test: Add simple tests for the add command > > notmuch-client.h | 3 +++ > notmuch-insert.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++--- > notmuch.c | 2 ++ > test/insert | 35 +++++++++++++++++++++++++++++++++ > 4 files changed, 94 insertions(+), 3 deletions(-) > > -- > 1.7.9.5 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch