Gnus development mailing list
 help / color / mirror / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: ding@gnus.org
Subject: Re: How do I get bigger gravatars (setting gravatar-size doesn't cut it)?
Date: Tue, 30 Nov 2010 16:33:19 +0100	[thread overview]
Message-ID: <87sjyi7rnk.fsf@gmail.com> (raw)
In-Reply-To: <8762vfp3mb.fsf@keller.adm.naquadah.org> (Julien Danjou's message of "Tue, 30 Nov 2010 10:22:52 +0100")

Julien Danjou <julien@danjou.info> writes:

> On Mon, Nov 29 2010, Štěpán Němec wrote:
>
>> ISTM better would be making `gnus-gravatar-size' nil by default, meaning
>> to just use `gravatar-size'. Thoughts?
>
> Sounds right. Done.

Thanks.

Another glitch I noticed: you encode the name in
`gnus-gravatar-transform-address', but then don't decode it in
`gnus-gravatar-insert', meaning the search fails and gravatars don't
work for non-ascii names (such as mine ;-)).

You also don't need to bind `inhibit-read-only' to t inside
`gnus-with-article-headers', as the latter already does that.

This works for me:

diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el
index a6ecd43..beb661f 100644
--- a/lisp/gnus/gnus-gravatar.el
+++ b/lisp/gnus/gnus-gravatar.el
@@ -85,7 +85,8 @@ (defun gnus-gravatar-insert (gravatar header address category)
       (when (buffer-live-p (current-buffer))
         (gnus-article-goto-header header)
         (mail-header-narrow-to-field)
-        (let ((real-name (cdr address))
+        (let ((real-name (when (cdr address)
+                           (mail-decode-encoded-word-string (cdr address))))
               (mail-address (car address)))
           (when (if real-name             ; have a realname, go for it!
                     (and (search-forward real-name nil t)
@@ -101,8 +102,7 @@ (defun gnus-gravatar-insert (gravatar header address category)
             ;; example we were fetching someaddress, and then we change to
             ;; another mail with the same someaddress.
             (unless (memq 'gnus-gravatar (text-properties-at (point)))
-              (let ((inhibit-read-only t)
-                    (point (point)))
+              (let ((point (point)))
                 (unless (featurep 'xemacs)
                   (setq gravatar (append gravatar gnus-gravatar-properties)))
                 (gnus-put-image gravatar nil category)



  reply	other threads:[~2010-11-30 15:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 17:12 Štěpán Němec
2010-11-29 21:22 ` Štěpán Němec
2010-11-30  9:22   ` Julien Danjou
2010-11-30 15:33     ` Štěpán Němec [this message]
2010-11-30 23:10       ` 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=87sjyi7rnk.fsf@gmail.com \
    --to=stepnem@gmail.com \
    --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).