From: Noam Postavsky <npostavs@gmail.com>
To: Toon Claes <toon@iotcl.com>
Cc: Joseph Mingrone <jrm@ftfl.ca>,
26298@debbugs.gnu.org,
Torsten Bronger <bronger@physik.rwth-aachen.de>
Subject: bug#26298: 26.0.50; Gnus fails to sign mail with PGP
Date: Sun, 29 Apr 2018 10:38:32 -0400 [thread overview]
Message-ID: <87k1sqoz6f.fsf@gmail.com> (raw)
In-Reply-To: <m2mv71lueg.fsf@T-437> (Toon Claes's message of "Mon, 14 Aug 2017 23:19:26 +0200 (CEST)")
[-- Attachment #1: Type: text/plain, Size: 776 bytes --]
Toon Claes <toon@iotcl.com> writes:
> If I add the following line to `mml-secure-epg-sign', I can successfully
> sign my email:
>
> #+begin_src emacs-lisp :tangle yes
> (setf (epg-context-pinentry-mode context) 'loopback)
> #+end_src
>
> Now I also understand why `epa-sign-file' works, I have set
> `(setq epa-pinentry-mode 'loopback)' in my init.el.
>
> But, I could use some advice on building a proper fix that would work
> for everyone. We could do something similar like as epa.el does, and add
> yet another defcustom, but doesn't feel very DRY.
> So I hope someone can chime in to give some advice.
So perhaps the best solution is simply rename epa-pinentry-mode to
epg-pinentry-mode, and use it is as the default
epg-context-pinentry-mode value (see attached).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 3013 bytes --]
From 937c2cf8a751bbc7581a0ca187f4cac023e607b3 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 29 Apr 2018 10:32:03 -0400
Subject: [PATCH v1] Move epa-pinentry-mode to epg-config (Bug#26298)
* lisp/epa.el (epa-pinentry-mode): Make into obsolete alias for...
* lisp/epg-config.el (epg-pinentry-mode): ...this new user option.
* lisp/epg.el (epg-context): Use it as the default value for
pinentry-mode.
---
lisp/epa.el | 23 ++---------------------
lisp/epg-config.el | 22 ++++++++++++++++++++++
lisp/epg.el | 2 +-
3 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/lisp/epa.el b/lisp/epa.el
index 5c237bca9b..e03933af30 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -56,27 +56,8 @@ epa-info-window-height
:type 'integer
:group 'epa)
-;; In the doc string below, we say "symbol `error'" to avoid producing
-;; a hyperlink for `error' the function.
-(defcustom epa-pinentry-mode nil
- "The pinentry mode.
-
-GnuPG 2.1 or later has an option to control the behavior of
-Pinentry invocation. The value should be the symbol `error',
-`ask', `cancel', or `loopback'. See the GnuPG manual for the
-meanings.
-
-In epa commands, a particularly useful mode is `loopback', which
-redirects all Pinentry queries to the caller, so Emacs can query
-passphrase through the minibuffer, instead of external Pinentry
-program."
- :type '(choice (const nil)
- (const ask)
- (const cancel)
- (const error)
- (const loopback))
- :group 'epa
- :version "25.1")
+(define-obsolete-variable-alias
+ 'epa-entry-mode 'epg-entry-mode "27.1")
(defgroup epa-faces nil
"Faces for epa-mode."
diff --git a/lisp/epg-config.el b/lisp/epg-config.el
index d30ebea2d6..ea57adc12f 100644
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -74,6 +74,28 @@ epg-passphrase-coding-system
:group 'epg
:type 'symbol)
+
+;; In the doc string below, we say "symbol `error'" to avoid producing
+;; a hyperlink for `error' the function.
+(defcustom epg-pinentry-mode nil
+ "The pinentry mode.
+
+GnuPG 2.1 or later has an option to control the behavior of
+Pinentry invocation. The value should be the symbol `error',
+`ask', `cancel', or `loopback'. See the GnuPG manual for the
+meanings.
+
+A particularly useful mode is `loopback', which redirects all
+Pinentry queries to the caller, so Emacs can query passphrase
+through the minibuffer, instead of external Pinentry program."
+ :type '(choice (const nil)
+ (const ask)
+ (const cancel)
+ (const error)
+ (const loopback))
+ :group 'epa
+ :version "27.1")
+
(defcustom epg-debug nil
"If non-nil, debug output goes to the \" *epg-debug*\" buffer.
Note that the buffer name starts with a space."
diff --git a/lisp/epg.el b/lisp/epg.el
index dc0e2df583..c42520e3db 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -211,7 +211,7 @@ epg--gv-nreverse
output-file
result
operation
- pinentry-mode
+ (pinentry-mode epg-pinentry-mode)
(error-output "")
error-buffer)
--
2.11.0
next prev parent reply other threads:[~2018-04-29 14:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 12:15 bug#26298: 26.0.50; Gnus fails to sign mail with PGP Torsten Bronger
2017-08-14 20:33 ` Toon Claes
2017-08-14 21:19 ` Toon Claes
2017-08-14 23:46 ` npostavs
2017-08-15 5:54 ` Toon Claes
2017-08-15 15:23 ` Noam Postavsky
2018-01-28 19:39 ` Toon Claes
2018-01-28 21:23 ` Noam Postavsky
2018-04-11 22:06 ` Lars Ingebrigtsen
2018-04-12 7:25 ` Noam Postavsky
2018-04-12 11:37 ` Lars Ingebrigtsen
2018-04-12 12:45 ` Noam Postavsky
2018-04-14 6:52 ` Toon Claes
2018-04-14 13:12 ` Lars Ingebrigtsen
2018-04-14 13:36 ` Toon Claes
2018-04-14 13:54 ` Lars Ingebrigtsen
2018-04-14 13:15 ` Lars Ingebrigtsen
2018-04-29 14:38 ` Noam Postavsky [this message]
2018-05-17 23:41 ` Noam Postavsky
2018-05-18 9:55 ` Basil L. Contovounesios
2018-05-18 13:38 ` Noam Postavsky
2018-05-23 23:09 ` Noam Postavsky
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1sqoz6f.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=26298@debbugs.gnu.org \
--cc=bronger@physik.rwth-aachen.de \
--cc=jrm@ftfl.ca \
--cc=toon@iotcl.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.