[PATCH] [EMACS] Adjust notmuch-crypto gpg call-process function

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Jan 4 10:30:27 PST 2017


On Tue 2017-01-03 21:55:48 -0500, John Byrnes wrote:
> I'm running the latest NixOS and noticed that the system does not
> install gpgv1 by default. This means that the only gpg binary available
> is the gpg2 binary.
>
> I found that notmuch-crypto.el hardcodes the GnuPG binary as gpg.  I
> thought it might make more sense to rely on the setting provided by 
> EasyPG to locate the correct GnuPG binary.
>
> The patch is quite simple - it just replaces "gpg" with the
> epg-gpg-program variable in each place it's used.
>
> -	(call-process "gpg" nil t t "--list-keys" fingerprint))
> +	(call-process epg-gpg-program nil t t "--list-keys" fingerprint))

I think this is reasonable.  We're already setting epg-gpg-program in
test/test-lib.sh, and in debian, epg-gpg-program is provided by
epg-config.el, which is part of emacs$VERSION-el, which is a dependency
of emacs$VERSION-common.

If we wanted to be extra careful, we could try to make it fall back to
plain "gpg" if epg-gpg-program is unset.

fwiw, debian will be shipping gpg2 as /usr/bin/gpg in stretch, and the
old 1.4 branch will be /usr/bin/gpg1 -- is there a reason that NixOS
isn't shipping gpg2 as /usr/bin/gpg ?

      --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20170104/cf8fdf9a/attachment.sig>


More information about the notmuch mailing list