[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Did you know that Gnus, the Emacs newsreader, supports emacs-w3m?
Actually, the version of Gnus bundled with Emacs does not support emacs-w3m (yet). You'd better use the latest version of Gnus. It is available at:
ftp://ftp.gnus.org/pub/gnus/gnus.tar.gz
Note: if emacs-w3m is supported in the Gnus version that comes with your Emacs distribution, it means either that this documentation is out-of-date (please report this bug as described in 11. Mailing list and submitting bug reports), or that you're using a very old version of emacs-w3m (in which case you should update it to a newer version).
You can convert HTML spam mails to be human-readable using emacs-w3m. Of course, it works for HTML ham (non-spam) mails as well, and for both emacs-w3m is probably faster than the default converter. You don't need to perform any additional operation. It will simply be displayed.
On HTML parts of an article buffer, the w3m-minor-mode
is turned
on and you can use the same main keys as the keys of emacs-w3m, for
instance, RET is for visiting a page which a link in the current
position points to. Those keys are defined in the
w3m-minor-mode-command-alist
variable. Keep in mind that some
commands are replaced by others similar to them, for security reasons
(see below).
Read the Gnus manual (see section `Display Customization' in The Emacs MIME Manual). The easiest way is to put the following line in your `~/.gnus.el' file:
(setq mm-text-html-renderer 'w3m) |
Also put the following line if you want to show images inline in article buffers:
(setq mm-inline-text-html-with-images t) |
If you don't need to use emacs-w3m keys in article buffers, add the following line too:
(setq mm-inline-text-html-with-w3m-keymap nil) |
The above description about spam and ham is not for kidding, it's just
here to get your attention. Some HTML mails might contain a nasty trick
used by spammers, using the `<img>' tag which is far more evil than
the `Click Here!' button. It is most likely intended to check
whether the ominous spam mail has reached your eyes or not, in which
case the spammer knows for sure that your email address is valid. It is
done by embedding an identifier string into a URL that you might
automatically retrieve when displaying the image. If the
mm-w3m-safe-url-regexp
variable has not been changed from the
default value, Gnus will never connect to the spammer's site
arbitrarily.
You can display images inline in an article buffer if you set
mm-inline-text-html-with-images
to t
, can't you? No, not
exactly: you're still being protected. If you don't care about leaking
information (i.e. the fact that your mail address is reachable), set the
mm-w3m-safe-url-regexp
variable to nil
. The default value
for mm-w3m-safe-url-regexp
is `"\\`cid:"' which means we
consider that images included in a mail with the `cid:' URL are
safe (that is, you can display such images without modifying the
mm-w3m-safe-url-regexp
variable).
Even when you are in the summary buffer, you can toggle displaying of images in the article buffer. It is effective only when those images are displayed by emacs-w3m, though. Here's an example:
(defun gnus-summary-w3m-safe-toggle-inline-images (&optional arg) "Toggle displaying of all images in the article buffer. If the prefix arg is given, all images are considered to be safe." (interactive "P") (save-excursion (set-buffer gnus-article-buffer) (w3m-safe-toggle-inline-images arg))) (eval-after-load "gnus-sum" '(define-key gnus-summary-mode-map "\C-i" 'gnus-summary-w3m-safe-toggle-inline-images)) |
See also 9.1 Turning Gnus into a web browser!.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |