Gnus development mailing list
 help / color / mirror / Atom feed
* [XEmacs] Gravatar and gnus-article-html
@ 2010-10-07  6:49 Katsumi Yamaoka
  0 siblings, 0 replies; only message in thread
From: Katsumi Yamaoka @ 2010-10-07  6:49 UTC (permalink / raw)
  To: ding

Hi,

The following advices enable you to display Gravatars and external
images in html articles under XEmacs:

--8<---------------cut here---------------start------------->8---
(when (featurep 'xemacs)
  (defadvice url-retrieve (around make-it-work-like-modern-one
				  (url &optional callback cbargs)
				  activate)
    "Make it work like modern one."
    (if (functionp callback)
	(let* (-url-retrieve-is-modernized-p-
	       (retval (let (callback cbargs)
			 (save-excursion ad-do-it))))
	  (with-current-buffer (cdr retval)
	    (goto-char (point-min))
	    (apply callback nil cbargs))
	  (cdr retval))
      ad-do-it))

  (defadvice url-parse-mime-headers (before dont-delete-header
					    (&optional no-delete switch-buff)
					    activate)
    "Don't delete header if demanded.  Convert CRLF to LF in header."
    (when (boundp '-url-retrieve-is-modernized-p-)
      (setq no-delete t)
      (and switch-buff (set-buffer url-working-buffer))
      (goto-char (point-min))
      (when (search-forward "\r\n\r\n" nil t)
	(while (search-backward "\r\n" nil t)
	  (replace-match "\n")))))

  (defadvice url-cache-cachable-p (around cache-gravatars (obj) activate)
    "Enable caching of Gravatars."
    (if (and url-automatic-caching
	     (equal (url-host obj) "www.gravatar.com"))
	(setq ad-return-value t)
      ad-do-it)))
--8<---------------cut here---------------end--------------->8---

You have to use the most recent No Gnus.  I use:

(setq gnus-treat-from-gravatar 'head
      gnus-gravatar-size 48
      mm-text-html-renderer 'gnus-article-html
      url-automatic-caching t)

Why don't you add your face to http://www.gravatar.com , if you
haven't done yet? :-)



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-07  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-07  6:49 [XEmacs] Gravatar and gnus-article-html Katsumi Yamaoka

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).