From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/35353 Path: main.gmane.org!not-for-mail From: "Bjørn Mork" Newsgroups: gmane.emacs.gnus.general Subject: Suggested mml2015 feature Date: 15 Mar 2001 12:00:01 +0100 Organization: DoD Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035171112 2587 80.91.224.250 (21 Oct 2002 03:31:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:31:52 +0000 (UTC) Return-Path: Original-Received: (qmail 12229 invoked by alias); 15 Mar 2001 11:00:03 -0000 Original-Received: (qmail 12224 invoked from network); 15 Mar 2001 11:00:03 -0000 Original-Received: from quimby.gnus.org (195.204.10.139) by gnus.org with SMTP; 15 Mar 2001 11:00:03 -0000 Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id MAA11485 for ding@gnus.org; Thu, 15 Mar 2001 12:00:00 +0100 (CET) Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-NNTP-Posting-Host: 148.122.193.186.dhcp.nextra.no Original-X-Trace: quimby.gnus.org 984654000 9404 148.122.193.186 (15 Mar 2001 11:00:00 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 15 Mar 2001 11:00:00 GMT User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.7 Original-Lines: 67 Xref: main.gmane.org gmane.emacs.gnus.general:35353 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:35353 --=-=-= I really like the automatic signature verification, but would like to see who supposedly signed a part without having to push a button and see all the gory output from gpg. E.g. by extracting the "from" part and using this as the button text instead of "OK". Note that I am completely lisp illiterate and that this is incomplete, but just to illustrate what I mean: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=mml2015.diff Index: mml2015.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mml2015.el,v retrieving revision 6.29 diff -u -r6.29 mml2015.el --- mml2015.el 2001/01/21 06:00:25 6.29 +++ mml2015.el 2001/03/15 10:58:12 @@ -334,6 +334,11 @@ (mm-set-handle-multipart-parameter mm-security-handle 'gnus-info "Failed")))) +(defun mml2015-gpg-extract-from () + (goto-char (point-min)) + (re-search-forward "^gpg: Good signature from \"\\(.*\\)\"$") + (match-string 1)) + (defun mml2015-gpg-verify (handle ctl) (catch 'error (let (part message signature) @@ -375,7 +380,9 @@ mm-security-handle 'gnus-info "Failed") (throw 'error handle))) (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "OK")) + mm-security-handle 'gnus-info + (with-current-buffer mml2015-result-buffer + (mml2015-gpg-extract-from)))) handle))) (defun mml2015-gpg-clear-verify () @@ -395,7 +402,9 @@ mm-security-handle 'gnus-details "Quit.") nil)) (mm-set-handle-multipart-parameter - mm-security-handle 'gnus-info "OK") + mm-security-handle 'gnus-info + (with-current-buffer mml2015-result-buffer + (mml2015-gpg-extract-from))) (mm-set-handle-multipart-parameter mm-security-handle 'gnus-info "Failed"))) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Bjørn --=-=-=--