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 C02B1431FB6 for ; Mon, 2 Apr 2012 14:43:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.29 X-Spam-Level: X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 X7UPFfRiwg-9 for ; Mon, 2 Apr 2012 14:43:23 -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 5E7F0431FAE for ; Mon, 2 Apr 2012 14:43:23 -0700 (PDT) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id E710B66E016C; Mon, 2 Apr 2012 14:43:22 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (gwave-213.ligo.caltech.edu [131.215.114.213]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 2149B66E0159; Mon, 2 Apr 2012 14:43:19 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id F2AA47F4; Mon, 2 Apr 2012 14:43:18 -0700 (PDT) From: Jameson Graef Rollins To: Jani Nikula Subject: Re: [PATCH 6/8] cli: add support for batch tagging operations to "notmuch tag" In-Reply-To: References: <87ty123tpc.fsf@servo.finestructure.net> <87aa2tc22z.fsf@zancas.localnet> <87iphh50hz.fsf@servo.finestructure.net> <87fwcl4yr8.fsf@servo.finestructure.net> User-Agent: Notmuch/0.12+87~g3c4c85f (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 02 Apr 2012 14:43:16 -0700 Message-ID: <87d37p4xor.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Cc: Notmuch Mail 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: Mon, 02 Apr 2012 21:43:23 -0000 --=-=-= So what if we instead modified the top level binary ("notmuch") to: * add an option to specify that commands are to be processed from stdin (--batch) * when in batch mode the db is opened once at the beginning and locked * commands are processed from stdin in the exact same form they are specified on the command line ("tag +foo -- from:bar", "search tag:foo", etc.). * db is closed when EOF is reached. That seems like it would be a generally much cleaner interface, and much more flexible. jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJPeh10AAoJEO00zqvie6q8PgEP/3dfQxm6ZveppXcxcchZ+2ce IFCZAy82P5RLBSogCqXFyySZPiMibvLALh479Sh9sWnftfuV1zLrwHpboEyCflDY CpzLOXXEPKccxQwowsJ7MuBXXZd5FqJF2IrGnRcW7rbv6Qrdf2SGS7sDcZSza10s 0MtbCB+WjoiRli5DKJQepWOFxR2398bdrcSDFgVVyzhWk87ODpPj4TDdrwb8HziM r6qyToI9hbwvhbOrCsoQH1U0TXhB/VQKfJkPSFAjArDVz6/A7gdKVnDHFvQvzMy9 QOqCpj/O/EAF/CrEMVwKZc35pscljGxGJ+GkP9L0O4IbK8JE5GaGcCJjp9F3P99m YRuL7mKLICZRRTK1NQ7SnTBPZAOa2ZT7lQaz6Vw6Air4dc4j9ajt9R5Tg25rWUBt IvZRWgbIwlR+b8DmTqWaQfKDaTzjsZWay1BzYpKIhDZ/M90MhALmPxJ3lQUEYOIn G7WfGrzTYSpEOm/aFCBWAgO0UPNftBcZY9ezyVuEdPdIELWABOMRRPqZvZ7plKcR 0HnzQlTIPuIudBMfVWNIxNJ6IsrJ4EEsTi2u2v/uPIE6TsCYjtpDqAS0j64liBZU q5IDmBdRontFpuu0wxtYXc6ykFboMu9zbMuL42JuB7lZEiJyL0s1F/pKxBg+jpZS 7LHNtEtXHVAYeL1YDC0k =1AQS -----END PGP SIGNATURE----- --=-=-=--