From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82723 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Displaying picture from PGP key if present? Date: Tue, 25 Dec 2012 14:20:24 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <874njas1yf.fsf@topper.koldfront.dk> References: <87ehirwgjq.fsf@topper.koldfront.dk> <87ip7quzk3.fsf@gnus.org> <87mwx2s62p.fsf@topper.koldfront.dk> <87vcbqtk8q.fsf@gnus.org> <87ip7qs5fm.fsf@topper.koldfront.dk> <878v8mtjbg.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1356441661 17174 80.91.229.3 (25 Dec 2012 13:21:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Dec 2012 13:21:01 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30989@lists.math.uh.edu Tue Dec 25 14:21:17 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TnURY-0006KS-AF for ding-account@gmane.org; Tue, 25 Dec 2012 14:21:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1TnUR3-000765-Rz; Tue, 25 Dec 2012 07:20:45 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1TnUR2-00075r-4K for ding@lists.math.uh.edu; Tue, 25 Dec 2012 07:20:44 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1TnUQw-0007PX-5L for ding@lists.math.uh.edu; Tue, 25 Dec 2012 07:20:44 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1TnUQu-00010P-5G for ding@gnus.org; Tue, 25 Dec 2012 14:20:36 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TnUR6-0005qO-4c for ding@gnus.org; Tue, 25 Dec 2012 14:20:48 +0100 Original-Received: from 2505ds5-by.0.fullrate.dk ([89.150.142.116]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Dec 2012 14:20:48 +0100 Original-Received: from asjo by 2505ds5-by.0.fullrate.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 25 Dec 2012 14:20:48 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 2505ds5-by.0.fullrate.dk OpenPGP: id=21BDE416; url=http://asjo.koldfront.dk/gpg.asc Mail-Follow-Up-To: never X-Now-Playing: So here I come, Raw like sushi (Neneh Cherry) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82723 Archived-At: On Tue, 25 Dec 2012 13:20:03 +0100, Lars wrote: > asjo@koldfront.dk (Adam Sjøgren) writes: >> Of the 448 public keys I have in my keyring, 86 have an image - almost >> 20%. > In that case it sounds worthwhile. So go ahead. :-) Thanks! I guess I should start by looking at how application/pgp-signature and application/pgp-encrypted parts are displayed. Ok, so, displaying a signed email is done by mml2015-epg-verify in mml2015.el by default. This comes from mm-verify-function-alist in mm-decode.el, where application/pgp-signature goes to mml2015-verify. Ok. Looking through mml2015-epg-verify (for some reason edebug-defun jumps over the entire function), the function epg-verify-result-to-string sounds like a good candidate for adding the image. Maybe changing epg.el would be the right thing to do? I don't know how to return a string with an image in it, though. Hey, maybe I can alter the output of epg-verify-result-to-string in mml2015-epg-verify with a function that finds the key in the string, checks for an image, and adds if it it exists, instead? Hm, this is how far I got. Mangling: (mm-set-handle-multipart-parameter mm-security-handle 'gnus-info (epg-verify-result-to-string (epg-context-result-for context 'verify))) in mml2015-epg-verify into something-that-fetches-the-image-and-adds-it is kind of... daunting. > (I know virtually nothing about the entire GPG subsystem in Emacs/Gnus.) (Heh, and I do? :-)) Best regards, Adam -- "Bara russin, ingen kaka" Adam Sjøgren asjo@koldfront.dk