[PATCH v4 3/3] cli/reply: make --decrypt take a keyword

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Dec 28 19:28:23 PST 2017


On Sat 2017-12-23 10:47:52 -0400, David Bremner wrote:
> Daniel Kahn Gillmor <dkg at fifthhorseman.net> writes:
>> +	{ .opt_keyword = (int*)(&params.crypto.decrypt), .name = "decrypt",
>> +	  .keyword_no_arg_value = "true", .keywords =
>> +	  (notmuch_keyword_t []){ { "false", NOTMUCH_DECRYPT_FALSE },
>> +				  { "auto", NOTMUCH_DECRYPT_AUTO },
>> +				  { "true", NOTMUCH_DECRYPT_NOSTASH },
>> +				  { 0, 0 } } },
>
> same question as for show, should we support --decrypt=nostash ?

No, we should not support --decrypt=nostash for show or reply.  The
semantics of the display commands (show, reply) are such that they
*never* modify the index or stash anything in there.  The equivalent for
the indexing (new, insert, reindex) commands' "--decrypt=nostash" in the
display commands is simply "--decrypt=true".

If you take a look at the subsequent series that follows this one,
you'll see that i offer a "--decrypt=stash" command "notmuch show", but
it makes some unusual assumptions (in particular, about opening the
database read/write, which "notmuch show" has never needed to do
before).

So, in case it wasn't clear: i've thought pretty hard about these
commands and the options that users are likely to want or need.

But the current series (under discussion in this thread) should be
applied *without* those additional changes -- i don't want to have the
whole controversy about "notmuch show --decrypt=stash" now. :)

      --dkg


More information about the notmuch mailing list