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 1048E431FBF for ; Sun, 21 Jul 2013 01:16:37 -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 mUjaQBPl36bc for ; Sun, 21 Jul 2013 01:16:32 -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 0227F431FB6 for ; Sun, 21 Jul 2013 01:16:31 -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 1V0ooa-0000IX-1m; Sun, 21 Jul 2013 09:16:26 +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 1V0ooZ-0007bE-Ox; Sun, 21 Jul 2013 09:16:23 +0100 From: Mark Walters To: Jameson Graef Rollins , Adam Wolfe Gordon , notmuch@notmuchmail.org Subject: Re: [PATCH 0/3] Introduce the add command In-Reply-To: <87wqom8v2x.fsf@servo.finestructure.net> References: <1373762746-22308-1-git-send-email-awg+notmuch@xvx.ca> <87wqom8v2x.fsf@servo.finestructure.net> User-Agent: Notmuch/0.15.2+192~g8222af3 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Sun, 21 Jul 2013 09:16:22 +0100 Message-ID: <87r4es8h0p.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: 46f18ea278537fb909ae84db46e1b727 (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 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: Sun, 21 Jul 2013 08:16:37 -0000 > On Sat, Jul 13 2013, Adam Wolfe Gordon wrote: >> 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. > > Hey, Adam. This feature seems fine, but it seems similar enought to > insert that I wonder if they can just be unified. What if insert just > took an optional path argument as well, e.g.: > > notmuch insert [options] [ +|- ... ] [-- /path/to/file] > > If the path is not in the db, it would insert it the same as if it had > come in via stdin. If the path *is* in the db, it could just do the add > part that you're looking for. That seems like it might be a more > intuitive UI experience to me. I sort of agree but wonder if it would be more natural under "new" than "insert". so notmuch new /path/to/file just adds that file (provided it is in the database; perhaps a relative path?) This would also be extensible to do a whole mail sub-directory which seems like it might also be a useful feature. (I am definitely not saying that this needs to be implemented now!) Best wishes Mark > > jamie. > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch