Gnus development mailing list
 help / color / mirror / Atom feed
From: michael@cadilhac.name (Michaël Cadilhac)
To: ding@gnus.org
Subject: Highlighting with GPG signed messages.
Date: Wed, 01 Aug 2007 16:17:52 +0200	[thread overview]
Message-ID: <87r6mn8hkf.fsf@lrde.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]

Hi !

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 :

Index: lisp/gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 7.222
diff -c -r7.222 gnus-art.el
*** lisp/gnus-art.el	20 Jul 2007 11:30:50 -0000	7.222
--- lisp/gnus-art.el	1 Aug 2007 14:11:14 -0000
***************
*** 8042,8048 ****
      (narrow-to-region (point) (point))
      (unless (gnus-unbuttonized-mime-type-p (car handle))
        (gnus-insert-mime-security-button handle))
!     (gnus-mime-display-part (cadr handle))
      (unless (bolp)
        (insert "\n"))
      (unless (gnus-unbuttonized-mime-type-p (car handle))
--- 8042,8051 ----
      (narrow-to-region (point) (point))
      (unless (gnus-unbuttonized-mime-type-p (car handle))
        (gnus-insert-mime-security-button handle))
!     ;; Remove an element in g-a-m-h so that the 'last condition of
!     ;; treatment functions can be validated.
!     (let ((gnus-article-mime-handles (cdr gnus-article-mime-handles)))
!       (gnus-mime-display-part (cadr handle)))
      (unless (bolp)
        (insert "\n"))
      (unless (gnus-unbuttonized-mime-type-p (car handle))

Thanks.

-- 
 |   Michaël `Micha' Cadilhac       |  Si j'étais sous-secrétaire d'État     |
 |   http://michael.cadilhac.name   |    aux choux farcis, vous entendriez   |
 |   JID/MSN:                       |  beaucoup parler des choux farcis !    |
 `----  michael.cadilhac@gmail.com  |          -- Nicolas Sarkozy       -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

             reply	other threads:[~2007-08-01 14:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 14:17 Michaël Cadilhac [this message]
2007-08-02  5:53 ` Katsumi Yamaoka
2007-08-02  6:28   ` Katsumi Yamaoka
2007-08-03 12:08     ` Katsumi Yamaoka
2007-08-03 12:38     ` Michaël Cadilhac
2007-08-06  2:14       ` Katsumi Yamaoka

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=87r6mn8hkf.fsf@lrde.org \
    --to=michael@cadilhac.name \
    --cc=ding@gnus.org \
    /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).