GNU bug report logs - #34726
epa-insert-keys

Previous Next

Package: emacs;

Reported by: rms <at> gnu.org

Date: Mon, 4 Mar 2019 03:28:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34726 in the body.
You can then email your comments to 34726 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Mon, 04 Mar 2019 03:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 04 Mar 2019 03:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: epa-insert-keys
Date: Sun, 03 Mar 2019 22:27:25 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

In the buffer made by epa-insert-keys, the first character
in each line gives some status information about the key.
I don't know what the characters mean, most of them.

How about putting that info into the doc string of epa-insert-keys and
maybe also in the first line of that buffer?

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Tue, 05 Mar 2019 16:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Tue, 05 Mar 2019 18:08:15 +0200
> From: Richard Stallman <rms <at> gnu.org>
> Date: Sun, 03 Mar 2019 22:27:25 -0500
> 
> In the buffer made by epa-insert-keys, the first character
> in each line gives some status information about the key.
> I don't know what the characters mean, most of them.
> 
> How about putting that info into the doc string of epa-insert-keys and
> maybe also in the first line of that buffer?

AFAIU, that text is generated by GnuPG the program, so the
interpretation of those one-letter flags should be in the GPG manual?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Wed, 06 Mar 2019 02:16:02 GMT) Full text and rfc822 format available.

Message #11 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Tue, 05 Mar 2019 21:15:05 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > AFAIU, that text is generated by GnuPG the program, so the
  > interpretation of those one-letter flags should be in the GPG manual?

That is not conveniently helpful for Emacs users.  I think the
buffer, or the doc string, should explain these lettsrs.

There could also be a reference to the right place in the GPG manual.

Could someone please take care of this?

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Wed, 06 Mar 2019 10:28:02 GMT) Full text and rfc822 format available.

Message #14 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Richard Stallman <rms <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Wed, 06 Mar 2019 11:27:23 +0100
>>>>> On Tue, 05 Mar 2019 21:15:05 -0500, Richard Stallman <rms <at> gnu.org> said:
    rms> That is not conveniently helpful for Emacs users.  I think
    rms> the buffer, or the doc string, should explain these lettsrs.

    rms> There could also be a reference to the right place in the GPG
    rms> manual.

The relevant section of the GPG manual says:

    TRUST VALUES
           Trust  values  are used to indicate ownertrust and validity of keys and
           user IDs.  They are displayed with letters or strings:

           -      unknown No ownertrust assigned / not yet calculated.

           e      expired

                  Trust calculation has failed; probably due to an expired key.

           q      undefined, undef Not enough information for calculation.

           n      never Never trust this key.

           m      marginal Marginally trusted.

           f      full Fully trusted.

           u      ultimate Ultimately trusted.

           r      revoked For validity only: the key  or  the  user  ID  has  been
                  revoked.

           ?      err The program encountered an unknown trust value.


which is a bit too much for epa-insert-keys, I think. How about:

