From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59149 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: OpenPGP header Date: Mon, 15 Nov 2004 00:48:21 +0100 Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1100476175 29806 80.91.229.6 (14 Nov 2004 23:49:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Nov 2004 23:49:35 +0000 (UTC) Original-X-From: ding-owner+M7689@lists.math.uh.edu Mon Nov 15 00:49:23 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CTU7W-0006jq-00 for ; Mon, 15 Nov 2004 00:49:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CTU6t-0004Fh-00; Sun, 14 Nov 2004 17:48:43 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CTU6m-0004Fb-00 for ding@lists.math.uh.edu; Sun, 14 Nov 2004 17:48:36 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CTU6h-0007vg-TT for ding@lists.math.uh.edu; Sun, 14 Nov 2004 17:48:31 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by justine.libertine.org (Postfix) with ESMTP id D77913A0035 for ; Sun, 14 Nov 2004 17:48:30 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CTU6f-0000Nq-00 for ; Mon, 15 Nov 2004 00:48:29 +0100 Original-Received: from c494102a.s-bi.bostream.se ([217.215.27.65]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Nov 2004 00:48:29 +0100 Original-Received: from jas by c494102a.s-bi.bostream.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 15 Nov 2004 00:48:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 60 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c494102a.s-bi.bostream.se X-Hashcash: 1:23:041114:gmane.emacs.gnus.general::zo9Tbu75ivOVUgWx:0000000000000000000000000000000000000LmC7 OpenPGP: id=B565716F; url=http://josefsson.org/key.txt User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:/L5vk2/8pciguK278vwcL1owmw4= Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59149 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59149 Jochen K=FCpper writes: > Steve Youngs writes: > >> * Simon Josefsson 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 * gnus-art.el (gnus-header-button-alist): Handle URLs in OpenPGP: headers separately. (gnus-button-openpgp): New function, inspired by Jochen K=FCpper . Index: gnus-art.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 (>=3D gnus-button-browse-level 0) browse-url 0) ("^[^:]+:" gnus-button-url-regexp 0 (>=3D gnus-button-browse-level 0) browse-url 0) + ("^OpenPGP:.*url=3D" gnus-button-url-regexp + 0 (>=3D gnus-button-browse-level 0) gnus-button-openpgp 0) ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=3D?&/]+\\)" 0 (>=3D 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))) =20 (defun gnus-button-message-id (message-id) "Fetch MESSAGE-ID."