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 F16CF6DE172E for ; Sun, 12 Mar 2017 12:26:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.17 X-Spam-Level: X-Spam-Status: No, score=0.17 tagged_above=-999 required=5 tests=[AWL=0.179, HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01] 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 tpvmE-jMl68B for ; Sun, 12 Mar 2017 12:26:51 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 8E6CF6DE172B for ; Sun, 12 Mar 2017 12:26:51 -0700 (PDT) Received: by guru.guru-group.fi (Postfix, from userid 501) id CC1721001F9; Sun, 12 Mar 2017 21:26:17 +0200 (EET) From: Tomi Ollila To: notmuch@notmuchmail.org Cc: tomi.ollila@iki.fi, John Byrnes Subject: emacs: use epg-gpg-program Date: Sun, 12 Mar 2017 21:26:16 +0200 Message-Id: <20170312192616.13305-1-tomi.ollila@iki.fi> X-Mailer: git-send-email 2.11.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Sun, 12 Mar 2017 19:26:54 -0000 From: John Byrnes From: John Byrnes Adjusted notmuch-crypto gpg call-process function to respect the GPG program set by the EasyPG epg-gpg-program variable. This is to correct a problem observed on NixOS where only gpg2 is installed by default. The Notmuch Emacs frontend fails when trying to access someone's key to verify their signature when it cannot find the GPG binary. --- id:878tqrpm8b.fsf@johnbyrnes.info with a shorter subject line. To me this patch LGTM. In comparison to id:87tw9ek798.fsf@alice.fifthhorseman.net , Fedora 25 has: $ gpg --version gpg (GnuPG) 1.4.21 $ gpg2 --version gpg (GnuPG) 2.1.13 $ emacs -Q -batch --eval '(progn (require '\''epg-config) (message epg-gpg-program))' gpg2 emacs/notmuch-crypto.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index 68a7e9f..c5111fd 100644 --- a/emacs/notmuch-crypto.el +++ b/emacs/notmuch-crypto.el @@ -140,7 +140,7 @@ mode." (with-selected-window window (with-current-buffer buffer (goto-char (point-max)) - (call-process "gpg" nil t t "--list-keys" fingerprint)) + (call-process epg-gpg-program nil t t "--list-keys" fingerprint)) (recenter -1)))) (defun notmuch-crypto-sigstatus-error-callback (button) @@ -151,9 +151,9 @@ mode." (with-selected-window window (with-current-buffer buffer (goto-char (point-max)) - (call-process "gpg" nil t t "--recv-keys" keyid) + (call-process epg-gpg-program nil t t "--recv-keys" keyid) (insert "\n") - (call-process "gpg" nil t t "--list-keys" keyid)) + (call-process epg-gpg-program nil t t "--list-keys" keyid)) (recenter -1)) (notmuch-show-refresh-view))) -- 2.10.0