From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E5E0F6DE0C45 for ; Thu, 21 Sep 2017 13:06:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.045 X-Spam-Level: X-Spam-Status: No, score=-0.045 tagged_above=-999 required=5 tests=[AWL=-0.045] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9eJrXuaihOJP for ; Thu, 21 Sep 2017 13:06:13 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTP id 0ED816DE0C3F for ; Thu, 21 Sep 2017 13:06:12 -0700 (PDT) Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id B53E8F99A; Thu, 21 Sep 2017 16:06:11 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 3940C206BC; Thu, 21 Sep 2017 14:52:10 -0400 (EDT) From: Daniel Kahn Gillmor To: Jani Nikula Cc: Notmuch Mail Subject: Re: [PATCH 0/9] argument parsing fixes and improvements In-Reply-To: <87k20st1yl.fsf@nikula.org> References: <87mv5qxt3d.fsf@fifthhorseman.net> <87o9q5wlnj.fsf@fifthhorseman.net> <87k20st1yl.fsf@nikula.org> Date: Thu, 21 Sep 2017 14:52:07 -0400 Message-ID: <87h8vv3mw8.fsf@fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Thu, 21 Sep 2017 20:06:14 -0000 --=-=-= Content-Type: text/plain On Thu 2017-09-21 20:07:30 +0300, Jani Nikula wrote: > So I think I'd prefer either strict booleans where the default is one or > the other, or an explicit tristate true|false|default. In your case, > perhaps --try-decrypt=(true|false|database), where the default can be > requested and clearly documented. And that's again not a bool, like > notmuch search --exclude, but then neither is your proposed option. It > has three options in reality, but you've hidden one. being able to set a default in the database is definitely useful, rather than having to find all the places that you (or some other tool) might be invoking a notmuch indexing subcommand. If you want to make it an explicit third variant as stated above, that's fine, but then we don't get --no-try-decrypt from your series here, which is itself a different kind of interface inconsistency. :/ I have plans for a few more boolean variables like this for indexing that will store their defaults in the database. Perhaps we should introduce a new tristate (true|false|database) type to make that simpler to deal with internally, but could also implement --no- prefixes? If that was something you're interested in providing, i'd be fine adjusting my patches to make use of it. --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEOCdgUepHf6PklTkyFJitxsGSMjcFAlnEClcACgkQFJitxsGS MjdhKw//bBXgY4pPWot8ZhUv7P0tl0B5GLACYzrqMQE9vvTDOJjtU9P8IrSWYsoS RA6TBktKaYH/ae5a5rs8G8tonDQZwbOnrliiar19KDndbFeuds8r/9CRZF5VMdDY 6p3dTKZmLlcvj1DnmCUW4uGj3JKRvWy1Oyg6sLqr0VVO3rlEkqbJqj9/OUZ+nxEe +lYvVjw9b5zGNxTsYduBOOL9ZjUQWjLeDnbbFZAuS2sFXuR+d78BRu56yxPDCkeV 57M7cOXc2OelvuKP1dNHilLk+p27m/cI7DiexmbKwDmdvmdd3jU1gJ5Hmj2g5Hw2 Sns1gdYNGEawB9F/2gBelsGZN6RjKHMzt462iGsCH/ilMkR30LEVUuwCKJYNKIUh klIYVgHhl0NxD+1dCn4eLMhcao/Ln4R10QSd5x8mD8WxModwZE/QErS2uOpBtvq/ kDTEkNBPgl79o020Xaxvl6NyJ+e6YCm4fUiCZjy2PzhPGnG12+OA5lZVDA5QZpRR mJ6fNUq77vbn1cPQ137gL45WJZy7XA9/5z3WnrW3toPAL4/R5HScQ5O848v+AYCV kPMzpYenSfA0HyF++qwFEQpDRF3k56KJxhu4jFplIOjmLjnMO6aBs02KM/A4loRO EHmWojDOq4M8h6zZqdi5oW8wNnfoIE5ahjK0zZUuiQvX4T2y+h4= =DyjI -----END PGP SIGNATURE----- --=-=-=--