[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.3 Reading HTML mails in SEMI MUAs

You can display HTML mails as human-readable, using emacs-w3m and SEMI MUAs, for example, Wanderlust, T-gnus, etc. Since those MUAs depend on SEMI (and also FLIM) for MIME functions, we generically call them SEMI MUAs. Although SEMI uses Emacs/W3 for rendering HTML mails by default, it can easily be altered to emacs-w3m and it will make your cyber life still more comfortable.

You simply need to put the following line in `~/.emacs' file:

(require 'mime-w3m)

The mime-w3m and mime-w3 modules are functionally alike, as you might have guessed (see how the names sound alike?). The latter is included in the SEMI package.

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.

There are some customizable variables related to the mime-w3m module:

If it is non-nil, images will be displayed inline in HTML mails. If it is the symbol default (which is the default) at the first time, the value of this variable will be replaced with the value of the w3m-default-display-inline-images variable. You probably don't need to change this.

Regexp matching URLs which are considered to be safe. The default value is `"\\`cid:"' which means we consider that images included in a mail with the `cid:' URLs are safe. See also 6.1 Reading HTML mails in Gnus about rogue attacks.

A hook run just after setting up the cooperation of the mime-w3m module and SEMI. The default value is nil.

By the way, even when you are in the summary buffer, you can toggle displaying of images in the article buffer (which is what is called the message buffer in the Wanderlust community). It is effective only when those images are displayed by emacs-w3m, though. Here're examples for T-gnus, Nana-gnus and Wanderlust:

;; T-gnus or Nana-gnus:
(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")
    (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))

;; Wanderlust:
(defun wl-summary-w3m-safe-toggle-inline-images (&optional arg)
  "Toggle displaying of all images in the message buffer.
If the prefix arg is given, all images are considered to be safe."
  (interactive "P")
    (set-buffer wl-message-buffer)
    (w3m-safe-toggle-inline-images arg)))

(eval-after-load "wl-summary"
  '(define-key wl-summary-mode-map
     "\M-i" 'wl-summary-w3m-safe-toggle-inline-images))

See also 9.1 Turning Gnus into a web browser! if you are using T-gnus or Nana-gnus.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by TSUCHIYA Masatoshi on November, 3 2005 using texi2html