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 2741B6DE0278 for ; Mon, 1 Oct 2018 09:06:45 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.292 X-Spam-Level: X-Spam-Status: No, score=0.292 tagged_above=-999 required=5 tests=[AWL=-0.150, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.211, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=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 TyGRK2hV32qf for ; Mon, 1 Oct 2018 09:06:43 -0700 (PDT) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by arlo.cworth.org (Postfix) with ESMTPS id 0B2686DE0275 for ; Mon, 1 Oct 2018 09:06:40 -0700 (PDT) Received: by mail-wr1-f67.google.com with SMTP id a13-v6so3892543wrt.5 for ; Mon, 01 Oct 2018 09:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=z4WAhKDAZF7p254av9vDYhm5dSfCdbZg9x8u83j+NRw=; b=zIdl1/kOmAqox3gdagXZOmHRcvCfP5+c+GCNznh45xgTUwxsdBEK7vWHgLVotimoKe as0h9WCmNH+icMD7g0sxSJZpo+47qMuRumWC6JdvCvWMXF7tatY6TmdyJ9ngIipP6VQu ceD/vBFmGk7b/xHlUTmvWaXxnqra5bcwXq5fTo2PknzXAC7i3SU6gtu9MShQ+VXfmtv1 ZJweLhExDz5kmS4MfVT+JYTsq6kpjxAH7BVBtJrkadXD2WQt1T6l2ugcSTREDdDgyWMM CG2JXmiBQ66rlVCmRpWSgLPKiNp7bhBYMxQOziLyIxBkCf38LmDiZZEtlGGPAevrqINW gFYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z4WAhKDAZF7p254av9vDYhm5dSfCdbZg9x8u83j+NRw=; b=q8h8tcn3p86EXkdOw64yysH6rS2lk4aZkG3DSqxKmHfC1lDaXtUM6EC8xjqnFZCAot KlpKfAN+RAatig83HhaahtX5Asoo6FNfdV1422ctjJa9pvZ8lVl7fF4nqVoPwxApN7DT DGvPY4zUQx168DbWl1jNNoi3vVulx95YefE3vhYaF9sd4ZXwvjj99HkuQ7gl+HzvzqgA yDY9FzZi5MoZwu1hFZ6lqIDo5fzAebRxXrYCcPuWrHjopWvRbipsMr1+Or9iF/ySQNr6 uySf8fTu2dDwT8m/dl9IuOnc0sJ2iMeaYbDu8ltKCAYP3sPfFdPy1OxW+SwSBpls9qDu LxBQ== X-Gm-Message-State: ABuFfoguspeArKOQijFwbKfXNQcDHqWtS7lj8G1QILrCQxDxRSdP4WpT 9jLClEQFUdlXqkhsbE7KO6R757QPTg6eNQ== X-Google-Smtp-Source: ACcGV63kvm9wQQmQoLoVzdtUP7lUmJBfQixwCGtX3FoXDTS+GyGfh2EqgaPV/nT/SnAC73FKoB5n8g== X-Received: by 2002:adf:a1dd:: with SMTP id v29-v6mr7375650wrv.50.1538409998297; Mon, 01 Oct 2018 09:06:38 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id t14-v6sm8601422wmi.35.2018.10.01.09.06.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 09:06:37 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id ae09bf90 for ; Mon, 1 Oct 2018 16:06:33 +0000 (UTC) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH v3 3/4] emacs: Add notmuch-crypto-gpg-program and use it Date: Mon, 1 Oct 2018 17:06:32 +0100 Message-Id: <20181001160633.26775-4-dme@dme.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181001160633.26775-1-dme@dme.org> References: <20181001160633.26775-1-dme@dme.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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: Mon, 01 Oct 2018 16:06:45 -0000 Allow the user to specify the gpg program to use when retrieving keys, etc., defaulting to the value of `epg-gpg-program'. --- emacs/notmuch-crypto.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index f128f30e..99087d0b 100644 --- a/emacs/notmuch-crypto.el +++ b/emacs/notmuch-crypto.el @@ -48,6 +48,11 @@ mode." :type 'boolean :group 'notmuch-crypto) +(defcustom notmuch-crypto-gpg-program epg-gpg-program + "The gpg executable." + :type 'string + :group 'notmuch-crypto) + (defface notmuch-crypto-part-header '((((class color) (background dark)) @@ -149,7 +154,7 @@ by user FROM." (with-selected-window window (with-current-buffer buffer (goto-char (point-max)) - (call-process epg-gpg-program nil t t "--list-keys" fingerprint)) + (call-process notmuch-crypto-gpg-program nil t t "--list-keys" fingerprint)) (recenter -1)))) (declare-function notmuch-show-refresh-view "notmuch-show" (&optional reset-state)) @@ -206,7 +211,7 @@ corresponding key when the status button is pressed." button (format "Retrieving key %s asynchronously..." keyid)) (let ((p (make-process :name "notmuch GPG key retrieval" :buffer buffer - :command (list epg-gpg-program "--recv-keys" keyid) + :command (list notmuch-crypto-gpg-program "--recv-keys" keyid) :connection-type 'pipe :sentinel #'notmuch-crypto--async-key-sentinel ;; Create the process stopped so that @@ -218,13 +223,14 @@ corresponding key when the status button is pressed." (process-put p :notmuch-show-point (point)) (message "Getting the GPG key %s asynchronously..." keyid) (continue-process p))) + (let ((window (display-buffer buffer))) (with-selected-window window (with-current-buffer buffer (goto-char (point-max)) - (call-process epg-gpg-program nil t t "--recv-keys" keyid) + (call-process notmuch-crypto-gpg-program nil t t "--recv-keys" keyid) (insert "\n") - (call-process epg-gpg-program nil t t "--list-keys" keyid)) + (call-process notmuch-crypto-gpg-program nil t t "--list-keys" keyid)) (recenter -1)) (notmuch-show-refresh-view))))) -- 2.19.0