unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@gnu.org>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: "Neal H. Walfield" <neal@gnupg.org>, emacs-devel@gnu.org
Subject: Re: epg.el: epg--status-GET_LINE not working?
Date: Wed, 05 Jul 2017 18:25:29 +0200	[thread overview]
Message-ID: <87d19ec0li.fsf-ueno@gnu.org> (raw)
In-Reply-To: <874lur5uia.fsf@mithlond.arda> (Teemu Likonen's message of "Wed,  05 Jul 2017 08:21:17 +0300")

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

Teemu Likonen <tlikonen@iki.fi> writes:

> I suggest a minimal handler so that epg wouldn't wait GET_LINE input in
> tofu conflicts (which currently doesn't work anyway) and
> epg-signature-to-string function would return a string like this:
>
>     Good signature from [keyid] [user id] (tofu conflict) created at
>     [date] using [algorithm]
>
> I believe epg is mostly used with Gnus and that line alone is useful.

Would that work?  I mean, if there is an unresolved tofu conflict,
shouldn't signature verification fail?

Anyway, I would rather ignore "tofu.conflict" like the attached patch
(not tested), until it becomes really useful.

Regards,
-- 
Daiki Ueno

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: epg.el.diff --]
[-- Type: text/x-patch, Size: 1015 bytes --]

diff --git a/lisp/epg.el b/lisp/epg.el
index 1e24b8d..4eb51ef 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -163,6 +163,8 @@ epg-dn-type-alist
 
 (defvar epg-prompt-alist nil)
 
+(defvar epg-unsupported-prompt-list '("tofu.conflict"))
+
 (define-error 'epg-error "GPG error")
 
 (cl-defstruct (epg-data
@@ -910,11 +912,13 @@ epg--status-GET_LINE
 	inhibit-quit)
     (condition-case nil
 	(process-send-string (epg-context-process context)
-			     (concat (read-string
-				      (if entry
-					  (cdr entry)
-					(concat string ": ")))
-				     "\n"))
+                             (if (member string epg-unsupported-prompt-list)
+                                 "\n"
+                               (concat (read-string
+                                        (if entry
+                                            (cdr entry)
+                                          (concat string ": ")))
+                                       "\n")))
       (quit
        (epg-context-set-result-for
 	context 'error

  reply	other threads:[~2017-07-05 16:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-26  6:58 epg.el: epg--status-GET_LINE not working? Teemu Likonen
2017-06-26  7:30 ` Daiki Ueno
2017-06-26  7:45   ` Teemu Likonen
2017-07-05  5:21   ` Teemu Likonen
2017-07-05 16:25     ` Daiki Ueno [this message]
2017-07-05 19:03       ` Teemu Likonen
2017-07-06 19:42         ` Neal H. Walfield
2017-07-05 23:03       ` Richard Stallman
2017-07-06 19:40       ` Neal H. Walfield
2017-07-06 19:37   ` Neal H. Walfield
2017-07-07  8:37     ` Daiki Ueno
2017-07-07  9:00       ` Neal H. Walfield
2017-07-10  8:31         ` Daiki Ueno
2017-07-10  9:06           ` Neal H. Walfield
2017-07-06 19:29 ` Neal H. Walfield
2017-07-06 20:05   ` Teemu Likonen

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=87d19ec0li.fsf-ueno@gnu.org \
    --to=ueno@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=neal@gnupg.org \
    --cc=tlikonen@iki.fi \
    /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).