From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.bugs Subject: bug#24229: 25.1; Can't set EPA program Date: Thu, 18 Aug 2016 09:14:27 +0200 Message-ID: References: <89B49EC8-8E9C-462F-8E0C-9A6ABC7A8C87@tenpoint.co.nz> <87mvkcqzbf.fsf-ueno@gnu.org> <4B42E5C1-2FC6-471D-9E68-309B1C9DF1FD@tenpoint.co.nz> <83ziobe80q.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1471504772 28068 195.159.176.226 (18 Aug 2016 07:19:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 Aug 2016 07:19:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: nick@tenpoint.co.nz, 24229@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 18 09:19:27 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baHbr-00072J-9e for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Aug 2016 09:19:27 +0200 Original-Received: from localhost ([::1]:51150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baHbo-0007tk-Ev for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Aug 2016 03:19:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baHXf-0004df-PV for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2016 03:15:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baHXa-0005BX-N9 for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2016 03:15:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baHXa-0005BT-KO for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2016 03:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1baHXa-00032s-H5 for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2016 03:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daiki Ueno Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Aug 2016 07:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24229 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24229-submit@debbugs.gnu.org id=B24229.147150449111673 (code B ref 24229); Thu, 18 Aug 2016 07:15:02 +0000 Original-Received: (at 24229) by debbugs.gnu.org; 18 Aug 2016 07:14:51 +0000 Original-Received: from localhost ([127.0.0.1]:60745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baHXO-00032D-Qo for submit@debbugs.gnu.org; Thu, 18 Aug 2016 03:14:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baHXM-00031z-Cx for 24229@debbugs.gnu.org; Thu, 18 Aug 2016 03:14:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baHXD-000545-7N for 24229@debbugs.gnu.org; Thu, 18 Aug 2016 03:14:43 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baHXD-00053p-4C; Thu, 18 Aug 2016 03:14:39 -0400 Original-Received: from du-a.org ([219.94.251.20]:42628 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1baHX9-0001qi-V9; Thu, 18 Aug 2016 03:14:36 -0400 In-Reply-To: <83ziobe80q.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 17 Aug 2016 18:21:09 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122344 Archived-At: Eli Zaretskii writes: >> From: Daiki Ueno >> Date: Wed, 17 Aug 2016 09:46:01 +0200 >> Cc: "24229@debbugs.gnu.org" <24229@debbugs.gnu.org> >>=20 >> > None of these variables forces the use of customize. Why=20 >> > is epg-gpg-program such a special case? >>=20 >> 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. >>=20 >> 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 writes: > I'm not sure I follow. If the user sets a variable, I think=20 > they're making their intention pretty clear =E2=80=93 use the set=20 > value.=20 > > If they know enough to set epg-gpg-program (using whatever=20 > mechanism), I'd argue they know enough to understand the=20 > capabilities of the program they're pointing to. Isn't it=20 > up to the user to know that gnupg 2.0 only supports=20 > GUI-based pinentry?=20 > > But if the existing arrangement is important, can we at > least extend the test to determine if the variable has=20 > been set using either mechanism? Something like this might > work: > > (not (equal (eval (car (get 'epg-gpg-program 'standard-value)))=20 > (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, --=20 Daiki Ueno