I just discovered w3m-mode (version 1.0). How do I display images
with an external viewer (like xv)? This is my current setup:
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
(setq w3m-coding-system 'iso-8859-1
w3m-input-coding-system 'iso-8859-1
w3m-output-coding-system 'iso-8859-1
w3m-arrived-file-coding-system 'iso-8859-1
w3m-mailto-url-function 'compose-mail
w3m-default-save-directory "~/tmp/down/")
Saying `I' on an image (<IMG SRC="..."> or <A HREF="..."> makes no
difference) offers me to save the image.
There is a variable called `w3m-display-inline-image' but setting it
to `t' doesn't make any difference. Perhaps this setting does only
make sense for XEmacs and Emacs 21.
Cheers, Ray
--
"I heard if you play the NT-4.0-CD backwards, you get a satanic message."
"Thats nothing, if you play it forward, it installs NT-4.0"
Yes, with Emacs 21 you will get inline images -- very nice. w3m.el is
a nice browser, how can I use this mode in Gnus for rendering
html-Mails?
Dirk
--
A morning without coffee is like something without something else.
> Yes, with Emacs 21 you will get inline images -- very nice. w3m.el
> is a nice browser, how can I use this mode in Gnus for rendering
> html-Mails?
Various variables might have to be looked at. See mailcap-mime-data
and the output of M-x apropos RET ^mm.*inlin RET
kai
--
~/.signature: No such file or directory
How will this work for the console?
Will it try to launch an external viewer much like links or w3m does?
/me has visions of a framebufferd gnuemacs graphical w3 browser
floating in his head.
/me smackes himself upside the head
--
--(tt...@faux.local|04:45|/home/faux)-- cat .sig
GUI's are for slackers. Get ibpconf.sh 6.1 on freshmeat.net
--(tt...@faux.local|04:45|/home/faux)-- export UIN=66618055
It's a damn poor mind that can only think of one way to spell a word.
- Andrew Jackson
> Yes, with Emacs 21 you will get inline images -- very nice. w3m.el
> is a nice browser, how can I use this mode in Gnus for rendering
> html-Mails?
Add this to your .gnus file:
(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)))
(mm-handle-set-undisplayer
handle
`(lambda ()
(let (buffer-read-only)
(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))))))))))
> >>>>> On Tue Jul 17, Dirk writes:
>
> > Yes, with Emacs 21 you will get inline images -- very nice. w3m.el
> > is a nice browser, how can I use this mode in Gnus for rendering
> > html-Mails?
>
> Add this to your .gnus file:
>
> (defadvice mm-inline-text (around use-w3m-instead (handle) activate)
> ...
Wow, that works great - much better and faster than W3!
The only problem is that it does nothing when you mouse-2 on links
(although they are still highlighted).
Is there any way of getting it to invoke browse-url (or equivalent)?
Cheers,
Mike
>The only problem is that it does nothing when you mouse-2 on links
>(although they are still highlighted).
>Is there any way of getting it to invoke browse-url (or equivalent)?
isn't w3m-mode just w3m running in a term-mode buffer? if so it's unlikely
that you can invoke emacs functions, though you might be able to convince
w3m to use the mouse itself.
--
okay, have a sig then
| <ug0buh...@ariel.co.uk> divulged:
|
| >The only problem is that it does nothing when you mouse-2 on links
| >(although they are still highlighted).
| >Is there any way of getting it to invoke browse-url (or equivalent)?
|
| isn't w3m-mode just w3m running in a term-mode buffer? if so it's unlikely
Definitely not. I'm sure John's emacs-w3m washing could be
modified (well, actually it is emacs-w3m's rendering code that has
to be modified/augmented/adviced/whateva) to do the same thing the
default W3 washing does, but I don't really have any need to read
HTML mails so I won't be doing that :)
--
Hannu
> John Wiegley <jo...@gnu.org> writes:
>
> > Add this to your .gnus file:
> >
> > (defadvice mm-inline-text (around use-w3m-instead (handle) activate)
> > ...
>
> Wow, that works great - much better and faster than W3!
>
> The only problem is that it does nothing when you mouse-2 on links
> (although they are still highlighted).
> Is there any way of getting it to invoke browse-url (or equivalent)?
try this.
(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)
> Mike Woolley (mi...@ariel.co.uk) writes:
>
> > John Wiegley <jo...@gnu.org> writes:
> >
> > > Add this to your .gnus file:
> > >
> > > (defadvice mm-inline-text (around use-w3m-instead (handle) activate)
> > > ...
> >
> > Wow, that works great - much better and faster than W3!
> >
> > The only problem is that it does nothing when you mouse-2 on links
> > (although they are still highlighted).
> > Is there any way of getting it to invoke browse-url (or equivalent)?
>
>
> try this.
>
> (defvar gnus-w3m-minor-mode nil)
> ...
That does what I want, thanks!
Cheers,
Mike
That works great here, too.
But if I haven't started emacs-w3m before I start gnus, I get an error
complaining about w3m-region (which I can fix with
(autoload 'w3m-region "w3m") )
and about an unbound variable, w3m-mode-map.
What's the best way to handle that?
Jay
>But if I haven't started emacs-w3m before I start gnus, I get an error
>complaining about w3m-region (which I can fix with
>(autoload 'w3m-region "w3m") )
>and about an unbound variable, w3m-mode-map.
>What's the best way to handle that?
as long as it's somewhere in your load-path either (load-library "w3m") or
(require 'w3m).
--
warning: i hate typing uppercase and will do my utmost to avoid it. hence
where the emacs norm is to use M-, \M-, C-, \C-, RET, SPC, i use \m-, \m-,
\c-, \c-, <ret>, and <spc>.
Ah, I had been loading the individual functions that I used.
Thanks!
Jay