From: David Bremner Date: Wed, 10 Feb 2016 11:49:54 +0000 (+2000) Subject: Re: [PATCH v3 05/16] Use a blank _notmuch_crypto to choose the default gpg_path X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8764d8fa546397c74ead55ed8ad12435758e464b;p=notmuch-archives.git Re: [PATCH v3 05/16] Use a blank _notmuch_crypto to choose the default gpg_path --- diff --git a/db/f34c589ca19b74b08525470677af0ef912f09d b/db/f34c589ca19b74b08525470677af0ef912f09d new file mode 100644 index 000000000..d9e81a5b0 --- /dev/null +++ b/db/f34c589ca19b74b08525470677af0ef912f09d @@ -0,0 +1,76 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id C0EA26DE0231 + for ; Wed, 10 Feb 2016 03:49:58 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.308 +X-Spam-Level: +X-Spam-Status: No, score=-0.308 tagged_above=-999 required=5 tests=[AWL=0.243, + RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] 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 hs622-KacY0x for ; + Wed, 10 Feb 2016 03:49:57 -0800 (PST) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id E0B4C6DE021E + for ; Wed, 10 Feb 2016 03:49:56 -0800 (PST) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1aTTGl-000853-4d; Wed, 10 Feb 2016 06:49:15 -0500 +Received: (nullmailer pid 24917 invoked by uid 1000); + Wed, 10 Feb 2016 11:49:54 -0000 +From: David Bremner +To: Daniel Kahn Gillmor , + Notmuch Mail +Subject: Re: [PATCH v3 05/16] Use a blank _notmuch_crypto to choose the + default gpg_path +In-Reply-To: <1454272801-23623-6-git-send-email-dkg@fifthhorseman.net> +References: <1454272801-23623-1-git-send-email-dkg@fifthhorseman.net> + <1454272801-23623-6-git-send-email-dkg@fifthhorseman.net> +User-Agent: Notmuch/0.21+5~gca076ce (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Wed, 10 Feb 2016 07:49:54 -0400 +Message-ID: <87oabovl7h.fsf@maritornes.cs.unb.ca> +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 11:49:59 -0000 + +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. + +d