From: Raymond Scholz <ray-2001@zonix.de>
Subject: Re: How to do something a bit complicated with inline decoding?
Date: Sat, 20 Oct 2001 12:34:39 +0200 [thread overview]
Message-ID: <lgd.87669amwg0.fsf@mde1.zonix.de> (raw)
In-Reply-To: <vafk7xrvkw6.fsf@INBOX.auto.gnus.tok.lucy.cs.uni-dortmund.de> (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "Fri, 19 Oct 2001 15:07:05 +0200")
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> But I know that I've seen mention of using w3m.el with Gnus. But where?
;; Greg in <2fasnftcpt4.fsf@broadcom.com> on gnu.emacs.help
(defvar gnus-w3m-minor-mode nil)
(make-variable-buffer-local 'gnus-w3m-minor-mode)
(add-to-list 'minor-mode-alist '(gnus-w3m-minor-mode " w3m"))
(add-to-list 'minor-mode-map-alist (cons 'gnus-w3m-minor-mode w3m-mode-map))
(defadvice mm-inline-text (around use-w3m-instead (handle) activate)
(let ((type (mm-handle-media-subtype handle)))
(if (not (equal type "html"))
ad-do-it
(let ((text (mm-get-part handle))
(b (point)))
(save-excursion
(insert text)
(save-restriction
(narrow-to-region b (point))
(goto-char (point-min))
(w3m-region (point-min) (point-max))
(setq gnus-w3m-minor-mode t))
(mm-handle-set-undisplayer
handle
`(lambda ()
(let (buffer-read-only)
(setq gnus-w3m-minor-mode nil)
(if (functionp 'remove-specifier)
(mapcar (lambda (prop)
(remove-specifier
(face-property 'default prop)
(current-buffer)))
'(background background-pixmap foreground)))
(delete-region ,(point-min-marker)
,(point-max-marker))))))))))
This code is also being mentioned in the file TIPS.ja (japanese)
coming with emacs-w3m. It should do inline images with Emacs 21 too.
Cheers, Ray
--
Hfr fgebat rapelcgvba!
prev parent reply other threads:[~2001-10-20 10:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-18 1:38 Lloyd Zusman
2001-10-18 7:17 ` Kai Großjohann
2001-10-18 11:00 ` Lloyd Zusman
2001-10-18 12:30 ` Colin Marquardt
2001-10-18 15:54 ` Kai Großjohann
2001-10-18 23:53 ` Lloyd Zusman
2001-10-19 10:44 ` Lloyd Zusman
2001-10-19 13:07 ` Kai Großjohann
2001-10-19 23:51 ` Lloyd Zusman
2001-10-20 10:34 ` Raymond Scholz [this message]
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=lgd.87669amwg0.fsf@mde1.zonix.de \
--to=ray-2001@zonix.de \
--cc=rscholz@zonix.de \
/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).