--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1B2E2431FBC\r
+ for <notmuch@notmuchmail.org>; Sat, 7 Mar 2015 09:19:58 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.738\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.738 tagged_above=-999 required=5\r
+ tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id SK9A1qSywhW1 for <notmuch@notmuchmail.org>;\r
+ Sat, 7 Mar 2015 09:19:54 -0800 (PST)\r
+Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com\r
+ [209.85.212.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id A8246431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 7 Mar 2015 09:19:54 -0800 (PST)\r
+Received: by widex7 with SMTP id ex7so9766955wid.3\r
+ for <notmuch@notmuchmail.org>; Sat, 07 Mar 2015 09:19:53 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:subject:in-reply-to:references\r
+ :user-agent:date:message-id:mime-version:content-type;\r
+ bh=0ATfHU3xBnnOJyL9PU+vptwUULLxihntaTQsEMFAVDc=;\r
+ b=WPxzAjQmYEdYYwtFlUBmrfmQSfPccoposyQr0OpeZhMPOkb5G8glSYZye7hD1XB6j6\r
+ F5Os0+aVlTyt6EPWTH0kbpqRMpNm9pYpZdNkamLXmdQv8gExOXTHR6RVqkyZ3X+d5AsY\r
+ o/FFp6+JU0iDeyzxDJbjDx1u+cTBdwhqwEBZTZmLKXAFe32/YHvB8QYCaiD3RHYP+ipE\r
+ c2Qtoe0fXAhWNZc0fFn82dIT/+exBKzkreOBycTrfXFzYP3FqpJ2WIrbmAn9K7ehFjqn\r
+ Chxfo6WJW9YRZFhe7vyWpcqpP7csWGNBJHrz55RXG58nOR6Ib6WPWsz5mvN7zkNf7YjG\r
+ sUOQ==\r
+X-Gm-Message-State:\r
+ ALoCoQnrRTZ1qMhbgO/cnbrK3Xn9kn9JZntYLGSQX7PG9FlNiY/aOcSU7L/2NAyR4z9o0eDWYyF1\r
+X-Received: by 10.180.103.40 with SMTP id ft8mr89542469wib.68.1425748793761;\r
+ Sat, 07 Mar 2015 09:19:53 -0800 (PST)\r
+Received: from localhost (mobile-internet-bcee3b-76.dhcp.inet.fi.\r
+ [188.238.59.76])\r
+ by mx.google.com with ESMTPSA id bd3sm7427211wib.17.2015.03.07.09.19.52\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 07 Mar 2015 09:19:53 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/2] CLI: make gpg binary used by libgmime configurable.\r
+In-Reply-To: <1418155271-23704-2-git-send-email-david@tethera.net>\r
+References: <1418155271-23704-1-git-send-email-david@tethera.net>\r
+ <1418155271-23704-2-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.19+74~g6aeef2e (http://notmuchmail.org) Emacs/24.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sat, 07 Mar 2015 19:20:12 +0200\r
+Message-ID: <87d24kiv1v.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 07 Mar 2015 17:19:58 -0000\r
+\r
+On Tue, 09 Dec 2014, David Bremner <david@tethera.net> wrote:\r
+> Previously we set up a way for the top level notmuch command to choose\r
+> which gpg binary was invoked by libgmime. In this commit we add the\r
+> (mostly boilplate) code to allow the notmuch-config command to read\r
+> and write this path, and use it in the appropriate struct.\r
+\r
+This should probably add the section comment in notmuch_config_open().\r
+\r
+For a lot of things we add the default to the config if it isn't there\r
+already. I'm undecided whether this is a good approach in general, and\r
+whether we should push the "gpg" hardcoding to the config code. For the\r
+time being I'm fine with this as it is, and we should probably have a\r
+look at the config code at a later time anyway.\r
+\r
+Is "gpg" as a section name too specific? Does this lead to having to add\r
+other sections for crypto/security/privacy stuff if it isn't related to\r
+gpg? *shrug*.\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+> ---\r
+> notmuch-client.h | 7 +++++++\r
+> notmuch-config.c | 15 +++++++++++++++\r
+> notmuch-reply.c | 2 ++\r
+> notmuch-show.c | 2 ++\r
+> 4 files changed, 26 insertions(+)\r
+>\r
+> diff --git a/notmuch-client.h b/notmuch-client.h\r
+> index c25c4ea..fad81d5 100644\r
+> --- a/notmuch-client.h\r
+> +++ b/notmuch-client.h\r
+> @@ -279,6 +279,13 @@ notmuch_config_set_database_path (notmuch_config_t *config,\r
+> const char *database_path);\r
+> \r
+> const char *\r
+> +notmuch_config_get_gpg_path (notmuch_config_t *config);\r
+> +\r
+> +void\r
+> +notmuch_config_set_gpg_path (notmuch_config_t *config,\r
+> + const char *gpg_path);\r
+> +\r
+> +const char *\r
+> notmuch_config_get_user_name (notmuch_config_t *config);\r
+> \r
+> void\r
+> diff --git a/notmuch-config.c b/notmuch-config.c\r
+> index a564bca..7aef1b6 100644\r
+> --- a/notmuch-config.c\r
+> +++ b/notmuch-config.c\r
+> @@ -107,6 +107,7 @@ struct _notmuch_config {\r
+> notmuch_bool_t is_new;\r
+> \r
+> char *database_path;\r
+> + char *gpg_path;\r
+> char *user_name;\r
+> char *user_primary_email;\r
+> const char **user_other_email;\r
+> @@ -690,6 +691,20 @@ notmuch_config_set_search_exclude_tags (notmuch_config_t *config,\r
+> &(config->search_exclude_tags));\r
+> }\r
+> \r
+> +const char *\r
+> +notmuch_config_get_gpg_path (notmuch_config_t *config)\r
+> +{\r
+> + return _config_get (config, &config->gpg_path, "gpg", "path");\r
+> +}\r
+> +\r
+> +void\r
+> +notmuch_config_set_gpg_path (notmuch_config_t *config,\r
+> + const char *gpg_path)\r
+> +{\r
+> + _config_set (config, &config->gpg_path, "gpg", "path", gpg_path);\r
+> +}\r
+> +\r
+> +\r
+> /* Given a configuration item of the form <group>.<key> return the\r
+> * component group and key. If any error occurs, print a message on\r
+> * stderr and return 1. Otherwise, return 0.\r
+> diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+> index e18370f..d6d3315 100644\r
+> --- a/notmuch-reply.c\r
+> +++ b/notmuch-reply.c\r
+> @@ -822,6 +822,8 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[])\r
+> return EXIT_FAILURE;\r
+> }\r
+> \r
+> + params.crypto.gpgpath = notmuch_config_get_gpg_path (config);\r
+> +\r
+> if (notmuch_database_open (notmuch_config_get_database_path (config),\r
+> NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much))\r
+> return EXIT_FAILURE;\r
+> diff --git a/notmuch-show.c b/notmuch-show.c\r
+> index d292f29..b0d4609 100644\r
+> --- a/notmuch-show.c\r
+> +++ b/notmuch-show.c\r
+> @@ -1204,6 +1204,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])\r
+> return EXIT_FAILURE;\r
+> }\r
+> \r
+> + params.crypto.gpgpath = notmuch_config_get_gpg_path (config);\r
+> +\r
+> if (notmuch_database_open (notmuch_config_get_database_path (config),\r
+> NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much))\r
+> return EXIT_FAILURE;\r
+> -- \r
+> 2.1.3\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r