[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program
From: |
Glenn Morris |
Subject: |
bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program |
Date: |
Thu, 09 Mar 2017 18:26:58 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Jens Lechtenboerger wrote:
> However, customizing epg-gpg-program does not work, recipe from
> 'emacs -Q':
>
> Check value of epg-gpg-program; in my case, I see gpg2:
> C-h v epg-gpg-program
>
> Eval the following:
> (setq epg-debug t)
> (customize-set-variable 'epg-gpg-program "/bin/echo")
>
> Invoke some EasyPG operation, e.g., encrypt a fresh file:
> C-x C-f test.gpg
>
> At this point, the debug buffer " *epg-debug*" shows that
> /usr/bin/gpg was invoked for decryption. Note that this is neither
> gpg2 (my machine's default) nor /bin/echo (my customization).
Thanks for the report. How about the following:
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -129,7 +129,8 @@ epg-find-configuration
(or (and (not no-cache) (alist-get protocol epg--configurations))
;; If the executable value is already set with M-x
;; customize, use it without checking.
- (if (and symbol (get symbol 'saved-value))
+ (if (and symbol (or (get symbol 'saved-value)
+ (get symbol 'customized-value)))
(let ((configuration
(funcall constructor (symbol-value symbol))))
(push (cons protocol configuration) epg--configurations)