diff --git a/lisp/epa.el b/lisp/epa.el
index e442c12a7d..7cb15b5165 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -421,7 +421,9 @@ epa--list-keys
 
 ;;;###autoload
 (defun epa-list-keys (&optional name)
-  "List all keys matched with NAME from the public keyring."
+  "List all keys matched with NAME from the public keyring.
+
+See `epa-insert-keys' for a description of the format."
   (interactive
    (if current-prefix-arg
        (let ((name (read-string "Pattern: "
@@ -433,7 +435,9 @@ epa-list-keys
 
 ;;;###autoload
 (defun epa-list-secret-keys (&optional name)
-  "List all keys matched with NAME from the private keyring."
+  "List all keys matched with NAME from the private keyring.
+
+See `epa-insert-keys' for a description of the format."
   (interactive
    (if current-prefix-arg
        (let ((name (read-string "Pattern: "
@@ -1308,7 +1312,12 @@ epa-export-keys
 
 ;;;###autoload
 (defun epa-insert-keys (keys)
-  "Insert selected KEYS after the point."
+  "Insert selected KEYS after point.
+
+This will display a list of keys with their validity status,
+keyid, and associated name.  See 'TRUST VALUES' in the gpg
+documentation for the meaning of the letters describing the
+validity status."
   (interactive
    (list (epa-select-keys (epg-make-context epa-protocol)
 			  "Select keys to export.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Thu, 07 Mar 2019 03:39:01 GMT) Full text and rfc822 format available.

Message #17 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Wed, 06 Mar 2019 22:38:02 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

     The relevant section of the GPG manual says:

    TRUST VALUES
           Trust  values  are used to indicate ownertrust and validity of keys and
           user IDs.  They are displayed with letters or strings:

           -      unknown No ownertrust assigned / not yet calculated.

           e      expired

                  Trust calculation has failed; probably due to an expired key.

           q      undefined, undef Not enough information for calculation.

           n      never Never trust this key.

           m      marginal Marginally trusted.

           f      full Fully trusted.

           u      ultimate Ultimately trusted.

           r      revoked For validity only: the key  or  the  user  ID  has  been
                  revoked.

           ?      err The program encountered an unknown trust value.

Thanks for finding that.  I would not have had an easy time finding it
myself.

  > +This will display a list of keys with their validity status,
  > +keyid, and associated name.  See 'TRUST VALUES' in the gpg
  > +documentation 

That is too vague to be helpful.  It tells the reader to search for
some other publication, and doesn't even say precisely what
publication or what its name is -- let alone where to look.

I don't think I could have got anywhere from it.


I think we should include a cleaned-up and clarified version of this
table in those two commands' doc strings.

But we need to fill in some gaps.  From that text, it is not clear
what q means.  Also, it is oriented towards answering the question
"what does the trust calculation do with this key" rather than "what
is the status of this key".

GNU documentation should try to be _helpful_ and present material in
terms of what the user wants to know.

Attempting to convert the list above into practical meanings for
a user, here's my draft for an improved table.

           e      key has expired
           r      Key has been revoked.

           How much trust to put in signatures of other keys by this one:
           n      none
           m      marginal trust
           f      full trust (for instance, you signed this key)
           u      ultimate trust

[I don't entirely understand those.  I do not understand GPG's trust
facilities, I don't want to learn to understand them; what I really
want to know is whether I signed that key.  How can I tell that?]

           ?      inconsistency in key ring trust data
	   q      some other strange case

[What does that really mean?  How does q differ from hyphen?]

Can anyone clear up the unclear points?



-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Thu, 07 Mar 2019 09:34:02 GMT) Full text and rfc822 format available.

Message #20 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Richard Stallman <rms <at> gnu.org>
Cc: 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Thu, 07 Mar 2019 10:33:10 +0100
>>>>> On Wed, 06 Mar 2019 22:38:02 -0500, Richard Stallman <rms <at> gnu.org> said:
    rms> Thanks for finding that.  I would not have had an easy time
    rms> finding it myself.

I had some trouble finding it myself.

    >> +This will display a list of keys with their validity status,
    >> +keyid, and associated name.  See 'TRUST VALUES' in the gpg
    >> +documentation

    rms> That is too vague to be helpful.  It tells the reader to
    rms> search for some other publication, and doesn't even say
    rms> precisely what publication or what its name is -- let alone
    rms> where to look.

The gpg documentation can be a man page or an info manual, plus there
are html and pdf version of the same documentation available from the
gpg website. We could just point people at

<https://www.gnupg.org/documentation/manuals/gnupg/Trust-Values.html>

    rms> I think we should include a cleaned-up and clarified version
    rms> of this table in those two commands' doc strings.

Thatʼs not a path Iʼd want to go down. The gpg documentation is long
and complex, because itʼs a complex program. Attempting to summarise
it in a few docstrings will result in incomplete or possibly incorrect
information, Iʼd rather people read the original.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Fri, 08 Mar 2019 04:16:02 GMT) Full text and rfc822 format available.

Message #23 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Thu, 07 Mar 2019 23:14:54 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Thatʼs not a path Iʼd want to go down. The gpg documentation is long
  > and complex, because itʼs a complex program. Attempting to summarise
  > it in a few docstrings will result in incomplete or possibly incorrect
  > information, Iʼd rather people read the original.

What in the "original" should I read?  I looked at the GPG Info file
which that text came from, as an Info file, but I see no further info
there to understand what those letters actually mean.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Fri, 08 Mar 2019 08:21:01 GMT) Full text and rfc822 format available.

Message #26 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rms <at> gnu.org
Cc: rpluim <at> gmail.com, 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Fri, 08 Mar 2019 10:19:25 +0200
> From: Richard Stallman <rms <at> gnu.org>
> Date: Thu, 07 Mar 2019 23:14:54 -0500
> Cc: 34726 <at> debbugs.gnu.org
> 
> What in the "original" should I read?  I looked at the GPG Info file
> which that text came from, as an Info file, but I see no further info
> there to understand what those letters actually mean.

Doesn't that mean this particular part of the bug report should be
sent to the GPG developers, asking them to clarify the GPG
documentation?  IMO, it's unreasonable to expect Emacs to rectify
documentation problems of every program we happen to invoke.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Sat, 09 Mar 2019 03:20:01 GMT) Full text and rfc822 format available.

Message #29 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rpluim <at> gmail.com, 34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Fri, 08 Mar 2019 22:19:30 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Doesn't that mean this particular part of the bug report should be
  > sent to the GPG developers, asking them to clarify the GPG
  > documentation?  IMO, it's unreasonable to expect Emacs to rectify
  > documentation problems of every program we happen to invoke.

Yes and no.  Ideally they would make it clear in the GPG documentation,
then we would make Emacs repeat that description or else make it easy
to find that from Emacs.

However, I don't know whether the GPG team includes people with those
skills and time to work on this.

I guess I will have to ask them.


-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34726; Package emacs. (Wed, 26 Aug 2020 11:22:01 GMT) Full text and rfc822 format available.

Message #32 received at 34726 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Richard Stallman <rms <at> gnu.org>,  34726 <at> debbugs.gnu.org
Subject: Re: bug#34726: epa-insert-keys
Date: Wed, 26 Aug 2020 13:21:42 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

>     rms> I think we should include a cleaned-up and clarified version
>     rms> of this table in those two commands' doc strings.
>
> Thatʼs not a path Iʼd want to go down. The gpg documentation is long
> and complex, because itʼs a complex program. Attempting to summarise
> it in a few docstrings will result in incomplete or possibly incorrect
> information, Iʼd rather people read the original.

That's true, but epg already does an interpretation of those status
characters and then fontifies the buffer based on them:

(defvar epg-key-validity-alist
  '((?o . unknown)
    (?i . invalid)
    (?d . disabled)
    (?r . revoked)
    (?e . expired)
    (?- . none)
    (?q . undefined)
    (?n . never)
    (?m . marginal)
    (?f . full)
    (?u . ultimate)))

To not then actually tell the users what we've interpreted the
characters to means just seems odd.

I've now changed this in Emacs 28 so that hovering over the character
says what the validity is (i.e., the help-echo property).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 26 Aug 2020 11:23:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 34726 <at> debbugs.gnu.org and rms <at> gnu.org Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 26 Aug 2020 11:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 23 Sep 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.