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 0C8D46DE1104 for ; Wed, 10 Feb 2016 08:37:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.018 X-Spam-Level: X-Spam-Status: No, score=-0.018 tagged_above=-999 required=5 tests=[AWL=-0.018] 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 HJ_2yq-Cclcd for ; Wed, 10 Feb 2016 08:37:54 -0800 (PST) Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108]) by arlo.cworth.org (Postfix) with ESMTP id 6A2AB6DE0BF6 for ; Wed, 10 Feb 2016 08:37:54 -0800 (PST) Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id 71100F997; Wed, 10 Feb 2016 11:37:51 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id E15F71FF3A; Wed, 10 Feb 2016 11:37:52 -0500 (EST) From: Daniel Kahn Gillmor To: David Bremner , Notmuch Mail Subject: Re: [PATCH v3 05/16] Use a blank _notmuch_crypto to choose the default gpg_path In-Reply-To: <87oabovl7h.fsf@maritornes.cs.unb.ca> References: <1454272801-23623-1-git-send-email-dkg@fifthhorseman.net> <1454272801-23623-6-git-send-email-dkg@fifthhorseman.net> <87oabovl7h.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.21+72~gd8c4f1c (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 10 Feb 2016 11:37:52 -0500 Message-ID: <877fico71b.fsf@alice.fifthhorseman.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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: Wed, 10 Feb 2016 16:37:56 -0000 On Wed 2016-02-10 06:49:54 -0500, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> This way we're only choosing a default in one place. >> --- >> notmuch-config.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/notmuch-config.c b/notmuch-config.c >> index d252bb2..7cd19a7 100644 >> --- a/notmuch-config.c >> +++ b/notmuch-config.c >> @@ -418,7 +418,8 @@ notmuch_config_open (void *ctx, >> } >> >> if (notmuch_config_get_crypto_gpg_path (config) == NULL) { >> - notmuch_config_set_crypto_gpg_path (config, "gpg"); >> + _notmuch_crypto_t crypto = { .gpg_path = NULL }; >> + notmuch_config_set_crypto_gpg_path (config, _notmuch_crypto_get_gpg_path (&crypto)); >> } > > I'm not sure if it's worth it, but this particular usage would be > cleaner if _notmuch_crypto_get_path allowed a NULL argument. Agreed; this change will be in my v4 series. --dkg