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 13E18431FBD for ; Sun, 21 Jul 2013 14:47:52 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.299 X-Spam-Level: X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, UNPARSEABLE_RELAY=0.001] 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 JZC1QeKYpWIq for ; Sun, 21 Jul 2013 14:47:44 -0700 (PDT) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id F246E431FB6 for ; Sun, 21 Jul 2013 14:47:43 -0700 (PDT) Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r6LLldmq018940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 21 Jul 2013 21:47:39 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r6LLlcdF007796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Jul 2013 21:47:38 GMT Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r6LLlbmO007792; Sun, 21 Jul 2013 21:47:38 GMT Received: from virt.cz.oracle.com (/10.163.102.127) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 21 Jul 2013 14:47:37 -0700 Date: Sun, 21 Jul 2013 23:47:35 +0200 From: Vladimir Marek To: Mark Walters Subject: Re: Re: [PATCH 0/3] Introduce the add command Message-ID: <20130721214735.GC4405@virt.cz.oracle.com> References: <1373762746-22308-1-git-send-email-awg+notmuch@xvx.ca> <87wqom8v2x.fsf@servo.finestructure.net> <87r4es8h0p.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87r4es8h0p.fsf@qmul.ac.uk> User-Agent: Mutt/ (2012-12-30) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] 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: Sun, 21 Jul 2013 21:47:52 -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!) That would be mostly welcome addition indeed ... Cheers -- Vlad