From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65010 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Highlighting with GPG signed messages. Date: Thu, 02 Aug 2007 14:53:21 +0900 Organization: Emacsen advocacy group Message-ID: References: <87r6mn8hkf.fsf@lrde.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: sea.gmane.org 1186034132 24942 80.91.229.12 (2 Aug 2007 05:55:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Aug 2007 05:55:32 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M13520@lists.math.uh.edu Thu Aug 02 07:55:25 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1IGTef-0005lJ-9X for ding-account@gmane.org; Thu, 02 Aug 2007 07:55:25 +0200 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 1IGTdk-0005RN-5f; Thu, 02 Aug 2007 00:54:28 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IGTde-0005Qq-Pi for ding@lists.math.uh.edu; Thu, 02 Aug 2007 00:54:22 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1IGTdY-000120-IR for ding@lists.math.uh.edu; Thu, 02 Aug 2007 00:54:22 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1IGTdU-0004wT-00 for ; Thu, 02 Aug 2007 07:54:13 +0200 Original-Received: from [66.225.201.151] (port=34914 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.63) (envelope-from ) id 1IGTct-0006b2-9Y for ding@gnus.org; Thu, 02 Aug 2007 00:53:36 -0500 X-Hashcash: 1:20:070802:ding@gnus.org::+XJhFWTSNVBiX9Ik:00001gnV X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:giO7za6podtUhMC/v8fbZ4CisrE= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.4 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65010 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable >>>>> Micha=EBl Cadilhac wrote: > When viewing a GPG signed message, the highlighting of citation and > signature isn't made. This is due to the `last' condition for the > highlighting to happen in the treatment functions. > For example, if you have a two parts message (Text + sig), > gnus-mime-display-security is called with the first one and the second > part is like discarded. So current-part and total-parts are never > equals and `last' is never validated. > This is the shortest patch I could came with : This is too short to work with forwarded signed messages. How about this one? --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =2D-- gnus-art.el~ 2007-07-20 11:23:53 +0000 +++ gnus-art.el 2007-08-02 05:46:46 +0000 @@ -5451,10 +5451,18 @@ (save-excursion (save-restriction (narrow-to-region beg (point)) =2D (gnus-treat-article =2D nil id =2D (gnus-article-mime-total-parts) =2D (mm-handle-media-type handle))))))))) + ;; Don't count signature parts that are never displayed. + ;; The part number should be re-calculated supposing this + ;; might be a message/rfc822 part. + (let (handles) + (dolist (part gnus-article-mime-handles) + (unless (or (stringp part) + (equal (car (mm-handle-type part)) + "application/pgp-signature")) + (push part handles))) + (gnus-treat-article + nil (length (memq handle handles)) (length handles) + (mm-handle-media-type handle)))))))))) =20 (defun gnus-unbuttonized-mime-type-p (type) "Say whether TYPE is to be unbuttonized." --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.5 (GNU/Linux) iD8DBQFGsXFZLGVAwA4tiLkRAsEWAJ90+f99R6RCcpPGWBUU9eJZhZtYMQCeOnxE Ek0rpSXk3Gt4xXcxsQxzHB8= =tIrS -----END PGP SIGNATURE----- --==-=-=--