bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Daiki Ueno
Subject: bug#24229: 25.1; Can't set EPA program
Date: Thu, 18 Aug 2016 09:14:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Daiki Ueno <ueno@gnu.org>
>> Date: Wed, 17 Aug 2016 09:46:01 +0200
>> Cc: "24229@debbugs.gnu.org" <24229@debbugs.gnu.org>
>> 
>> > None of these variables forces the use of customize. Why 
>> > is epg-gpg-program such a special case?
>> 
>> That is primarily because of the UX differences between three maintained
>> versions of GnuPG: 2.0, 2.1, and 1.x.  GnuPG 2.0 does not provide a way
>> to prompt passphrase without GUI, but others do.  Some people are fine
>> with 2.0 as they use Emacs on a graphical environment only, but other
>> people are not.
>> 
>> So, we really need to take account of user's intention here; check
>> whether the variable set by user or it is the default value.  With
>> 'setq' it is not possible to have such distinction.
>
> Doesn't Customize provide some functions that allow such a
> distinction?  The Customize UI surely is able to tell when a variable
> was "changed not through Customize", isn't that what you want?

This is what we are currently doing, and the bug is saying that it
should be done without Customize.  It doesn't make sense to me though.

Nick Helm <nick@tenpoint.co.nz> writes:

> I'm not sure I follow. If the user sets a variable, I think 
> they're making their intention pretty clear – use the set 
> value. 
>
> If they know enough to set epg-gpg-program (using whatever 
> mechanism), I'd argue they know enough to understand the 
> capabilities of the program they're pointing to. Isn't it 
> up to the user to know that gnupg 2.0 only supports 
> GUI-based pinentry? 
>
> But if the existing arrangement is important, can we at
> least extend the test to determine if the variable has 
> been set using either mechanism? Something like this might
> work:
>
> (not (equal (eval (car (get 'epg-gpg-program 'standard-value))) 
>             (default-value 'epg-gpg-program)))

There seems to be some confusions here.
- The standard-value property is actually from Customize.
- The default-value function is to get the default value of buffer local
  variables.

So, It doesn't work as you expect.  I am really not sure why you insist
on using setq.  As far as I know, Customize is the recommended way to
set user options and provides more features like this.

Regards,
-- 
Daiki Ueno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]