From: Jameson Graef Rollins Date: Fri, 19 Jul 2013 14:48:06 +0000 (+1700) Subject: Re: [PATCH 0/3] Introduce the add command X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a57865e75b166a0ea39dc458f7a375536f1bbe3f;p=notmuch-archives.git Re: [PATCH 0/3] Introduce the add command --- diff --git a/6e/fa5e4e26d15026aa3bd14a04b83c779c5d383a b/6e/fa5e4e26d15026aa3bd14a04b83c779c5d383a new file mode 100644 index 000000000..e2e3bf75d --- /dev/null +++ b/6e/fa5e4e26d15026aa3bd14a04b83c779c5d383a @@ -0,0 +1,107 @@ +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 7A2BE431FBD + for ; Fri, 19 Jul 2013 07:48:21 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[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 S0qERT7WHkFZ for ; + Fri, 19 Jul 2013 07:48:16 -0700 (PDT) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id DC365431FC2 + for ; Fri, 19 Jul 2013 07:48:15 -0700 (PDT) +Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by fire-doxen-postvirus (Postfix) with ESMTP id 56C2F328040; + Fri, 19 Jul 2013 07:48:15 -0700 (PDT) +X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new +Received: from finestructure.net (lair.fifthhorseman.net [108.58.6.98]) + (Authenticated sender: jrollins) + by fire-doxen-submit (Postfix) with ESMTP id 7AAC232806D; + Fri, 19 Jul 2013 07:48:12 -0700 (PDT) +Received: by finestructure.net (Postfix, from userid 1000) + id 8F29762962; Fri, 19 Jul 2013 07:48:09 -0700 (PDT) +From: Jameson Graef Rollins +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+223~g9020f68 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 19 Jul 2013 07:48:06 -0700 +Message-ID: <87wqom8v2x.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; protocol="application/pgp-signature" +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: Fri, 19 Jul 2013 14:48:21 -0000 + +--=-=-= +Content-Type: text/plain + +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. + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iQIcBAEBCAAGBQJR6VGnAAoJEO00zqvie6q83kYP/jGNGIC3wM4O9d5mutvp3abl +arGzPewrLlVN9LWq31xQRusUasKf6GDCn7vfddiMYd7eZfgMAA+Sn9xbQ662gdHn +0wdQW+Vs1x2WntAxaQ+ZfWxE3d5OKn2Hb/4GjXjZaUg9XppA9V0984fsIhdPaWDb +6PbRXtJoC8VLt+yUxvcjywy2CUWLo/xU7FOtV4kZEGxm+zv9kSDj+RliH//jFJ5C +x/HelLow9lO7of8fwU9JwaUsb4zDpy8b1R6iq0Lz4y2PRNb/9LR1S9dHo6h/42Po +xivQF+cENpHmdDBrKy/t3017pWb3Df4ZfD03QbnOUSe+jyqncp1AN/FmKZqFaAj2 +g4haRVfrtMf6iAlKeqGAxD5lhwDW2Zd32jhLOw6o3+VgL6Iy0lb431T3A8G49026 +W1r1bSkGjFY36gfiH/5YV7XsY7Arj3F0DUQfDPRLMufFJ7wVhsc8B5vpKMu9Jhea +g/lLQ7l/AgzzGX4tsftgJwTJhK/cxzBZZxX6B8s3eW2mCd4YGJGPrngez2uxGy1a +9VZog56pvkJPfblDbKV9CuQqsDeptGPB0rr5ReyW0CQPf0161oUIoThwO1k7ztQd +luYChXia6Au5d8GePGmLPtbD+RSJ5aYycJTb5Fhn1GnPSOl8k9Gq+Q45glmZgdwD +Qg3VrV1bEyJO+BUNUoGT +=ifDO +-----END PGP SIGNATURE----- +--=-=-=--