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

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

Date: Wed, 04 Jan 2017 13:30:27 -0500

To: John Byrnes,


From: Daniel Kahn Gillmor

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/, 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 ?

signature.asc (application/pgp-signature)