From: Daiki Ueno <ueno@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: nick@tenpoint.co.nz, 24229@debbugs.gnu.org
Subject: bug#24229: 25.1; Can't set EPA program
Date: Thu, 18 Aug 2016 09:14:27 +0200 [thread overview]
Message-ID: <od160qyo8fg.fsf-ueno@gnu.org> (raw)
In-Reply-To: <83ziobe80q.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Aug 2016 18:21:09 +0300")
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
next prev parent reply other threads:[~2016-08-18 7:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 4:58 bug#24229: 25.1; Can't set EPA program Nick Helm
2016-08-15 22:26 ` Noam Postavsky
2016-08-16 0:56 ` Nick Helm
2016-08-16 19:38 ` Daiki Ueno
2016-08-17 0:18 ` Nick Helm
2016-08-17 7:46 ` Daiki Ueno
2016-08-17 15:21 ` Eli Zaretskii
2016-08-18 7:14 ` Daiki Ueno [this message]
2016-08-18 14:13 ` Eli Zaretskii
2016-08-18 15:08 ` Daiki Ueno
2016-08-18 15:35 ` Eli Zaretskii
2016-08-18 15:46 ` Glenn Morris
2016-08-18 16:16 ` Eli Zaretskii
2016-08-19 9:22 ` Daiki Ueno
2016-08-19 9:40 ` Eli Zaretskii
2016-08-17 17:45 ` Richard Stallman
2016-08-18 1:32 ` Nick Helm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=od160qyo8fg.fsf-ueno@gnu.org \
--to=ueno@gnu.org \
--cc=24229@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=nick@tenpoint.co.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).