diff options
| author | Lars Ingebrigtsen | 2020-08-26 13:22:55 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-08-26 13:23:00 +0200 |
| commit | a4d57add69fd2077bd21ce917ea8ca3b22621ec0 (patch) | |
| tree | e50c91690cee07327ba7b7bd7ad4802813be965b | |
| parent | e48c60e7c9b4d6e5a11fc11cdd5dded868321b80 (diff) | |
| download | emacs-a4d57add69fd2077bd21ce917ea8ca3b22621ec0.tar.gz emacs-a4d57add69fd2077bd21ce917ea8ca3b22621ec0.zip | |
Make the epa key display slightly more informative
* lisp/epa.el (epa--button-key-text): Say what the validity
characters output by GPG mean (bug#34726).
| -rw-r--r-- | lisp/epa.el | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/lisp/epa.el b/lisp/epa.el index 3c804361c36..b065887cef1 100644 --- a/lisp/epa.el +++ b/lisp/epa.el | |||
| @@ -255,18 +255,25 @@ You should bind this variable with `let', but do not set it globally.") | |||
| 255 | (validity (epg-sub-key-validity (car (epg-key-sub-key-list key))))) | 255 | (validity (epg-sub-key-validity (car (epg-key-sub-key-list key))))) |
| 256 | (propertize | 256 | (propertize |
| 257 | (concat | 257 | (concat |
| 258 | (format "%c " | 258 | (propertize |
| 259 | (if (epg-sub-key-validity primary-sub-key) | 259 | (format "%c " |
| 260 | (car (rassq (epg-sub-key-validity primary-sub-key) | 260 | (if (epg-sub-key-validity primary-sub-key) |
| 261 | epg-key-validity-alist)) | 261 | (car (rassq (epg-sub-key-validity primary-sub-key) |
| 262 | ? )) | 262 | epg-key-validity-alist)) |
| 263 | (epg-sub-key-id primary-sub-key) | 263 | ? )) |
| 264 | " " | 264 | 'help-echo (format "Validity: %s" |
| 265 | (if primary-user-id | 265 | (epg-sub-key-validity primary-sub-key))) |
| 266 | (if (stringp (epg-user-id-string primary-user-id)) | 266 | (propertize |
| 267 | (epg-user-id-string primary-user-id) | 267 | (concat |
| 268 | (epg-decode-dn (epg-user-id-string primary-user-id))) | 268 | (epg-sub-key-id primary-sub-key) |
| 269 | "")) | 269 | " " |
| 270 | (if primary-user-id | ||
| 271 | (if (stringp (epg-user-id-string primary-user-id)) | ||
| 272 | (epg-user-id-string primary-user-id) | ||
| 273 | (epg-decode-dn (epg-user-id-string primary-user-id))) | ||
| 274 | "")) | ||
| 275 | 'help-echo (format "Show %s" | ||
| 276 | (epg-sub-key-id (car (epg-key-sub-key-list key)))))) | ||
| 270 | 'face | 277 | 'face |
| 271 | (if validity | 278 | (if validity |
| 272 | (cdr (assq validity epa-validity-face-alist)) | 279 | (cdr (assq validity epa-validity-face-alist)) |
| @@ -334,9 +341,7 @@ If ARG is non-nil, mark the key." | |||
| 334 | (insert | 341 | (insert |
| 335 | (propertize | 342 | (propertize |
| 336 | (concat " " (epa--button-key-text key)) | 343 | (concat " " (epa--button-key-text key)) |
| 337 | 'epa-key key | 344 | 'epa-key key)) |
| 338 | 'help-echo (format "Show %s" | ||
| 339 | (epg-sub-key-id (car (epg-key-sub-key-list key)))))) | ||
| 340 | (insert "\n"))) | 345 | (insert "\n"))) |
| 341 | 346 | ||
| 342 | (defun epa--list-keys (name secret &optional doc) | 347 | (defun epa--list-keys (name secret &optional doc) |