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

From: Nick Helm <[email-masked]>
Date: Wed, 17 Aug 2016 00:18:51 +0000

> On 17/08/2016, at 7:38 AM, Daiki Ueno <[email-masked]> wrote:
> 
> Nick Helm <[email-masked]> writes:
> 
>> 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.
> 
> It's an intended behaviour.  If you expect all the setup behind the
> scene, you need to use the Customize interface instead of ‘setq'.

Yes, I gathered it is intended from the code, but that 
doesn't make it the right thing to do.

Why are users focred to use customize? There are many 
cases where Emacs enables the user to point to an 
external executable with setq. Here are a few I found 
in my init:

ispell-program-name
insert-directory-program
find-program
remote-shell-program
dired-chmod-program

None of these variables forces the use of customize. Why 
is epg-gpg-program such a special case?

> This is similar to the mode variables.  See:
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Minor-Modes.html#Minor-Modes

I don't see a parallel between mode variables and a user 
option like epg-gpg-program. They are different things 
with different purposes.