From: Simon Josefsson <jas@extundo.com>
Subject: Re: OpenPGP header
Date: Mon, 15 Nov 2004 00:48:21 +0100 [thread overview]
Message-ID: <iluhdns6lh6.fsf@latte.josefsson.org> (raw)
In-Reply-To: <m365489g0s.fsf@doze.jochen-kuepper.de>
Jochen Küpper <jochen@fhi-berlin.mpg.de> writes:
> Steve Youngs <steve@youngs.au.com> writes:
>
>> * Simon Josefsson <jas@extundo.com> writes:
>>
>> > There is an effort to standardize the features from X-PGP:,
>> > X-PGP-ID: etc into OpenPGP:, see:
>
> [...]
>
>> Nice idea. Especially if Gnus can be made to use the header to snarf
>> the key into the local keyring.
>
> That should probably be similar to the handling of X-Request-PGP:
Good idea. I installed the following.
If you click on the URL in my OpenPGP: header, ideally you should get
a PGG window with some information.
What do people think?
2004-11-15 Simon Josefsson <jas@extundo.com>
* gnus-art.el (gnus-header-button-alist): Handle URLs in OpenPGP:
headers separately.
(gnus-button-openpgp): New function, inspired by Jochen Küpper
<jochen@fhi-berlin.mpg.de>.
Index: gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 7.62
diff -u -p -r7.62 gnus-art.el
--- gnus-art.el 14 Nov 2004 19:44:26 -0000 7.62
+++ gnus-art.el 14 Nov 2004 23:46:32 -0000
@@ -6301,6 +6301,8 @@ variable it the real callback function."
0 (>= gnus-button-browse-level 0) browse-url 0)
("^[^:]+:" gnus-button-url-regexp
0 (>= gnus-button-browse-level 0) browse-url 0)
+ ("^OpenPGP:.*url=" gnus-button-url-regexp
+ 0 (>= gnus-button-browse-level 0) gnus-button-openpgp 0)
("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)"
0 (>= gnus-button-message-level 0) gnus-url-mailto 1)
("^[^:]+:" "\\(<\\(url: \\)?\\(nntp\\|news\\):\\([^>\n ]*\\)>\\)"
@@ -6662,6 +6664,13 @@ specified by `gnus-button-alist'."
(info)
(Info-directory)
(Info-menu url))
+
+(defun gnus-button-openpgp (url)
+ "Retrieve and add an OpenPGP key given URL from an OpenPGP header."
+ (with-temp-buffer
+ (mm-url-insert-file-contents-external url)
+ (pgg-snarf-keys-region (point-min) (point-max))
+ (pgg-display-output-buffer nil nil nil)))
(defun gnus-button-message-id (message-id)
"Fetch MESSAGE-ID."
next prev parent reply other threads:[~2004-11-14 23:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-14 16:55 Simon Josefsson
2004-11-14 21:26 ` Steve Youngs
2004-11-14 22:21 ` Xavier Maillard
[not found] ` <microsoft-free.87d5ygw299.fsf-ZDdsx92XhsQvtab9mdV7tw@public.gmane.org>
2004-11-14 23:17 ` Jochen Küpper
2004-11-14 23:48 ` Simon Josefsson [this message]
2004-11-14 23:19 ` Simon Josefsson
2004-11-14 23:49 ` Steve Youngs
2004-11-14 23:59 ` Simon Josefsson
2004-11-15 0:40 ` Steve Youngs
2004-11-16 20:43 ` Simon Josefsson
2004-11-14 22:24 ` Xavier Maillard
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=iluhdns6lh6.fsf@latte.josefsson.org \
--to=jas@extundo.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.
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 NNTP newsgroup(s).