Subject: Re: bug#24229: 25.1; Can't set EPA program

From: Nick Helm <[email-masked]>
Date: Tue, 16 Aug 2016 00:56:17 +0000

> On 16/08/2016, at 10:26 AM, Noam Postavsky <[email-masked]> wrote:
> 
>> Setting epg-gpg-program has no effect if set using
>> any other method than customize.
>> 
>> For instance, doing (setq epg-gpg-program "gpg1") in
>> init.el does not work. EPA ignores the program name
>> and fails with some cryptic message about no found
>> configurations.
> 
> Please post the exact error message.
> 
> Does this also happen if you do
> 
>    emacs -Q --eval '(setq epg-gpg-program "gpg1")'
> 

When trying to visit a symmetrically encrypted file, 
*Messages* gives me this:
epg-context—make: GPG error: "no usable configuration", OpenPGP

Yes, the error still occurs when launching with: 
emacs -Q —-eval '(setq epg-gpg-program "gpg1")'

However, it doesn’t occur when launching with:
emacs -Q --eval '(customize-save-variable (quote epg-gpg-program) "gpg1")'

A quick look at `epg-find-configuration' shows it only 
checks epg-gpg-program's saved-value symbol property; 
if the variable is set elsewhere it is ignored.

I can get around it by symlinking gpg>gpg1 but that
kinda defeats the purpose of having the variable.

Nick