--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id A79BE6DE02DA\r
+ for <notmuch@notmuchmail.org>; Sun, 24 Jan 2016 07:22:59 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.657\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.657 tagged_above=-999 required=5 tests=[AWL=0.005, \r
+ SPF_NEUTRAL=0.652] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 2tR2-t40iawa for <notmuch@notmuchmail.org>;\r
+ Sun, 24 Jan 2016 07:22:57 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id C99F86DE0217\r
+ for <notmuch@notmuchmail.org>; Sun, 24 Jan 2016 07:22:55 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 8291C10005A;\r
+ Sun, 24 Jan 2016 17:23:02 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
+ Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH v2 04/16] Provide _notmuch_crypto_{set,get}_gpg_path\r
+In-Reply-To: <1453258369-7366-5-git-send-email-dkg@fifthhorseman.net>\r
+References: <1453258369-7366-1-git-send-email-dkg@fifthhorseman.net>\r
+ <1453258369-7366-5-git-send-email-dkg@fifthhorseman.net>\r
+User-Agent: Notmuch/0.21+32~g73439f8 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sun, 24 Jan 2016 17:23:02 +0200\r
+Message-ID: <m2twm357e1.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 24 Jan 2016 15:22:59 -0000\r
+\r
+On Wed, Jan 20 2016, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:\r
+\r
+> Use functions to access the gpg_path for a _notmuch_crypto_t object.\r
+> This lets us return sensible defaults based on the state of the user's\r
+> machine.\r
+> ---\r
+> notmuch-reply.c | 13 ++++++++++---\r
+> notmuch-show.c | 12 ++++++++++--\r
+> util/crypto.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-\r
+> util/crypto.h | 8 +++++++-\r
+> 4 files changed, 75 insertions(+), 7 deletions(-)\r
+>\r
+> diff --git a/util/crypto.c b/util/crypto.c\r
+> index c18c82c..0b51347 100644\r
+> --- a/util/crypto.c\r
+> +++ b/util/crypto.c\r
+> @@ -21,7 +21,11 @@\r
+> \r
+> #include "notmuch.h"\r
+> #include "crypto.h"\r
+> +#include "search-path.h"\r
+> #include <string.h>\r
+> +#include <talloc.h>\r
+> +\r
+> +#define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0]))\r
+> \r
+> #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0]))\r
+\r
+duplicate ARRAY_SIZE definition ?\r
+\r
+> \r
+> @@ -38,7 +42,7 @@ get_gpg_context (_notmuch_crypto_t *crypto, GMimeCryptoContext **ctx)\r
+> }\r
+> \r
+> /* TODO: GMimePasswordRequestFunc */\r
+> - crypto->gpgctx = g_mime_gpg_context_new (NULL, crypto->gpgpath ? crypto->gpgpath : "gpg");\r
+> + crypto->gpgctx = g_mime_gpg_context_new (NULL, _notmuch_crypto_get_gpg_path(crypto));\r
+> if (! crypto->gpgctx) {\r