\input texinfo @c -*- mode: texinfo -*-
@c %**start of header
@setfilename emacs-w3m.info
@settitle Emacs-w3m -- an Emacs interface to w3m --
@c %**end of header
@documentlanguage en
@include version.texi
@synindex pg cp

@copying
Copyright @copyright{} 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009 @w{TSUCHIYA Masatoshi}

@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License, Version 2 or any
later version published by the Free Software Foundation.

This document is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License along
with this document; see the file COPYING.  If not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
@end quotation
@end copying

@dircategory GNU Emacs Lisp
@direntry
* Emacs-w3m: (emacs-w3m).  An Emacs interface to w3m
@end direntry

This file documents emacs-w3m, an Emacs interface to w3m.

This edition is for emacs-w3m version @value{VERSION}.

@finalout
@titlepage
@sp 10
@title Emacs-w3m User's Manual
@subtitle An Emacs interface to w3m for emacs-w3m version @value{VERSION}
@author The emacs-w3m development team
@page

@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@contents

@node Top
@top Emacs-w3m User's Manual

@flushright
The emacs-w3m development team
@end flushright

This manual corresponds to emacs-w3m version @value{VERSION}.

@ifnottex
@insertcopying
@end ifnottex

@menu
* Introduction::                Preliminary remarks
* Getting Started::             It's so easy to begin to use emacs-w3m
* Basic Usage::                 Basic usage
* Pretty Good Features::        Pretty good features
* Customizable Variables::      Customizable variables
* Hooking into MUAs::           Hooking emacs-w3m into mail/newsreaders
* Frequently Asked Questions::  There isn't always an answer
* Known Problems::              You can surely solve it
* Shimbun Library::             A tool for reading a web newspaper
* Tips::                        Some knick-knacks using emacs-w3m
* Mailing List::                Mailing list and submitting bug reports
* Emacs-w3m Functions::         Details of some emacs-w3m functions
* External Packages::           Companion packages you might need
* Authors::                     People who wrote this manual
* Index::                       Index

@detailmenu
 --- The Detailed Node Listing ---

Getting Started

* Required Emacs Version::      What version of Emacs can be used?
* You Need w3m::                Using w3m: the reason why emacs-w3m is fast
* Other Requirements::          Things required to run emacs-w3m
* Installing Emacs-w3m::        Installing emacs-w3m
* Non-UNIX-like systems::       Installing on non-UNIX-like systems
* Minimal Settings::            Minimal settings to run emacs-w3m

Basic Usage

* Browsing Web Pages::          Let's go netsurfing!
* Inline Images::               Toggle displaying inline images
* Tracing History::             Going back through time and space
* Managing Bookmarks::          That's a favorite with me!
* Using Tabs::                  Everybody likes tabs
* Working with buffers::        Creating, killing and moving across buffers
* Downloading::                 Downloading a file
* Submitting Forms::            Filling in HTML forms
* HTML File Information::       Support for web page editing and hacking

Pretty Good Features

* Using Search Engines::        A convenient way to search the web
* Grouping URLs::               Visiting several web pages in one URL
* Weather Information::         It will be fine tomorrow
* Using Antenna::               Raise your antenna
* Showing Directory Tree::      Showing the tree structure of local directories
* Viewing Perl Documents::      Viewing Perl Documents
* Using Namazu::                Searching files with Namazu
* Octet::                       Viewing data in various octal form
* Frame Local Buffers::         Grouping sessions into separate frames
* Session Manager::             Saving and loading sessions

Customizable Variables

* General Variables::           General variables
* Image Variables::             Variables related to images
* Form Variables::              Variables related to forms
* Cookie Variables::            Variables related to cookies
* Bookmark Variables::          Variables related to bookmarks
* Search Variables::            Variables related to searching the web
* Weather Variables::           Variables related to weather information
* Dtree Variables::             Variables related to the dtree feature
* Antenna Variables::           Variables related to antenna
* Perldoc Variables::           Variables related to perldoc
* Namazu Variables::            Variables related to namazu
* Octet Variables::             Variables related to the octet feature
* Session Manager Variables::   Variables related to session manager
* Hooks::                       Hooks
* Other Variables::             Other variables

Hooking into MUAs

* Gnus::                        Reading HTML mails in Gnus
* Mew::                         Reading HTML mails in Mew
* SEMI MUAs::                   Reading HTML mails in @acronym{SEMI} MUAs
* VM::                          VM (vieW maiL) is not Wanderlust

Frequently Asked Questions

* General FAQ::                 General Questions
* Trouble FAQ::                 Troubleshooting
* Shimbun FAQ::                 Questions of Shimbun Library

Known Problems

Shimbun Library

* Nnshimbun::                   Turning Gnus into a web browser!
* Mew Shimbun::                 Reading web newspapers with Mew
* Shimbun with Wanderlust::     Reading web newspapers with Wanderlust
* Shimbun local mode::          Use a shell script to fetch shimbun feeds
* Shimbun Sites::               Sites supported by Shimbun
* Shimbun Basics::              How to make a new shimbun module

Tips

Mailing List

Emacs-w3m Functions

@end detailmenu
@end menu

@node Introduction
@chapter Preliminary remarks
@cindex Introduction

@uref{http://www.cs.indiana.edu/elisp/w3/docs.html, Emacs/W3} once was
the most popular web browser on Emacs.  However, it worked so slowly
that we wanted a speedy alternative.  On the other hand,
@uref{http://w3m.sourceforge.net/, w3m} was a pager with WWW capability,
developed by Akinori ITO.  Although it was a pager, it was possible to
use it as a text-mode WWW browser, so we started developing an Emacs
interface to w3m.

Our special thanks go to Akinori ITO and the w3m team for the excellent
w3m program.  We would also like to thank everybody who has submitted
comments, suggestions, and bug fixes.  Even though we're not aware of
any problems, all responsibility for this program is ours (the emacs-w3m
development team), but there is absolutely no warranty.  The emacs-w3m
program was first created by TSUCHIYA Masatoshi in June 2000.

See also @uref{http://emacs-w3m.namazu.org/, the emacs-w3m official
page}.

@node Getting Started
@chapter It's so easy to begin to use emacs-w3m
@cindex Getting started
@cindex Starting up

Emacs-w3m may have already been installed on your system, in which case
you can skip this section and begin to use the program at once.  If
you're not that lucky, read on to learn how to install emacs-w3m.

@menu
* Required Emacs Version::      What version of Emacs can be used?
* You Need w3m::                Using w3m: the reason why emacs-w3m is fast
* Other Requirements::          Things required to run emacs-w3m
* Installing Emacs-w3m::        Installing emacs-w3m
* Non-UNIX-like systems::       Installing on non-UNIX-like systems
* Minimal Settings::            Minimal settings to run emacs-w3m
@end menu

@node Required Emacs Version
@section What version of Emacs can be used?
@cindex Possible Emacs versions

You can run emacs-w3m in various versions of Emacsen listed below:

@table @samp

@item Emacs 21.1 or greater
No additional packages are required.

@item XEmacs 21.x
First of all, you should note that emacs-w3m supports only XEmacs
21.4.17 and later and XEmacs 21.5-b19 and later.  In addition, you need
to have installed the latest xemacs-base package including the
@file{timer-funcs.el} module.

The @acronym{APEL} package and the @samp{gifsicle} program are required.
In addition, it would be better to have installed the @file{rfc2368.el}
module which parses @samp{mailto} urls (@pxref{Other Requirements}).

@item Emacs 20.x, Emacs 19.34 (including Mule 2.3)
Emacs-w3m no longer supports those Emacs versions.

@end table

If you use the development version of GNU Emacs, perhaps you should run
the CVS version of emacs-w3m on it.  In that case, it is strongly
recommended that you join the @ref{Mailing List}.

@node You Need w3m
@section Using w3m: the reason why emacs-w3m is fast
@cindex w3m

Emacs-w3m uses the external w3m program as a back-end to retrieve web
contents and as an HTML rendering engine; that's how we could create an
accelerated Emacs web browser with asynchronous operation.

You must install the latest w3m, it is available at:

@uref{http://prdownloads.sourceforge.net/w3m/}

@node Other Requirements
@section Things required to run emacs-w3m
@cindex @acronym{APEL} package
@cindex Gifsicle program
@cindex ImageMagick package
@cindex @acronym{FLIM} package
@cindex Mule-UCS package
@cindex codepage-ex
@cindex rfc2368.el

Depending on the Emacs version you're using, third party packages may be
required.  This section provides resources to help you find and install
them.

@table @samp

@item @acronym{APEL}
Indispensable to XEmacs.  You should install @acronym{APEL} before
building emacs-w3m.  @acronym{APEL} is available at:

@uref{http://kanji.zinbun.kyoto-u.ac.jp/~tomo/lemi/dist/apel/}

Note that you must not use the @acronym{APEL} XEmacs package (which is
contained in SUMO) of the versions older than 1.32.  If you have already
installed such a version, you should upgrade it or use the following
directives to replace it with @acronym{APEL} which is linked above (you
can also use the same directives in order to newly install
@acronym{APEL}):

@example
% rm -fr /usr/local/lib/xemacs/xemacs-packages/lisp/apel
% cd apel-10.7
% make install-package XEMACS=xemacs-21.4.x\
  PACKAGEDIR=/usr/local/lib/xemacs/xemacs-packages
@end example

@item gifsicle
Indispensable to XEmacs.  There is a known bug in all XEmacs 21.x series
that won't let it display optimized animated gifs correctly or may make
it crash when some kind of an interlaced gif image is displayed.
Emacs-w3m uses the @samp{gifsicle} program to convert gif data in order
to make it possible to be handled by XEmacs 21.x.  It is available at:

@uref{http://www.lcdf.org/gifsicle/}

@item ImageMagick
If the @samp{convert} program bundled with the ImageMagick package is
available on your system, emacs-w3m will use it to resize images or to
convert @samp{favicon} images into a format Emacs can handle.
Emacs-w3m will work without ImageMagick, but installing it will improve
your surfing experience.  You can get the ImageMagick package from:

@uref{ftp://ftp.imagemagick.org/pub/ImageMagick/}

To manipulate @samp{favicon} images, we recommend version 5.4.0-5 and
later, previous versions may work but we didn't check them thoroughly.

@item @acronym{FLIM}
The @acronym{FLIM} package is required to use the @samp{shimbun}
library.  The @samp{shimbun} library is a collection of tools for
reading web newspapers, you can use it with Gnus, Mew or Wanderlust.
@xref{Shimbun Library}.

Note that the @acronym{FLIM} package requires the @acronym{APEL} package
regardless of the version of Emacs you are using.  Therefore, you must
install both @acronym{APEL} and @acronym{FLIM} if you would like to use
the @samp{shimbun} library.  The @acronym{FLIM} package is available at:

@uref{http://kanji.zinbun.kyoto-u.ac.jp/~tomo/lemi/dist/flim/flim-1.14/}

@item Mule-UCS
If you use XEmacs 21.4, or need to read Chinese text, Japanese text,
Korean text, etc. using Emacs 21, we recommend you install the Mule-UCS
Emacs Lisp package so as to enable emacs-w3m to display pages encoded by
UTF-8, which is the typical coding system of the Unicode system.  Note
that Emacs 21 supports the Unicode system partially (e.g., for Latin
text) and Emacs 22 or greater fully supports it.  The Mule-UCS Emacs
Lisp package is available at:

@uref{http://unit.aist.go.jp/itri/itri-gist/ftp.m17n.org/pub/mule/Mule-UCS/test/Mule-UCS-current.tar.gz}

(The official page for Mule-UCS will open in the near future in
@uref{http://www.meadowy.org/}.)

If you use it with Emacs 21.2, it is necessary to apply
@uref{http://www.m17n.org/mlarchive/mule/200203/msg00000.html, this
patch} before installation.

If you are an XEmacs 21.4 user, the compiled package is here:

@uref{ftp://ftp.xemacs.org/xemacs/packages/mule-ucs-1.14-pkg.tar.gz}

(You don't need to install it in addition to Mule SUMO, that contains
it.)

@item codepage-ex
Some web sites in Europe specify a @samp{charset=ISO-8859-1} encoding,
but really use @code{windows-1252}.  Since @code{iso-8859-1} is
insufficient to decode that, emacs-w3m uses @code{windows-1252} as a
superset of @code{iso-8859-1} if it is available.  The
@code{windows-1252} coding system is built-in since Emacs 22.  Even in
Emacs 21, you can enable to use it using the module called
@code{codepage-ex}.  See the following page:

@uref{http://nijino.homelinux.net/emacs/codepage-ex.html}

@item rfc2368.el
Install it if you'd like to enable emacs-w3m running with XEmacs to
parse @samp{mailto} urls properly.  You can find the @file{rfc2368.el}
module which can be used with XEmacs in the @file{attic} directory in
the emacs-w3m distribution.  To install it, copy the @file{rfc2368.el}
file to the directory belonging to the @code{load-path}, and perform the
following command:

@example
% xemacs -batch -vanilla -f batch-byte-compile rfc2368.el
@end example
@end table

@node Installing Emacs-w3m
@section Installing emacs-w3m
@cindex Installing emacs-w3m

See the official page @uref{http://emacs-w3m.namazu.org/} for
instructions on how to get the latest emacs-w3m.  Is everything ready?
Now, let's begin.

In order to install emacs-w3m on non-UNIX-like systems (or any system
lacking the ability to execute the @samp{configure} script or has no
@samp{make} command), skip this section and go to the next section
@xref{Non-UNIX-like systems}.

@enumerate
@item
First, extract a tarball of the emacs-w3m distribution and enter the top
directory as follows:

@example
% tar zxf emacs-w3m-@value{VERSION}.tar.gz
% cd emacs-w3m-@value{VERSION}
@end example

If you've checked out emacs-w3m from CVS, you have to run
@samp{autoconf} with no argument to generate the @samp{configure}
script.

@item
Run the @samp{configure} script.

@example
% ./configure
@end example

@emph{Important notice to Gnus users}:

If multiple versions of Gnus are installed on your system (it is likely
that there are the released version and the development version of
Gnus), make sure that the @code{load-path} contains the directory where
the version you use is installed (check for the @file{gnus.elc} file).
You can ensure that with the @samp{--with-addpath} option as follows:

@example
% ./configure --with-addpath=/usr/local/share/emacs/site-lisp/gnus
@end example

If you've installed @acronym{APEL}, @acronym{FLIM} or something in

non-standard directories other than the default @code{load-path}, you
must specify them using the @samp{--with-addpath} option as follows (you
may also include the Gnus directory in it separated with @samp{:}):

@example
% ./configure --with-addpath=/opt/share/apel:/opt/share/flim
@end example

@item
Just run @samp{make} and @samp{make install}.  See also the next step if
you are using XEmacs.

@example
% make
% make install
@end example

All Lisp and info files will be installed in the appropriate
directories.  Now, how do you know what files will go where?  To know it
beforehand, use this:

@example
% make what-where
@end example

If you are using Emacs or XEmacs capable of displaying images, you had
better install icon image files.  To do this:

@example
% make install-icons
@end example

@noindent
or

@example
% make install-icons30
@end example

@noindent
The later is for using the slightly larger icon images.

@item
You can also install emacs-w3m as an XEmacs package using @samp{make
install-package} instead of @samp{make install} as follows:

@example
% make
% make install-package
@end example

In this case, you don't have to execute @samp{make install-icons} nor
@samp{make install-icons30}.

If you need to specify the package directory, there are two ways to do
that:

@itemize @bullet

@item
Use the @samp{configure} option @samp{--with-packagedir=}.  For example:

@example
% ./configure --with-packagedir=/opt/xemacs/xemacs-packages
% make what-where
% make
% make install-package
@end example

@item
Use the @samp{PACKAGEDIR} variable.  For example:

@example
% ./configure
% make what-where PACKAGEDIR=/opt/xemacs/xemacs-packages
% make
% make install-package PACKAGEDIR=/opt/xemacs/xemacs-packages
@end example

@end itemize

@end enumerate

@node Non-UNIX-like systems
@section Installing on non-UNIX-like systems
@cindex Installing on non-UNIX-like systems

If you cannot execute the @samp{configure} script on your system, or if
no @samp{make} command is available, cast the following spell:

@example
% emacs -batch -q -no-site-file -l w3mhack.el NONE -f w3mhack-nonunix-install
@end example

If @acronym{APEL}, @acronym{FLIM} (or any other library) aren't
installed in the ordinary places, the installer will leave them out.  In
such a case, it is necessary to tell those places to the installer as
shown below:

@example
% emacs -batch -q -no-site-file -l w3mhack.el //c/share/apel://c/share/flim -f w3mhack-nonunix-install
@end example

@node Minimal Settings
@section Minimal settings to run emacs-w3m

This section mentions some fundamental settings for emacs-w3m.  If you
want to fine-tune your installation, you'll find many customizable
variables in @ref{Customizable Variables}.

@table @samp

@item Autoloads
@cindex Adding autoload settings

You don't need this if you've installed emacs-w3m as an XEmacs package
(@pxref{Installing Emacs-w3m}) because the @file{w3m/auto-autoloads.el}
takes care of setting up autoloads.

In all other cases, put the following line in your @file{~/.emacs} file:

@lisp
(require 'w3m-load)
@end lisp

@item Startup File
@cindex Startup file
@vindex w3m-init-file

We recommend using the @file{~/.emacs-w3m} file (which is the default
value of @code{w3m-init-file}) if you need to twiddle some emacs-w3m
variables.  This file is similar to @file{~/.emacs}, but is read when
emacs-w3m starts.  Note that some options shouldn't be modified there,
for example, @code{w3m-command}.

@item Proxy Gateway
@cindex Firewall
@cindex Proxy gateways
@cindex Proxy servers
@vindex w3m-command-arguments
@vindex w3m-no-proxy-domains

If you are behind a firewall and access the Internet through a proxy
gateway, you need to instruct w3m to use it.

There are several ways to do this, one is to set the @code{http_proxy}
environment variable globally in the shell something like:

@example
setenv http_proxy http://proxy.hogege.com:8000/
@end example

Another way is to customize the @code{w3m-command-arguments} variable to
add the options @samp{-o} and
@samp{http_proxy=http://PROXY_SERVER_NAME:PORT/}.

This can also be done in your @file{~/.emacs-w3m} file as shown below:

@lisp
(setq w3m-command-arguments
      (nconc w3m-command-arguments
             '("-o" "http_proxy=http://proxy.hogege.com:8000/")))
@end lisp

To specify hosts for which the proxy shouldn't be used (Intranet sites
and the like), set the @code{no_proxy} (note that it is not
@code{no-proxy}) environment variable to a comma-separated list of
hostnames.  Alternatively, you can set the @code{w3m-no-proxy-domains}
variable to a list of domain names (not host names) as follows:

@lisp
(setq w3m-no-proxy-domains '("local.com" "neighbor.com"))
@end lisp

See also the documentation of the @code{w3m-command-arguments-alist}
variable for instructions on how to use regexps to specify
@code{no_proxy} hosts.

@end table

@node Basic Usage
@chapter Basic usage

@menu
* Browsing Web Pages::          Let's go netsurfing!
* Inline Images::               Toggle displaying inline images
* Tracing History::             Going back through time and space
* Managing Bookmarks::          That's a favorite with me!
* Using Tabs::                  Everybody likes tabs
* Working with buffers::        Creating, killing and moving across buffers
* Downloading::                 Downloading a file
* Submitting Forms::            Filling in HTML forms
* HTML File Information::       Support for web page editing and hacking
@end menu

@node Browsing Web Pages
@section Let's go netsurfing!

You can, by the keys, let emacs-w3m do all the web browsing operations.
Emacs-w3m uses the @samp{Lynx-like} keymap (@pxref{Key Binding}) by
default.  Of course, you can use the mouse buttons, too.

@menu
* Key Binding::                 There are two types of the key bindings
* Launching and Jumping::       Go ahead, just try it
* Moving in a page::            Moving from place to place in a page
* Moving over pages::           Moving from page to page
* Browsing with Mouse Operations:: Surfing using the mouse
* Going Back to Daily Hacking and/or Daily Writing:: Return to an Ordinary Life
@end menu

@node Key Binding
@subsection There are two types of the key bindings
@cindex Key binding
@cindex Lynx-like keymap
@cindex Info-like keymap
@vindex w3m-key-binding

Since emacs-w3m is a late-coming web browser in the history of Emacs web
browsers, we offer two types of the key bindings in order that users can
get used to the new web browser easily.  One is called the
@samp{Lynx-like} keymap, the other is the @samp{Info-like} keymap.  You
can see what they mean from those names, can't you?  The former is
similar to that of @samp{Lynx} which is the text-based web browser, and
the later is similar to that of @samp{Info} which is GNU's official
document browser.  By default, the @samp{Lynx-like} keymap is used.  If
you would like to use the @samp{Info-like} keymap, type

@example
@w{@kbd{M-x customize-option @key{RET} w3m-key-binding @key{RET}}}
@end example

@noindent
choose the @samp{Info-like} keymap, and save the changed state.
Otherwise, add the following snippet to your @file{~/.emacs} file, not
@file{~/.emacs-w3m.el} file:

@lisp
(setq w3m-key-binding 'info)
@end lisp

To change the key binding one by one, modify the @code{w3m-mode-map}
variable in your @file{~/.emacs-w3m.el} file like the following:

@lisp
(define-key w3m-mode-map [up] 'previous-line)
(define-key w3m-mode-map [down] 'next-line)
(define-key w3m-mode-map [left] 'backward-char)
(define-key w3m-mode-map [right] 'forward-char)
@end lisp

@node Launching and Jumping
@subsection Go ahead, just try it

You can invoke emacs-w3m using three different commands, listed below.
Try one of these commands: a web page is displayed in an Emacs buffer
named ``*w3m*'', meaning that it is an emacs-w3m buffer.  As you will
probably notice, the major mode for an emacs-w3m buffer is
@code{w3m-mode}, there are also minor modes (@pxref{Managing
Bookmarks}).

This section explains the most fundamental usage of these commands, see
@ref{Emacs-w3m Functions} for more information on them.  See also
@ref{Customizable Variables} for variables you can use to customize
emacs-w3m's behavior.

@table @code
@item w3m
@findex w3m
@vindex w3m-home-page
@vindex w3m-quick-start
@cindex Using emacs-w3m as a batch command
Start emacs-w3m, displaying the homepage specified in the
@code{w3m-home-page} variable.  The default value for
@code{w3m-home-page} is ``about:''.  Set the @code{w3m-quick-start}
variable to @code{nil} if you want to input a target URL every time you
start emacs-w3m.

You can also use this as an argument when starting emacs.  Examples:

@example
% emacs -f w3m
@end example

To specify a URL, you could also use:

@example
% emacs -f w3m http://emacs-w3m.namazu.org/
@end example

@item w3m-find-file
@findex w3m-find-file
Prompt for a local file name in the minibuffer, and display it in
emacs-w3m.

@item w3m-browse-url
@findex w3m-browse-url
Prompt for a URL in the minibuffer, and display it in emacs-w3m.  This
command is provided, if anything, in order to start emacs-w3m from other
application programs.
@end table

Moving in an emacs-w3m buffer won't be painful if you're an Emacs user
already, since many of the standard keys work as intended.  For
instance, @kbd{C-n}, @kbd{C-v} and @kbd{C-s} (which are commonly used to
move down one line, one page, or search downwards for a word) are valid
keys in an emacs-w3m buffer.

To follow a link, use the @kbd{@key{RET}} key.  You have to move the
point to a link to do this; links are easily recognizable in a buffer
because they are not displayed like ordinary text: they can be
underlined, or have a different color.  The face @code{w3m-anchor}
controls how they are to be displayed (@pxref{Customizable Variables}).

@table @asis
@item @kbd{@key{RET}}
@itemx @kbd{@key{right}} (Lynx-like keymap only)
@kindex @key{RET}
@kindex @key{right} (Lynx-like keymap)
@findex w3m-view-this-url
Display the page pointed by the link under point
(@code{w3m-view-this-url}).

The exact behavior of this command depends on the properties of the link
under point, and on whether you give it a prefix argument or not.  See
@ref{Emacs-w3m Functions} for details.
@end table

As mentioned above, you can be prompted for a URL when you use the
command @w{@kbd{M-x w3m}}, by setting the @code{w3m-quick-start}
variable to @code{nil}.  In an emacs-w3m buffer, there are also two
popular ways to go to new pages by entering their URLs, see below.

@table @asis
@item @kbd{@key{RET}}
@kindex @key{RET}
@findex w3m-view-this-url
In an emacs-w3m buffer, you can be prompted for a URL in the minibuffer
and make emacs-w3m display the corresponding page by hitting
@kbd{@key{RET}} after moving the point to the URL displayed in the
@samp{header-line}.  This feature will feel familiar to you if you are
used to GUI-based web browsers like Mozilla.  Detailed explanations
about this can be found in @ref{Emacs-w3m Functions}
(@code{w3m-view-this-url}).

@item @kbd{g}
@kindex g
@findex w3m-goto-url
Prompt for a URL in the minibuffer and make emacs-w3m display the
corresponding page (independently of the position of the point) in an
emacs-w3m buffer.  This binding will be familiar to you if you already
use Gnus or Mew (@code{w3m-goto-url}).

@item @kbd{G}
@kindex G
@findex w3m-goto-url-new-session
Prompt for a URL in the minibuffer, and display it in a new session.
This function works just like @kbd{g} (@w{@kbd{M-x w3m-goto-url}})),
except that it opens a new session.  Unless you are using emacs-w3m on
the character terminal, opening a new session means displaying the page
in a new tab.  For more information about tabs, please refer to
@ref{Using Tabs} (@code{w3m-goto-url-new-session}).

@item @kbd{c} (Lynx-like keymap)
@itemx @kbd{y} (Info-like keymap)
@kindex c (Lynx-like keymap)
@kindex y (Info-like keymap)
@findex w3m-print-current-url
Display the URL of the page being displayed in the echo area and put it
in the @code{kill-ring} (@code{w3m-print-current-url}).

@item @kbd{u} (Lynx-like keymap)
@itemx @kbd{Y} (Info-like keymap)
@kindex u (Lynx-like keymap)
@kindex Y (Info-like keymap)
@findex w3m-print-this-url
Display the target URL of the link under point in the echo area and put
it in the @code{kill-ring} (@code{w3m-print-this-url}).
@end table

If the page you're reading is today's news or someone's diary, it may
have been updated since you loaded it.  You can refresh the page using
the following command.  (This command can also be useful to force a full
redisplay of the page if it looks broken.)

@table @asis
@item @kbd{R}
@itemx @kbd{C-S-l} (Info-like keymap only)
@kindex R
@kindex C-S-l (Info-like keymap)
@findex w3m-reload-this-page
Reload the page (@code{w3m-reload-this-page}).
@end table

@node Moving in a page
@subsection Moving from place to place in a page
@cindex Moving in a page

Being able to use familiar Emacs movement bindings while browsing a web
page probably fascinates you already.  Believe it or not, there is
more!  Since we value your time, we have added keys to move the point,
scroll the page or find links in a very fast way.  When you master
them, you will understand how handy they are.

The keys are assigned so that scroll commands can be called using
shorter keystrokes than standard Emacs key bindings.  And since places
where you can input text are pretty specific in web pages
(@pxref{Submitting Forms}), most keys have special meanings and aren't
assigned to @code{self-insert-command} anymore.

@c Scrolling
@table @asis
@item @kbd{@key{SPC}}
@kindex @key{SPC}
@findex w3m-scroll-up-or-next-url
Scroll downwards.  You may be used to this binding if you use the
@samp{more} or @samp{less} commands, or Emacs's @code{view-mode}
(@code{w3m-scroll-up-or-next-url}).

@item @kbd{@key{DEL}}
@itemx @kbd{b}
@itemx @kbd{@key{backspace}}
@itemx @kbd{S-@key{SPC}}
@itemx @kbd{C-?}
@kindex @key{DEL}
@kindex b
@kindex @key{backspace}
@kindex S-@key{SPC}
@kindex C-?
@findex w3m-scroll-down-or-previous-url
Scroll upwards.  You may be used to this binding if you use the
@samp{less} command or Emacs's @code{view-mode}
(@code{w3m-scroll-down-or-previous-url}).

@item @kbd{>}
@kindex >
@findex w3m-scroll-left
@vindex w3m-horizontal-scroll-columns
Scroll to the left.  The scroll step is given by the
@code{w3m-horizontal-scroll-columns} variable, default 10
(@code{w3m-scroll-left}).

@item @kbd{<}
@kindex <
@findex w3m-scroll-right
@vindex w3m-horizontal-scroll-columns
Scroll to the right.  The scroll step is given by the
@code{w3m-horizontal-scroll-columns} variable, default 10
(@code{w3m-scroll-right}).

@item @kbd{.} (Lynx-like keymap)
@itemx @kbd{S-@key{left}} (Info-like keymap)
@kindex . (Lynx-like keymap)
@kindex S-@key{left} (Info-like keymap)
@findex w3m-shift-left
@vindex w3m-horizontal-shift-columns
Shift to the left (a fine level horizontal scrolling).  The shift step
is given by the @code{w3m-horizontal-shift-columns} variable, default 2
(@code{w3m-shift-left}).

@item @kbd{,} (Lynx-like keymap)
@itemx @kbd{S-@key{right}} (Info-like keymap)
@kindex , (Lynx-like keymap)
@kindex S-@key{right} (Info-like keymap)
@findex w3m-shift-right
@vindex w3m-horizontal-shift-columns
Shift to the right (a fine level horizontal scrolling).  The shift step
is given by the @code{w3m-horizontal-shift-columns} variable, default 2
(@code{w3m-shift-right}).

@item @kbd{M-l}
@kindex M-l
@findex w3m-horizontal-recenter
Scroll horizontally so that the current position is centered
(@code{w3m-horizontal-recenter}).
@end table

@c Moving
The @code{w3m-mode} major mode defines commands to move to various kinds
of things; namely links, forms, and images (whether they are displayed
or not).

Let's consider this simple example: suppose we want to search for a word
on the widely-known Google search engine.  Step one: open
@uref{http://www.google.com} in emacs-w3m.  Step two: once the page is
loaded, hit @kbd{]}.  Tadaa!  The point has moved to the first form
input in the page, you can now hit @kbd{@key{RET}} to enter something in
it, and then @w{@kbd{C-c C-c}} to submit.  Without this command, you
would have had to move into the page using @kbd{C-n}, @kbd{C-f} and so
forth, it would have been a real pain.

@table @asis
@item @kbd{@key{TAB}}
@itemx @kbd{@key{down}} (Lynx-like keymap only)
@kindex @key{TAB}
@kindex @key{down} (Lynx-like keymap)
@findex w3m-next-anchor
Move the point to the next link (an ``anchor'' in emacs-w3m lingo).
More strictly speaking, move the point forwards to the nearest anchor.

@item @kbd{M-@key{TAB}}
@itemx @kbd{S-@key{TAB}}
@itemx @kbd{@key{backtab}}
@itemx @kbd{@key{up}} (Lynx-like keymap only)
@kindex M-@key{TAB}
@kindex S-@key{TAB}
@kindex @key{backtab}
@kindex @key{up} (Lynx-like keymap)
@findex w3m-previous-anchor
Move the point to the previous anchor.  More strictly speaking, move the
point backwards to the nearest anchor (@code{w3m-previous-anchor}).

@item @kbd{]}
@kindex ]
@findex w3m-next-form
Move the point to the next form.  More strictly speaking, move the point
forwards to the nearest form (@code{w3m-next-form}).

@item @kbd{[}
@kindex [
@findex w3m-previous-form
Move the point to the previous form.  More strictly speaking, move the
point backwards to the nearest form (@code{w3m-previous-form}).

@item @kbd{@}}
@kindex @}
@findex w3m-next-image
Move the point to the next image.  More strictly speaking, move the
point forwards to the nearest image (@code{w3m-next-image}).

@item @kbd{@{}
@kindex @{
@findex w3m-previous-image
Move the point to the previous image.  More strictly speaking, move the
point backwards to the nearest image (@code{w3m-previous-image}).
@end table

@node Moving over pages
@subsection Moving from page to page

This section explains how to move from page to page, but not by
following links or inputing URLs (these ways of moving are explained in
@ref{Launching and Jumping}).

This includes commands to move backwards and forwards in history (the
familiar ``Back'' and ``Forward'' from other browsers), and the
obligatory ``Go to the home page'' feature.  You will probably
understand this better after reading the @ref{Tracing History} section.

@table @asis
@item @kbd{B} (Lynx-like keymap)
@itemx @kbd{@key{left}} (Lynx-like keymap)
@itemx @kbd{l} (Info-like keymap)
@itemx @kbd{p} (Info-like keymap)
@kindex B (Lynx-like keymap)
@kindex @key{left} (Lynx-like keymap)
@kindex l (Info-like keymap)
@kindex p (Info-like keymap)
@findex w3m-view-previous-page
Move back one page in history (@code{w3m-view-previous-page}).  With a
numeric argument ARG, move back ARG pages.  This is the preferred way to
go back in time.

@item @kbd{N} (Lynx-like keymap)
@itemx @kbd{n} (Info-like keymap)
@kindex N (Lynx-like keymap)
@kindex n (Info-like keymap)
@findex w3m-view-next-page
Move forward one page in history (@code{w3m-view-next-page}).  Of
course, this will work only if you've used @kbd{B} (@kbd{l} for the
@samp{Info-like} keymap) to move back in history.  If called with a
numeric argument ARG, move forward ARG pages. This command actually
allows you to go back to the future!

@item @kbd{H}
@kindex H
@findex w3m-gohome
@vindex w3m-quick-start
Move to the home page (@code{w3m-gohome}).  You can specify the URL of
the home page by customizing the @code{w3m-home-page} variable
(``about:'' by default).
@end table

These commands are exclusive features of emacs-w3m, we were able to
obtain patents on them, so you won't find them anywhere else.  That's
why you must learn to use them today!  (Just kidding.)

@table @asis
@item @kbd{^}
@itemx @kbd{u} (Info-like keymap only)
@kindex ^
@kindex u (Info-like keymap)
@findex w3m-view-parent-page
Attempt to move to the parent directory of the page currently displayed.
For instance, it will attempt to move to ``http://foo/bar/'' when
``http://foo/bar/baz'' is displayed.  This function has been implemented
because of the following observation: users of web browsers often have
to move up one level of directories because the information they're
looking for isn't displayed on the current page (either because it has
been deleted, or because a search engine took them to the wrong page).

When you use another web browser, you usually need to remove the last
component from the URL by using the @kbd{@key{DEL}} key, etc. several
times manually.  In emacs-w3m, this operation can be performed in only
one keystroke, by typing @kbd{^}!

Also, you type this command with prefix as ``2 ^'', you visit the upper
directory according to input number. you type ``0 ^'', you visit the top
of this site.
@end table

@table @asis
@item @kbd{@key{SPC}}
@kindex @key{SPC}
@findex w3m-scroll-up-or-next-url
When the current point is located at the end of the buffer and you
cannot scroll down further, hit the @kbd{@key{SPC}} key to go on to the
``next page'' (@code{w3m-scroll-up-or-next-url}).  Here, ``next page''
means the page referred to in the special ``next'' header of the current
page (read on).  This feature has nothing to do with the history.

You probably noticed that some websites split their contents over
several small pages, partly because it's not comfortable for users to
wait for huge contents to transfer in one go.  For example, search
results of search engines often appear like that.  On such sites, users
often need to follow links manually from one page to the next in order
the access all the information.

Hopefully emacs-w3m attempts to enable you to browse a series of
contents over pages as if you were viewing them as a single page, by
combining two operations: explicitly following links and scrolling.

That's how it works: these kinds of websites often have fields such as
``next'', ``prev'' or ``previous'' in the headers of their web pages.
These fields contain information about links between divided pages.
Emacs-w3m uses these fields to know what to follow.

Let's take an example with Google again to explain how the two
operations (following links and scrolling) are combined.  Open
@uref{http://www.google.com} and search for a word.  If you search for a
very common word (e.g. ``hamburger''), you will get tons of search
results.  Google returns the first page of search results, after having
sorted them using its own algorithm and divided them into several pages.
Use @kbd{@key{SPC}} to scroll through this first page.  Keep scrolling
until you see the end of the web page in the window.  Here, a surprise
is waiting for you.  If you use a web browser other than emacs-w3m and
want to see the rest of the search results, you would have to click on
any of the numbers listed under

@example
Gooooooogle
@end example

@example
1 2 3 4 5 6 7 8...
@end example

to follow the link.  But with emacs-w3m, you can follow the link by just
typing @kbd{@key{SPC}}, just as if you were scrolling!

@item @kbd{@key{DEL}}
@itemx @kbd{b}
@itemx @kbd{@key{backspace}}
@itemx @kbd{S-@key{SPC}}
@itemx @kbd{C-?}
@kindex @key{DEL}
@kindex b
@kindex @key{backspace}
@kindex S-@key{SPC}
@kindex C-?
@findex w3m-scroll-down-or-previous-url
When the point is located at the beginning of the buffer and you cannot
scroll upward, hit the @kbd{@key{DEL}} to go to the ``previous'' page
(@code{w3m-scroll-down-or-previous-url}).  Here, the ``previous'' page
means the page which is assigned to the ``prev'' or ``previous'' fields
in the header of the current page.  This function has nothing to do with
the history, and works like @kbd{@key{SPC}} (w3m-scroll-up-or-next-url).
@end table

@node Browsing with Mouse Operations
@subsection Surfing using the mouse

The emacs-w3m developers went to some trouble to ensure that normal
people who aren't Emacs otaku can also use emacs-w3m.  You can perform
most web browsing operations using only the mouse except for entering
text, e.g. URL, forms, etc.  Note that sometimes you might still need to
use modifier keys since the emacs-w3m developers are all Emacs
otaku@dots{}

Use @kbd{mouse-2} to ``follow links'' (the first basic of web browsing).
Under Emacs 22.1 and newer, you can also follow links using
@kbd{mouse-1}, depending of the value of
@code{mouse-1-click-follows-link}.

@table @kbd
@item mouse-2
@kindex mouse-2
@findex w3m-mouse-view-this-url
Follow the link under the mouse pointer
(@code{w3m-mouse-view-this-url}).

@item S-@key{mouse-2}
@kindex S-@key{mouse-2}
@findex w3m-mouse-view-this-url-new-session
Follow the link under the mouse pointer in a new session
(@code{w3m-mouse-view-this-url-new-session}).
@end table

Scrollbar, menubar and toolbar are helpful in emacs-w3m when you use a
mouse (your Emacs must support them, and you must have enabled them).
You can scroll an emacs-w3m window using the scrollbar.  You can invoke
many emacs-w3m commands described in this manual from the ``w3m'' menu
which appears at the top of the Emacs frame.  Note: it's not necessary
to use the menubar for most emacs-w3m commands, you can use the toolbar
icons instead.

To switch between buffers in an emacs-w3m window using ``Tabs''
(@pxref{Using Tabs}), click on the topmost line in an emacs-w3m window
directory using @kbd{mouse-2} or choose one from the ``Tab'' menu which
appears next but one to the ``w3m'' menu.

@node Going Back to Daily Hacking and/or Daily Writing
@subsection Return to an Ordinary Life

Think back.  You probably didn't start Emacs to browse the web, but to,
say, replace some editor's built-in interpreter with scheme, write Info
documentation or put into print your opinion on software patents@dots{}
who knows?  While you were using Emacs, you ran into the need to browse
the web for your work.  But you happened to be able to see the web page
without leaving Emacs at all.  Wow.

Now the time has come to return to work.  Keep it up or the world won't
change!  Type @kbd{q} if you think you might need to browse the web
again.  Type @kbd{Q} if you don't have any intention to go back to
emacs-w3m for a while.

@table @kbd
@item q
@kindex q
@findex w3m-close-window
Close an emacs-w3m window and select the other buffer
(@code{w3m-close-window}).

@item Q
@kindex Q
@findex w3m-quit
Save the ``arrived URLs'' list to disk (@pxref{Tracing History}), save
cookies (@pxref{Cookie Variables}) and really quit emacs-w3m
(@code{w3m-quit}).
@end table

@node Inline Images
@section Toggle displaying inline images
@cindex Displaying images

If the Emacs version you're using is capable of displaying images in
buffers, then emacs-w3m can display them in web pages, just like
``graphical'' browsers like Mozilla do.  You should make sure your Emacs
is correctly setup for images before trying to use any of the following
commands (@pxref{Required Emacs Version}).

To toggle displaying of images in the current buffer, use @kbd{T}
(@kbd{I} for the @samp{Info-like} keymap).  It makes emacs-w3m fetch the
images from the server, then display them in the buffer, at the position
they would have in a ``graphical'' browser. If you hit the key again,
images will disappear from the buffer.

By default, emacs-w3m won't display images, but you can change its
behavior and choose to always display images, for this you need to
customize the @code{w3m-default-display-inline-images} variable and
change its value from @code{nil} to @code{t}.  @xref{Customizable
Variables}.

Emacs-w3m also comes with nifty features that let you zoom an image in
or out, save it to a file, or view it in a external viewer.  See also
@ref{Moving in a page} for instructions on how to move from image to
image in an emacs-w3m buffer.

@table @asis
@item @kbd{T} (Lynx-like keymap)
@itemx @kbd{I} (Info-like keymap)
@kindex T (Lynx-like keymap)
@kindex I (Info-like keymap)
@findex w3m-toggle-inline-images
Toggle displaying of all the inline images in this buffer
(@code{w3m-toggle-inline-images}).  If and only if
@code{transient-mark-mode} is turned on and the region is active, only
the images within the region will be turned on.

Note1: whether to display inline images in a page from the start when
you first visit the page is controlled by the value of the variable
@code{w3m-default-display-inline-images} (the default is off) as
mentioned above.  But the visibility of images in pages that you visit
from this buffer inherits the last status of the visibility in this
buffer if @code{w3m-toggle-inline-images-permanently} is non-@code{nil}
(default=@code{t}).  If @code{w3m-toggle-inline-images-permanently} is
@code{nil}, @code{w3m-default-display-inline-images} always controls it.

Note2: this command deactivates the region, so you have to set it again
if you want to turn on only the images in a certain area again.

@item @kbd{t} (Lynx-like keymap)
@itemx @kbd{i} (Info-like keymap)
@kindex t (Lynx-like keymap)
@kindex i (Info-like keymap)
@findex w3m-toggle-inline-image
Toggle displaying of the single inline image under the cursor
(@code{w3m-toggle-inline-image}).  If and only if
@code{transient-mark-mode} is turned on and the region is active, only
the images within the region will be turned on.  For the @samp{Info-like
keymap}, this key is bound to the command (@code{w3m-view-image}) that
launches the external viewer if Emacs does not support displaying
images.

@item @kbd{M-S-t} (Lynx-like keymap)
@itemx @kbd{M-S-i} (Info-like keymap)
@kindex M-T (Lynx-like keymap)
@kindex M-I (Info-like keymap)
@findex w3m-turnoff-inline-images
Turn off displaying of all the inline images in this buffer.
(@code{w3m-turnoff-inline-images}).

@item @kbd{I} (Lynx-like keymap)
@kindex I (Lynx-like keymap)
@findex w3m-view-image
@cindex Viewing images
View the image under point in an external viewer
(@code{w3m-view-image}).

@item @kbd{M-i}
@kindex M-i
@findex w3m-save-image
@cindex Saving images
Save the image under point to an external file.  The default name will
be the original name of the image, so most of the time
@w{@kbd{M-i @key{RET}}} will save the image with the right name
(@code{w3m-save-image}).

@cindex Zooming images
@item @kbd{M-[}
@kindex M-[
@findex w3m-zoom-out-image
Zoom out the image under point (@code{w3m-zoom-out-image}).

@item @kbd{M-]}
@kindex M-]
@findex w3m-zoom-in-image
Zoom in the image under point (@code{w3m-zoom-in-image}).
@end table

@node Tracing History
@section Going back through time and space
@cindex Browsing history
@cindex Arrived URLs

Emacs-w3m has several ways to present you with a list of all the pages
you visited before.  The first way is simply called the ``emacs-w3m
history'', it is a list of the pages you visited in this session,
presented hierarchically, that is: when you follow a link, the page
you're leaving becomes the ``parent'' of the page you're going to.  It
is a very nice to keep track of the pages you visited, and remember
from where you came if the history gets too long.

Here is an example of this feature in action, after a short visit to the
GNU Project's homepage:

@example
GNU's Not Unix! - the GNU Project and the Free Software Foundation (FSF)
  Philosophy of the GNU Project - Free Software Foundation (FSF)
    GNU Emacs - GNU Project - Free Software Foundation (FSF)
     Order from the Free Software Foundation (FSF)
  Links to Other Free Software Sites - GNU Project - Free Software Fo...
    EFF: Homepage
@end example

(In fact, this example is slightly edited to fit in 72 columns; the
URLs won't be cut in the actual emacs-w3m buffer.)

You can get this kind of history using the @kbd{s} key (the @kbd{o} key
for the @samp{Info-like} keymap) in any emacs-w3m buffer.

Please note that this history is buffer-local, i.e. specific to an
emacs-w3m buffer.  But emacs-w3m has a unique feature: when you visit a
new page, the history is copied over to the new buffer, so that you can
still access the pages you visited so far.  This is different from the
way Mozilla and others work; in these browsers the history always starts
from scratch in new buffers.

Emacs-w3m can do more than just record which pages you visited, it can
also save specific locations in those pages, in case you want to go back
to the exact same place in the page.  Press @w{@kbd{C-c C-@@}}, and the
location of the cursor will be stored in history.  In order to go back
to that particular location within the page, press @w{@kbd{C-c C-v}} in
the emacs-w3m buffer visiting the page.

@table @asis
@item @kbd{s} (Lynx-like keymap)
@itemx @kbd{C-u s} (Lynx-like keymap)
@itemx @kbd{o} (Info-like keymap)
@itemx @kbd{C-u o} (Info-like keymap)
@kindex s (Lynx-like keymap)
@kindex C-u s (Lynx-like keymap)
@kindex o (Info-like keymap)
@kindex C-u o (Info-like keymap)
@findex w3m-history
Display the list of URLs visited in this session.  If called with a
prefix argument (see below), show the list of arrived URLs instead
(@code{w3m-history}).

@item @kbd{C-c C-@@}
@itemx @kbd{C-c C-@key{SPC}}
@kindex C-c C-@@
@kindex C-c C-@key{SPC}
@findex w3m-history-store-position
Record the position of the cursor in the page in history.

@item @kbd{C-c C-v}
@kindex C-c C-v
@findex w3m-history-restore-position
Move to the position which has been marked with @w{@kbd{C-c C-@@}}
(@code{w3m-history-store-position}) in the currently displayed page.
@end table

The other way to have information about past pages is the ``arrived
URLs'' list: it is a list of the last 500 URLs you have visited in
emacs-w3m.  The list is ordered by date, the most recent coming first,
and for each page the time of visit is displayed.  Here's an example
(edited):

@example
Order from the Free Software Foundation (FSF)             22:53:25
GNU Emacs - GNU Project - Free Software Foundation (FS    22:53:05
Philosophy of the GNU Project - Free Software Foundati... 22:52:46
Philosophy of the GNU Project - Free Software Foundati... 22:52:39
EFF: Homepage                                             22:52:18
Links to Other Free Software Sites - GNU Project - Fre... 22:52:07
Links to Other Free Software Sites - GNU Project - Fre... 22:52:07
GNU's Not Unix! - the GNU Project and the Free Softwar... 22:51:32
Bookmarks                                                 22:51:02
The DICT Development Group- upwards                       2003-01-08
the monkey puzzle: new debian packages as an rss feed     2003-01-08
new-debian-packages.rss                                   2003-01-07
it's a miracle                                            2003-01-06
@end example

You can get this history by passing a prefix argument to the previous
command, i.e. using @w{@kbd{C-u s}} (@w{@kbd{C-u o}} for the
@samp{Info-like} keymap).  The number of URLs showed in this page is
customizable, see the @code{w3m-keep-arrived-urls} variable.  It cannot
exceed 500 by default.  @xref{Customizable Variables}.

Of course, in all cases all the lines showed in the examples are links,
you can go to any of the pages you visited previously just like if you
were visiting a regular page, by following the link.

Also see the @ref{Moving over pages} section, it explains how to move in
the history with simple keybindings, i.e. the ``Back'' and ``Next''
features.

@node Managing Bookmarks
@section That's a favorite with me!
@cindex Bookmarks

Like all modern browsers, emacs-w3m has advanced features related to
bookmarks: it lets you classify them in categories, edit them and of
course, browse them easily.

@menu
* Adding Bookmarks::            Adding a URL to your favorites
* Consulting Bookmarks::        Browse your bookmarks
* Editing Bookmarks::           How to change your bookmarks
@end menu

@node Adding Bookmarks
@subsection Adding a URL to your favorites
@cindex Adding a bookmark
@kindex a
@kindex C-u a
@findex w3m-bookmark-add-current-url
@kindex M-a
@findex w3m-bookmark-add-this-url

There are several ways to add a URL to your bookmarks.  The first one is
to use the @kbd{a} key (or call the @code{w3m-bookmark-add-current-url}
command) to add the page you're currently browsing: it will prompt you
for a section to where the bookmark should go (completion is available
with the @kbd{@key{TAB}} key) and will let you edit the title of the
bookmark (the default being the title of the current page).  Complete
these two steps, validating each with @kbd{@key{RET}}, and you will see
the message ``Added'' in the minibuffer, which means (surprise!) that
the page has been added to your bookmarks.

Another way to add a bookmark is to use the @kbd{M-a} key (or call the
@code{w3m-bookmark-add-this-url} command): it adds the URL under point
(that means, the URL you would be taken to if you followed the link) to
the bookmarks.  As before, you will have to input the section for this
bookmark and its title, the default being this time the name of the
link itself.

The third and final way to do this is to use @w{@kbd{C-u a}}, this time
you will be prompted for the URL to add, its section, and the title to
use for it in the bookmarks.

@table @kbd
@item a
Add the current page to the bookmarks, or if called with a prefix
argument, prompt for a URL and add it
(@code{w3m-bookmark-add-current-url}).

@item M-a
Add the URL under point to the bookmarks
(@code{w3m-bookmark-add-this-url}).
@end table

@node Consulting Bookmarks
@subsection Browse your bookmarks
@cindex Consulting bookmarks
@kindex v
@findex w3m-bookmark-view

The easiest way to see the bookmarks is to use the @kbd{v} key in an
emacs-w3m buffer; another possibility is to go to the special URL
@uref{about://bookmark/}.  You will see your bookmarks, organized by
section, each line being one bookmark.  You can browse them exactly
like you would browse any other page.

On the bookmarks page a w3m minor mode is activated, the bookmark mode.
It adds key bindings to edit the bookmarks.  @xref{Editing Bookmarks}.

@table @kbd
@item v
Visit the bookmarks page (@code{w3m-bookmark-view}).
@end table

@node Editing Bookmarks
@subsection How to change your bookmarks
@cindex Editing bookmarks

The bookmark minor mode (@pxref{Consulting Bookmarks}) offers several
key bindings related to bookmark edition, most noticeably @kbd{C-k} to
kill (i.e. delete) a bookmark, and @kbd{E} (@kbd{e} for the
@samp{Info-like} keymap) to edit the bookmark file.

Bookmarks are kept in an HTML file, so you can edit the file by hand,
but be very careful: if you erase the comments emacs-w3m needs to
recognize section names, things can break easily.  If you know the
basics of HTML, the file should otherwise be quite self-explanatory.

@table @kbd
@item C-k
@findex w3m-bookmark-kill-entry
Kill the bookmark under point (@code{w3m-bookmark-kill-entry}).

@item E
@findex w3m-bookmark-edit
Visit the bookmarks file (@code{w3m-bookmark-edit}).

@item C-_
@findex w3m-bookmark-undo
Undo the last changes (@code{w3m-bookmark-undo}).
@end table

@node Using Tabs
@section Everybody likes tabs

Unlike most other text-based browsers, emacs-w3m has support for tabbed
browsing.  What is tabbed browsing, you might ask?  It's very simple: it
is a way to represent all active emacs-w3m buffers in a single window,
by showing a line at the top which shows all the buffers in a simple and
self-explaining way, each buffer being shown as a ``tab''.  This line
stays visible all the time and does not scroll with the rest of the
buffer, so that you can switch to another buffer, or use the feedback it
provides at any moment.

The easiest way to get the feeling of it is to just try, so go on and
open an emacs-w3m session.  If you didn't change anything to the
configuration, the tabs line is active by default, it is this bright
line at the top with a smaller rectangle that shows the title of the
current page.  Now create another w3m buffer (with @kbd{G}, for
example): now you have two of these rectangles.  These are tabs.

The most obvious use of tabs is switching: by clicking with the
@kbd{mouse-1} button on a tab, you make the buffer it represents active.
It also works with the @kbd{mouse-2} button, or with rolling the mouse
wheel if you are using GNU Emacs.  It's a very quick and easy way to
work with several emacs-w3m buffers, you just have to point and click,
or to roll the mouse wheel.  (Yeah yeah, I hear you.  You want to switch
using the keyboard.  Don't worry, it's also possible.  It's explained in
the next section.  Now keep quiet and read on!)

Another nifty feature is the feedback it provides.  If you are on a
color terminal or window system, emacs-w3m shows the text in the tab in
different colors to show the status of the page@footnote{Although XEmacs
shows all tabs in the same colors at every moment, you can easily
distinguish the selected tab and others and see the status of the
current page in the modeline.}.  For example, when the page is being
loaded, the text is in red, and goes back to its default color (usually
black) when the loading is complete.  This way you can tell with a
single glance at the tabs line if the page you're waiting for has
arrived or not.

Finally, if the web page provides a favicon, it will be shown in the
tab as well@footnote{Under XEmacs, favicons will currently not be shown
in the tabs line.}.  More eye-candy for the emacs-w3m user!

User options:

@table @code
@item w3m-use-tab
@vindex w3m-use-tab
Whether to activate tabbed browsing or not.
@end table

If you are a GNU Emacs user, the mouse wheel allows you not only to go
to an adjacent buffer but also to move a buffer to the adjacent place.
To do that, press and hold down the control key while you roll the mouse
wheel on the tabs line.  There are two variables that control how
emacs-w3m behaves by the mouse wheel:

@table @code
@item w3m-tab-track-mouse
@vindex w3m-tab-track-mouse
This variable controls whether to make the mouse track the selected tab.
The default value is @code{t}.  You may want to set this to @code{nil}
if you use a proportional font for the tab faces.  See also
@code{w3m-tab-mouse-position-adjuster}.

@item w3m-tab-mouse-position-adjuster
@vindex w3m-tab-mouse-position-adjuster
This variable contains the values used to adjust the mouse position on
tabs when the mouse pointer tracks the selected tab.  The default value
is @code{(0.5 . -4)}.  It consists of the cons of a floating point
number @var{m} and an integer @var{n} that are applied to calculating of
the mouse position, which is given in pixel units, as follows:

@example
(TAB_WIDTH + M) * ORDER + N
@end example

Where @var{tab_width} is the pixel width of a tab and @var{order} is the
order number in tabs.  The result is rounded towards zero.

Note that the calculation will always fail if you use a proportional
font for the tab faces.  See also @code{w3m-tab-track-mouse}.
@end table

@node Working with buffers
@section Creating, killing and moving across buffers

Sooner or later, you will be addicted to emacs-w3m, and you'll have to
manage all your browsing needs with it.  To help you with this daunting
task, we have imagined many different ways to work with emacs-w3m
buffers.

@menu
* Creating and killing buffers:: Creating and killing buffers
* Moving across buffers::        Moving across buffers
* Selecting buffers::            Selecting buffers from a list
@end menu

@node Creating and killing buffers
@subsection Creating and killing buffers
@cindex Creating new buffers
@cindex Killing buffers

It is sometimes useful to just create a new buffer without opening a web
page in it.  This operation is called ``creating a twin copy'' of a
buffer, in emacs-w3m lingo.  It will simply create a new buffer whose
contents are identical to the currently active buffer.

The opposite of this is closing buffers: you can just close one buffer
(because you're not interested in its contents anymore) or you can
decide to close all buffers but the current one.  Emacs-w3m lets you do
this with the following commands:

@table @kbd
@item C-c C-t
@itemx M-n
@kindex C-c C-t
@kindex M-n
@findex w3m-copy-buffer
Create an identical copy of the currently active buffer, under a new
name.  This is used to start a new session without loading a web page in
the new buffer (@code{w3m-copy-buffer}).

@item C-c C-w
@kindex C-c C-w
@findex w3m-delete-buffer
Close the current emacs-w3m buffer (@code{w3m-delete-buffer}).

@item C-c M-w
@kindex C-c M-w
@findex w3m-delete-other-buffers
Close all emacs-w3m buffers, but the active one
(@code{w3m-delete-other-buffers}).
@end table

@node Moving across buffers
@subsection Moving across buffers

The commands you will probably use most often are those who allow you
to go to an adjacent buffer; that is a buffer just ``after'' or
``before'' the current one.  The meaning of this will be obvious if you
use tabs: the next buffer is the one just after the active one, on the
right, and the previous buffer is the one on the left.  However, XEmacs
displays tabs in random order unfortunately, so you need to pay
attention to the number which is displayed in each tab in order to know
what is the adjacent buffer if you are using XEmacs.  The key bindings
for these commands are @w{@kbd{C-c C-p}} and @w{@kbd{C-c C-n}}.

These commands understand the numeric argument convention, i.e. if you
call them with a number N as argument, you will be taken N buffers away
from the current one.  For example, to go two buffers on the right from
the current position, use @w{@kbd{2 C-c C-n}}@footnote{You can use
@w{@kbd{C-u 2 C-c C-n}} instead of @w{@kbd{2 C-c C-n}} as usual.  But
keep in mind all numeric keys and minus-sign are assigned to the numeric
prefix arguments in emacs-w3m buffers.}.

@table @kbd
@item C-c C-p
@kindex C-c C-p
@findex w3m-previous-buffer
Move to the previous emacs-w3m buffer.  This is usually the next buffer
to the left in the tabs line.  If called with a numeric argument N, move
N buffers to the previous (@code{w3m-previous-buffer}).

@item C-c C-n
@kindex C-c C-n
@findex w3m-next-buffer
Move to the next emacs-w3m buffer.  This is usually the next buffer to
the right in the tabs line.  If called with a numeric argument N, move N
buffers to the next (@code{w3m-next-buffer}).
@end table

If you are a GNU Emacs user, you can also move an emacs-w3m buffer to
the adjacent place on the tabs line using the following commands:

@table @kbd
@item C-c C-.
@itemx C-c C->
@findex w3m-tab-move-right
Move the selected emacs-w3m buffer to the right hand adjacent place on
the tabs line.  If called with a numeric argument N, move N tabs to the
right (@code{w3m-tab-move-right}).

@item C-c C-,
@itemx C-c C-<
@findex w3m-tab-move-left
Move the selected emacs-w3m buffer to the left hand adjacent place on
the tabs line.  If called with a numeric argument N, move N tabs to the
left (@code{w3m-tab-move-left}).
@end table

Also note that if these commands don't fit you well despite our efforts,
you might find what you need in ``generalist'' buffer management
packages such as ibuffer or iswitchb---since emacs-w3m buffers are
regular Emacs buffers, they will work fine too.

@node Selecting buffers
@subsection Selecting buffers from a list

There are two ways to select emacs-w3m buffers from a list.  The first
one is a minibuffer-based interface, called with @w{@kbd{C-c C-a}}.  You
can choose the buffer you want to display using the @kbd{M-p} and
@kbd{M-n} keys (or the @key{up} and @key{down} arrow keys), they will
make you cycle through the list.  You can also edit the prompt and type
the title of an existing web page, using @kbd{@key{TAB}} for completion.
For example, if you have a ``Google Search'' page opened, you can type
``Goo'' then hit @kbd{@key{TAB}} and the page title will be completed.
After the page name, the buffer name is given (between brackets).  Then
use @kbd{@key{RET}} to switch to the buffer you have chosen.

The second and more sophisticated interface is called the emacs-w3m
buffer list, it is invoked with @w{@kbd{C-c C-s}}.  It shows you the
list of all opened buffers in a separate window (either a vertical or a
horizontal window---@w{@kbd{C-c C-s}} toggles between the two modes) and
allows you to view the buffers in real-time: when you move the point in
the buffer list, the buffer under point is displayed in the main window,
which allows you to have direct visual feedback of the buffer you're
switching to.

To move in the buffer list, you can use the @kbd{p} and @kbd{n} keys
(or the arrow keys).  In the buffer list, @kbd{@key{DEL}} and
@kbd{@key{SPC}} allow you to scroll the buffer displayed in the main
window, which is handy if you want to check that you're seeing the right
buffer.  To select the buffer under point, you can use the
@kbd{@key{RET}} key, in which case the buffer list will be buried, or
the @kbd{w} key, in which case the buffer list will remain visible and
the focus given to the main window.

You can also close and create buffers from this menu, using the same
bindings as the one used in regular buffers (@pxref{Creating and killing
buffers}).

Finally, the @kbd{?} key shows a short help, @kbd{g} refreshes the list
and the @kbd{q} key exits the buffer list, not changing the active
buffer.

@table @kbd
@item C-c C-a
@kindex C-c C-a
@findex w3m-switch-buffer
@cindex Switching buffers using the minibuffer
Prompt for a buffer name in the minibuffer.  @kbd{M-p} and @kbd{M-n}
cycle through the list of existing buffers and @kbd{@key{TAB}} completes
(@code{w3m-switch-buffer}).

@item C-c C-s
@kindex C-c C-s
@findex w3m-select-buffer
@cindex Switching buffers using the buffer list
Show the buffer list in a separate window (@code{w3m-select-buffer}).
In this window, @w{@kbd{C-c C-s}} toggles between horizontal and
vertical modes, @kbd{@key{RET}} selects the buffer under point and
buries the buffer list, @kbd{w} selects the buffer under point and gives
it the focus, @kbd{n}, @kbd{p} and the arrow keys can be used to move
down or up.
@end table

@node Downloading
@section Downloading a file
@cindex Downloading files

It is possible to download (i.e. fetch, but not display) any web page or
file with emacs-w3m: just put the point on the link you want to
download and hit @kbd{d}.  You will be prompted for a filename under
which to save the file locally, by default it will be the name of the
file on the remote server.  Confirm with @kbd{@key{RET}}.  The download
will be asynchronous and not block your Emacs session, you can continue
your emacs-w3m browsing in another buffer if you want.

Please note that this download mechanism uses w3m to download things,
you might want to use the more powerful wget downloader instead.  Have a
look at our friend project ``emacs-wget'', its homepage is at
@uref{http://pop-club.hp.infoseek.co.jp/emacs/emacs-wget/}.

@table @asis
@item @kbd{d} (Lynx-like keymap)
@itemx @kbd{D} (Info-like keymap)
@kindex d (Lynx-like keymap)
@kindex D (Info-like keymap)
@findex w3m-download-this-url
Download the file or the page pointed to by the link under point
(@code{w3m-download-this-url}).

@item @kbd{M-d} (Lynx-like keymap)
@itemx @kbd{d} (Info-like keymap)
@kindex M-d (Lynx-like keymap)
@kindex d (Info-like keymap)
@findex w3m-download
Download the contents of URL to a local file (@code{w3m-download}).  You
will be prompted for the URL and the name of a local file.
@end table

@node Submitting Forms
@section Filling in HTML forms

These emacs-w3m commands let you move between forms and fill in fields,
using simple key bindings and optionally prompting you for values in
Emacs windows or in the minibuffer.

The main key binding to remember is @kbd{@key{RET}}.  It has different
meanings, depending on the thing under point: for textareas, you will be
prompted for a value in the minibuffer.  For select tags, you will be
given a list of choices in an electric Emacs window (you can move using
the arrow keys, and pick one with the @kbd{@key{RET}} key).  For radio
and checkbox buttons, the @kbd{@key{RET}} key selects one of the
elements.

When in the minibuffer or in the electric window, you can cancel with
the @w{@kbd{C-c C-q}} sequence.  To submit the form, use
@w{@kbd{C-c C-c}}.

@table @asis
@item @kbd{]}
Jump to the next form (@code{w3m-next-form}).

@item @kbd{[}
Jump to the previous form (@code{w3m-previous-form}).

@item @kbd{C-c C-c}
Submit form at point (@code{w3m-submit-form}).

@item @kbd{@key{RET}}
Edit the value of the form item under point.

@item @kbd{@key{RET}} @r{(w3m-form-*-keymap)}
Accept the value.

@item @kbd{C-c C-q} @r{(w3m-form-*-keymap)}
Quit editing the form item, leaving changes.
@end table

Unless @code{w3m-form-use-textarea-backup} is set to @code{nil},
emacs-w3m stores the text you input in textareas in backup files for
later reuse.  When you start editing a form and there is backup text
available, you will be asked whether you want to use it or not.  Files
to save text are stored in the directory specified by the
@code{w3m-form-textarea-directory} variable.

@node HTML File Information
@section Support for web page editing and hacking

For those who usually use Emacs to write documentation or programs, it's
very convenient to be able to browse the web in the same Emacs session.
For example, if you are editing a HTML file in Emacs, you can preview it
without launching an external browser.  You can also quickly copy sample
code from technical documentation during a programming marathon@dots{}

How about the opposite?  (That is, being able to edit the source of a
web page in a web browser.)  Wouldn't that be cool?  Imagine you found
an error in your document after previewing it in emacs-w3m; you probably
want to fix it right away.  Or if you are a programmer specialized in
web technology, sometimes you might want to see the raw HTML file for
the current web page@dots{} especially if you are the author of a
Shimbun module (@pxref{Shimbun Basics}).

It is usually possible to switch to an Emacs buffer visiting an HTML
file by using the buffer name, but emacs-w3m adds a specific keybinding
for this.  Emacs-w3m knows the URL of the web page it is visiting, so
why not take advantage of this?

@table @asis
@item @kbd{\}
@kindex \
@findex w3m-view-source
Display the current web page in the raw HTML
format(@code{w3m-view-source}).

@item @kbd{=}
@kindex =
@findex w3m-view-header
Show the information about currently displayed web page. It includes
title, URL, document type, last modified date(@code{w3m-view-header}).

@item @kbd{E} (Lynx-like keymap)
@itemx @kbd{e} (Info-like keymap)
@kindex E (Lynx-like keymap)
@kindex e (Info-like keymap)
@findex w3m-edit-current-url
Edit the local file pointed by URL of current
page(@code{w3m-edit-current-url}).

@item @kbd{e} (Lynx-like keymap)
@itemx @kbd{E} (Info-like keymap)
@kindex e (Lynx-like keymap)
@kindex E (Info-like keymap)
@findex w3m-edit-this-url
Edit the local file pointed by URL under
point(@code{w3m-edit-this-url}).

@item @kbd{M}
@kindex M
@findex w3m-view-url-with-external-browser
Launch an external browser (other than emacs-w3m) and display the same
web page as currently displayed in
emacs-w3m(@code{w3m-view-url-with-external-browser}).  The external
browser to be used is defined by the variable
@code{w3m-content-type-alist}, depending on the kind of URL.

@item @kbd{|}
@kindex |
@findex w3m-pipe-source
Pipe the source of the web page to a command.  You will be prompted for
the command (@code{w3m-pipe-source}).
@end table

The (@pxref{Tips}) section gives more examples on how to integrate
emacs-w3m with other commands and Emacs subsystems.

@node Pretty Good Features
@chapter Pretty good features

@menu
* Using Search Engines::        Convenient ways to search the web
* Grouping URLs::               Visiting several web pages in one URL
* Weather Information::         It will be fine tomorrow
* Using Antenna::               Raise your antenna
* Showing Directory Tree::      Showing the tree structure of local directories
* Viewing Perl Documents::      Viewing Perl Documents
* Using Namazu::                Searching files with Namazu
* Octet::                       Viewing data in various octal form
* Frame Local Buffers::         Grouping sessions into separate frames
* Session Manager::             Saving and loading sessions
@end menu

@node Using Search Engines
@section Convenient ways to search the web
@cindex Search engines

Emacs-w3m comes with advanced features related to search engines, they
are accessible through three interfaces:

@itemize
@item
The regular search interface, invoked by the @kbd{S} key (the @kbd{s}
key for the @samp{Info-like} keymap) in any emacs-w3m buffer.  It is a
simple interactive way to choose which search engine to use and input a
search term; see @ref{The Search Interface}.

@item
The Quicksearch interface: it is a faster (yet more complicated) way to
use search engines, by going to specially crafted URLs.  For more
information about this feature, see @ref{Quick Searching}.

@item
The ``I'm feeling lucky'' feature: if it's enabled
(@code{w3m-enable-google-feeling-lucky}), entering words instead of a
regular URL at the URL prompt will begin a Google search for the words
automatically, and display the most relevant result.  This is useful if
you actually want to fetch the most relevant page, it does not display a
list of search results.
@end itemize

@menu
* The Search Interface::        How to search with emacs-w3m
* Quick Searching::             An alternative (and fast) way to search the web
* Adding New Search Engines::   Using your favorite engines
@end menu

@node The Search Interface
@subsection How to search with emacs-w3m
@cindex Searching

You can fire up the regular search interface by using the @kbd{S} key
(the @kbd{s} key for the @samp{Info-like} keymap) in an emacs-w3m
buffer.  You will see a prompt in the minibuffer, asking for a search
term.  Type one or several words at the prompt, then hit
@kbd{@key{RET}}.  The result page of your search in the engine appears,
you can then browse the results, just as if you had used the normal web
based entry point to the engine.

You probably noticed that you have not been given a chance to choose
which engine you want to search with.  By default, emacs-w3m will use
the Google search engine, you can change this behavior by customizing
the @code{w3m-search-default-engine} variable (see @ref{Customizable
Variables}), or you can specify the search engine each time you use the
command.

To specify which engine to use, you have to give the command a prefix
argument (usually, this means hitting @kbd{C-u} before the command,
e.g. @w{@kbd{C-u S}} (@w{@kbd{C-u s}} for the @samp{Info-like} keymap).
Emacs-w3m will prompt you for an engine, you can choose one by typing
its name (completion is also available with the @kbd{@key{TAB}} key).
Once you have made your choice, hit the @kbd{@key{RET}} key.  You can
then type your search term, hit @kbd{@key{RET}}, and you will see the
search results.

@table @asis
@item @kbd{S} (Lynx-like keymap)
@itemx @kbd{s} (Info-like keymap)
@kindex S (Lynx-like keymap)
@kindex s (Info-like keymap)
@findex w3m-search
@vindex w3m-search-default-engine
Begin a new search.  If called with a prefix argument, prompt for the
engine to use (@code{w3m-search}).
@end table

@node Quick Searching
@subsection An alternative (and fast) way to search the web
@cindex Quick Searching
@cindex Special URLs
@vindex w3m-uri-replace-alist
@vindex w3m-search-engine-alist
@vindex w3m-default-coding-system

If you're a ``Web Power User'' (and since you're reading this, you
probably are), you need a quick and efficient way to perform searches.
The Quick Searching feature is one.

What does it do?  It lets you launch web searches by simply going to a
special URL such as @uref{gg:emacs}.  The advantages of this mode of
operation are:

@itemize
@item
It's fast.  You just have to type a URL to choose the engine and the
search word(s), in one go.

@item
It's convenient.  With this feature, you can easily open a new emacs-w3m
tab or window, and launch a search in it, using for example, the @kbd{G}
key to open a URL in a new window, and going to a Quicksearch URL.  You
can also bookmark searches just by bookmarking the special Quicksearch
URL.

@item
It works with the grouping feature.  You can launch two searches at the
same time, with a URL like @uref{group:gg:emacs&ya:w3m}.  This would
for instance launch a search for ``emacs'' on Google and for ``w3m'' on
Yahoo!.  @xref{Grouping URLs}.
@end itemize

Using it is very simple: suppose you want to search for the word ``gnu''
on Google and get a list of results.  Hit @kbd{g} to go to a new URL,
and type ``gg:gnu''.  The first part of this expression, ``gg''
indicates that we want to use the Google search engine.  The second term
is the word we will be searching for.  The prefix and the search term
must be separated by a colon.  Hit @kbd{@key{RET}}, and you will see the
results of your search.  Note that you can input several words by
separating them with spaces.  @kbd{@key{SPC}} is a self-inserting key in
the minibuffer if the ``Feeling Lucky'' feature is enabled (it is by
default; see @code{w3m-enable-google-feeling-lucky}).  If it's disabled,
then hit @kbd{C-q} first, i.e. @w{@kbd{C-q @key{SPC}}}.

The default configuration of emacs-w3m includes several prefixes you can
use, they are defined in the @code{w3m-uri-replace-alist} variable.
There's for example ``gg'' for Google, ``ggg'' for Google Groups, ``ya''
for Yahoo!, ``al'' for Altavista, ``alc'' for Eijirou on the web to name
a few.  You can also add prefixes for the search engines you define,
@xref{Adding New Search Engines}.

Instead of prefixes, you can also use full engine names in Quicksearch
URLs, such as ``google'' or ``yahoo''.  These names are defined in
the @code{w3m-search-engine-alist} variable.

@node Adding New Search Engines
@subsection Using your favorite engines
@cindex Adding new search engines

Emacs-w3m has a number of built-in search engines you can use.  What if
you want to use your favorite search engine and it's not listed in the
known search engines?  You have to add it to the list of search
engines, and it's quite easy:

@enumerate
@item
First, you have to find what's the entry point of the search engine you
want to add, for example:

@uref{http://my.searchengine.com/?query=foobar}

where foobar is the term you want to search for.

@item
Once you have this information, add this to your @file{~/.emacs-w3m}
file:

@lisp
(eval-after-load "w3m-search"
  '(add-to-list 'w3m-search-engine-alist
                '("My engine"
                  "http://my.searchengine.com/?query=%s"
                  nil)))
@end lisp

Replace the first field ``My engine'' with the description of your
engine, the second field with the entry point (the @samp{%s} is
important, it will be replaced by the search term when you issue the
search), and the third field is the encoding to use, @code{nil} or
omitting this field means to use the value of
@code{w3m-default-coding-system} as a regular encoding.

For English search engines, you rarely have to worry about this.
However, for some Japanese search engines, you may need to specify
something (e.g. @code{euc-japan}) there.

@item
You can now use this engine to search, using the normal @kbd{S} key (the
@kbd{s} key for the @samp{Info-like} keymap) in emacs-w3m.  If you use
this engine often, you can also add it to the Quicksearch (see
@ref{Quick Searching}) engines and give it a small prefix, by adding
this to your @file{~/.emacs-w3m} file instead:

@lisp
(eval-after-load "w3m-search"
  '(progn
     (add-to-list 'w3m-search-engine-alist
                  '("My engine"
                    "http://my.searchengine.com/?query=%s"
                    nil))
     (add-to-list 'w3m-uri-replace-alist
                  '("\\`my:" w3m-search-uri-replace "My engine"))))
@end lisp

This way you can also use a URL like @uref{my:foobar} to search for the
term ``foobar'' with your engine.
@end enumerate

@node Grouping URLs
@section Visiting several web pages in one URL
@cindex Grouping URLs

Emacs-w3m can manipulate ``group URLs'': special URLs that contain
several real URLs.  When you open these group URLs, emacs-w3m will open
one buffer for each URL in the group, allowing you to open several pages
in one go.

To build group URLs, you just have to put together (i.e. concatenate)
all the addresses you want to open, separating them with the ampersand
symbol (that's ``&''), and prefixing the grouped URLs with ``group:''.
For example, suppose you want to visit the GNU Project's homepage,
@uref{http://www.gnu.org/}, and the Savannah homepage,
@uref{http://savannah.nongnu.org/}: the group URL would be

@uref{group:http://www.gnu.org/&http://savannah.nongnu.org/}

Since this syntax can be quite hard to use on a daily basis, this
feature will be most useful when used with very short URLs (Quicksearch
URLs for example, see @ref{Quick Searching}); or in non-interactive
contexts.

@node Weather Information
@section It will be fine tomorrow

@node Using Antenna
@section Raise your antenna
@cindex Antenna
@cindex Tracking changes in web pages
@cindex about://antenna/

Antenna is a tool to keep track of changes in web pages.  Using Antenna,
you can periodically check if particular pages have been updated, and if
they haven't, know the last time you saw them.

You can start Antenna using the @kbd{A} key in any emacs-w3m buffer.
Alternatively, you can go to the special URL @uref{about://antenna/}; it
does the same thing.

@menu
* Setting up Antenna::          How to add your web sites to Antenna
* Daily web tracking::          Tracking changes with Antenna
@end menu

@node Setting up Antenna
@subsection How to add your web sites to Antenna
@vindex w3m-antenna-sites

If you want to add the visiting web site to Antenna, type the @kbd{+}
key.  You will be taken to the customization buffer of
@code{w3m-antenna-sites}, with all fields already set up for you.  You
just have to hit the buttons ``Save for future sessions'' and
``Finish''.

@table @kbd
@item +
@kindex +
@findex w3m-antenna-add-current-url
Add a URL to the Antenna database.  If called with a prefix argument,
ask for a URL instead of adding the current page
(@code{w3m-antenna-add-current-url}).
@end table

@node Daily web tracking
@subsection Tracking changes with Antenna
@cindex The Antenna interface

On the Antenna page, you will see two sections: one called ``Updated''
and another called ``Visited''.  In the ``Updated'' section, you will
find websites which have changed since the last Antenna update, and in
the ``Visited'' section, the websites which haven't.  In each section,
each line stands for one website of the Antenna database, and has the
following structure:

@samp{  * 2002/12/15 16:43  (T)  My website}

The first part is the last time the website was updated, or if this
information is not available, the last time Antenna noticed a change in
this page.

The @samp{(T)} stands for ``Time'', it means that the change was
detected because the last modification time of that page has changed
since the last Antenna update.  Another possible value here is @samp{S}
(for ``Size''), which means that the change has been detected because
the size of the page has changed.

The last part of this line is the title you gave to this website when
you added it to the database.

Please note that the Antenna database doesn't get automatically updated,
you have to update it each time you want to check if the sites have
changed, either by hitting @kbd{R} in the Antenna page, or by passing a
prefix argument to the command (start Antenna with @w{@kbd{C-u A}}, for
example).

@vindex w3m-antenna-refresh-interval
If you want to make the Antenna database get updated automatically, set
the value of the @code{w3m-antenna-refresh-interval} variable to a
positive integer which is an interval time in seconds.

@table @kbd
@item A
@kindex A
@findex w3m-antenna
Visit the Antenna page.  If called with a prefix argument, update the
Antenna database before displaying it (@code{w3m-antenna}).
@end table

@node Showing Directory Tree
@section Showing the tree structure of local directories
@cindex Showing the tree structure of local directories

Using the @code{w3m-dtree} command, you can display a tree of all
subdirectories of a local directory, and browse it like a regular web
page.  The emacs-w3m buffer you get when you use this feature is very
similar to the output of the external ``tree'' utility, hence the
name.  Emacs-w3m adds a bonus: if you call the command with a prefix
argument, it will display files as well, turning emacs-w3m into a
full-featured file browser.

Here is an example of what an emacs-w3m dtree run looks like:

@example
/home/romain/.elisp/emacs-w3m/
 |-CVS/
 |-attic/
 |  +-CVS/
 |-autom4te.cache/
 |-doc/
 |  |-CVS/
 |  +-emacs-w3m/
 |-icons/
 |  +-CVS/
 |-patches/
 |  +-CVS/
 +-shimbun/
    +-CVS/
@end example

And with a prefix argument, you get something like this instead:

@example
/home/romain/.elisp/emacs-w3m/ (allfiles)
 |-(f).cvsignore
 |-(f)BUGS.ja
 |-(f)COPYING
 |-[d]CVS/
 |  |-(f)Entries
 |  |-(f)Repository
 |  +-(f)Root
 |-(f)ChangeLog
 |-(f)ChangeLog.1
 |-(f)Makefile
 |-(f)Makefile.in
 |-(f)README
 |-(f)README.ja
@end example

@table @asis
@item @kbd{D} (Lynx-like keymap)
@itemx @kbd{T} (Info-like keymap)
@kindex D (Lynx-like keymap)
@kindex T (Info-like keymap)
@findex w3m-dtree
Prompt for a local directory in the minibuffer, then display its tree
structure.  If called with a prefix argument (e.g. @w{@kbd{C-u D}}, or
@w{@kbd{C-u T}} for the @samp{Info-like} keymap), show files in the
directories as well (@code{w3m-dtree}).
@end table

@node Viewing Perl Documents
@section Viewing perl documents


@node Using Namazu
@section Searching files with Namazu

(under translation)


@node Octet
@section Viewing data in various octal form
@findex octet-find-file

(under construction)

These following lines in your @file{~/.emacs} may help you to browse
octet data files which are opened with @code{octet-find-file}.

@lisp
(add-hook 'octet-find-file-hook 'view-mode)
(add-hook 'octet-find-file-hook 'w3m-minor-mode)
@end lisp

@node Frame Local Buffers
@section Grouping sessions into separate frames

It is possible to manage groups of emacs-w3m sessions in separate
frames.  One use for this would be to have two emacs-w3m frames, where
one contains sessions visiting search engines, and the other sessions
visiting news sites.

@findex w3m-fb-mode
Emacs-w3m offers some convenient features that allow you to visit many
web pages at the same time.  For instance, you can use tabs
(@pxref{Using Tabs}) to visit many pages in new sessions, or do so using
a special URL beginning with @samp{group:} (@pxref{Grouping URLs}).
However, you may want to group them into separate frames if there are
too many pages.  If so, the @code{w3m-fb-mode} command is for you.  Note
that you have to set the @code{w3m-use-tab} variable to non-@code{nil}
(@code{t} by default) and set the @code{w3m-pop-up-frames} variable to
@code{nil} (the default) in order to use it (@pxref{General Variables}).

Typing @w{@kbd{M-x w3m-fb-mode}} toggles the mode, but you can turn the
mode on by giving a positive integer as a prefix argument to the command
(zero or less turns it off).

When the @code{w3m-fb-mode} is turned on, the sessions that you start in
the current frame will be associated with only that frame.  Other
sessions that are opened in other frames will similarly only appear in
those frames.  In other words, sessions associated with one frame don't
appear in other frames.  @code{w3m-fb-mode} doesn't create any new
frames, so you need to make them yourself in some way.

@node Session Manager
@section Saving and loading sessions

It is possible to save and load the emacs-w3m sessions sets.

@kindex @kbd{M-S}
You can save the set of the currently opened sessions for the future
use.  Just hit @kbd{M-S} and name the set.

@kindex @kbd{M-s}
@findex w3m-session-select
Then you will ask how to take the saved sessions set back, won't you?
Hit @kbd{M-s} to open the sessions selection menu.  The available
command keys include:

@table @asis
@item @kbd{@key{RET}}
@findex w3m-session-select-select
Open all the sessions of the selected sessions set.

@item @kbd{M-s}
@findex w3m-session-select-open-session-group
Open the detail menu for the selected sessions set.  You can open the
sessions one by one in that menu.

@item @kbd{d}
@findex w3m-session-select-delete
Delete the selected sessions set or the session.

@item @kbd{r}
@findex w3m-session-select-rename
Rename the selected sessions set.

@item @kbd{s}
@findex w3m-session-select-save
Save all the opened sessions.  So does @kbd{M-S}.

@item @kbd{n}
@findex w3m-session-select-next
Move the cursor to the next sessions set.

@item @kbd{p}
@findex w3m-session-select-previous
Move the cursor to the previous sessions set.

@item @kbd{q}
@findex w3m-session-select-quit
Quit the sessions selection menu.
@end table

@vindex w3m-session-deleted-save
@vindex w3m-session-automatic-save
Emacs-w3m saves some sessions automatically.  If
@code{w3m-session-deleted-save} is non-@code{nil}, emacs-w3m saves the
closed sessions automatically.  This would be helpful for recovering a
session that has been closed inadvertently.  If
@code{w3m-session-automatic-save} is non-@code{nil}, emacs-w3m saves the
opened sessions automatically when quitting emacs-w3m.

@vindex w3m-session-load-last-sessions
Sometimes you might forget the URLs of the pages you viewed with the
interest.  Of course emacs-w3m helps you even in such a case.  If
@code{w3m-session-load-last-sessions} is non-@code{nil}, emacs-w3m
automatically opens the sessions set viewed last.  If it is @code{ask},
you will be asked whether to take the set back (default @code{nil}).

@vindex w3m-session-crash-recovery
@vindex w3m-session-load-crashed-sessions
You may have had a bad experience with a crash. It makes you
disappointing, and makes displayed web pages lost. Emacs-w3m helps you
also in such a case. If @code{w3m-session-crash-recovery} is
non-@code{nil}, emacs-w3m saves displayed sessions set to use for crash
recovering automatically and recovers saved sessions when emacs-w3m (or
emacs, etc) crashes (default @code{t}). If
@code{w3m-session-load-crashed-sessions} is non-@code{nil}, emacs-w3m
automatically recovers the crashed sessions set. If it is @code{ask},
you will be asked whether to recover the set (default @code{ask}).

@node Customizable Variables
@chapter Customizable variables
@cindex Customizing user options
@vindex w3m-init-file

A lot of emacs-w3m variables are customizable via the Custom mechanism,
a graphical Emacs interface to define user options.  Custom offers
several methods to define your customizations, you can use for example
@w{@kbd{M-x customize-option}} for a single option (i.e. an Emacs Lisp
variable) or @w{@kbd{M-x customize-group}} to see all available options
(including variables and faces) for a ``group'' and change them; in
which case the group to use is @code{w3m}.

Alternatively (if you don't want to use Custom), you can put arbitrary
Emacs Lisp expressions in your emacs-w3m initialization file, which is
@file{~/.emacs-w3m} by default.  This example:

@lisp
(setq w3m-home-page "http://emacs-w3m.namazu.org/")
@end lisp

@noindent
would set the default homepage to @uref{http://emacs-w3m.namazu.org/}.
The syntax to use is the same as in your @file{~/.emacs}
file.  @xref{Init File, ,Init File, emacs, The Emacs Manual}.

Please note that some variables from external modules could be undefined
at the time the @file{~/.emacs-w3m} file is loaded, thus making them
impossible to modify (of course if you don't care about the default
value, you can override them completely in your
@file{~/.emacs-w3m}) file.  The @code{w3m-search-engine-alist} variable
is a typical example (@pxref{Search Variables}).

@table @code
@item w3m-init-file
When emacs-w3m starts, it will read the @code{w3m-init-file} file.  The
default value is @file{~/.emacs-w3m}.  You probably don't need to change
this.  This is a normal Emacs Lisp file and can be used to avoid
cluttering your @file{~/.emacs} and @file{site-init} files with
emacs-w3m stuff.  Emacs-w3m will also check for files with the same
names as this, but with @file{.elc} and @file{.el} extensions (in other
words, @file{~/.emacs-w3m.elc}, @file{~/.emacs-w3m.el} and
@file{~/.emacs-w3m}, in this order).
@end table

@menu
* General Variables::           General variables
* Image Variables::             Variables related to images
* Form Variables::              Variables related to forms
* Cookie Variables::            Variables related to cookies
* Bookmark Variables::          Variables related to bookmarks
* Search Variables::            Variables related to searching the web
* Weather Variables::           Variables related to weather information
* Dtree Variables::             Variables related to the dtree feature
* Antenna Variables::           Variables related to antenna
* Perldoc Variables::           Variables related to perldoc
* Namazu Variables::            Variables related to namazu
* Octet Variables::             Variables related to the octet feature
* Session Manager Variables::   Variables related to session manager
* Hooks::                       Hooks
* Other Variables::             Other variables
@end menu

@node General Variables
@section General variables
@cindex General variables

@table @code
@item w3m-accept-languages
@vindex w3m-accept-languages
List of acceptable languages in descending order of priority.  The
default value is set according to the @samp{accept_language} entry of
the @samp{w3m} configuration file (normally @file{~/.w3m/config}).

@item w3m-add-referer
@vindex w3m-add-referer

Rule of sending referers.  There are five choices as the valid values of
this option.

@enumerate
@item
@code{nil}: this means that emacs-w3m never send referers.

@item
@code{t}: this means that emacs-w3m always send referers.

@item
@code{lambda}: this means that emacs-w3m send referers only when both
the current page and the target page are provided by the same server.

@item
a cons cell keeping two regular expressions: this means that emacs-w3m
send referers when the url of the current page matches the first regular
expression and does not match the second regular expression.  @code{Nil}
for the regexp matches any url.

@item
a function: emacs-w3m send referers when this function which has two
arguments, URL and REFERER, returns non-@code{nil}.
@end enumerate

If you're nervous about leaking private WEB browsing history
information, set this option to `nil' or `lambda'.  If your computer
belongs to a secret network, you may set a pair of regular expressions
to inhibit sending referers which will disclose your private
information, as follows:

@lisp
(setq w3m-add-referer
      '("\\`http:\"
        . "\\`http://\\([^./]+\\.\\)*example\\.net/"))
@end lisp

@item w3m-add-user-agent
@vindex w3m-add-user-agent
Non-@code{nil} means add the User-Agent field to the request header.
The value of @code{w3m-user-agent} is used for the field body.

@item w3m-arrived-file
@vindex w3m-arrived-file
Name of the file to keep the arrived @acronym{URL}s database.

@item w3m-auto-show
@vindex w3m-auto-show
Non-@code{nil} means provide the ability to horizontally scroll the
window.  Automatic horizontal scrolling happens when the point gets away
from both ends of the window, but nothing occurs if
@code{truncate-lines} is set to @code{nil}.

This feature works with specific emacs-w3m code; usual
@code{auto-hscroll-mode}, @code{automatic-hscrolling},
@code{auto-show-mode} or @code{hscroll-mode} will all be invalidated in
emacs-w3m buffers.

@item w3m-charset-coding-system-alist
@vindex w3m-charset-coding-system-alist
Alist of @acronym{MIME} charsets and coding systems.  Both charsets and
coding systems must be symbols.

@item w3m-coding-system
@vindex w3m-coding-system
Default coding system used to communicate with the @samp{w3m} command.

@item w3m-coding-system-priority-list
@vindex w3m-coding-system-priority-list
Coding systems in order of priority used for emacs-w3m sessions.

@item w3m-command
@vindex w3m-command
Name of the executable file of the @samp{w3m} command.  You normally
don't have to specify the value, since emacs-w3m looks for the existing
commands @samp{w3m}, @samp{w3mmee} and @samp{w3m-m17n} (in this order)
in the @code{exec-path} directories in order if it is @code{nil} in the
beginning.

If you want to use the other @samp{w3m} command, specify the value of
this variable explicitly in the .emacs file or customize the value and
save it.  In this case, you need to restart Emacs and emacs-w3m: there
is currently no way to apply the changing of the @samp{w3m} command to
all the emacs-w3m programs safely after loading the @file{w3m.elc}
module.

@item w3m-command-arguments
@c @vindex w3m-command-arguments
List of the default arguments passed to the @samp{w3m} command.  See
also @code{w3m-command-arguments-alist}.

@item w3m-command-arguments-alist
@vindex w3m-command-arguments-alist
Alist of regexps matching urls and additional arguments passed to
@samp{w3m}.  A typical usage of this variable is to specify whether to
use a proxy server for particular hosts.  The first match made will be
used.  Here is an example of how to set this variable:

@lisp
(setq w3m-command-arguments-alist
      '(;; Don't use the proxy server to visit local web pages.
        ("^http://\\([^/]*\\.\\)*your-company\\.com\\(/\\|$\\)"
         "-no-proxy")
        ;; Use the proxy server to visit any foreign urls.
        (""
         "-o" "http_proxy=http://proxy.your-company.com:8080/")))
@end lisp

@noindent
Here the first element matches any url where the scheme is @samp{http}
and the hostname is either @samp{your-company.com} or a name ending with
@samp{.your-company.com}; the proxy server is not used for those hosts.
If you are a regexp novice, you can use the @code{w3m-no-proxy-domains}
variable instead.

@item w3m-command-environment
@vindex w3m-command-environment
Alist of environment variables for subprocesses to inherit.

@item w3m-confirm-leaving-secure-page
@vindex w3m-confirm-leaving-secure-page
If non-@code{nil}, you'll be asked for confirmation when leaving secure
pages.  It is STRONGLY recommended to set a non-nil value to this option.
You MUST understand what you want to do completely before switching off
this option.  The default value is @code{t}.

@item w3m-content-type-alist
@vindex w3m-content-type-alist
Alist of content types, regexps, commands to view, and filters.  Each
element is a list which consists of the following data:

@enumerate
@item
Content type.

@item
Regexp matching a url or a file name.

@item
Method to view contents.  The following three types may be used:

@enumerate a
@item
Lisp function which takes the url to view as an argument.
@item
("@var{command}" [@var{arg}@dots{}]) -- where "@var{command}" is the
external command and @var{arg}'s are the arguments passed to the command
if any.  The symbols @code{file} and @code{url} that appear in
@var{arg}'s will be replaced respectively with the name of a temporary
file which contains the contents and the string of the url to view.
@item
@code{nil} which means to download the url into the local file.
@end enumerate

@item
Content type that overrides the one specified by @code{1. Content type}.
Valid values include:

@enumerate a
@item
Lisp function that takes three arguments @var{url}, @var{content-type},
and @var{charset}, and returns a content type.
@item
String that specifies a content type.
@item
@code{nil} that means not to override the content type.
@end enumerate
@end enumerate

@item w3m-correct-charset-alist
@vindex w3m-correct-charset-alist
Alist of @acronym{MIME} charsets; strange ones and standard ones.

@item w3m-db-history-display-size
@vindex w3m-db-history-display-size
Maximum number of arrived @acronym{URL}s which are displayed per page.

@item w3m-decoder-alist
@vindex w3m-decoder-alist
Alist of encoding types, decoder commands, and arguments.

@item w3m-default-coding-system
@c @vindex w3m-default-coding-system
Default coding system used to encode url strings and post-data.

@item w3m-default-content-type
@vindex w3m-default-content-type
Default value assumed as the content type of local files.

@item w3m-default-directory
@vindex w3m-default-directory
Directory used as the current directory in emacs-w3m buffers.  The valid
values include a string specifying an existing directory, a symbol of
which the value specifies an existing directory, a function which takes
a url as an argument and returns a directory, and @code{nil} (which is
the default).  If the specified directory does not exist or it is
@code{nil}, the value of @code{w3m-profile-directory} is used.

Note that there is an exception: if a page visits a local file or visits
a remote file using ftp, the directory in which the file exists is used
as the current directory instead.

@item w3m-default-save-directory
@vindex w3m-default-save-directory
Default directory where downloaded files will be saved to.

@item w3m-delete-duplicated-empty-lines
@vindex w3m-delete-duplicated-empty-lines
Non-@code{nil} means display two or more continuous empty lines into
single.

@item w3m-dirlist-cgi-program
@vindex w3m-dirlist-cgi-program
Name of the @acronym{CGI} program to list a local directory.  If it is
@code{nil}, the dirlist.cgi module of the @samp{w3m} command will be
used.

@item w3m-doc-view-content-types
@vindex w3m-doc-view-content-types
List of content types for which to use @code{doc-view-mode} to view
contents.  This overrides @code{w3m-content-type-alist}.

@item w3m-edit-function
@vindex w3m-edit-function
Function used for editing local files.  It is used when the
@code{w3m-edit-current-url} command or the @code{w3m-edit-this-url}
command is invoked.

@item w3m-edit-function-alist
@vindex w3m-edit-function-alist
Alist of functions used for editing pages.  This option is referred to
decide which function should be used to edit a specified page, when
either @code{w3m-edit-current-url} or @code{w3m-edit-this-url} is
invoked.  When no suitable function is found from this alist,
@code{w3m-edit-function} is used.

@item w3m-enable-google-feeling-lucky
@vindex w3m-enable-google-feeling-lucky
Non-@code{nil} enables you to enter any words as well as a url when
prompted.  In that case, emacs-w3m uses Google to search for the words.
The default value is @code{t}.

@item w3m-encoding-type-alist
@vindex w3m-encoding-type-alist
Alist of file suffixes and content encoding types.

@item w3m-file-coding-system
@vindex w3m-file-coding-system
Coding system used when writing configuration files.  This value will be
referred to by the @code{w3m-save-list} function.

@item w3m-file-name-coding-system
@vindex w3m-file-name-coding-system
Coding system used to convert pathnames when emacs-w3m accesses files.

@item w3m-fill-column
@vindex w3m-fill-column
Integer used as the value for @code{fill-column} in emacs-w3m buffers.
If it is positive, pages will be displayed within the columns of that
number.  If it is zero or negative, the number of columns which
subtracted that number from the window width is applied to the maximum
width of pages.  Note that XEmacs does not always obey this setting.

@item w3m-follow-redirection
@vindex w3m-follow-redirection
Maximum number of redirections which emacs-w3m honors and follows.  If
@code{nil}, redirections are followed by the @samp{w3m} command.  Don't
set it to @code{nil} if you allow to use cookies (i.e., you have set
@code{w3m-use-cookies} to non-@code{nil}) since cookies may be shared
among many redirected pages.

@item w3m-home-page
@c @vindex w3m-home-page
This variable specifies the url string to open when emacs-w3m starts.
Don't say HP, it's the abbreviated name of a certain company. ;-)

@item w3m-horizontal-scroll-columns
@c @vindex w3m-horizontal-scroll-columns
Number of steps in columns used when scrolling a window horizontally.

@item w3m-horizontal-scroll-division
@vindex w3m-horizontal-scroll-division
Integer used by the program making the point certainly visible.  The
cursor definitely does not go missing even when it has been driven out
of the window while wandering around anchors and forms in an emacs-w3m
buffer.

Suppose that the value of this variable is N.  When the point is outside
the left of the window, emacs-w3m scrolls the window so that the point
may be displayed on the position within 1/N of the width of the window
from the left.  Similarly, when the point is outside the right of the
window, emacs-w3m scrolls the window so that the point may be displayed
on the position of 1/N of the width of the window from the right.

This feature doesn't work if @code{w3m-auto-show} is @code{nil}.  The
value must be a larger integer than 1.

@item w3m-horizontal-shift-columns
@c @vindex w3m-horizontal-shift-columns
Number of steps in columns used when shifting a window horizontally.
The term @samp{shifting} means a fine level scrolling.

@item w3m-imitate-widget-button
@vindex w3m-imitate-widget-button
If non-@code{nil}, imitate the widget buttons on link (anchor) buttons.
It is useful for moving about in a Gnus article buffer using
@kbd{@key{TAB}} key.  It can also be any Lisp form that should return a
boolean value.

@item w3m-init-file
@c @vindex w3m-init-file
Your emacs-w3m startup file name.  If a file with the @samp{.el} or
@samp{.elc} suffixes exists, it will be read instead.

Note: This file is used as the startup configuration @emph{NOT} for the
@samp{w3m} command but for emacs-w3m.  In order to modify configurations
for the @samp{w3m} command, edit the file named @file{~/.w3m/config}
normally.

@item w3m-input-coding-system
@vindex w3m-input-coding-system
Coding system used when writing to @samp{w3m} processes.  It overrides
@code{coding-system-for-write} if it is not @code{binary}.  Otherwise,
the value of the @code{w3m-current-coding-system} variable is used
instead.

@item w3m-keep-arrived-urls
@vindex w3m-keep-arrived-urls
Maximum number of @acronym{URL}s which the arrived @acronym{URL}s
database keeps.

@item w3m-keep-cache-size
@vindex w3m-keep-cache-size
Maximum number of pages to be cached in emacs-w3m.

@item w3m-key-binding
@c @vindex w3m-key-binding
Type of key binding set used in emacs-w3m sessions.  The valid values
include @code{info} which provides @samp{Info-like} keys, and @code{nil}
which provides @samp{Lynx-like} keys.

@item w3m-language
@vindex w3m-language
Your preferred language used in emacs-w3m sessions.

@item w3m-local-directory-view-method
@vindex w3m-local-directory-view-method
Symbol of the method to view a local directory tree.  The valid values
include @code{w3m-cgi} using the @acronym{CGI} program specified by the
@code{w3m-dirlist-cgi-program} variable (which see), and
@code{w3m-dtree} using the w3m-dtree Lisp module.

@item w3m-local-find-file-function
@vindex w3m-local-find-file-function
Function used to open local files.  If a url of the @code{file:} scheme
in which you entered agrees with the rule of the
@code{w3m-local-find-file-regexps} variable (which see), it is used to
open the file.

Function should take one argument, the string naming the local file.  It
can also be any Lisp form returning a function.  Set this to @code{nil}
if you want to always use emacs-w3m to see local files.

@item w3m-local-find-file-regexps
@vindex w3m-local-find-file-regexps
@code{Cons} of two regexps matching and not matching with local file
names.  If a url of the @code{file:} scheme in which you entered matches
the first form and does not match the latter form, it will be opened by
the function specified by the @code{w3m-local-find-file-function}
variable.  @code{Nil} for the regexp matches any file names.

For instance, the value @code{(nil . "\\.html?\\'")} allows
@file{file:///some/where/w3m.el}, not
@file{file:///any/where/index.html}, to open by the function specified
by @code{w3m-local-find-file-function}.  The latter will be opened as a
normal web page.  Furthermore, if you would like to view some types of
contents in the local system using the viewers specified by the
@code{w3m-content-type-alist} variable, you can add regexps matching
those file names to the second element of this variable.  For example:

@lisp
(setq w3m-local-find-file-regexps
      '(nil . "\\.\\(?:[sx]?html?\\|dvi\\|ps\\|pdf\\)\\'"))
@end lisp

It is effective only when the @code{w3m-local-find-file-function}
variable is set properly.

@item w3m-mailto-url-function
@vindex w3m-mailto-url-function
Function used to handle the @code{mailto} urls.  Function is called with
one argument, just a url.  If it is @code{nil}, a function specified by
the @code{mail-user-agent} variable will be used for composing mail
messages.

@item w3m-mailto-url-popup-function-alist
@vindex w3m-mailto-url-popup-function-alist
Alist of @code{(MAJOR-MODE . FUNCTION)} pairs used to pop a mail buffer
up.  If a user clicks on a @code{mailto} url and a mail buffer is
composed by @code{mail-user-agent} with the @code{MAJOR-MODE},
@code{FUNCTION} will be called with a mail buffer as an argument.  Note
that the variables @code{special-display-buffer-names},
@code{special-display-regexps}, @code{same-window-buffer-names} and
@code{same-window-regexps} will be bound to @code{nil} while popping to
a buffer up.

@item w3m-make-new-session
@vindex w3m-make-new-session
Non-@code{nil} means making new emacs-w3m buffers when visiting new
pages.  If it is non-@code{nil} and there are already emacs-w3m buffers,
the @code{w3m} command makes a new emacs-w3m buffer if a user specifies
a url string in the minibuffer, and the @code{w3m-safe-view-this-url}
command also makes a new buffer if a user invokes it in a buffer not
being running the @code{w3m-mode}.  The default value is @code{nil}.

@item w3m-mbconv-command
@vindex w3m-mbconv-command
Name of the @samp{mbconv} command provided by the @samp{libmoe} package.
The @samp{libmoe} package is used when you use the @samp{w3mmee} command
instead of the @samp{w3m} command.  See also @code{w3m-command}.

@item w3m-no-proxy-domains
@c @vindex w3m-no-proxy-domains
List of domain names for which emacs-w3m will not use a proxy server.
Each element should be exactly a domain name which means the latter
common part of the host names, not a regexp.

@item w3m-output-coding-system
@vindex w3m-output-coding-system
Coding system used when reading from @samp{w3m} processes.

@item w3m-pop-up-frames
@vindex w3m-pop-up-frames
Non-@code{nil} means pop to a new frame up for an emacs-w3m session.
This variable is similar to @code{pop-up-frames} and does override
@code{w3m-pop-up-windows}.  If @code{w3m-use-tab} is non-@code{nil} or
there is the buffers selection window (for the @code{w3m-select-buffer}
feature), this variable is ignored when creating the second or more
emacs-w3m session.

@item w3m-pop-up-windows
@vindex w3m-pop-up-windows
Non-@code{nil} means split the windows when a new emacs-w3m session is
created.  This variable is similar to @code{pop-up-windows} and quite
overridden by @code{w3m-pop-up-frames} as if @code{pop-up-frames}
influences.  Furthermore, if @code{w3m-use-tab} is non-@code{nil} or
there is the buffers selection window (for the @code{w3m-select-buffer}
feature), this variable is ignored when creating the second or more
emacs-w3m session.

@item w3m-popup-frame-parameters
@vindex w3m-popup-frame-parameters
Alist of frame parameters used when creating a new emacs-w3m frame.  It
allows not only the alist form but also XEmacs' plist form.

@item w3m-prefer-cache
@vindex w3m-prefer-cache
Non-@code{nil} means that cached contents are used without checking
headers.

@item w3m-profile-directory
@vindex w3m-profile-directory
Directory where emacs-w3m config files are loaded from or saved to.

@item w3m-quick-start
@c @vindex w3m-quick-start
Non-@code{nil} means let emacs-w3m start quickly w/o requiring
confirmation.  When you invoke the @code{w3m} command, it attempts to
visit the page of a string like url around the cursor or the value of
@code{w3m-home-page}.  You won't be asked for the confirmation then if
this value is non-@code{nil}.  Otherwise, you will be prompted for that
url with the editing form.

@item w3m-redirect-with-get
@vindex w3m-redirect-with-get
If non-@code{nil}, use the GET method after redirection.  It controls
how emacs-w3m works when a server responds the code 301 or 302.  Here is
an extract from RFC2616:

Note: RFC 1945 and RFC 2068 specify that the client is not allowed to
change the method on the redirected request.  However, most existing
user agent implementations treat 302 as if it were a 303 response,
performing a GET on the Location field-value regardless of the original
request method.

@item w3m-relationship-estimate-rules
@vindex w3m-relationship-estimate-rules
Rules to estimate relationships between a retrieved page and others.

@item w3m-select-buffer-horizontal-window
@vindex w3m-select-buffer-horizontal-window
Non-@code{nil} means split windows horizontally to open the selection
window.

@item w3m-select-buffer-window-ratio
@vindex w3m-select-buffer-window-ratio
The percentage of the selection window to the whole frame.  The car is
used when splitting windows horizontally and the cdr is for splitting
windows vertically.

@item w3m-show-decoded-url
@vindex w3m-show-decoded-url
Non-@code{nil} means show decoded URIs in the echo area, the balloon,
etc.  This variable can take one of the following five kinds of forms:

@enumerate
@item
t

Decode URIs using the encoding guessed from the value of
@code{w3m-coding-system-priority-list}.

@item
Coding system

Decode URIs using this value.

@item
List of coding systems

Decode URIs using the encoding assumed based on this list.

@item
Alist of predicates and forms described below:

Each element looks like the @code{(PREDICATE . ENCODING)} form.
@code{PREDICATE} should be a regexp, a function or a Lisp form, and
@code{ENCODING} should be one of the forms described here excluding this
form.  If @code{PREDICATE} is a regexp, it will be tested whether it
matches to the target url.  If it is a function, it will be called with
the target url.  If it is a Lisp form, it will be simply evaluated.
Elements are tested in turn until the result of the test of the
predicate is true and the encoding which is associated to the predicate
is used for decoding URIs.

@item
nil

Don't decode URIs.
@end enumerate

@item w3m-use-title-buffer-name
@vindex w3m-use-title-buffer-name
Non-@code{nil} means use name of buffer included current title.

@item w3m-show-error-information
@vindex w3m-show-error-information
Non-@code{nil} means show an error information as a web page.  Page is
made when the foreign server doesn't respond to a request to retrieve
data.

@item w3m-space-before-favicon
@vindex w3m-space-before-favicon
String of space char(s) to be put in front of favicon in the mode-line.
It may be better to use two or more spaces if you are using oblique or
italic font in the modeline.

@item w3m-space-before-modeline-icon
@vindex w3m-space-before-modeline-icon
String of space character(s) to be put in front of the modeline icon.
It may be better to use one or more spaces if you are using oblique or
italic font in the modeline.

@item w3m-terminal-coding-system
@vindex w3m-terminal-coding-system
Default coding system used when writing to @samp{w3m} processes.  It is
just a default value to set process' coding system initially.  (This
variable name is analogically derived from the behavior of the
@samp{w3m} command which accepts data from Emacs just like reads from
the terminal.)

@item w3m-touch-command
@vindex w3m-touch-command
Name of the executable file of the touch command.  Note that the command
is required to be able to modify file's timestamp with the @samp{-t}
option.

@item w3m-track-mouse
@vindex w3m-track-mouse
Whether to track the mouse and message the url under the mouse.  See
also @code{show-help-function} if you are using GNU Emacs.

@noindent
A tip for XEmacs users:

You can also use the @code{balloon-help} feature by the
@w{@kbd{M-x balloon-help-mode}} command with arg 1.  If the window
manager decorates the balloon-help frame, and that is not to your taste,
you may strip it off with the following directives:

@example
For ol[v]wm use this in .Xdefaults:
   olvwm.NoDecor: balloon-help
     or
   olwm.MinimalDecor: balloon-help

For fvwm version 1 use this in your .fvwmrc:
   NoTitle balloon-help
or
   Style "balloon-help" NoTitle, NoHandles, BorderWidth 0

For twm use this in your .twmrc:
   NoTitle @{ "balloon-help" @}
@end example

See the @file{balloon-help.el} file for more information.

@item w3m-uri-replace-alist
@c @vindex w3m-uri-replace-alist
Alist of regexps matching @acronym{URI}s, and some types of
replacements.  It can be used universally to replace @acronym{URI}
strings in the local rule to the valid forms in the Internet.

Each element looks like the @code{(REGEXP FUNCTION OPTIONS...)} form.
@code{FUNCTION} takes one or more arguments, a uri and @code{OPTIONS}.
You can use the grouping constructs @samp{\\(...\\)} in @code{REGEXP},
and they can be referred by the @samp{\N} forms in a replacement (which
is one of @code{OPTIONS}).

Here are some predefined functions which can be used for those ways:

@table @code
@item w3m-pattern-uri-replace
@findex w3m-pattern-uri-replace
Replace a @acronym{URI} using PATTERN (which is just an @code{OPTION}).
It is allowed that PATTERN contains the @samp{\N} forms in the same
manner of @code{replace-match}.

@item w3m-search-uri-replace
@findex w3m-search-uri-replace
Generate valid URLs to query words on some specified search engines.
For example, the element

@lisp
("\\`gg:" w3m-search-uri-replace "google")
@end lisp

@noindent
makes it possible to replace the @acronym{URI} @samp{gg:emacs} to a
query for the word @samp{emacs} on the Google search engine.
@end table

@item w3m-url-local-directory-alist
@vindex w3m-url-local-directory-alist
Alist of @acronym{URL}s and local directories.  If directory names of a
given @acronym{URL} and the car of an element are the same, emacs-w3m
assumes that the file exists in the local directory where the cdr of an
element points to.  The default value will be set to a value of the
@code{yahtml-path-url-alist} variable which exchanged the car and the
cdr in each element if it is available.

@item w3m-use-ange-ftp
@vindex w3m-use-ange-ftp
Non-@code{nil} means that @code{ange-ftp} or @code{efs} is used to
access FTP servers.

@item w3m-use-cygdrive
@vindex w3m-use-cygdrive
If non-@code{nil}, use the @samp{/cygdrive/} rule when performing
@code{expand-file-name}.

@item w3m-use-filter
@vindex w3m-use-filter
Non-@code{nil} means use filter programs to convert web contents.  See
also @code{w3m-filter-rules} (the @file{w3m-filter.elc} module provides
it but might have never been loaded.  In that case, to see the default
value and the documentation of @code{w3m-filter-rules}, type
@w{@kbd{M-x load-library @key{RET} w3m-filter @key{RET}}}).

@item w3m-use-form
@vindex w3m-use-form
Non-@code{nil} means make it possible to use form
extensions. @emph{(EXPERIMENTAL)}

@item w3m-submit-form-safety-check
@vindex w3m-submit-form-safety-check
Non-@code{nil} means ask you for confirmation when submitting a form.
The default value is @code{nil}.

@item w3m-use-header-line
@vindex w3m-use-header-line
Non-@code{nil} means display the header line.

@item w3m-use-header-line-title
@vindex w3m-use-header-line-title
Non-@code{nil} means display the current title at the header line. This
variable is effective only when @code{w3m-use-tab} is @code{nil}.

@item w3m-use-mule-ucs
@vindex w3m-use-mule-ucs
Non-@code{nil} means use the multi-script support with Mule-UCS.

@item w3m-use-refresh
@vindex w3m-use-refresh
Non-@code{nil} means honor the REFRESH attribute in META tags.
Emacs-w3m arbitrarily takes you to a url specified by that attribute.
Note that they may be malicious traps.

@item w3m-refresh-minimum-interval
@vindex w3m-refresh-minimum-interval
Minimum seconds to wait for refresh, when visiting a page by
history-back or history-next.

@item w3m-use-symbol
@vindex w3m-use-symbol
Non-@code{nil} means replace symbols that the @samp{<_SYMBOL>} tags lead
into.  It is meaningful only when the @samp{w3m-m17n} command is used
and (X)Emacs handles unicode charsets.

@item w3m-menu-on-forefront
@vindex w3m-menu-on-forefront
Non-@code{nil} means place the emacs-w3m menus on the forefront of the
menu bar.  The default value is @code{nil}.

@item w3m-use-tab
@c @vindex w3m-use-tab
Non-@code{nil} means make emacs-w3m a tab browser.  It makes it possible
to show all emacs-w3m buffers in a single window with the tabs line, and
you can choose one by clicking a mouse on it.  See also
@code{w3m-use-tab-menubar}.

@item w3m-use-tab-menubar
@vindex w3m-use-tab-menubar
Non-@code{nil} means use the TAB pull-down menu in the menubar.  It
makes it possible to show all emacs-w3m buffers in a single window, and
you can choose one by clicking a mouse on it.  This feature requires
that Emacs has been built to be able to display multilingual text in the
menubar if you often visit web sites written in non-ascii text.  See
also @code{w3m-use-tab}.

@item w3m-use-toolbar
@vindex w3m-use-toolbar
Non-@code{nil} activates toolbar of @samp{w3m}.

@item w3m-user-agent
@vindex w3m-user-agent
String used for the User-Agent field.  See also
@code{w3m-add-user-agent}.

@item w3m-new-session-in-background
@vindex w3m-new-session-in-background
Say whether not to focus on a new tab or a new session in target.
It influences only when a new emacs-w3m buffer is created.

@item w3m-do-cleanup-temp-files
@vindex w3m-do-cleanup-temp-files
Non-@code{nil} enables emacs-w3m's auto cleanig forgotten temporary
files feature. The default is @code{nil}.
@end table

@node Image Variables
@section Variables related to images
@cindex Variables related to images

@table @code
@item w3m-default-display-inline-images
@vindex w3m-default-display-inline-images
Non-@code{nil} means display images inline in emacs-w3m buffers.  You
can toggle the visibility of images with the
@code{w3m-toggle-inline-images} command.  See also
@code{w3m-toggle-inline-images-permanently}.

@item w3m-favicon-cache-expire-wait
@vindex w3m-favicon-cache-expire-wait
The cache will be expired after specified seconds passed since
retrieval.  If this variable is @code{nil}, never expired.

@item w3m-favicon-cache-file
@vindex w3m-favicon-cache-file
Filename of saving favicon cache.  It defaults to the file named
@file{.favicon} under the directory specified by the
@code{w3m-profile-directory} variable.

@item w3m-favicon-size
@vindex w3m-favicon-size
Size of favicon. This value is used as geometry argument for
@code{convert}.

@item w3m-favicon-type
@vindex w3m-favicon-type
Image type of display favicon.

@item w3m-favicon-use-cache-file
@vindex w3m-favicon-use-cache-file
If non-@code{nil}, use favicon cache file.

@item w3m-favicon-default-background
@vindex w3m-favicon-default-background
Color name used as transparent color of favicon image.  @code{Nil} means
to use the background color of the Emacs frame.  The null string "" is
special, that will be replaced with the background color of the header
line or the mode line on which the favicon is displayed.  Note that this
value is effective only with Emacs 22 and greater.

@item w3m-icon-directory
@vindex w3m-icon-directory
Directory where emacs-w3m should find icon files.

@item w3m-imagick-convert-program
@vindex w3m-imagick-convert-program
Program name of ImageMagick's @samp{convert}.

@item w3m-treat-image-size
@vindex w3m-treat-image-size
Non-@code{nil} means let the @samp{w3m} command mind the ratio of the
size of images and text.  The default value is @code{t}.

If it is non-@code{nil}, the @samp{w3m} command will make a
@samp{halfdump} which reserves rectangle spaces in which images will be
put, and also @samp{alt} texts will be truncated or padded with spaces
so that their display width will be the same as the width of images.

See also @code{w3m-pixels-per-character} and @code{w3m-pixels-per-line}.
Those values will be passed to the @samp{w3m} command in order to
compute columns and lines which images occupy.

@item w3m-pixels-per-character
@vindex w3m-pixels-per-character
Integer used for the @code{-ppc} argument of the @samp{w3m} command.  If
@code{nil}, the width of the default face is used.  It is valid only
when @code{w3m-treat-image-size} is non-@code{nil}.  The default value
is @code{nil}.  If you want to use emacs-w3m in a character terminal and
make @code{w3m-treat-image-size} effective, you need to set this
variable properly.

@item w3m-pixels-per-line
@vindex w3m-pixels-per-line
Integer used for the @samp{-ppl} argument of the @samp{w3m} command.  If
@code{nil}, the height of the default face is used.  It is valid only
when @code{w3m-treat-image-size} is non-@code{nil}.  Note that a small
value may not induce a good result.  The default value is @samp{64}.  If
you want to use emacs-w3m in a character terminal and make
@code{w3m-treat-image-size} effective, you need to set this variable
properly.

@item w3m-resize-image-scale
@vindex w3m-resize-image-scale
Number of steps in percent used when resizing images.

@item w3m-resize-images
@vindex w3m-resize-images
If non-@code{nil}, resize images to the specified width and height.

@item w3m-show-graphic-icons-in-header-line
@vindex w3m-show-graphic-icons-in-header-line
Non-@code{nil} means show graphic status indicators in the header-line.
If it is @code{nil}, also the favicon won't be shown in the header-line
even if @code{w3m-use-favicon} is non-@code{nil}.  This variable is
currently meaningless under XEmacs.

@item w3m-show-graphic-icons-in-mode-line
@vindex w3m-show-graphic-icons-in-mode-line
Non-@code{nil} means show graphic status indicators in the mode-line.
If it is @code{nil}, also the favicon won't be shown in the mode-line
even if @code{w3m-use-favicon} is non-@code{nil}.

@item w3m-toggle-inline-images-permanently
@vindex w3m-toggle-inline-images-permanently
Non-@code{nil} means let the visibility of images continue permanently.
The visibility of images is initialized according to
@code{w3m-default-display-inline-images} at the first time, and except
that it may be toggled by the @code{w3m-toggle-inline-images} command,
it does not change hereafter, if it is non-@code{nil}.  Otherwise,
whether images are visible is initialized according to
@code{w3m-default-display-inline-images} whenever you visit a new page
or reload the current page in an emacs-w3m buffer.

@item w3m-use-favicon
@vindex w3m-use-favicon
Non-@code{nil} means show favicon images if they are available.  It will
be set to @code{nil} automatically if ImageMagick's @code{convert}
program does not support the ico format.

@item w3m-image-default-background
@vindex w3m-image-default-background
Color name used as transparent color of image.  @code{Nil} means to use
the background color of the Emacs frame.  The null string "" is special,
that will be replaced with the background color of the buffer. Note that
this value is effective only with Emacs 22 and greater.
@end table

@node Form Variables
@section Variables related to forms
@cindex Variables related to forms

@table @code
@item w3m-form-input-map-buffer-lines
@vindex w3m-form-input-map-buffer-lines
Buffer lines for form select map buffer.

@item w3m-form-input-select-buffer-lines
@vindex w3m-form-input-select-buffer-lines
Buffer lines for form select buffer.

@item w3m-form-input-textarea-buffer-lines
@vindex w3m-form-input-textarea-buffer-lines
Buffer lines for form textarea buffer.

@item w3m-form-mouse-face
@vindex w3m-form-mouse-face
Mouse face to highlight selected value.

@item w3m-form-treat-textarea-size
@vindex w3m-form-treat-textarea-size
Non-@code{nil} means to process textarea size (treat textarea rows).

@item w3m-form-use-fancy-faces
@vindex w3m-form-use-fancy-faces
Use fancy faces to fontify @samp{<form>} tags.

@item w3m-form-use-textarea-backup
@vindex w3m-form-use-textarea-backup
@vindex w3m-form-textarea-directory
Non-@code{nil} means save and restore backup text saved when you last
edited this textarea.  Files to save text are stored in the directory
specified by the @code{w3m-form-textarea-directory} variable.
@end table

@node Cookie Variables
@section Variables related to cookies
@cindex Variables related to cookies

@table @code
@item w3m-cookie-accept-bad-cookies
@vindex w3m-cookie-accept-bad-cookies
If @code{nil}, don't accept bad cookies.  If @code{t}, accept bad
cookies.  If ask, ask user whether accept bad cookies or not.

@item w3m-cookie-accept-domains
@vindex w3m-cookie-accept-domains
A list of trusted domain name string.

@item w3m-cookie-file
@vindex w3m-cookie-file
File in which cookies are kept.

@item w3m-cookie-reject-domains
@vindex w3m-cookie-reject-domains
A list of untrusted domain name string.

@item w3m-use-cookies
@vindex w3m-use-cookies
Non-@code{nil} means enable emacs-w3m to use cookies.
@emph{(EXPERIMENTAL)}
@end table

@node Bookmark Variables
@section Variables related to bookmarks
@cindex Variables related to bookmarks

@table @code
@item w3m-bookmark-file
@vindex w3m-bookmark-file
Bookmark file of w3m.

@item w3m-bookmark-file-coding-system
@vindex w3m-bookmark-file-coding-system
Coding system for a created bookmark file.
This option is used when a new bookmark file is created, or when an
existing bookmark file includes ASCII characters only.  If the coding
system which is used to encode your using bookmark file is different
from the value of this option, emacs-w3m does not change the encoding
of your bookmark file.

@item w3m-bookmark-default-section
@vindex w3m-bookmark-default-section
Default section to add new entry.

@item w3m-bookmark-menu-open-new-session
@vindex w3m-bookmark-menu-open-new-session
If non-@code{nil}, ``Bookmark'' menu item open new session.
@end table

@node Search Variables
@section Variables related to searching the web
@cindex Variables related to searching the web

@table @code
@item w3m-search-default-engine
Name of the default search engine.  The default is @samp{google}.

@item w3m-search-engine-alist
An alist of search engines.  Each element looks like @code{(@var{engine}
@var{action} @var{coding} @var{post-data})}.  @var{engine} is a string,
the name of the search engine.  @var{action} is a string, the URL that
performs a search.  @var{action} must contain a @code{"%s"}, which is
substituted by a query string.  @var{coding} is optional value which is
coding system for query string.  @var{post-data} is optional value which
is a string for POST method search engine.  If @var{coding} is omitted,
it defaults to @code{w3m-default-coding-system}.

@item w3m-search-word-at-point
@vindex w3m-search-word-at-point
Non-@code{nil} means that the word at point is used as an initial
string.  If @code{transient-mark-mode}, this option is ignored and the
region is used as an initial string.  The default is @code{t}.

@item w3m-search-thing-at-point-arg
@vindex w3m-search-thing-at-point-arg
Argument for `thing-at-point' used in `w3m-search-read-query'. The
default is @code{word}.
@end table

@node Weather Variables
@section Variables related to weather information
@cindex Variables related to weather information

@table @code
@item w3m-weather-default-area
@vindex w3m-weather-default-area
Default region to check weather.  The default is the southern part of
Kyoto city.

@item w3m-weather-filter-functions
@vindex w3m-weather-filter-functions
Filter functions to remove useless tags.  The default value is a list
that contains the following function symbols in this order:

@code{w3m-weather-extract-contents} @code{w3m-weather-adjust-contents}
@code{w3m-weather-expand-anchors} @code{w3m-weather-insert-title}
@end table

@node Dtree Variables
@section Variables related to the dtree feature
@cindex Variables related to the dtree feature

@table @code
@item w3m-dtree-default-allfiles
@vindex w3m-dtree-default-allfiles
If non-@code{nil}, invert the meaning of the prefix argument given to
the @code{w3m-dtree} command, i.e., the command shows not only
directories but also files even if you don't give a prefix argument.
The default is @code{nil}.

@item w3m-dtree-directory-depth
@vindex w3m-dtree-directory-depth
Integer that controls how deep @code{w3m-dtree} shows subdirectories.
If it is @code{nil}, files in all subdirectories are shown.  The default
is @code{8}.

@item w3m-dtree-indent-strings
@vindex w3m-dtree-indent-strings
Vector containing strings used for the indentation.  The default is
@code{["|-" "+-" "|  " "   "]}.

@item w3m-dtree-stop-strings
@vindex w3m-dtree-stop-strings
Vector containing strings used to indent directories under which there
are subdirectories hidden because of @code{w3m-dtree-directory-depth}.
The default is @code{["|=" "+="]}.
@end table

@node Antenna Variables
@section Variables related to antenna
@cindex Variables related to antenna

@table @code
@item w3m-antenna-file
@vindex w3m-antenna-file
Name of the file containing antenna URLs.  The default value is
@file{~/.w3m/.antenna}, where @samp{~/.w3m} is the default value of
@code{w3m-profile-directory} (@pxref{General Variables}).

@item w3m-antenna-html-skelton
@vindex w3m-antenna-html-skelton
Skeleton used for making the html contents of antenna pages.

@item w3m-antenna-make-summary-function
@vindex w3m-antenna-refresh-interval
Function used to make the summary of the site information.  The default
is @code{w3m-antenna-make-summary-like-natsumican}.  The other
ready-made function is @code{w3m-antenna-make-summary}.

@item w3m-antenna-sites
List of web sites that @code{w3m-antenna} watches.  The default is
@code{nil}.

@item w3m-antenna-sort-changed-sites-function
@vindex w3m-antenna-sort-changed-sites-function
Function used to sort a list of sites having been changed.  The default
is @code{w3m-antenna-sort-sites-by-time}.  The other ready-made function
is @code{w3m-antenna-sort-sites-by-title}.

@item w3m-antenna-sort-unchanged-sites-function
@vindex w3m-antenna-sort-unchanged-sites-function
Function used to sort a list of sites having not been changed.  The
default is @code{w3m-antenna-sort-sites-by-time}.  The other ready-made
function is @code{w3m-antenna-sort-sites-by-title}.
@end table

@node Perldoc Variables
@section Variables related to perldoc
@cindex Variables related to perldoc

@table @code
@item w3m-perldoc-command
@vindex w3m-perldoc-command
Name of the executable file of @samp{perldoc}.  The default is
@code{"perldoc"}.

@item w3m-perldoc-input-coding-system
@vindex w3m-perldoc-input-coding-system
Coding system used when writing to the @samp{perldoc} command.  The
default value is @code{euc-japan} if you are in the Japanese language
environment.  Otherwise it is @code{utf-8} if it is available, or
@code{iso-latin-1}.

@item w3m-perldoc-output-coding-system
@vindex w3m-perldoc-output-coding-system
Coding system used when reading from the @samp{perldoc} command.  The
default is @code{undecided}.

@item w3m-perldoc-pod2html-command
@vindex w3m-perldoc-pod2html-command
Name of the executable file of @samp{pod2html}.  The default is
@code{"pod2html"}.

@item w3m-perldoc-pod2html-arguments
@vindex w3m-perldoc-pod2html-arguments
Lisp of arguments passed to the @samp{pod2html} command.  The default is
@code{("--noindex")}.
@end table

@node Namazu Variables
@section Variables related to namazu
@cindex Variables related to namazu

@table @code
@item w3m-namazu-command
@vindex w3m-namazu-command
Name of the executable file of Namazu.  The default is @file{namazu}.

@item w3m-namazu-arguments
@vindex w3m-namazu-arguments
List of arguments passed to Namazu.  The default value is @code{("-h"
"-H" "-n" w3m-namazu-page-max "-w" whence)}.  The symbols
@code{w3m-namazu-page-max} and @code{whence} will be replaced
respectively with the value of that variable and a proper value that the
program determines properly.

@item w3m-namazu-default-index
@vindex w3m-namazu-default-index
An alias for the default index, or the directory name of it.  If this is
@code{nil}, you will be prompted for the directory name whenever you
invoke the @code{w3m-namazu} command with no prefix argument.  The
default is the value of @code{namazu-default-dir} if it exists and
@code{namazu-always-query-index-directory} is @code{nil}.  Otherwise
@code{nil}.

@item w3m-namazu-index-alist
@vindex w3m-namazu-index-alist
Alist of aliases and index directories.  The default value is determined
due to @code{namazu-dir-alist} if any or @code{nil}.

@item w3m-namazu-input-coding-system
@vindex w3m-namazu-input-coding-system
Coding system used when reading from the namazu process.  The default is
the value of @code{namazu-cs-read} if it exists, or @code{undecided}.

@item w3m-namazu-output-coding-system
@vindex w3m-namazu-output-coding-system
Coding system used when writing to the namazu process.  The default is
the value of @code{namazu-cs-write} if it exists, or is determined to
@code{shift_jis-dos} or @code{euc-japan-unix} due to the system type.

@item w3m-namazu-page-max
@vindex w3m-namazu-page-max
The maximum number of documents retrieved in one search.  The default is
the value of @code{namazu-search-num} if any, or @code{30}.
@end table

@node Octet Variables
@section Variables related to the octet feature
@cindex Variables related to the octet feature

There is no user option for the moment.

@node Session Manager Variables
@section Variables related to session manager
@cindex Variables related to session manager

@table @code
@item w3m-session-file
@vindex w3m-session-file
File name to keep sessions.

@item w3m-session-time-format
@vindex w3m-session-time-format
Format of saved time.

@item w3m-session-automatic-title
@vindex w3m-session-automatic-title
String of title to save session automatically.

@item w3m-session-deleted-title
@vindex w3m-session-deleted-title
String of title to save session when buffer delete.

@item w3m-session-crash-recovery-title
@vindex w3m-session-crash-recovery-title
String of title to save session to use for crash recovering.

@item w3m-session-deleted-keep-number
@vindex w3m-session-deleted-keep-number
Number to keep sessions when buffers delete.

@item w3m-session-automatic-keep-number
@vindex w3m-session-automatic-keep-number
Number to keep sessions automatically.

@item w3m-session-unknown-title
@vindex w3m-session-unknown-title
String of title to use when title is not specified.
@end table

@node Hooks
@section Hooks
@cindex Hooks

@table @code
@item w3m-after-cursor-move-hook
@vindex w3m-after-cursor-move-hook
Hook run each time after the cursor moves in emacs-w3m buffers.  This
hook is called by the @code{w3m-check-current-position} function by way
of @code{post-command-hook}.

@item w3m-delete-buffer-hook
@vindex w3m-delete-buffer-hook
Hook run when every emacs-w3m buffer is deleted.

@item w3m-display-hook
@vindex w3m-display-hook
Hook run after displaying pages in emacs-w3m buffers.  Each function is
called with a url string as the argument.  This hook is evaluated by the
@code{w3m-goto-url} function.

@item w3m-fontify-after-hook
@vindex w3m-fontify-after-hook
Hook run after fontifying emacs-w3m buffers.  This hook is evaluated by
the @code{w3m-fontify} function.

@item w3m-fontify-before-hook
@vindex w3m-fontify-before-hook
Hook run when starting to fontify emacs-w3m buffers.  This hook is
evaluated by the @code{w3m-fontify} function.

@item w3m-form-input-map-mode-hook
@vindex w3m-form-input-map-mode-hook
A hook called after w3m-form-input-map-mode.

@item w3m-form-input-map-set-hook
@vindex w3m-form-input-map-set-hook
A Hook called before w3m-form-input-map-set.

@item w3m-form-input-select-mode-hook
@vindex w3m-form-input-select-mode-hook
A hook called after w3m-form-input-select-mode.

@item w3m-form-input-select-set-hook
@vindex w3m-form-input-select-set-hook
A Hook called before w3m-form-input-select-set.

@item w3m-form-input-textarea-mode-hook
@vindex w3m-form-input-textarea-mode-hook
A hook called after w3m-form-input-textarea-mode.

@item w3m-form-input-textarea-set-hook
@vindex w3m-form-input-textarea-set-hook
A Hook called before w3m-form-input-textarea-set.

@item w3m-minor-mode-hook
@vindex w3m-minor-mode-hook
Hook run after @code{w3m-minor-mode} initialization.

@item w3m-mode-hook
@vindex w3m-mode-hook
Hook run after @code{w3m-mode} initialization.  This hook is evaluated
by the @code{w3m-mode} function.

@item w3m-select-buffer-hook
@vindex w3m-select-buffer-hook
Hook run when a different emacs-w3m buffer is selected.

@item w3m-bookmark-mode-hook
@vindex w3m-bookmark-mode-hook
Hook run at the end of function `w3m-bookmark-mode'.
@end table

@node Other Variables
@section Other variables
@cindex Other variables

@table @code
@item w3m-async-exec
@vindex w3m-async-exec
Non-@code{nil} means execute the @samp{w3m} command asynchronously in
Emacs process.

@item w3m-broken-proxy-cache
@vindex w3m-broken-proxy-cache
Set it to @code{t} if the proxy server seems not to work properly in
caching.  Note that this may be the double-edged sword; setting it to
@code{t} will likely be harmful if the proxy server sends bad requests
(e.g., not including the Host header, see RFC2616 section 14.23) to
foreign servers when the @samp{w3m} command specifies the
@samp{no-cache} directive.  Also note that it may not be effective if
you are using old @samp{w3m} command.

@item w3m-history-minimize-in-new-session
@vindex w3m-history-minimize-in-new-session
Non-@code{nil} means minimize copied history so that there's only
current page.  This variable is effective when creating of the new
session by copying (i.e., @code{w3m-copy-buffer}).  The default value is
@code{nil}.

@item w3m-history-reuse-history-elements
@vindex w3m-history-reuse-history-elements
Non-@code{nil} means reuse the history element when re-visiting the
page.  Otherwise, a new history element will be created even if there
are elements for the same url in the history.

Emacs-w3m used to operate as the case in which it is non-@code{nil},
however it sometimes brought about users' dissatisfaction.  For example,
if a user visited the pages A -> B -> C -> B in order, performing BACK
on the second B would let a user visit A.  The reason why a user was
taken to A rather than C is that the @code{w3m-history} variable only
had the list @code{(A B C)} as a history and B was the current position
at that time.

The default value for this variable is @code{nil} which allows the
@code{w3m-history} variable to have the list @code{(A B C B)}.  Where
contents of two B's are the identical Lisp objects.  So, too much
wasting the Lisp resources will be avoided.

See the documentation for the variables @code{w3m-history} and
@code{w3m-history-flat} for more information.

@item w3m-process-connection-type
@vindex w3m-process-connection-type
Value for @code{process-connection-type} used when communicating with
@samp{w3m}.

@item w3m-process-modeline-format
@vindex w3m-process-modeline-format
Format used when displaying the progress of the external @samp{w3m}
process.  It shows a percentage of the data loaded from the web server.

@item w3m-show-current-title-in-buffer-tab
@vindex w3m-show-current-title-in-buffer-tab
If non-@code{nil}, show the title strings in the buffers tab.  It has no
effect if your XEmacs does not support the gutter items.
@end table

@node Hooking into MUAs
@chapter Hooking emacs-w3m into mail/newsreaders

This section introduces three Message User Agents (MUAs).  All those
MUAs can display HTML mails properly using emacs-w3m.  You'll find here
HowTo's and some notes about setting up and using emacs-w3m with each
of these MUAs.

Quick note about the conventions we use: what does @samp{message}
mean?@* When a Gnus user says @samp{message}, it often means a draft of
a message to be sent as mail or news.  However, it is the term used by
Mew or Wanderlust users for received mail.  They use @samp{draft} for
the draft of a message to be sent.  On the other hand, a received
message is called an @samp{article} by Gnus users.

@menu
* Gnus::                        Reading HTML mails in Gnus
* Mew::                         Reading HTML mails in Mew
* SEMI MUAs::                   Reading HTML mails in @acronym{SEMI} MUAs
* VM::                          VM (vieW maiL) is not Wanderlust
@end menu

@node Gnus
@section Reading HTML mails in Gnus
@cindex Reading HTML mails in Gnus
@vindex mm-inline-text-html-with-images
@vindex mm-inline-text-html-with-w3m-keymap
@vindex mm-text-html-renderer
@vindex w3m-minor-mode
@vindex w3m-minor-mode-command-alist

Did you know that Gnus, the Emacs newsreader, supports emacs-w3m?
Actually, Gnus bundled with Emacs of which the version is 22.1 or
greater supports emacs-w3m.  If your Emacs is somewhat old, you'd better
use the latest version of Gnus.  It is available at:

@uref{ftp://ftp.gnus.org/pub/gnus/gnus.tar.gz}

@itemize @bullet
@item
What can you do with emacs-w3m?

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 @code{w3m-minor-mode} is turned
on and you can use the same main keys as the keys of emacs-w3m, for
instance, @kbd{@key{RET}} is for visiting a page which a link in the
current position points to.  Those keys are defined in the
@code{w3m-minor-mode-command-alist} variable.  Keep in mind that some
commands are replaced by others similar to them, for security reasons
(see below).

@item
What do you have to do?

Read the Gnus manual (@pxref{Display Customization, ,Display
Customization, emacs-mime, The Emacs MIME Manual}).  The easiest way is
to put the following line in your @file{~/.gnus.el} file:

@lisp
(setq mm-text-html-renderer 'w3m)
@end lisp

Also put the following line if you want to show images inline in article
buffers:

@lisp
(setq mm-inline-text-html-with-images t)
@end lisp

If you don't need to use emacs-w3m keys in article buffers, add the
following line too:

@lisp
(setq mm-inline-text-html-with-w3m-keymap nil)
@end lisp

@item
Notes

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 @samp{<img>} tag which is far more evil than
the @samp{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
@code{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
@code{mm-inline-text-html-with-images} to @code{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
@code{mm-w3m-safe-url-regexp} variable to @code{nil}.  The default value
for @code{mm-w3m-safe-url-regexp} is @samp{"\\`cid:"} which means we
consider that images included in a mail with the @samp{cid:} URL are
safe (that is, you can display such images without modifying the
@code{mm-w3m-safe-url-regexp} variable).

@item
Giveaway

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:

@lisp
(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, force displaying of images."
  (interactive "P")
  (with-current-buffer gnus-article-buffer
    (let ((st (point-min))
          (nd (point-max))
          (w3m-async-exec w3m-async-exec))
      (save-restriction
        (widen)
        (if (or (> st (point-min)) (< nd (point-max)))
            (setq w3m-async-exec nil))
        (article-goto-body)
        (goto-char (or (text-property-not-all (point) (point-max)
                                              'w3m-safe-url-regexp nil)
                       (point)))
        (if (interactive-p)
            (call-interactively 'w3m-toggle-inline-images)
          (w3m-toggle-inline-images arg))))))

(eval-after-load "gnus-sum"
  '(define-key gnus-summary-mode-map
     "\C-i" 'gnus-summary-w3m-safe-toggle-inline-images))
@end lisp
@end itemize

@noindent
See also @ref{Nnshimbun}.

@node Mew
@section Reading HTML mails in Mew

By using emacs-w3m with Mew, you can see HTML mails as it intended to be
displayed.  To do so, put the following line in the @file{~/.mew.el}
file:

@lisp
(require 'mew-w3m)
@end lisp

@noindent
With just this, an HTML mail will be displayed in the message window as
if it were a plain text.  You can still use the @w{@kbd{C-c C-e}} command
(@code{mew-summary-execute-external}) there.

It is also quite common these days to see mails containing the same
information twice, they use the @samp{multipart/alternative} format
which consists of both a @samp{text/plain} part and a @samp{text/html}
part (what a waste of bandwidth it is).  Mew displays only the
@samp{text/plain} part of such a mail by default.  However, you perhaps
want to see the @samp{text/html} part since you are using emacs-w3m.
If so, add the following lines to the @file{~/.mew.el} file:

@lisp
(setq mew-mime-multipart-alternative-list
      '("Text/Html" "Text/Plain" ".*"))
@end lisp

@noindent
There are some customizable variables related to Mew:

@table @code
@item mew-use-w3m-minor-mode
If non-@code{nil}, the @code{w3m-minor-mode} is turned on in the message
buffer where a text/html part is displayed, and you can use the same
main keys as the keys of emacs-w3m, for instance, @kbd{@key{RET}} is for
visiting a page which a link in the current position points to.  Those
keys are defined in the @code{w3m-minor-mode-command-alist} variable.
Keep in mind that some commands are replaced by others similar to them,
for security reasons.  The default value is @code{nil}.

@item mew-w3m-auto-insert-image
If non-@code{nil}, you can see images inline in the message buffer when
you read a multipart/related message.  Note that mew-w3m only allows
images contained in the message body with a @samp{cid:} URL to be
displayed (as we consider them safe).  The default value is @code{nil}.

To activate this feature, add following in your @file{~/.mew.el}.

@lisp
(define-key mew-summary-mode-map "T" 'mew-w3m-view-inline-image)
@end lisp

Press ``T'', toggle the visibility of the images included its message
only.  Press ``C-uT'', display the all images included its Text/Html
part.

@item mew-w3m-cid-retrieve-hook
A hook run just after retrieving a @samp{cid:} URL.  The default value
is @code{nil}.
@end table

@noindent
See also @ref{Mew Shimbun}.

@node SEMI MUAs
@section Reading HTML mails in @acronym{SEMI} MUAs

You can display HTML mails as human-readable, using emacs-w3m and
@acronym{SEMI} MUA, for example, Wanderlust.  Since that MUA depends on
@acronym{SEMI} (and also @acronym{FLIM}) for MIME functions, we
generically call it @acronym{SEMI} MUA.  Although @acronym{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.

@noindent
You simply need to put the following line in @file{~/.emacs} file:

@lisp
(require 'mime-w3m)
@end lisp

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

On HTML parts of an article buffer, the @code{w3m-minor-mode} is turned
on and you can use the same main keys as the keys of emacs-w3m, for
instance, @kbd{@key{RET}} is for visiting a page which a link in the
current position points to.  Those keys are defined in the
@code{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 @code{mime-w3m}
module:

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

@item mime-w3m-safe-url-regexp
Regexp matching URLs which are considered to be safe.  The default value
is @samp{"\\`cid:"} which means we consider that images included in a
mail with the @samp{cid:} URLs are safe.  See also @ref{Gnus} about
rogue attacks.

@item mime-w3m-setup-hook
A hook run just after setting up the cooperation of the @code{mime-w3m}
module and @acronym{SEMI}.  The default value is @code{nil}.
@end table

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's an example for
Wanderlust:

@lisp
(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")
  (with-current-buffer wl-message-buffer
    (w3m-toggle-inline-images arg)))

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

@node VM
@section VM (vieW maiL) is not Wanderlust

The module vm-w3m.el that provides the feature for VM to display html
mails and a patch have been handed over to the new VM maintainer,
although it has not appeared in the stable version of VM yet.  Try
visiting @uref{http://www.nongnu.org/viewmail/, the VM home page}.

@node Frequently Asked Questions
@chapter There isn't always an answer

@menu
* General FAQ::                 General Questions
* Trouble FAQ::                 Troubleshooting
* Shimbun FAQ::                 Questions of Shimbun Library
@end menu

@node General FAQ
@section General Questions

@itemize @bullet
@item
Q. What's emacs-w3m?

It is an interface program on Emacs which controls w3m.  For more
information, see @ref{Introduction}.

@item
Q. Which emacs versions are supported?

The following Emacsen have been checked for emacs-w3m support:

@itemize @bullet
@item Emacs 21
@item Emacs 22
@item XEmacs 21.4.17 and later with/without Mule
@item XEmacs 21.5-b19 and later with/without Mule
@item Meadow
@end itemize

Note that you're required to use @acronym{APEL} if you'd like to run
emacs-w3m under XEmacs.  For more information, see @ref{Other
Requirements}.

@item
Q. Which w3m versions are supported?

The following w3m versions have been checked for emacs-w3m support:

@itemize @bullet
@item w3m-0.3 and later
@item w3mmee-p24-18 + moe-1.5.4

Note that w3mmee mentioned as the example is configured with the
@samp{lang=many} option (it can be done by entering 3, when the
@samp{configure} script prompts you, "Which language do you prefer?").
It also requires the @samp{libmoe} package.
@end itemize

@item
Q. I've already installed @acronym{APEL} in the XEmacs SUMO package, is
it ok?

There are some problems in the XEmacs @acronym{APEL} package (all
modules have been compiled for XEmacs with Mule); for instance, the
@samp{std11} modules conflict with the @acronym{FLIM}'s one, etc.  Even
though you can use @file{apel-1.23-pkg.tar.gz} or later for both XEmacs
with Mule and non-Mule XEmacs if you don't use @acronym{FLIM} for the
@samp{shimbun} features, we recommend you replace it or newly install
the original @acronym{APEL} package.  See @ref{Other Requirements} where
to get it from.

@item
Q. I've gotten the developing version of emacs-w3m with CVS, however I'm
missing @file{configure} script.

It is necessary to run @samp{autoconf} first, to generate
@file{configure} script.
@end itemize

@node Trouble FAQ
@section Troubleshooting

@itemize @bullet
@item
Q. Why can't I enter a password on pages which require authentication?

Make sure the @code{w3m-async-exec} variable is set to a value other
than @code{nil}.

@item
Q. Why can't I enter a password for a proxy server which requires
authentication?

Make sure the @code{w3m-async-exec} variable is set to a value other
than @code{nil}.

@item
Q. Why can't I follow links?

Emacs-w3m requires a version of w3m which recognizes the @samp{-header}
option.  Check what version of w3m you use.

@item
Q. Why do garbage characters appear?

It could be caused by the following reasons:

@enumerate
@item
Bad HTML file

If the character set specified by the @samp{<meta>} tag differs from
the actual contents in an HTML file, it will not be displayed correctly.
Use the command @w{@kbd{M-x w3m-redisplay-with-charset @key{RET}}} or
@w{@kbd{C c}} to set the correct character set and to force redisplay of
the page.

@item
Limitation of the character sets

A page written by a character set other than ISO-2022-JP(jis), EUC-JP,
or SHIFT_JIS may not be displayed correctly.  Try one of the following
ways:

@enumerate a
@item
Any characters defined in Unicode will be displayed correctly if you
install the Mule-UCS package (@pxref{Other Requirements}).  You need to
make sure that the value of the @code{w3m-use-mule-ucs} variable is set
to a value other than @code{nil} after installing the Mule-UCS package.
In addition, if you want to make Emacs (and also emacs-w3m) handle the
character sets EUC-JISX0213 and ISO-2022-JP-3, you have to install the
@samp{jisx0213} module which is contained in the Mule-UCS package
(though it doesn't work under XEmacs unfortunately).

@item
Install w3mmee or w3m-m17n, and set the @code{w3m-command} variable to
the appropriate value.  And emacs-w3m will use the multi-lingual
features provided by one of those programs.
However, a page written by a coding system which Emacs doesn't support
may not be displayed correctly. So please install Mule-UCS package if
necessary.
@end enumerate

@item
Emacsen incompatibility

Under XEmacs 21.1, pages written by the SHIFT_JIS character set may not
be displayed correctly.  There is also a problem in XEmacs 21.2 prior to
the beta 36 version.  You should upgrade your XEmacs if you use such
one.

You should notice that XEmacs versions 21.1 and 21.2 have already been
retired officially.

@item
Don't use @code{standard-display-european}

It is generally harmful since it often makes Latin characters get
displayed incorrectly.  For instance, the apostrophe character
(@samp{'}) which was encoded as @samp{&#8217} will be displayed as the
character @samp{u} with a grave accent as if it had been encoded as
@samp{&#249}.  If the line something like the following is in your
@file{~/.emacs} file or site files which Emacs loads when starting up,
we strongly recommend you to remove it.

@lisp
(standard-display-european 1)
@end lisp

There the argument might be @code{t}, not @code{1}.
@end enumerate

@item
Q. Why can't images be shown?

It could be caused by the following reasons:

There is a bug in the earlier versions of the @samp{libungif} library.
You have to install @samp{libungif-4.1.0b1} and later.

You must install the @samp{gifsicle} program if you want to run
emacs-w3m under XEmacs.  @xref{Other Requirements}.

Emacs-w3m doesn't support the old versions of w3m.  Check what version
of w3m you use.

@item
Q. Why can't I browse pages which require cookies?

(This is still an experimental feature.)

Make sure the @code{w3m-use-cookies} variable is set to a value other
than @code{nil}.

@item
Q. Why can't I fill in the form?

(This is still an experimental feature.)

Make sure the @code{w3m-use-form} variable is set to a value other than
@code{nil}.

@item
Q. Why can't I submit a form?

(This is still an experimental feature.)

Make sure the @code{w3m-use-form} variable is set to a value other than
@code{nil}.  You also need to use a version of w3m which recognizes the
@samp{-post} option in order to use this function.  Check what version
of w3m you use.

@item
Q. Why are frames not rendered?

Install w3mmee and put the following line in your @file{~/.emacs} file:

@lisp
(setq w3m-command "w3mmee")
@end lisp

@item
Q. Why are favicon images not displayed in the tabs line on GNU Emacs?

Install the @samp{convert} program which is included in ImageMagick.
It is available from: @uref{http://www.imagemagick.org/}

@item
Q. Why does GNU Emacs get locked when a favicon image is going to be
displayed?
@item
Q. My computer accesses the disk drive violently and says @samp{process
convert exited abnormally with code 10}.  What's the story?

Do you use an old version of ImageMagick?  As far as we know, it happens
when you use the @samp{convert} program bundled with ImageMagick 5.2.1.
It has been confirmed that the @samp{convert} program bundled with
ImageMagick 5.4.0-5 (and later) works fine.

If you don't want to use ImageMagick, or if you can't use its most
recent version, add the following line in your @file{~/.emacs-w3m} file:

@lisp
(setq w3m-use-favicon nil)
@end lisp

@item
Q. Why does not emacs-w3m work with w3mmee?

If you are using w3mmee configured with the option @samp{lang=en} or
@samp{lang=ja}, reconfigure w3mmee with the option @samp{lang=many} (it
can be done by entering 3, when the @samp{configure} script prompts you,
"Which language do you prefer?"), and rebuild w3mmee.

@item
Q. Why I cannot visit web pages using emacs-w3m?  There is no problem
when visiting local html files or using w3m barefoot, though.

What is called the asynch
patch@footnote{@uref{http://www.page.sannet.ne.jp/knabe/w3m/w3m.html,
w3m on cygwin}} is applied to the w3m command which some Linux
distribution (e.g. Gentoo Linux) contains.  It is useful when using w3m
barefoot, however it might make emacs-w3m hang.  If it is suspected, we
recommend you reinstall the w3m command from the original source.

@item
Q. Why doesn't the emacs-w3m frame pop up to the front?

It is quite convenient that the @w{@kbd{M-x w3m @key{RET}}} command
makes the emacs-w3m frame pop to the front even if it is hidden under
the other frames.  However, it was reported that it does not work when
running Emacs which has been built on some platforms (e.g., Fedora
Linux) in which the @samp{metacity} window manager is used.  In those
systems, other features which raise the Emacs frames will not work,
either.  If you are in such a miserable circumstance, it might be worth
trying the following advice:

@lisp
(if (or (not window-system) (featurep 'xemacs))
    nil
  (defadvice raise-frame
    (after make-it-work (&optional frame) activate)
    "Make it work with the aid of wmctrl."
    (call-process
     "wmctrl" nil nil nil "-i" "-R"
     (frame-parameter (or frame (selected-frame))
                      'outer-window-id))))
@end lisp

Where @samp{wmctrl} is the external command which you can get from:

@uref{http://sweb.cz/tripie/utils/wmctrl/}

Note that you have to install the @samp{wmctrl} command before putting
the advice into the @file{~/.emacs} file.

The following one is currently unnecessary for emacs-w3m, but a certain
application needs it to work.  (You will lose nothing by adding it if
you are in the platform in which the previous one is needed.)

@lisp
(if (or (not window-system) (featurep 'xemacs))
    nil
  (defadvice pop-to-buffer (after enable-it-to-forcus-frame
                                  activate)
    "Enable it to focus frame if `pop-up-frames' is non-nil."
    (when pop-up-frames
      (let ((id (condition-case nil
                    (frame-parameter
                     (window-frame
                      (get-buffer-window (ad-get-arg 0)))
                     'outer-window-id)
                  (error nil))))
        (when id
          (call-process
           "wmctrl" nil nil nil "-i" "-R" id))))))
@end lisp

The last one is perhaps unnecessary but it might be worth trying in some
platforms.

@lisp
(if (or (not window-system)(featurep 'xemacs))
    nil
  (defadvice select-frame (around set-input-focus
                                  (frame) activate)
    "Run `select-frame-set-input-focus'."
    (setq ad-return-value (and (framep frame)
                               (frame-live-p frame)
                               frame))
    (ad-deactivate 'select-frame)
    (unwind-protect
        (select-frame-set-input-focus frame)
      (ad-activate 'select-frame))))
@end lisp

These workarounds will become unnecessary in subsequent Emacs releases
(22.2 or 23.1).
@end itemize

@node Shimbun FAQ
@section Questions of Shimbun Library

@itemize @bullet
@item
Q. Why are the @samp{shimbun} modules not installed?

Note that the @samp{shimbun} modules (files under the @file{shimbun/}
directory) won't be installed if the @acronym{FLIM} package has not been
installed in your system.

The @samp{configure} script determines automatically whether the
@acronym{FLIM} package is installed or not.  If the @acronym{FLIM}
package is installed in a non-standard directory, the determination
fails.  In this case, you can use the @samp{--with-addpath} configure
option to explicitly set the directory name where the @acronym{FLIM}
package has been installed.  Here's an example:

@example
% ./configure --with-addpath=$HOME/share/emacs/site-lisp/flim
@end example
@end itemize

@node Known Problems
@chapter You can surely solve it


@node Shimbun Library
@chapter A tool for reading a newspaper
@cindex Shimbun library

More and more newspapers, mailing list archives, bulletin boards, and
individual diaries (such as hyper nikki system, weblogs and blogs) are
published on the web.  @samp{Shimbun} library enables you to read those
contents with your favorite mail/news reader.  Actually, @samp{Shimbun}
library provides functions to convert those contents into articles like
common e-mails.

@quotation
@samp{Shimbun} is pronounced ``she-n-boon'' (but actually vowels
shouldn't be prolonged), it means ``newspaper'' in Japanese.
@end quotation

The @samp{shimbun} module has the goal to generate articles that are as
readable as normal mail or news posting.  This goal is often difficult
to achieve as web sites change the html of their articles.

If you notice (even small) annoyances like nonsense images within the
text or any other text that is not related to the article please report
them using @code{report-emacs-w3m-bug} (@pxref{Mailing List}).

@samp{Shimbun} library currently supports Asahi Shimbun, Yomiuri
On-line, many mailing list archives such as Emacs Devel, XEmacs Beta,
Gnus, Mew, and Wanderlust, Slashdot, Slashdot Japan, and a lot of
others.  For more detail, see @ref{Shimbun Sites}.

By the way, you have to pay attention to copyright when using
@samp{Shimbun} library.  Copyrights of articles generated with
@samp{Shimbun} library are reserved by copyright holders of those
original contents.  Therefore, you are obliged not to violate rights of
copyright holders, when you enjoy generated articles.  It means that you
can enjoy generated articles on ``fair use'' that is described in the
copyright law.

We, emacs-w3m development team, give no warranty to you, if
@samp{Shimbun} library causes a damage to you, or if you face a lawsuit
about violation of copyrights.

@samp{Shimbun} library is a collection of many modules, but each of them
serves no useful purpose alone.  This section explains three typical
@samp{Shimbun} applications (two of which are included in the
@samp{Shimbun} library) and how to make @samp{Shimbun} modules by
yourself (you need to be able to write Emacs Lisp programs).

@menu
* Nnshimbun::                   Turning Gnus into a web browser!
* Mew Shimbun::                 Reading web newspapers with Mew
* Shimbun with Wanderlust::     Reading web newspapers with Wanderlust
* Shimbun local mode::          Use a shell script to fetch shimbun feeds
* Shimbun Sites::               Sites supported by Shimbun
* Shimbun Basics::              How to make a new shimbun module
@end menu

Note that you need to have installed the @acronym{FLIM} package (and
Gnus if you'd like to use @samp{nnshimbun}) before building and
installing emacs-w3m.  The @acronym{FLIM} package requires the
@acronym{APEL} package.  You might also want to see @xref{Other
Requirements}.

@node Nnshimbun
@section Turning Gnus into a web browser!
@cindex nnshimbun
@cindex Web Newspaper

@samp{Nnshimbun} is a Gnus back end, but it is distributed with
emacs-w3m, not Gnus, exceptionally.  @samp{Nnshimbun} allows you to turn
Gnus into an exceptionally useful web browser.  You can skim through the
articles on a newspaper's web server without having to see all the
advertisement.  You can read articles in mailing list archives as if you
were subscribed to the list.  You can also read submissions in bulletin
boards, etc...  Note that if you want to followup, you still need to use
emacs-w3m as Gnus can't post via the web with @samp{nnshimbun}.

See also @ref{Gnus} for rendering HTML messages with emacs-w3m if you
use Gnus.

@findex gnus-group-make-shimbun-group
@c @kindex G n (Group)
The easiest way to get started with @samp{nnshimbun} is to use
something like the following in the Group buffer:

@w{@kbd{M-x gnus-group-make-shimbun-group @key{RET} asahi @key{RET} national @key{RET}}}
@c @w{@kbd{G n asahi @key{RET} national @key{RET}}}

@noindent
Replace @samp{asahi} and @samp{national} with the keyword corresponding
to the server you'd like to connect to and the group you're interested
in respectively.  You can complete both of those names by using
@kbd{@key{TAB}} or @kbd{@key{SPC}}.

You can also bind that to a key if there's enough room in the
@code{gnus-group-mode-map} map, you can add something like the following
in your @file{~/.gnus.el} file:

@lisp
(eval-after-load "gnus-group"
  '(define-key gnus-group-mode-map "Gn"
     'gnus-group-make-shimbun-group))
@end lisp

@noindent
Then, you can use @w{@kbd{G n}} instead of
@w{@kbd{M-x gnus-group-make-shimbun-group}}.

@emph{Could someone book this keystroke at the Gnus Tower?}

@c Otherwise, you can also see articles by browsing the back end using
@c @w{@kbd{B nnshimbun @key{RET} asahi @key{RET}}}.

@findex gnus-group-make-shimbun-groups
@noindent
Besides this, you can use the @code{gnus-group-make-shimbun-groups}
command in order to make all groups for the specified server.

@samp{Nnshimbun} simply fetches HTML contents from the web server and
displays them as an article, but it will never save articles in the
local file system, except if you use persistent articles
(@pxref{Persistent Articles, ,Persistent Articles, gnus, The Gnus
Manual}).  @samp{Nnshimbun} uses @acronym{NOV} files for each
@samp{nnshimbun} group, and its back end is almost the same as
@samp{nnml}.

The following @samp{nnshimbun} variables can be customized:

@table @code
@item nnshimbun-keep-backlog
@vindex nnshimbun-keep-backlog
@vindex gnus-keep-backlog
This variable overrides the @code{gnus-keep-backlog} variable
(@pxref{Article Backlog, ,Article Backlog, gnus, The Gnus Manual}) in
@samp{nnshimbun} groups.  If you set @code{nnshimbun-keep-backlog} to a
number @var{n}, @samp{nnshimbun} will store at most @var{n} old articles
in a buffer for later re-fetching.  If this variable is non-@code{nil}
and is not a number, @samp{nnshimbun} will store @emph{all} read
articles (this is not a good idea).  The default value is 300.

Note that smaller values may spoil the @code{prefetch-articles} feature
(see below), since @samp{nnshimbun} uses the backlog to keep the
prefetched articles.

@item nnshimbun-directory
@vindex nnshimbun-directory
Directory where @samp{nnshimbun} saves @acronym{NOV} and marks files.
The default value is @samp{~/News/shimbun/}.  This is a server variable
(@pxref{Server Variables, ,Server Variables, gnus, The Gnus Manual}).

@item nnshimbun-default-group-level
@vindex nnshimbun-default-group-level
The default group level overriding @code{gnus-level-default-subscribed}.
It will be applied to newly created @samp{nnshimbun} groups.  The
default value is @code{nil}.  This is a server variable (@pxref{Server
Variables, ,Server Variables, gnus, The Gnus Manual}).

@item nnshimbun-marks-is-evil
@vindex nnshimbun-marks-is-evil
If non-@code{nil}, Gnus will never generate and use marks file for
@samp{shimbun} spools.  Using marks files makes it possible to backup
and restore @samp{shimbun} groups separately from @file{.newsrc.eld}.
If you have, for some reason, set this to @code{t}, and want to set it
to @code{nil} again, you should always remove the corresponding marks
file (usually named @samp{.marks} in the @samp{shimbun} group directory,
but see @code{nnshimbun-marks-file-name}) for the group.  Then the marks
file will be regenerated properly by Gnus.  The default value is
@code{nil}.  This is a server variable (@pxref{Server Variables, ,Server
Variables, gnus, The Gnus Manual}).
@end table

@cindex group parameters
You can use the specially made group parameter for @samp{nnshimbun} in
addition to the standard group parameters provided by Gnus@footnote{The
easiest way to specify group parameters is to type @w{@kbd{G c}} in the
group buffer after moving the point to the group you'd like to customize
(@pxref{Group Parameters, ,Group Parameters, gnus, The Gnus Manual}).}.
Several parameters for @samp{nnshimbun} are collected into the single
group parameter @code{nnshimbun-group-parameters} which is a property
list (the values can be different for every group).  Here's an example:

@lisp
'(index-range all prefetch-articles off encapsulate-images on
              expiry-wait 6)
@end lisp

Below is the documentation for those group parameters and related
variables.

@table @code
@item prefetch-articles
@vindex nnshimbun-pre-fetch-article
In a group where this group parameter is set to something else than
@code{off} or @code{nil}, @samp{nnshimbun} not only checks for new
articles, but also downloads them.  Though it will slow checking of new
articles down, you won't be kept waiting when reading articles.  In the
group where this group parameter is not set or its value is @code{nil},
the value of the @code{nnshimbun-pre-fetch-article} variable (@code{off}
by default) is used instead.

@item encapsulate-images
@vindex nnshimbun-encapsulate-images
In a group where this group parameter is set to something else than
@code{off} or @code{nil}, @samp{nnshimbun} will put image data embedded
in the original contents into an article as @samp{multipart/related}
parts of the MIME format.  In the group where this group parameter is
not set or its value is @code{nil}, the value of the
@code{nnshimbun-encapsulate-images} variable is used instead.  The
default value for the @code{nnshimbun-encapsulate-images} variable is
the value of the @code{shimbun-encapsulate-images} variable which is
provided in the @samp{shimbun} library (the default value is probably
@code{t}).

@item index-range
@vindex nnshimbun-index-range
You can specify the range of articles to be fetched from the web server
using the @code{index-range} group parameter.  To specify the range, use
the following values:

@table @code
@item nil
@itemx all
all pages

@item last
only the latest page
@end table

@table @samp
@item integer N
the latest N pages
@end table

@samp{Nnshimbun} checks whether there are new articles by parsing the
index page of the server.  It is possible that there are two or more
index pages on the server.  For instance, in the case of the mailing
list servers, index pages are generally classified according to the date
on which the article was posted.  It would take a considerable amount of
time to check all those huge index pages especially if you are
connecting via a slow line.

If it is possible, @samp{nnshimbun} won't check index pages which have
already been checked at the last connection.  If you want to save even
more time, use @code{last}.  It makes @samp{nnshimbun} refer to only the
latest index page for checking new articles.

In the group where the @code{index-range} group parameter is not set or
its value is @code{nil}, the value of the @code{nnshimbun-index-range}
variable (@code{2} by default) is used.

@item nnshimbun-group-parameters-alist
@vindex nnshimbun-group-parameters-alist
This is an Emacs Lisp variable, an alist of regexp of group names and
@samp{nnshimbun} group parameters.  The default value is @code{nil}.
Each element may have the form @samp{(REGEXP KEYWORD VALUE KEYWORD
VALUE...)}, for example:

@lisp
'("^nnshimbun\\+asahi:" index-range all prefetch-articles off
  encapsulate-images on expiry-wait 6)
@end lisp

Since you can use this variable to specify the same @samp{nnshimbun}
group parameters for two or more groups which have similar names (i.e.,
those groups are likely to have similar characteristics each other), it
is useful that it can be used instead of specifying the @samp{nnshimbun}
group parameters to several groups respectively.  If the group parameter
has already been set in a group, that takes precedence over this
variable.
@end table

@cindex article expiry
@cindex auto-expire
@cindex expiry-wait
@vindex nnmail-expiry-wait-function
@vindex nnmail-expiry-wait
You can instruct @samp{nnshimbun} to expire articles@footnote{There are
mainly two ways to expire articles automatically in the @samp{nnshimbun}
groups.  One is to add a group name regular expression (it should begin
with ``^nnshimbun\\+'') to the @code{gnus-auto-expirable-newsgroups}
variable and to put the expiry period for each group into the
@code{nnmail-expiry-wait-function} variable.  Another is to set the
@code{auto-expire} group parameter to @code{t} and to set the expiry
period with the @code{expiry-wait} group parameter in every
@samp{nnshimbun} group which you want to expire automatically.  See
@xref{Expiring Mail, ,Expiring Mail, gnus, The Gnus manual}, for more
information.  In the group to which the @code{expiry-wait} group
parameter is not specified, a default expiry period will be applied.}.
Keep in mind that when an article is expired, it is not deleted from the
remote server, it's still available there.  What is deleted is the line
in your own @acronym{NOV} file for @samp{nnshimbun}@footnote{The
@acronym{NOV} file for @samp{nnshimbun} is named something like
``~/News/shimbun/asahi/national/.overview''.} corresponding to the
article to be expired.  Then the article won't appear in the Summary
buffer, forever and ever.

If you don't expire articles in @samp{nnshimbun} groups, the
@acronym{NOV} files will continue to grow fat indefinitely and you may
see very old articles in the Summary buffer as if they were existing (in
fact, they might have expired three years ago on the remote server!).
Even if you try to read such an article, nothing will appear in the
article buffer.  On the other hand, most mailing list servers generally
offer all the past articles.  You may not feel like expiring articles in
such groups in order to look back with nostalgia to the good old days
and to be able to read, eyes filled with tears, articles which you
thought long gone.

You can mark @samp{nnshimbun} articles as expirable and specify the
expiry period in each @samp{nnshimbun} group as well as the other mail
back ends.  However, there are a little differences between
@samp{nnshimbun} and the other mail back ends:

@itemize @bullet
@item
First of all, the expiry period is determined with the following
priorities.  Note that the default value might be different from group
to group.

@enumerate
@item
The value of the @code{expiry-wait} group parameter in a group.

@item
The value produced by evaluating the @code{nnmail-expiry-wait-function}
variable for a group.

@item
The default value provided by the @samp{shimbun} module corresponding to
a group.

@item
The value of the @code{nnmail-expiry-wait} variable.
@end enumerate

@item
Second of all, the argument to be passed to the function specified by
the @code{nnmail-expiry-wait-function} variable will contain the names
of the back end and the server like ``nnshimbun+asahi:national'', while
only the group name will be given in the case of the other mail
back ends.  Here's an example:

@lisp
(setq nnmail-expiry-wait-function
      (lambda (group)
        (cond ((string-equal group "ding") 7)
              ((string-equal group "nnshimbun+ding:ding") 'never))))
@end lisp

This means that there are two groups for the same ding mailing list; one
is subscribed as a list member, the other is for reading from the
mailing list archive at the Gnus Towers.  Ahem, isn't it clever?  The
local mail files in the ``ding'' group will be expired in seven days and
your local disk space will be saved, but you can read even the articles
of the last century in the second group (if it is really needed,
though).

@item
Third of all, and this is written down so that you can remember it when
you're filled with doubt: even when all articles from a @samp{nnshimbun}
group should be expired, the most recent one will be kept.  This is not
to satisfy your indecisive heart, it's because the next time you fetch
new articles for this group, @samp{nnshimbun} will know where to begin
and not fetch all the articles all over again.
@end itemize

The group parameters and the variables related to expiring
@samp{nnshimbun} articles are:

@table @code
@item expiry-wait
@cindex expiry-wait
Don't be confused, please.  The @code{expiry-wait} group parameter is
provided as one of the elements of @code{nnshimbun-group-parameters},
the specially made group parameter for @samp{nnshimbun}.  It has the
same name and the same meaning as the standard group parameter.  You may
use whichever you like.  If nnshimbun's one is set to non-@code{nil}
value, it takes precedence over the standard one.  It is provided in
order to concentrate things related to @samp{nnshimbun} at one place of
the ``Gnus Customize'' buffer (which will appear by typing @w{@kbd{G c}}
in the group buffer) and to realize managing collectively by the
@code{nnshimbun-group-parameters-alist} variable@footnote{We've already
prepared the answer to the question that why @code{auto-expire}
etc. aren't included in the nnshimbun's special group parameter?  The
answer is, @code{expiry-wait} is handled by the @samp{nnshimbun}
back end, but @code{auto-expire} is handled by the Gnus core.
Therefore, it is contrary to the design policy of Gnus to extend the
Gnus core functions so that it may work for one particular back end
(i.e. reading a value from the nnshimbun's special group parameter).}.
The values which can be used are a number of expiry period, @code{never}
or @code{immediate} as well as the standard group parameter.

@item nnshimbun-keep-unparsable-dated-articles
@vindex nnshimbun-keep-unparsable-dated-articles
If this variable is non-@code{nil}, the articles of which the time of
creation (or the time of arrival) is unknown will never be expired,
since their age is unknown.  The default is @code{t}.  If you set this
variable to @code{nil}, the articles of which the time is unknown will
also be expired unconditionally when the time to expire has come.  Well,
it might prove useful for a general cleaning at the end of a year.
@end table

@node Mew Shimbun
@section Reading web newspapers with Mew

Mew Shimbun is an Emacs Lisp program meant to be used with
@samp{shimbun} and Mew (version 2.1 and later).  The @file{mew-shimbun}
module will be installed together with emacs-w3m if Mew, @acronym{APEL},
and @acronym{FLIM} are also installed.

We recommend you also see @ref{Mew}.

@enumerate
@item
Setting things up

Put the following lines in the last of the @file{~/.mew.el} file:

@format
;;; Loading mew-shimbun, defining keys.
;; (setq mew-shimbun-use-unseen t)              ;;; @footnote{Uncomment
this line if you'd like to manage unseen messages.  It must be placed
before the @code{(require 'mew-shimbun)} line.}
(require 'mew-shimbun)
(define-key mew-summary-mode-map "G"  (make-sparse-keymap))
(define-key mew-summary-mode-map "Gg" 'mew-shimbun-goto-folder)
(define-key mew-summary-mode-map "GG" 'mew-shimbun-goto-unseen-folder)
(define-key mew-summary-mode-map "Gi" 'mew-shimbun-retrieve)
(define-key mew-summary-mode-map "GI" 'mew-shimbun-retrieve-all)
(define-key mew-summary-mode-map "Gr" 'mew-shimbun-re-retrieve)
(define-key mew-summary-mode-map "GR" 'mew-shimbun-re-retrieve-all)
(define-key mew-summary-mode-map "Ge" 'mew-shimbun-expire)
(define-key mew-summary-mode-map "GE" 'mew-shimbun-expire-all)

;; Specifying @samp{shimbun} servers and groups to be read with Mew in the
;; @code{mew-shimbun-folder-groups} variable.  Each element has the form
;; @code{("folder" ("server.group" . range) ...)}.  You can use @code{all},
;; @code{last}, and a number for the @code{range} item.

(setq mew-shimbun-folder-groups
      '(;; Fetching @samp{yomiuri.national}, @samp{yomiuri.sports}, etc.
        ;; into the @samp{+shimbun/yomiuri} folder collectively.
        ("yomiuri"
         ("yomiuri.national" . 2)
         ("yomiuri.sports". 2)
         ("yomiuri.world". 2))
        ;; Fetching @samp{security-memo.memo}
        ;; into @samp{+shimbun/security-memo}.
        ("security-memo"
         ("security-memo.memo" . 2))
        ("slashdot-jp"
         ("slashdot-jp.story" . last))
        ;; You can read several groups in one folder (@samp{+shimbun/emacs})
        ;; as follows even if each group comes from a different server.
        ("emacs"
         ("airw.wl" . last)
         ("emacs-w3m.emacs-w3m" . last))
        ;; Fetching diaries into @samp{+shimbun/hns/arisawa} and
        ;; @samp{+shimbun/hns/miyoshi} respectively.
        ("hns/arisawa"
         ("hns.arisawa" . last))
        ("hns/miyoshi"
         ("hns.miyoshi" . last))))
@end format

You did the fundamental setups.  For the other user definable variables,
use @w{@kbd{M-x customize-group}} for the @code{mew-shimbun} group or
see the source code.

@item
Reading @samp{shimbun} messages

@enumerate a
@item
Getting started

Type @w{@kbd{G I}} (@code{mew-shimbun-retrieve-all}) first, after
setting things up as mentioned above.  The @samp{shimbun} folders
specified by the @code{mew-shimbun-folder-groups} variable will be
created under the @samp{+shimbun} parent folder.  Typing @w{@kbd{G I}}
is also useful when you have added new groups.  You can change the name
of the parent folder (@samp{+shimbun} by default) by customizing the
@code{mew-shimbun-folder} variable.

@item
Moving into a @samp{shimbun} folder

You can move to any folder (including @samp{shimbun}) by typing @kbd{g}
(@code{mew-summary-goto-folder}), but @w{@kbd{G g}}
(@code{mew-shimbun-goto-folder}) is restricted to moving to only the
@samp{shimbun} folder.  In addition, folders which have new messages
(in other words, folders which have not been scanned) will be displayed
when using a prefix argument with @w{@kbd{G g}} (i.e.
@w{@kbd{C-u G g}}).  A prefix argument similarly affects @w{@kbd{G G}}
as well.

@item
Fetching messages in each folder

You can fetch new messages for the current folder exclusively by typing
@w{@kbd{G i}} (@code{mew-shimbun-retrieve}) in a @samp{shimbun} folder.

@item
Fetching updated messages

If you perform the @w{@kbd{G r}} command
(@code{mew-shimbun-re-retrieve}) when a particular message is being
displayed, the message will be updated if it is possible, and new
messages will be fetched.  With a prefix argument (i.e.
@w{@kbd{C-u G r}}), it will attempt to update messages which are marked
with the mark specified by the @code{mew-shimbun-mark-re-retrieve}
variable (@samp{@@} by default).  It would be useful for CNET, etc.

The @w{@kbd{G R}} command (@code{mew-shimbun-re-retrieve-all}) checks
the freshness of all messages and re-fetches the updated messages.  If a
prefix argument is given (i.e. @w{@kbd{C-u G R}}), the messages within
the region will be processed.  It is probably worthwhile if the site is
running the hyper nikki system (@samp{nikki} means ``diary'' in
Japanese).
@end enumerate

@item
Managing unseen messages

If you have the following setting in the @file{~/.mew.el} file,

@lisp
(setq mew-shimbun-use-unseen t)
@end lisp

newly fetched messages will be marked with the mark specified by the
@code{mew-shimbun-mark-unseen} variable (@samp{*} by default), and it
will disappear automatically after reading the message.

Normally, the unseen marks will not be saved in the @file{.mew-cache}
file if scanning is not performed after adding or deleting marks in the
Mew summary mode, but if you add the following line to the
@file{~/.mew.el} file,

@lisp
(setq mew-shimbun-use-unseen-cache-save t)
@end lisp

the unseen marks will be saved in the @file{.mew-cache} file
automatically for the @samp{shimbun} groups when exiting Mew or killing
a folder (using @w{@kbd{C-c C-q}}).  However, it is not securely saved
@footnote{People who have set the @code{mew-touch-folder-p} variable to
@code{t} will succeed 100% in saving marks, but people who use
@code{nil} value seem not to be 0% successful.}.  To do this securely,
you had better have the habit of performing the @samp{scan update}
command after reading the folder.

If you don't like the @samp{*} mark for unseen messages, customize
the @code{mew-shimbun-mark-unseen} variable (see above).  By specifying
the mark by @w{@kbd{C-u N}}, you will be able to lead a better life with
taking care of unseen messages.

@item
Expiring messages

You can expire messages if you set the @code{mew-shimbun-expires}
variable beforehand.  For example:

@lisp
(setq mew-shimbun-expires
      '(("yomiuri" . 7)
        ("asahi" . 1)
        ("slashdot-jp" . 7)
        ("emacs" . 7)))
@end lisp

If you set this variable as shown above, you can specify the expiry
period; 7 days for @samp{+shimbun/yomiuri}, 1 day for
@samp{+shimbun/asahi}.  Messages in the @samp{shimbun} folder where the
expiry period is not specified will never be expired.  You can use the
@w{@kbd{G e}} command (@code{mew-shimbun-expire}) to expire the
expirable messages in the current folder.  The @w{@kbd{G E}} command
(@code{mew-shimbun-expire-all}) is for expiring the expirable messages
in all the @samp{shimbun} folders.  Note that once the messages have
been expired, you cannot recover them.

@item
How to mark messages with @samp{$} as unseen

Put the following lines in the @file{~/.mew.el} file in order to define
the @samp{$} mark and use @samp{$} for the mark of unseen.  See
@uref{http://www.mew.org/ml/mew-dist-2.0/msg01251.html} if you would
like to replace the @samp{$} mark with another.

@format
;;----------------------------------------------------------------------
;;; Code for using @samp{$} as the unseen mark.
(setq mew-mark-unseen ?$)
(setq mew-shimbun-mark-unseen mew-mark-unseen)
(setq mew-mark-show-list (cons mew-mark-unseen mew-mark-show-list))
(setq mew-mark-afterstep-spec
      (cons (cons mew-mark-unseen '(1 0 1 0 0 0 0))
            mew-mark-afterstep-spec))
(setq mew-mark-spec
      (cons (list mew-mark-unseen "unseen" 0 nil nil nil nil nil)
            mew-mark-spec))
(setq mew-highlight-mark-keywords
      (cons
       (cons mew-mark-unseen 'mew-face-mark-unseen)
       mew-highlight-mark-keywords))
(defface mew-face-mark-unseen
  '((((class color) (type tty))
     (:foreground "green"))
    (((class color) (background light))
     (:foreground "deep pink" :bold t :italic t))
    (((class color) (background dark))
     (:foreground "thistle"))
    (t (:bold t)))
  "*Face to highlight the unseen mark"
  :group 'mew-highlight)
(defun mew-summary-unseen (&optional count)
  "Put the unseen mark(default is '$') in COUNT times."
  (interactive "P")
  (mew-mark-put-mark-loop (function mew-summary-unseen-one) count nil))
(defun mew-summary-unseen-one (&optional no-msg)
  "Put the unseen mark(default is '$') on this message."
  (mew-mark-put-mark mew-mark-unseen no-msg))
(defun mew-summary-mark-unseen ()
  "Change the '*' mark into the '$' mark."
  (interactive)
  (mew-summary-exchange-mark mew-mark-review mew-mark-unseen))
(defun mew-thread-mark-unseen ()
  "Put the '$' mark on all messages of the current sub-thread."
  (interactive)
  (mew-thread-mark mew-mark-unseen))

(define-key mew-summary-mode-map "$"  'mew-summary-unseen)
(define-key mew-summary-mode-map "m$" 'mew-summary-mark-unseen)
(define-key mew-summary-mode-map "t$" 'mew-thread-mark-unseen)
;;----------------------------------------------------------------------
@end format
@end enumerate

@node Shimbun with Wanderlust
@section Reading web newspapers with Wanderlust

Wanderlust includes @samp{elmo-shimbun} as an ELMO module, so you can
read @samp{shimbun} by just accessing a folder beginning with @samp{@@}
(@pxref{Shimbun Folder, ,Shimbun Folder, wl, The Wanderlust Manual}).

@node Shimbun local mode
@section Using a shell script to fetch shimbun feeds

If you read lots of @samp{shimbuns}, checking those for new articles can
take some time due to emacs-w3m retrieving the feeds one by one.  If you
want to speed this up, you can use a shell script to retrieve the feeds,
which you can either call manually (e.g. from within Emacs) or
automatically through schedulers like cron.  The feeds must be saved in
specially named files, and emacs-w3m will then use those files instead
of calling w3m.

The following variables control the local mode:

@table @code
@item shimbun-use-local
@vindex shimbun-use-local
Setting this to @code{t} will activate the local mode, meaning that
emacs-w3m will first check if a feed is available as a local file.  If
it cannot be found, it will be retrieved through w3m as usual.

@item shimbun-local-path
@vindex shimbun-local-path
This is the directory where the shimbun files are stored.  The default
value is @code{w3m-default-save-directory}.
@end table

The file name for a feed is expected to be the MD5 of the URL, truncated
to the first 10 characters, appended with the string @samp{_shimbun}.
You can easily generate the file name for a feed in Emacs through

@lisp
(concat (substring (md5 "http://example/feed") 0 10) "_shimbun")
@end lisp

@findex nnshimbun-generate-download-script
If you use Gnus with @samp{nnshimbun}, there is already a function which
will generate a download shell script for all currently subscribed
shimbun groups.  Just call @code{nnshimbun-generate-download-script},
and it will generate the shell script in a new buffer which you can save
afterwards.  If you call the function with a prefix, it will put an
ampersand after each w3m call, so that the feeds are retrieved in
parallel.

@node Shimbun Sites
@section Sites supported by Shimbun

This section provides the list of sites supported by @samp{shimbun}
library.  Unfortunately for people who cannot understand Japanese,
almost of supported sites are written in Japanese.

@menu
* Newspapers Supported by Shimbun::
* News Sites Supported by Shimbun::
* Mailing Lists Supported by Shimbun::
* Sport Sites Supported by Shimbun::
* Misc Sites Supported by Shimbun::
@end menu

@node Newspapers Supported by Shimbun
@subsection Newspapers Supported by Shimbun

These are newspapers that are supported by @samp{shimbun} library.

@table @asis
@item @uref{http://www.asahi.com/, Asahi Shimbun}
asahi.book asahi.book.column asahi.book.news asahi.book.paperback
asahi.book.review asahi.book.special asahi.business asahi.car
asahi.culture asahi.digital asahi.editorial asahi.edu asahi.english
asahi.food asahi.health asahi.housing asahi.igo asahi.international
asahi.international.asia asahi.international.column
asahi.international.special asahi.international.world asahi.job
asahi.kansai asahi.kansai.entertainment asahi.kansai.kokoro
asahi.kansai.sumai asahi.kansai.taberu asahi.komimi asahi.life
asahi.life.column asahi.national asahi.politics asahi.rss asahi.science
asahi.shopping asahi.shopping.column asahi.shopping.yakimono
asahi.shougi asahi.sports asahi.sports.baseball asahi.sports.battle
asahi.sports.etc asahi.sports.football asahi.sports.golf
asahi.sports.rugby asahi.sports.usa asahi.sports.winter asahi.tenjin
asahi.travel asahi.wakata

Those groups generate articles containing only text by default.  If you
would like to make them generate HTML articles that contain not only
text but also photographs, add the following line to your
@file{~/.emacs} file:

@lisp
(setq shimbun-asahi-prefer-text-plain nil)
@end lisp

On the other hand, you can also use the @samp{asahi-html} back end to
generate HTML articles.  In order to use it, specify
@samp{asahi-html.business} instead of @samp{asahi.business} as the group
name for example.

@item @uref{http://mytown.asahi.com/, Asahi Shimbun}
asahi-mytown.(hokkaido@dots{}okinawa)

The Asahi Shimbun local-news sections including all the prefectures of
Japan.

@item @uref{http://www.bbc.co.uk/, BBC}
bbc.news

@item @uref{http://www.welt.de/, Die Welt}
welt-de.news

@item @uref{http://www.zeit.de/, Die Zeit}
zeit-de.auto zeit-de.computer zeit-de.deutschland zeit-de.feuilleton
zeit-de.gesundheit zeit-de.international zeit-de.leben zeit-de.literatur
zeit-de.musik zeit-de.news zeit-de.reisen zeit-de.schule zeit-de.sport
zeit-de.studium zeit-de.wirtschaft zeit-de.wissen zeit-de.zuender

@item @uref{http://gendai.net/, Gendai Net}
gendai-net.today gendai-net.syakai gendai-net.sports gendai-net.geino
gendai-net.wadai gendai-net.kenko gendai-net.syoku gendai-net.book

@item @uref{http://mainichi.jp/, Mainichi jp}
@itemx (This site has been shifted from MSN in October, 2007)
mainichi.flash mainichi.sports mainichi.entertainment
mainichi.entertainment.art mainichi.mantan mainichi.electronics
mainichi.weekly mainichi.opinion.editorial mainichi.opinion.yoroku
mainichi.opinion.hasshinbako mainichi.opinion.eye mainichi.opinion.hito
mainichi.opinion.kinji mainichi.opinion.yuraku mainichi.opinion.closeup
mainichi.opinion.kaisetsu mainichi.opinion.newsup

Those groups generate HTML articles containing photographs by default.
If you would like to make them generate articles that contain only text,
add the following line to your @file{~/.emacs} file:

@lisp
(setq shimbun-mainichi-prefer-text-plain t)
@end lisp

@item @uref{http://www.nytimes.com/, The New York Times}
nytimes.homepage nytimes.news.business
nytimes.news.business.media&advertising
nytimes.news.business.worldbusiness nytimes.news.business.smallbusiness
nytimes.news.business.yourmoney nytimes.news.business.dealbook
nytimes.news.education nytimes.news.health nytimes.news.health.policy
nytimes.news.health.psychology nytimes.news.world
nytimes.news.world.africa nytimes.news.world.americas
nytimes.news.world.asia nytimes.news.world.europe
nytimes.news.world.middleeast nytimes.news.us nytimes.news.newyork
nytimes.news.newyork.thecity nytimes.news.newyork.metro
nytimes.news.obituaries nytimes.news.science nytimes.news.science.earth
nytimes.news.science.nutrition nytimes.news.science.space
nytimes.news.sports nytimes.news.sports.basketball.college
nytimes.news.sports.football.college nytimes.news.sports.golf
nytimes.news.sports.hockey nytimes.news.sports.other
nytimes.news.sports.baseball.pro nytimes.news.sports.basketball.pro
nytimes.news.sports.football.pro nytimes.news.sports.soccer
nytimes.news.technology nytimes.news.technology.bits
nytimes.news.technology.circuits nytimes.news.technology.pogue
nytimes.news.washington nytimes.features.arts
nytimes.features.arts.design nytimes.features.arts.music
nytimes.features.arts.television nytimes.features.automobiles
nytimes.features.books nytimes.features.books.review
nytimes.features.dining&wine nytimes.features.fashion
nytimes.features.fashion.thursdaystyles
nytimes.features.fashion.weddings nytimes.features.home&garden
nytimes.features.jobs nytimes.features.magazine
nytimes.features.movie.news nytimes.features.movie.reviews
nytimes.features.realestate nytimes.features.theater
nytimes.features.travel nytimes.features.travel.escapes
nytimes.features.week_in_review nytimes.additional.pop_top
nytimes.opinion.editorial

The New York Times began to offer news articles for free on September
19, 2007.  In spite of having said @samp{charset=iso-8859-1}, this site
often uses the @code{windows-1252} charset that is a superset of
@code{iso-8859-1}.  @samp{Shimbun} (and also emacs-w3m) works in even
such a case if the @code{windows-1252} coding system is available in
your (X)Emacs.

@item @uref{http://www.nikkansports.com/, Nikkan Sports}
nikkansports.flash nikkansports.baseball
nikkansports.baseball.highschool nikkansports.baseball.amateur
nikkansports.baseball.mlb nikkansports.soccer nikkansports.soccer.japan
nikkansports.soccer.world nikkansports.sports nikkansports.sumo
nikkansports.nba nikkansports.nfl nikkansports.nhl nikkansports.rugby
nikkansports.golf nikkansports.motor nikkansports.battle
nikkansports.race nikkansports.race.kka nikkansports.entertainment
nikkansports.cinema nikkansports.general

@item @uref{http://www.nikkei.co.jp/, Nihon Keizai Shimbun}
nikkei.top nikkei.main nikkei.keizai nikkei.sangyo nikkei.tento
nikkei.kansai nikkei.it.business nikkei.it.busi_gyoukai
nikkei.it.biz-system nikkei.it.sox nikkei.it.data nikkei.it.taidan
nikkei.it.internet nikkei.it.broad nikkei.it.net_gyoukai nikkei.it.iptel
nikkei.it.tele nikkei.it.broadcast nikkei.it.internet-column
nikkei.it.contents nikkei.it.ec nikkei.it.policy nikkei.it.e-gov
nikkei.it.mobile nikkei.it.mob_gyoukai nikkei.it.mobsoft
nikkei.it.mobcon nikkei.it.money nikkei.it.one nikkei.it.security
nikkei.it.net_crime nikkei.it.digital nikkei.it.pc nikkei.kokunai
nikkei.markets nikkei.kawase nikkei.kinri nikkei.ft nikkei.dj
nikkei.ngyoseki nikkei.gyosuuchi nikkei.gyoseki nikkei.china
nikkei.market nikkei.kaigai nikkei.seiji nikkei.shakai nikkei.retto
nikkei.sports nikkei.newpro nikkei.release nikkei.release.it.comp
nikkei.release.it.peri nikkei.release.it.sys nikkei.release.it.cont
nikkei.release.it.net nikkei.release.it.lsi nikkei.release.it.game
nikkei.release.it.etc nikkei.release.dist.depart
nikkei.release.dist.ryohan nikkei.release.dist.zakka
nikkei.release.dist.cosme nikkei.release.dist.car
nikkei.release.dist.book nikkei.release.dist.record
nikkei.release.dist.food nikkei.release.dist.mercha
nikkei.release.dist.mail nikkei.release.dist.netshop
nikkei.release.dist.etc nikkei.release.money.bank
nikkei.release.money.sec nikkei.release.money.am
nikkei.release.money.insu nikkei.release.money.etc
nikkei.release.maker.chemi nikkei.release.maker.mecha
nikkei.release.maker.car nikkei.release.maker.elec
nikkei.release.maker.food nikkei.release.maker.sports
nikkei.release.maker.apparel nikkei.release.maker.commu
nikkei.release.maker.etc nikkei.release.service.medic
nikkei.release.service.rest nikkei.release.service.trans
nikkei.release.service.energy nikkei.release.service.enter
nikkei.release.service.env nikkei.release.service.consul
nikkei.release.service.edu nikkei.release.service.haken
nikkei.release.service.life nikkei.release.service.media
nikkei.release.service.lease nikkei.release.service.travel
nikkei.release.service.etc nikkei.release.const.const
nikkei.release.const.house nikkei.release.const.etc nikkei.shasetsu

@item @uref{http://sankei.jp.msn.com/, MSN Sankei News}
@itemx (This site has been shifted to MSN in October, 2007)
sankei.news.shakai sankei.news.kokusai sankei.news.seiji
sankei.news.keizai sankei.news.seikatsu sankei.news.kyouiku
sankei.news.sports sankei.news.cutlure sankei.news.chiho
sankei.special.komori sankei.special.kuroda sankei.special.ito
sankei.special.tamura sankei.special.jieitai sankei.special.kenpo
sankei.special.kyouiku sankei.special.kiko sankei.ronsetsu.shucho
sankei.ronsetsu.sankeisho sankei.ronsetsu.seiron

@item @uref{http://www.spiegel.de/, Spiegel Online}
spiegel.news

@item @uref{http://www.sponichi.co.jp/, Sponichi}
sponichi.baseball sponichi.soccer sponichi.usa sponichi.others
sponichi.society sponichi.entertainment sponichi.horseracing

@item @uref{http://www.sueddeutsche.de/, Sueddeutsche Zeitung}
sueddeutsche-de.alles sueddeutsche-de.nachrichten
sueddeutsche-de.politik sueddeutsche-de.wirtschaft
sueddeutsche-de.finanzen sueddeutsche-de.kino sueddeutsche-de.kultur
sueddeutsche-de.sport sueddeutsche-de.muenchen sueddeutsche-de.panorama
sueddeutsche-de.leben sueddeutsche-de.gesundheit
sueddeutsche-de.computer

@item @uref{http://www.yomiuri.co.jp/, Yomiuri Shimbun}
yomiuri.atmoney yomiuri.editorial yomiuri.entertainment yomiuri.iryou
yomiuri.kyoiku yomiuri.kyoiku.children yomiuri.kyoiku.english
yomiuri.kyoiku.qanda yomiuri.kyoiku.renaissance yomiuri.kyoiku.special
yomiuri.national yomiuri.politics yomiuri.science yomiuri.sports
yomiuri.world

Those groups generate articles containing only text by default.  If you
would like to make them generate HTML articles that contain not only
text but also photographs, add the following line to your
@file{~/.emacs} file:

@lisp
(setq shimbun-yomiuri-prefer-text-plain nil)
@end lisp

On the other hand, you can also use the @samp{yomiuri-html} back end to
generate HTML articles.  In order to use it, specify
@samp{yomiuri-html.atmoney} instead of @samp{yomiuri.atmoney} as the
group name for example.
@end table

@node News Sites Supported by Shimbun
@subsection News Sites Supported by Shimbun

These are news sites that are supported by @samp{shimbun} library.

@table @asis
@item @uref{http://english.aljazeera.net/, Al Jazeera}
aljazeera.news aljazeera.africa aljazeera.america aljazeera.asia-pacific
aljazeera.central-asia aljazeera.europe aljazeera.middle-east
aljazeera.focus aljazeera.business aljazeera.sport aljazeera.programmes

@item @uref{http://news.com.com/, CNET}
cnet.news cnet.enterprise.software cnet.enterprise.hardware
cnet.security cnet.networking cnet.personal.technology cnet.newsmakers
cnet.perspectives

@item @uref{http://japan.cnet.com/, CNET Japan}
cnet-jp.general cnet-jp.news cnet-jp.special cnet-jp.opinion
cnet-jp.blog.geetstate cnet-jp.blog.kenn cnet-jp.blog.lessig
cnet-jp.blog.matsumura cnet-jp.blog.nakajima cnet-jp.blog.saeki
cnet-jp.blog.sakamoto cnet-jp.blog.sasaki cnet-jp.blog.sentan
cnet-jp.blog.staff cnet-jp.blog.takawata cnet-jp.blog.watanabe

@item @uref{http://www.cnn.co.jp/, CNN Japan}
cnn-jp.business cnn-jp.fringe cnn-jp.science cnn-jp.showbiz
cnn-jp.sports cnn-jp.top cnn-jp.usa cnn-jp.world

@item @uref{http://www.de-bug.de/, De-Bug Magazine}
debugmagazin-de.frontpage debugmagazin-de.musik debugmagazin-de.reviews
debugmagazin-de.magazin debugmagazin-de.medien debugmagazin-de.podcast
debugmagazin-de.musiktechnik debugmagazin-de.screen
debugmagazin-de.gadgets debugmagazin-de.games debugmagazin-de.mode

@item @uref{http://japanese.engadget.com/, Engadget Japanese}
engadget-ja.top

@item @uref{http://www.excite.co.jp/, Excite News}
excite.bit-koneta excite.world-odd

@item @uref{http://www.fau.org/, FAU-IAA}
fau.news

@item @uref{http://www.heise.de/, Heise Online}
heise.news heise.telepolis

@item @uref{http://news.infoshop.org/, Infoshop News}
infoshop.news

@item @uref{http://www.watch.impress.co.jp/, Impress}
impress.enterprise impress.pc impress.dc impress.akiba impress.av
impress.game impress.k-tai impress.internet impress.bb impress.forest
impress.robot impress.kaden impress.car

@item @uref{http://www.itmedia.co.jp/, ITmedia}
itmedia.news.bursts itmedia.news.domestic itmedia.news.foreign
itmedia.news.products itmedia.news.technology itmedia.news.web20
itmedia.news.nettopics itmedia.news.society itmedia.news.security
itmedia.news.industry itmedia.news.research itmedia.news.sp_amd
itmedia.anchordesk itmedia.bizid itmedia.enterprise itmedia.+D.plusd
itmedia.+D.mobile itmedia.+D.pcupdate itmedia.+D.lifestyle
itmedia.+D.games itmedia.+D.docomo itmedia.+D.au_kddi
itmedia.+D.vodafone itmedia.+D.shopping
itmedia.+D.lifestyle.column.asakura itmedia.+D.lifestyle.column.honda
itmedia.+D.lifestyle.column.kobayashi itmedia.+D.lifestyle.column.kodera
itmedia.+D.lifestyle.column.nishi itmedia.+D.lifestyle.column.ogikubo
itmedia.+D.lifestyle.column.tachibana
itmedia.+D.lifestyle.column.takemura itmedia.+D.lifestyle.column.unakami

@item @uref{http://www.japantimes.co.jp/, Japan Times}
japantimes.general japantimes.business

@item @uref{http://www.laut.de/, LAUT AG}
laut-de.news laut-de.platten laut-de.platten_alternative
laut-de.platten_dance laut-de.platten_hiphop platten_jazz
laut-de.platten_metal laut-de.platten_pop laut-de.platten_rnb
laut-de.platten_rock

@item @uref{http://www.n24.de/, N24}
n24-de.boerse n24-de.boulevard n24-de.nachrichten n24-de.netnews
n24-de.politik n24-de.sport n24-de.wirtschaft

@item @uref{http://opentechpress.jp/, Open Tech Press}
opentechpress-jp.general opentechpress-jp.enterprise
opentechpress-jp.opensource opentechpress-jp.security
opentechpress-jp.news opentechpress-jp.pr

@item @uref{http://www.perlentaucher.de/, Perlentaucher}
perlentaucher-de.aktuell

@item @uref{http://www.rediff.com/, Rediff.com}
rediff.news

@item @uref{http://www.slashdot.org/, Slashdot}
slashdot.frontpage slashdot.apple slashdot.askslashdot slashdot.books
slashdot.developers slashdot.games slashdot.hardware slashdot.interviews
slashdot.IT slashdot.linux slashdot.mobile slashdot.politics
slashdot.science

The following variables are available for configuring the comment section
of the Slashdot shimbun:

@table @code
@item shimbun-slashdot-get-comments
@vindex shimbun-slashdot-get-comments
If set to @code{t} (the default), comments will be retrieved for every
article.  They are separated from the intro text through a formfeed
character (i.e. ``^L''); you can access them by scrolling the article
buffer as usual (for Gnus you can use the ``Next page'' button and the
``Previous page'' button).  Setting this variable to @code{nil} will
deactivate retrieval of comments.

@item shimbun-slashdot-comment-threshold
@vindex shimbun-slashdot-comment-threshold
Threshold for displayed comments (default: 3).  Can be a number between
-1 (all comments) and 5 (highest rating).

@item shimbun-slashdot-comment-display
@vindex shimbun-slashdot-comment-display
Type of display for the comments (default: ``flat'').  Can be either
``flat'', ``thread'' or ``nested''.  Note that this must be a string,
not a symbol.
@end table

@item @uref{http://slashdot.jp/, Slashdot Japan}
slashdot-jp.story slashdot-jp.askslashdot slashdot-jp.bookreview
slashdot-jp.bsd slashdot-jp.developers slashdot-jp.interview
slashdot-jp.linux slashdot-jp.mac slashdot-jp.mobile slashdot-jp.science
slashdot-jp.security slashdot-jp.slash slashdot-jp.it
slashdot-jp.hardware slashdot-jp.diary.oliver

Add appropriate configurations to the variable
@code{shimbun-slashdot-jp-group-alist}, you can browse other diaries
provided at @uref{http://slashdot.jp/}.

@item @uref{http://techon.nikkeibp.co.jp/, Tech-On! by NikkeiBP}
tech-on.latestnews tech-on.mobile tech-on.bbint tech-on.d-ce tech-on.AT
tech-on.edaonline tech-on.device tech-on.lsi tech-on.silicon
tech-on.observer tech-on.fpd tech-on.mono tech-on.embedded tech-on.mecha
tech-on.MEMS tech-on.nano tech-on.carele tech-on.board tech-on.mcu
tech-on.PLM tech-on.memory tech-on.measurement tech-on.column.mot

Tech-On! is a technology news site brought by NikkeiBP.  At least in
autumn 2007, it doesn't seem to be, but a login account (that's for
free) was needed to read the whole contents of articles formerly.  If it
becomes required again in the future, visit
@uref{http://techon.nikkeibp.co.jp/guide/inf_regi.html, the registration
page} to have it.  The following two variables control how you log in:

@table @code
@item shimbun-tech-on-user-name
@vindex shimbun-tech-on-user-name
User name to log in on Tech-On! with.  If it is @code{nil}, you will be
prompted for a user name when logging in on Tech-On! with.  If it is a
string, it will be used as a user name and you will never be prompted.
If it is neither @code{nil} nor a string (that is the default), you will
never log in.

@item shimbun-tech-on-password
@vindex shimbun-tech-on-password
Password to use to log in on Tech-On! with.  If it is @code{nil}, you
will be prompted for a password when logging in on Tech-On! with.  If it
is a string, it will be used as a password and you will never be
prompted.  If it is neither @code{nil} nor a string (that is the
default), you will never log in.
@end table

Entering them is required only once in the Emacs session at the first
time to start reading a Tech-On! article.

@item @uref{http://hotwired.goo.ne.jp/, HotWired Japan}
wired-jp.news wired-jp.business wired-jp.culture wired-jp.technology
wired-jp.blog.ogura wired-jp.blog.sasaki wired-jp.blog.takahashi

@item @uref{http://headlines.yahoo.co.jp/, Yahoo! Japan}
yahoo.topnews yahoo.news yahoo.politics yahoo.society yahoo.people
yahoo.business-all yahoo.market yahoo.stock yahoo.industry
yahoo.international yahoo.entertainment yahoo.sports yahoo.computer
yahoo.zenkoku yahoo.hokkaido yahoo.aomori yahoo.iwate yahoo.miyagi
yahoo.akita yahoo.yamagata yahoo.fukushima yahoo.tokyo yahoo.kanagawa
yahoo.chiba yahoo.saitama yahoo.ibaraki yahoo.tochigi yahoo.gunma
yahoo.yamanashi yahoo.nagano yahoo.niigata yahoo.toyama yahoo.ishikawa
yahoo.fukui yahoo.aichi yahoo.gifu yahoo.shizuoka yahoo.mie yahoo.osaka
yahoo.hyogo yahoo.kyoto yahoo.shiga yahoo.nara yahoo.wakayama
yahoo.tottori yahoo.shimane yahoo.okayama yahoo.hiroshima
yahoo.yamaguchi yahoo.tokushima yahoo.kagawa yahoo.ehime yahoo.kochi
yahoo.fukuoka yahoo.saga yahoo.nagasaki yahoo.kumamoto yahoo.oita
yahoo.miyazaki yahoo.kagoshima yahoo.okinawa

The yahoo.news group retrieves the headline news and also the flash news.
Those groups generate HTML articles by default.  If you would like to
make them generate articles containing only text, add the following line
to your @file{~/.emacs} file:

@lisp
(setq shimbun-yahoo-prefer-text-plain t)
@end lisp

@item @uref{http://japan.zdnet.com/, ZDNet Japan}
zdnet-jp.news zdnet-jp.news.network zdnet-jp.news.hardware
zdnet-jp.news.software zdnet-jp.news.manage zdnet-jp.news.security
zdnet-jp.news.internet zdnet-jp.news.os zdnet-jp.news.db
zdnet-jp.news.system zdnet-jp.column zdnet-jp.column.sp1
zdnet-jp.column.netsecurity1 zdnet-jp.column.ea1 zdnet-jp.column.btl
zdnet-jp.column.solutionIT zdnet-jp.channel.security
zdnet-jp.channel.ilm zdnet-jp.blog.iida zdnet-jp.blog.mhatta
zdnet-jp.blog.kurei zdnet-jp.blog.opensource zdnet-jp.blog.soa
zdnet-jp.blog.dp

@item @uref{http://www.theonion.com/, The Onion}
the-onion.news
@end table

@node Mailing Lists Supported by Shimbun
@subsection Mailing Lists Supported by Shimbun

These are mailing list archives supported by @samp{shimbun} library.

@table @asis
@item @uref{http://lists.airs.net/semi-gnus/archive/, Semi-gnus Mailing List in Japan}
airs.semi-gnus-ja

@item @uref{http://lists.airs.net/, Wanderlust Mailing List}
airs.wl airs.wl-en

@item @uref{http://www.rc.tutrp.tut.ac.jp/bbdb-ml/, Big Brother DataBase Mailing List}
bbdb-ml.bbdb-ml

@item @uref{http://mail.gnome.org/archives/, GNOME Mailing List}
gnome.balsa-list gnome.calendar-list gnome.cvs-commits-list
gnome.foundation-announce gnome.foundation-list gnome.fplan-list
gnome.gconf-list gnome.gdome gnome.gnome-1.4-list
gnome.gnome-announce-list gnome.gnome-components-list
gnome.gnome-db-list gnome.gnome-de gnome.gnome-debugger-list
gnome.gnome-devel-list gnome.gnome-doc-list gnome.gnome-gui-list
gnome.gnome-hackers gnome.gnome-hackers-readonly
gnome.gnome-hackers-test gnome.gnome-i18n gnome.gnome-i18n-tools
gnome.gnome-kde-list gnome.gnome-list gnome.gnome-office-list
gnome.gnome-pilot-list gnome.gnome-sound-list gnome.gnome-themes-list
gnome.gnome-ui-hackers gnome.gnome-web-list gnome.gnome-webmaster-list
gnome.gnome-workshop-list gnome.gnomecc-list gnome.gnumeric-list
gnome.gtk-app-devel-list gnome.gtk-devel-list gnome.gtk-doc-list
gnome.gtk-i18n-list gnome.gtk-list gnome.gtk-perl-list
gnome.guppi-list gnome.libart gnome.libart-hackers gnome.orbit-list
gnome.vote gnome.wm-spec-list gnome.xml gnome.xslt

@item @uref{http://www.java-conf.gr.jp/archives/, Java Conference Mailing List}
javaconf.servlet-ml javaconf.business-ml
javaconf.duke-in-the-box-ml javaconf.jfriends-ml javaconf.JGT-ml
javaconf.jini-ml javaconf.ejb-ml javaconf.cm-ml javaconf.horb-ml
javaconf.talk-ml

@item @uref{http://www.peanuts.gr.jp/~kei/ml-archive/, LinuxCE JP Mailing List}
linuxce-jp.users

@item @uref{http://www.m17n.org/, Mule Mailing List}
m17n.mule-ja m17n.mule

@item @uref{http://www.ysnb.net/meadow/, Meadow Mailing List}
meadow.meadow-develop meadow.meadow-users-jp

@item @uref{http://www.mew.org/ml/, Mew Mailing List}
mew.mew-dist mew.mew-win32 mew.mew-int

@item @uref{http://www.mew.org/ml/, MagicPoint Mailing List}
mew.mgp-users mew.mgp-users-jp

@item @uref{http://www.namazu.org/cgi-bin/mailman/listinfo, www.namazu.org Mailing Lists}
namazu.kakasi-commits namazu.kakasi-dev namazu.migemo
namazu.namazu-users-en namazu.namazu-users-ja
namazu.namazu-devel-ja namazu.namazu-devel-en
namazu.namazu-win32-users-ja namazu.sary

@item @uref{http://emacs-w3m.namazu.org/ml/, emacs-w3m Mailing List}
emacs-w3m.emacs-w3m

@item @uref{http://www.jp.netbsd.org/ja/JP/ml/, NetBSD JP Mailing List}
netbsd.announce-ja netbsd.junk-ja netbsd.tech-misc-ja
netbsd.tech-pkg-ja netbsd.port-arm32-ja netbsd.port-hpcmips-ja
netbsd.port-mac68k-ja netbsd.port-mips-ja netbsd.port-powerpc-ja
netbsd.hpcmips-changes-ja netbsd.members-ja netbsd.admin-ja
netbsd.www-changes-ja

@item @uref{http://blade.nagaokaut.ac.jp/, Ruby Mailing List}
ruby.comp.lang.ruby ruby.fj.comp.lang.ruby
ruby.ruby-dev ruby.ruby-ext ruby.ruby-list ruby.ruby-math
ruby.ruby-talk

@item @uref{http://linux.toshiba-dme.co.jp/ML/tlinux-users-j/, Toshiba Linux Users JP Mailing List}
toshiba.linux-users-j

@item @uref{http://mi.med.tohoku.ac.jp/~satodai/w3m-dev/, w3m-dev Mailing List}
w3m-dev.w3m-dev w3m-dev.w3m-dev-en

@item @uref{http://yar-3.net/digiko/, digiko Mailing List}
digiko.digiko

@item @uref{http://list-archive.xemacs.org/, XEmacs Mailing List}
xemacs.xemacs-announce xemacs.xemacs-beta-ja
xemacs.xemacs-beta xemacs.xemacs-build-reports xemacs.xemacs-cvs
xemacs.xemacs-design xemacs.xemacs-mule xemacs.xemacs-nt
xemacs.xemacs-patches xemacs.xemacs-users-ja xemacs.xemacs

@item @uref{http://memo.st.ryukoku.ac.jp/archive/, Security MEMO Mailing List}
security-memo.memo security-memo.free-memo security-memo.social-memo

Please note that userid and passowrd are required for
@samp{security-memo.*} so you have to write;

@example
machine memo.st.ryukoku.ac.jp
realm input username/password = archives/archives
login archives
passwd archives

machine memo.st.ryukoku.ac.jp
realm input user: archives / password: archives
login archives
passwd archives
@end example

@noindent
in @file{~/.w3m/passwd} and remove group and others access permissions
from the file.

@item @uref{http://lists.debian.or.jp/, Debian JP Mailing List}
debian-jp.debian-announce debian-jp.debian-devel
debian-jp.debian-www debian-jp.debian-users debian-jp.debian-policy
debian-jp.jp-qa

@item @uref{http://lists.debian.org, Debian Mailing List}
debian.debian-announce debian.debian-commercial debian.debian-firewall
debian.debian-french debian.debian-isp debian.debian-italian
debian.debian-kde debian.debian-laptop debian.debian-news
debian.debian-news-german debian.debian-news-portuguese
debian.debian-security-announce debian.debian-testing
debian.debian-user debian.debian-user-catalan
debian.debian-user-french debian.debian-user-polish
debian.debian-user-portuguese debian.debian-user-spanish
debian.debian-user-swedish debian.debian-admintool
debian.debian-apache debian.debian-autobuild debian.debian-beowulf
debian.debian-boot debian.debian-cd debian.debian-ctte
debian.debian-debbugs debian.debian-devel debian.debian-devel-announce
debian.debian-devel-french debian.debian-devel-games
debian.debian-devel-spanish debian.debian-doc debian.debian-dpkg
debian.debian-emacsen debian.debian-events-eu debian.debian-events-na
debian.debian-faq debian.debian-gcc debian.debian-glibc
debian.debian-gtk-gnome debian.debian-hams debian.debian-ipv6
debian.debian-java debian.debian-jr debian.debian-med
debian.debian-mentors debian.debian-newmaint
debian.debian-newmaint-admin debian.debian-ocaml-maint
debian.debian-openoffice debian.debian-perl debian.debian-pilot
debian.debian-policy debian.debian-pool debian.debian-python
debian.debian-qa debian.debian-qa-private debian.debian-release
debian.debian-security debian.debian-snapshots
debian.debian-tetex-maint debian.debian-toolchain debian.debian-vote
debian.debian-wnpp debian.debian-www debian.debian-x debian.deity
debian.debian-chinese debian.debian-chinese-big5
debian.debian-chinese-gb debian.debian-esperanto debian.debian-i18n
debian.debian-japanese debian.debian-l10n-catalan
debian.debian-l10n-dutch debian.debian-l10n-english
debian.debian-l10n-french debian.debian-l10n-italian
debian.debian-l10n-portuguese debian.debian-l10n-spanish
debian.debian-laespiral debian.debian-russian
debian.debian-simplified-chinese debian.debian-68k debian.debian-alpha
debian.debian-arm debian.debian-bsd debian.debian-hppa
debian.debian-hurd debian.debian-ia64 debian.debian-mips
debian.debian-parisc debian.debian-powerpc debian.debian-s390
debian.debian-sparc debian.debian-superh debian.debian-ultralinux
debian.debian-win32 debian.debian-all-changes
debian.debian-alpha-changes debian.debian-arm-changes
debian.debian-books debian.debian-cd-vendors debian.debian-changes
debian.debian-consultants debian.debian-curiosa
debian.debian-devel-all-changes debian.debian-devel-alpha-changes
debian.debian-devel-arm-changes debian.debian-devel-changes
debian.debian-devel-hurd-i386-changes debian.debian-devel-i386-changes
debian.debian-devel-m68k-changes debian.debian-devel-powerpc-changes
debian.debian-devel-sparc-changes debian.debian-hurd-i386-changes
debian.debian-i386-changes debian.debian-legal
debian.debian-m68k-changes debian.debian-mirrors
debian.debian-powerpc-changes debian.debian-project
debian.debian-publicity debian.debian-sgml debian.debian-sparc-changes
debian.lcs-eng debian.lsb-confcall debian.lsb-discuss debian.lsb-impl
debian.lsb-spec debian.lsb-test debian.spi-announce debian.spi-general
debian.vgui-discuss

@item @uref{http://www.kde.gr.jp/ml/, KDE Mailing List in Japan}
kde.Kuser kde.Kdeveloper

@item @uref{http://www.geocrawler.com/, Geocrawler}
All archives of Geocrawler are supported by @samp{shimbun} library.  You
can use the command
@w{@kbd{M-x shimbun-geocrawler-add-group @key{RET}}}, to add your
favorite archive to the variable @code{shimbun-geocrawler-group-alist}.

@item @uref{http://marc.theaimsgroup.com/, Mailing list ARChives}
Mailing list ARChives (@acronym{MARC}) are supported by @samp{shimbun}
library.  Add a group name of your favorite archive and its URL to the
variable @code{shimbun-marc-aims-group-alist}, and you can browse it.

@item @uref{http://sources.redhat.com/ml/, RedHat Mailing List}
redhat.automake redhat.bug-automake redhat.automake-prs
redhat.automake-cvs redhat.binutils redhat.binutils-cvs
redhat.c++-embedded redhat.crossgcc redhat.cgen redhat.cgen-prs
redhat.cgen-cvs redhat.cygwin redhat.cygwin-xfree redhat.cygwin-announce
redhat.cygwin-xfree-announce redhat.cygwin-apps redhat.cygwin-patches
redhat.cygwin-developers redhat.cygwin-cvs redhat.cygwin-apps-cvs
redhat.docbook-tools-discuss redhat.docbook-tools-announce
redhat.docbook-tools-cvs redhat.docbook redhat.dssslist
redhat.sgml-tools redhat.docbook-apps redhat.ecos-announce
redhat.ecos-devel redhat.ecos-discuss redhat.ecos-maintainers
redhat.ecos-patches redhat.elix redhat.elix-announce redhat.gdb
redhat.gdb-announce redhat.gdb-testers redhat.gdb-testresults
redhat.gdb-patches redhat.gdb-cvs redhat.bug-gdb redhat.gdb-prs
redhat.libc-alpha redhat.libc-hacker redhat.bug-glibc redhat.glibc-cvs
redhat.glibc-linux redhat.bug-gnats redhat.gnats-devel
redhat.gnats-announce redhat.gnats-cvs redhat.gsl-discuss
redhat.gsl-announce redhat.gsl-cvs redhat.guile redhat.guile-emacs
redhat.guile-prs redhat.guile-gtk redhat.bug-guile redhat.guile-cvs
redhat.guile-emacs-cvs redhat.insight redhat.insight-announce
redhat.insight-prs redhat.installshell redhat.inti redhat.kawa
redhat.libffi-discuss redhat.libffi-announce redhat.libstdc++
redhat.libstdc++-cvs redhat.libstdc++-prs redhat.mauve-discuss
redhat.mauve-announce redhat.newlib redhat.pthreads-win32 redhat.rhdb
redhat.rhdb-announce redhat.rhug-rhats redhat.rpm2html-cvs
redhat.rpm2html-prs redhat.rpm2html redhat.sid redhat.sid-announce
redhat.sid-cvs redhat.sourcenav redhat.sourcenav-announce
redhat.sourcenav-prs redhat.win32-x11 redhat.xconq7
redhat.xconq-announce redhat.xconq-cvs

@item @uref{http://www.tech-arts.co.jp/macosx/, MacOSX JP Mailing List}
macosx-jp.macosx-jp macosx-jp.macosx-dev-jp
macosx-jp.macosx-ws-jp macosx-jp.webobjects-jp

@item @uref{http://sourceforge.jp, SourceForge JP}
All archives served by SourceForge JP are supported by @samp{shimbun}
library.  Add a group name of your favorite archive to the variable
@code{shimbun-sourceforge-jp-mailing-lists}, and you can browse it.

@item @uref{http://heimat.jp/~nakaji/elips/, Elips Mailing List}
elips.elips

@item @uref{http://lists.squeakfoundation.org/pipermail/squeak-ja/, Squeak-ja Mailing List}
squeak-ja.main

@item @uref{http://www.sra.co.jp/smalltalk/SML/archives/, Smalltalkers' Salon Mailing List}
sml.main

@item @uref{http://lists.squeakfoundation.org/pipermail/squeak-dev/, Squeak-dev Mailing List}
squeak-dev.main

@item @uref{http://www.mail-archive.com/plucker-*@@rubberchicken.org/maillist.html, Plucker Mailing List}
plucker.announce plucker.list plucker.dev

@item @uref{http://www.pilot-link.org/pipermail/, pilot-link Mailing List}
pilot-link.announce pilot-link.devel pilot-link.general
pilot-link.unix-ng

@item @uref{http://www.thedotin.net/maillists/coldsync-hackers/maillist.html, Coldsync Mailing List}
coldsync.main

@item @uref{http://www.jpilot.org/pipermail/jpilot/, J-Pilot Mailing List}
jpilot.main

@item @uref{http://lists.gnu-designs.com/pipermail/pilot-mailsync/, pilot-mailsync Mailing List}
pilot-mailsync.main

@item @uref{http://www.mozilla.gr.jp/ml/logs/moz-users/, Mozilla Users Mailing List in Japan}
mozilla-jp.users

Please note that userid and passowrd are required for
@samp{mozilla-jp.users} so you have to write;

@example
machine www.mozilla.gr.jp
realm Please Enter mozilla mozilla
login mozilla
passwd mozilla
@end example

@noindent
in @file{~/.w3m/passwd} and remove group and others access permissions
from the file.

@item @uref{http://www.tdiary.org/, tDiary Developers Mailing List in Japan}
tdiary-ml.devel tdiary-ml.theme

@item @uref{http://arch.bluegate.org/mailman/listinfo, arch.bluegate.org Mailing Lists}
arch-bluegate.subversion-jp arch-bluegate.arch-jp arch-bluegate.mailman
arch-bluegate.viewarch

@item @uref{http://www.tigris.org/, Tigris.org:Open Source Software Engineering}
All archives served by Tigris.org are supported by @samp{shimbun}
library.  Add a group name of your favorite archive to the variable
@code{shimbun-tigris-group-alist}, and you can browse it.
Group name is tigris.<project>.<mailinglist>.

@item @uref{http://www.scipy.net/mailman/listinfo, www.SciPy.net Mailing Lists}
scipy.astropy scipy.ipython-user scipy.ipython-dev scipy.scipy-user
scipy.scipy-dev scipy.scipy-testlog scipy.scipy-chaco scipy.scipy-cvs

@end table

@node Sport Sites Supported by Shimbun
@subsection Sport Sites Supported by Shimbun

These are sport sites supported by @samp{shimbun} library.

@table @asis
@item @uref{http://www.makanai.com/, makanai}
makanai.f1news

@item @uref{http://www.ksky.ne.jp/~tahara/f1/, F1 FAN}
f1fan.news

@item @uref{http://forum.nifty.com/fmotor/, @@nifty:motorsports}
msports-nifty.F1 msports-nifty.IRL msports-nifty.WRC
msports-nifty.Europe msports-nifty.USA

@item @uref{http://sports.yahoo.co.jp/, Yahoo!SPORTS}
yahoo-sports.F1 yahoo-sports.baseball yahoo-sports.keiba
yahoo-sports.NBA yahoo-sports.NFL yahoo-sports.rugby
@end table

@@nifty:motorsports requires the Mule-UCS package (@pxref{Other
Requirements}) for Emacs-21.4 or any previous versions.

@node Misc Sites Supported by Shimbun
@subsection Misc Sites Supported by Shimbun

These are misc sites supported by @samp{shimbun} library.  WEB BBS and
serial publications are included.

@table @asis
@item @uref{http://www.tcup.com/, Tea Cup Bulletin Boards}
You can subscribe to various bulletin boards provided by Tea Cup
Communication.  By default, there are three pre-configured boards listed
below:

@table @asis
@item tcup.yutopia
@uref{http://www61.tcup.com/6116/yutopia.html, Yutopia BBS}

@item tcup.meadow
@uref{http://www66.tcup.com/6629/yutopia.html, Meadow BBS}

@item tcup.skk
@uref{http://www67.tcup.com/6718/yutopia.html, SKK BBS}
@end table

To add new boards to the list, look up the names and the urls and modify
the @code{shimbun-tcup-group-alist} variable.  The following form is an
example to add two boards, @samp{foo} and @samp{bar}, to the list:

@lisp
(eval-after-load "sb-tcup"
  '(setq shimbun-tcup-group-alist
         (append
          '(("foo" "http://MMMM.teacup.com/foo/bbs2")
            ("bar" "http://NNNN.teacup.com/bar/bbs2"))
          shimbun-tcup-group-alist)))
@end lisp

@item 2ch
This is an example to browse Meadow BBS and emacs-w3m BBS on 2ch.
@lisp
(setq shimbun-2ch-group-alist
      '(("Meadow" .
         "http://pc.2ch.net/test/read.cgi/software/1005469775")
        ("emacs-w3m" .
         "http://pc.2ch.net/test/read.cgi/unix/1013710106")))
@end lisp

@item @uref{http://www.math.tohoku.ac.jp/~kuroki/support/, Bulletin Board Systems using CGI_Board}

Set your favorite browse bulletin board systems using CGI_Board to
@code{shimbun-cgi-board-group-alist}, and you can browse them.

@item HNS
This is an example to use @samp{sb-hns}.
@lisp
(setq shimbun-hns-group-alist
      '(("arisawa"                            ;; Group Name
         "http://nijino.homelinux.net/diary/" ;; URL
         "ari@@mbf.sphere.ne.jp")              ;; E-Mail Address
        ("miyoshi"
         "http://www.be.wakwak.com/cgi-bin/sbox/~miyoshi/hns/"
         "miyoshi@@meadowy.org")))
@end lisp

@item tDiary
This is an example to use @samp{sb-tdiary}.
@lisp
(setq shimbun-tdiary-group-alist
      '(("henahena"                          ;; Group Name
         "http://www.fan.gr.jp/~ring/d/")    ;; URL
        ("yoichi"
         "http://yoichi.geiin.org/d/")))
@end lisp

@item Diaries at @uref{http://plaza.rakuten.co.jp/, Rakuten Plaza}
This is an example to use @samp{sb-rakuten}.
@lisp
(setq shimbun-rakuten-group-alist
      '(("rakuten-id" . "email-address")))
@end lisp

@item @uref{http://www.emacswiki.org/, EmacsWiKi}
emacswiki.changes emacswiki.diff

@item RSS feeds containing contents
To use this back end, look for the RSS feeds containing contents which
you would like to read, and add those groups to the
@code{shimbun-rss-hash-group-path-alist} variable by the following way.
The name of the back end is @samp{rss-hash}.  You may use this back end
for reading mainly personal blogs.

The parameters for each group configuration consist of the name of the
group, the address of the RSS feed, the type of the mail (@code{t} for
html), the regexp matching the start of contents, and the regexp
matching the end of contents.  The parameters other than the name of the
group and the address of the RSS feed are optional.

Here is an example of setting @code{shimbun-rss-hash-group-path-alist}.
In this case, you can browse those groups as @samp{rss-hash.sampleblog1}
and @samp{rss-hash.sampleblog2}:

@lisp
(setq shimbun-rss-hash-group-path-alist
      '(;; text mail
        ("sampleblog1" "http://www.example.com/index1.rss")
        ;; html mail
        ("sampleblog2" "http://www.example.com/index2.rss"
         t "</title>" "<!-- start ads")))
@end lisp

@item Atom feeds containing contents
As well as the previous section (RSS feeds containing contents), you can
also read the Atom feeds which contain published contents.  To do that,
configure the variable @code{shimbun-atom-hash-group-path-alist} (and
possibly @code{shimbun-atom-hash-x-face-alist}, etc.) in the way similar
to shimbun-rss-hash-*.  The name of the back end is @samp{atom-hash}.

@item RSS feeds without published content
Many feeds do not contain the full content of the articles, or only so
called teasers, i.e. quick summaries.  If a site publishes such a feed,
instead of writing a special shimbun for it, you can in many cases use
the @samp{rss-blogs} back end.  The setup is similar to the
@samp{rss-hash} shimbun; here is an example:

@lisp
(setq shimbun-rss-blogs-group-url-regexp
  '(("first-feed" "http://example/wordpressfeed")
    ("second-feed" "http://example/somefeed"
     "<div name=\"content\">" "<div name=\"comments\">")
    ("third-feed" "http://example/someotherfeed" 'none)))
@end lisp

The first two items are the name and the URL of the feed.  Optionally,
you can give two regular expressions denoting the start and end of the
actual content on the HTML pages the feed is pointing to.  If you just
use the symbol @code{none} here, no filtering will be done whatsoever.
Additionally, the @samp{rss-blogs} shimbun can deal automatically with
some popular blogging engines, namely Google's Blogger/Blogspot
(including comment feeds), WordPress, and TypePad.  If your feed is from
a site using one of those (which you can see by looking at the
@code{generator} tag), just omit the optional parameters and the code
will try to extract the content automatically for you.

@item Wiki contents
This is an example to use @samp{sb-wiki}.  @samp{sb-wiki} support
PukiWiki and Hiki.  If you don't know which regexps to set to 4th and
5th elements of an inner list, just set @code{nil} and you'll just see
all contents of a page.
@lisp
(setq shimbun-wiki-group-alist
      '(("pukiwiki" ;; Group Name
         "http://pukiwiki.org/index.php?cmd=rss10" ;; URL
         "webmaster@@pukiwiki.org" ;; E-Mail Address
         nil ;; X-Face
         "\n<h3 id=\"" ;; regexp to represent contents start
         "</address>") ;; regexp to represent contents end
        ("hiki"
         "http://www.namaraii.com/hiki/?c=rss"
         "webmaster@@fdiary.net"
         nil
         "<div class=\"section\">"
         "<div class=\"sidebar\">")
        ("apollo"
         "http://wiki.fdiary.net/apollo/?c=rss"
         "moriq@@moriq.com"
         nil
         "<div class=\"section\">"
         "<div class=\"sidebar\">")
        ))
@end lisp

@item @uref{http://auctions.yahoo.co.jp/, Yahoo! AUCTIONS}
This is an example to use @samp{sb-yahoo-auctions}.
@lisp
(setq shimbun-yahoo-auctions-group-alist
      '(("mp3player" . "http://list3.auctions.yahoo.co.jp/jp/show/catleaf_rss?category=2084039708&alocale=0jp")
        ("iPod" . "http://search3.auctions.yahoo.co.jp/search_rss?p=iPod&auccat=2084039708&alocale=0jp&acc=jp")))
@end lisp

@item @uref{http://www.vinelinux.org, VineLinux Errata}
vinelinux.errata.4x.i386 vinelinux.errata.4x.ppc
vinelinux.errata.3x.i386 vinelinux.errata.3x.ppc
vinelinux.errata.3x.alpha
vinelinux.errata.2x.i386 vinelinux.errata.2x.ppc
vinelinux.errata.2x.sparc vinelinux.errata.2x.alpha
vinelinux.errata.1x

@item @uref{http://www.mmz.kantei.go.jp/, Japan's Cabinet Mail Magazine}
kantei.m-magazine-en kantei.m-magazine-ja kantei.m-magazine-cn.hatoyama
kantei.m-magazine-kr.hatoyama kantei.m-magazine-en.hatoyama
kantei.m-magazine-ja.hatoyama kantei.m-magazine-en.aso
kantei.m-magazine-ja.aso kantei.m-magazine-en.fukuda
kantei.m-magazine-ja.fukuda kantei.m-magazine-en.abe
kantei.m-magazine-ja.abe kantei.m-magazine-en.koizumi
kantei.m-magazine-ja.koizumi

@samp{kantei.m-magazine}, @samp{kantei.m-magazine-cn} and
@samp{kantei.m-magazine-kr} are also available for the backward
compatibility.

@item @uref{http://www.jpo.go.jp/, Patent Office in Japan}
jpo.news jpo.revision jpo.lawguide jpo.details

@item @uref{http://www-6.ibm.com/jp/developerworks/, IBM developerWorks} (in Japanese)
ibm-dev.autonomic ibm-dev.java ibm-dev.linux ibm-dev.opensource
ibm-dev.webservices ibm-dev.xml

@item @uref{http://www.pocketgames.jp/, Pocketgames}
pocketgames.news

@item @uref{http://www.wince.ne.jp/, Wincefan}
wincefan.news

@item @uref{http://www.palmfan.com/, PalmFan}
palmfan.news

@item @uref{http://homepage1.nifty.com/akiba/plat.html, Report of Electrical Stores Street} (in Japanese)
dennou.report

@item @uref{http://pcweb.mycom.co.jp/column/, PCWEB COLUMN Square}
pcweb-column.jsr pcweb-column.yume pcweb-column.hreceipe
pcweb-column.kita pcweb-column.shonanlife pcweb-column.kaden
pcweb-column.nemurenai pcweb-column.komono pcweb-column.js
pcweb-column.en pcweb-column.motherboard pcweb-column.svalley
pcweb-column.architecture pcweb-column.motorlife
pcweb-column.nihongoprog pcweb-column.objc pcweb-column.ide
pcweb-column.music pcweb-column.itsecurity pcweb-column.soundvisual
pcweb-column.osx pcweb-column.sopinion pcweb-column.ebook
pcweb-column.orerobo pcweb-column.zsh pcweb-column.rikei
pcweb-column.lifehack pcweb-column.world pcweb-column.guutara
pcweb-column.volt pcweb-column.textclean pcweb-column.person
pcweb-column.web20 pcweb-column.system

below items are also available for the backward compatibility.
pcweb-column.itshihonron pcweb-column.yetanother pcweb-column.asia
pcweb-column.benri pcweb-column.bytes pcweb-column.game
pcweb-column.hitech pcweb-column.java pcweb-column.jisakuparts
pcweb-column.scramble pcweb-column.toolexp pcweb-column.winvista
pcweb-column.winxp pcweb-column.interview pcweb-column.ityougo
pcweb-column.kimeuchi pcweb-column.stratesys pcweb-column.toyagain

@item @uref{http://tsuruo.dominohosting.biz/members/tsuruo/, Notes Exhibition}
lotusex.news lotusex.library lotusex.operation lotusex.primer
lotusex.tips lotusex.practical lotusex.qanda lotusex.lounge
lotusex.bbs

@item @uref{http://www.atmarkit.co.jp, @@IT forum}
atmarkit.news atmarkit.fwin2k atmarkit.fdotnet atmarkit.fsys
atmarkit.fxml atmarkit.fdb atmarkit.flinux atmarkit.fnetwork
atmarkit.fjava atmarkit.fsecurity atmarkit.farc atmarkit.fbiz
atmarkit.fwcr atmarkit.jibun

@item @uref{http://www.matsusaka-u.ac.jp/~okumura/texfaq/qa/, TeX Q&A Bulletin Board}
texfaq.qanda

@item @uref{http://x51.org/, X51.org}
x51.anima x51.art x51.auction x51.blow x51.cabal x51.crime x51.disaster
x51.edge x51.enema x51.ghost x51.homme x51.info x51.life x51.love
x51.media x51.medical x51.military x51.northkorea x51.oparts x51.phallic
x51.psychics x51.religion x51.science x51.top x51.ufo x51.uma x51.xfiles

@item @uref{http://www.exconn.net/, eXperts Connection (eXConn)}
exconn.news

@item @uref{http://msdn.microsoft.com/, MSDN}
msdn.all msdn.netframework msdn.architecture msdn.asp.net msdn.data
msdn.longhorn msdn.mobility msdn.subscriptions msdn.msdntv msdn.office
msdn.security msdn.sql msdn.theshow msdn.vbasic msdn.vcsharp
msdn.visualc msdn.vfoxpro msdn.vjsharp msdn.vstudio msdn.vs2005
msdn.webservices msdn.embedded msdn.xml msdn.japan.msdn
msdn.japan.msdn-us

@item @uref{http://haiku-os.org/, Haiku OS}
haiku-os.news haiku-os.forums haiku-os.newsletters

@item @uref{http://www.ffii.org/, Foundation for a Free Information Infrastructure}
ffii.en.software-patents ffii.en.software-patents.ffii
ffii.en.information-infrastructure ffii.en.project
ffii.de.software-patente ffii.de.software-patente.ffii
ffii.de.informations-infrastruktur ffii.fr.brevets-logiciels
ffii.fr.brevets-logiciels.ffii ffii.nl.softwarepatenten
ffii.nl.softwarepatenten.ffii
@end table

@node Shimbun Basics
@section How to make a new shimbun module
@cindex @file{shimbun.el}

@samp{Shimbun} is a library set of emacs-w3m that enables you to read
certain web contents using Gnus, Wanderlust, or Mew as if they were
email messages.  Here we will explain how to make a new @samp{shimbun}
module.

@menu
* Overview::
* Getting web page and header information::
* Displaying an article::
* Inheriting shimbun module::
* Making text/plain articles::
* Zenkaku to hankaku conversion::
* Coding convention of Shimbun::
@end menu

@node Overview
@subsection Overview

When you make a new @samp{shimbun} module @samp{foobar} for reading
contents of @uref{http://www.foobar.net}, what you have to do first is
to put the following S expressions in the first part of the
@file{sb-foobar.el} file:

@lisp
(require 'shimbun)
(luna-define-class shimbun-foobar (shimbun) ())
@end lisp

@noindent
We will explain what they are below, so you can understand they are just
incantations now.  You have to use the same suffix @samp{foobar} in the
file name (@file{sb-foobar.el}) and the class name
(@samp{shimbun-foobar}) as the second argument for the
@code{luna-define-class} macro.

Major jobs of the @samp{shimbun-foobar} module can be classified broadly
into the following four categories (note that you may rephrase
``folder'' with ``group'' if you are a Gnus user):

@enumerate
@item
Getting a page source from @uref{http://www.foobar.net} in order to
gather articles' subjects etc. when a MUA opens the @samp{foobar}
folder.

@item
Gathering subjects and other necessary informations from the page source
in order to make headlines of articles and returning them as the
structured list called @code{headers}.

@item
Getting a page source for an article from the web site, for example,
@uref{http://www.foobar.net/053003.html}, when MUA requires to display
an article in the @samp{foobar} folder, and

@item
Removing cruft, e.g. advertisements, from the page source and formatting
a raw article.
@end enumerate

@noindent
@code{shimbun-headers} of @file{shimbun.el} does the first job,
@code{shimbun-get-headers} does the second, @code{shimbun-article} does
the third and @code{shimbun-make-contents} does the last.

The @code{shimbun-headers} method does the first job, the
@code{shimbun-get-headers} method does the second, the
@code{shimbun-article} method does the third and the
@code{shimbun-make-contents} method does the last thing.  The default
methods for those categories are defined in the @file{shimbun.el}
module.

Open the @file{shimbun.el} file.  You may see unfamiliar definitions
like @code{luna-define-generic} or @code{luna-define-method} there.  Hm,
they look like @code{defun}, don't you?  You may also see there's just a
doc-string in the former definition and the same symbol is declared
again in the later form.  And further, there are some symbols only
declared by the @code{luna-define-generic} form, not by the
@code{luna-define-method} form.  What on earth are we seeing?  Isn't the
program not written in the Emacs-Lisp language?

The truth is that the @samp{shimbun} modules use the @file{luna.el}
module provided by @acronym{FLIM} which enables you to write object
oriented programs in the Emacs-Lisp language.

There are method programs defined rigidly for the specific purposes in
the @file{shimbun.el} module.  The @code{shimbun-headers} method gets a
page source from a certain URL, the @code{shimbun-get-headers} method
gathers subjects and other informations, etc@dots{} (see above).  They
do routine works, so they cannot take proper method to meet various web
contents in the world.  Eh?  Oh, you shouldn't believe in a heresy!

The @file{shimbun.el} module only provides the default method functions.
Remember the @code{defadvice} feature.  There are three ways to modify
the behavior of a function: @code{:before}, @code{:around} and
@code{:after}.  Similarly, each default @samp{shimbun} method function
can be modified for a certain purpose (note that the @code{:around}
method-qualifier can be omitted).  And it should be written specially
that the modification will be effective only when the specified
@samp{shimbun} module is selected.

Now as you may have understood that the @code{luna-define-generic} form
provides only a husk in a sense, the @code{luna-define-method} form
defines an actual function which can be different for each
@samp{shimbun} module, and the @code{luna-define-class} form declares
the @samp{shimbun} class in the first part of the @file{sb-foobar.el}
module.

@node Getting web page and header information
@subsection Getting web page and header information

Let's identify a target web page URL to gather subjects and other
informations first.  If a web site uses a frame, a target is only one
of the web pages.  Second, lets create a body of the
@code{shimbun-index-url} method function using the
@code{luna-define-method} form in your @file{sb-foobar.el} file.  And
make the user customizable variable @code{shimbun-foobar-groups}, which
we will explain later@footnote{At least one group is necessary for each
@samp{shimbun} module even if you don't want it.}.

@lisp
(defvar shimbun-foobar-url "http://www.foobar.net")

(luna-define-method shimbun-index-url ((shimbun shimbun-foobar))
  shimbun-foobar-url)

(defvar shimbun-foobar-groups '("news"))
@end lisp

After you create a body of the @code{shimbun-index-url} method, the
@code{shimbun-headers} method can get a web page source since the
@file{shimbun.el} module already has the default @code{shimbun-headers}
method.  After the @code{shimbun-headers} method gets a web page source,
it calls the @code{shimbun-get-headers} method to gather headers
information.  As the @file{shimbun.el} module does not have the
@code{shimbun-get-headers} method, you have to create it in your
@file{sb-foobar.el} file.

Now look carefully in the page source and create the
@code{shimbun-get-headers} method in your @file{sb-foobar.el} file.

Create a regular expression that can gather headers information.
Minimally necessary information are subject, date, author, URL and
@code{message-id} of an article.  They are used in MUA as Subject, Date,
From, Xref and Message-ID.

If you want to make an article from a line in a web page source, like:

@example
<a href="053003.html">some talks on May 30(posted by Mikio &lt;foo@@bar.net&gt;)</a>
@end example

@noindent

use the following regexp:

@example
"<a href=\"\\(\\([0-9][0-9][0-9][0-9]\\)[0-9][0-9]\\.html\\)\">\\([^<(]+\\)(posted by \\([^<]+\\))<\/a>"
@end example

@noindent
You can get a value for Xref by
@w{@code{(match-string 1)}}.  You can get a value for Date by modifying
a value of
@w{@code{(match-string 2)}}.  Subject by
@w{@code{(match-string 3)}} and From from
@w{@code{(match-string 4)}}.  You can modify them further for showing
additional information in MUA.

If URL of an article is a relative path like above, use
@code{shimbun-expand-url} to expand it before putting information to
header.  If each article doesn't have a each unique URLs (i.e. URL of
headers and URL of articles are just same), you have to ask Emacs to
remember body of an article when gathering headers information, For more
detail see the files @file{sb-palmfan.el}, @file{sb-dennou.el} and
@file{sb-tcup.el}.

Sometimes you cannot identify Date information when gathering headers
information only from a web page source.  If so, leave it, just set a
null string, @code{""} to its value.  If you can identify Date only when
you see contents of an article, you can set it at that time by using
@code{shimbun-make-contents} method.  And you may use a fixed From for a
web site (e.x. "webmaster@@foobar.net").

Be careful when you build a message-id.  Make sure it has uniqueness
otherwise you may not be able to read some articles in the
@samp{shimbun}@footnote{And more, you may not be able to read actual
email messages from someone when message-ids conflict!}.  Assure
uniqueness by building message-id using date information, a domain of
the page and/or a part of URL of the page.  And use @samp{@@} but
@samp{:} as a part of message-id in order to display inline images.  See
RFC2387 and RFC822 for more detail.

Put these information to header using function
@code{shimbun-create-header} of the @file{shimbun.el} module.

A bare bone of @code{shimbun-get-headers} in your @file{sb-foobar.el}
file is as follows:

@lisp
(luna-define-method shimbun-get-headers ((shimbun shimbun-foobar)
                                         &optional range)
  (let ((regexp "....")
        subject from date id url headers)
    ...
    (catch 'stop
      (while (re-search-forward regexp nil t nil)
        ...
        (when (shimbun-search-id shimbun id)
          (throw 'stop nil))
        (push (shimbun-create-header
               0 subject from date id "" 0 0 url)
              headers)))
    headers))
@end lisp

@noindent
Note that you can access @samp{shimbun-foobar} instance via temporary
variable @code{shimbun} in the method.

Now we will explain a user variable @code{shimbun-foobar-groups}.

Assume that you have two groups of articles in
@w{@uref{http://www.foobar.net}} and there are two different web pages
for such groups in where @samp{shimbun} module gathers header
information.  For examples, there are what's new information of the web
site in
@w{@uref{http://www.foobar.net/whatsnew/index.hmtl}}, and there are
archive lists of email messages posted to ML in
@w{@uref{http://www.foobar.net/ml/index.html}}.  In such case you may
want to access the group by @samp{shimbun} folders
@samp{foobar.whatsnew} and @samp{foobar.ml}.  If so, put the following S
expressions to the @file{sb-foobar.el} file.

@lisp
(defvar shimbun-foobar-url "http://www.foobar.net")

(defvar shimbun-foobar-group-path-alist
  '(("whatsnew" . "/whatsnew/index.html")
    ("ml" . "/ml/index.html")))

(defvar shimbun-foobar-groups
  (mapcar 'car shimbun-foobar-group-path-alist))

(luna-define-method shimbun-index-url ((shimbun shimbun-foobar))
  (concat shimbun-foobar-url
          (cdr (assoc (shimbun-current-group-internal shimbun)
                      shimbun-foobar-group-path-alist))))
@end lisp

@noindent
You can get the current group by using
@code{shimbun-current-group-internal}.  You can use it in
@code{shimbun-get-headers} method (or others) in order to change its
behavior in accordance with the current group.

Each @samp{shimbun} module needs at least one group.  There is not a
special rule for naming a group, but if you don't find out a good name,
use @samp{news} or @samp{main}.

@node Displaying an article
@subsection Displaying an article

@code{shimbun-article} method defined in the @file{shimbun.el} module
gets URL from Xref information of header, get a web page source from the
URL, and call @code{shimbun-make-contents} in working buffer of the
source.   Major job of @code{shimbun-make-contents} is to process such
HTML.  Imagine that a working buffer has a web page source of an
article.  @code{shimbun-make-contents} defined in the @file{shimbun.el}
module insert (i) header information to top of the buffer, (ii)
@samp{<html>}, @samp{<body>} and etc. right after the information, and
(iii) @samp{</body>} and @samp{</html>} to end of the buffer.  MUA
displays an article as a HTML mail.

@quotation
Not only HTML articles, but also articles in the @samp{text/plain}
format can be generated.  @xref{Making text/plain articles}.
@end quotation

If you don't want to process an article, you don't have to define
@code{shimbun-make-contents} in the @file{sb-foobar.el} module.

If you want to remove some part of a web page source of an article at
its top and its end, set regexp to @code{shimbun-foobar-content-start}
that matches content start and @code{shimbun-foobar-content-end} that
matches content end.

@lisp
(defvar shimbun-foobar-content-start "^<body>$")
(defvar shimbun-foobar-content-end "^<\/body>$")
@end lisp

@noindent
@code{shimbun-clear-contents}, which is called by
@code{shimbun-make-contents} defined in the @file{shimbun.el} module,
will remove HTML source from @code{point-min} to
@code{shimbun-foobar-content-start} and from
@code{shimbun-foobar-content-end} to @code{point-max} using the regexps.
Note that it will not remove any HTML source when either of the regexp
searches fails.

If you want to remove more unnecessary parts (e.x. advertisements)
diligently, define @code{shimbun-clear-contents} in your new
@file{sb-foobar.el} file as follows:

@lisp
(luna-define-method shimbun-clear-contents :around ((shimbun shimbun-foobar)
                                                    header)
  ;; cleaning up
  (while (re-search-forward "..." nil t nil)
    (delete-region (match-beginning 0) (match-end 0)))
  (luna-call-next-method))
@end lisp

@noindent
For more details see @code{shimbun-make-contents} in the
@file{sb-ibm-dev.el} file.

I said in the subsection of @ref{Getting web page and header
information} that if each article doesn't have a each unique URLs you
have to ask Emacs to remember body of an article when gathering headers
information,  In such case you don't have to get a web page from URL of
Xref in @file{shimbun-article} method.  Just get texts from Emacs
memories and put them with pretty printing.  For more detail see
definitions of @file{shimbun-article} method of @file{sb-palmfan.el},
@file{sb-dennou.el} or @file{sb-tcup.el}.

@node Inheriting shimbun module
@subsection Inheriting shimbun module

There are some famous mailing list manager (or archiver).

@itemize @bullet
@item Mailman
@noindent
The GNU Mailing List Manager, formerly called as @samp{pipermail}.  See
@uref{http://www.gnu.org/software/mailman/index.html} for detail.

@item MHonArc
@noindent
See @uref{http://www.oac.uci.edu/indiv/ehood/mhonarc.html} for detail.

@item fml
@noindent
fml mailing list server/manager.  See
@uref{http://www.fml.org/software/fml/} for detail.

@item mailarc
@noindent
See @uref{http://cvs.namazu.org/mailarc/} for detail.
@end itemize

If you find out one of such mailing list managers' names in a web page
source when you analyze it in the step of @xref{Getting web page and
header information}, you are very lucky@footnote{Such mailing list
managers often show their own name in an archive list page}.  The
modules @file{sb-mailman.el}, @file{sb-mhonarc.el}, @file{sb-fml.el} and
@file{sb-mailarc.el} have the @code{shimbun-get-headers} method, etc,
already, when you write small code that is not defined in such
@samp{shimbun} modules, your new @file{sb-foobar.el} module works!

If you use the @file{sb-mailman.el} module, write the following S
expressions to the top of the @file{sb-foobar.el} file:

@lisp
(require 'sb-mailman)
(luna-define-class shimbun-foobar (shimbun-mailman) ())
@end lisp

@noindent
Those above mean that @samp{shimbun} module @samp{shimbun-foobar}
inherits shimbun-mailman class@footnote{i.e. shimbun-mailman class is a
parent class.} and methods defined in the @file{sb-mailman.el} module
will be used in @samp{shimbun-foobar} by default.  You can overwrite
some of parent methods, if necessary.

See the @file{sb-pilot-mailsync.el} file as a sample that uses the
@file{sb-mailman.el} module.  You can feel how easy to create a new
@samp{shimbun} module by using such parent modules.

Note that there are some localized version of such mailing list manager,
for examples, some of them show Date information in Japanese.  The
modules @file{sb-mailman.el}, @file{sb-mhonarc.el}, @file{sb-fml.el} and
@file{sb-mailarc.el} assumes that mailing list managers are not
localized.

If you want to read via @samp{shimbun} a web site that uses localized
mailing list manager, you may have to overwrite some methods in the
parent module.

@node Making text/plain articles
@subsection Making text/plain articles

Even if the MUA is reinforced by emacs-w3m so as to be able to read HTML
articles, @samp{text/plain} articles might be more convenient in some
cases.  To make the @samp{sb-foobar} module generate @samp{text/plain}
articles rather than @samp{text/html} articles, there are two ways to do
that.

@itemize @bullet
@item
The one is to make the @samp{sb-foobar} module inherit
(@pxref{Inheriting shimbun module}) the @samp{sb-text} module.  Here's
an example you may put in the beginning of the @samp{sb-foobar} module.

@lisp
(require 'sb-text)
(luna-define-class shimbun-foobar (shimbun-text) ())
@end lisp

The @samp{sb-text} module provides the @code{shimbun-make-contents}
method which generates the articles in the @samp{text/plain} format.
This will be useful for the @samp{shimbun} modules handling the web
sites which put up only text articles.

@item
The other is to set the @code{shimbun-foobar-prefer-text-plain} variable
to non-@code{nil}.  This makes the @code{shimbun-make-contents} method
generate the articles in the @samp{text/plain} format (actually, it uses
the functions provided by the @samp{sb-text} module).  Note that this is
effective only to the modules which inherit the default
@code{shimbun-make-contents} method (especially the modules which
inherit the @samp{sb-text} module are not affected).  The advantage of
this way is that users can easily switch @samp{text/plain} articles and
@samp{text/html} articles.

The default value for the @code{shimbun-foobar-prefer-text-plain}
variable is @code{nil} if it is not defined.  So, it defaults to
@code{nil} in every @samp{shimbun} module except for the modules
@file{sb-asahi.el} and @file{sb-yomiuri.el}.

In addition, you can use the variables
@code{shimbun-foobar-text-content-start} and
@code{shimbun-foobar-text-content-end} instead of
@code{shimbun-foobar-content-start} and
@code{shimbun-foobar-content-end} to extract significant text in web
pages (@pxref{Displaying an article}).  If the formers are not defined,
those values default to the latter values.
@end itemize

@noindent
Whichever the ways you use, you should note that the @samp{text/plain}
articles cannot contain images, links, etc.

@node Zenkaku to hankaku conversion
@subsection Zenkaku to hankaku conversion

``Zenkaku'' or ``zenkaku character(s)'' is a term commonly used to call
Japanese wide characters, and ``hankaku'' is an opposite term for
ordinary ASCII characters.  There is a complete set of zenkaku
characters corresponding to at least the ASCII character set.

Some Japanese web sites tend to use zenkaku characters a lot, and those
articles might not necessarily be comfortable to read.  If you feel so,
you can use this feature that converts those zenkaku ASCII characters
into hankaku.  To do that, set the @code{shimbun-foobar-japanese-hankaku}
variable to @code{t}.  Where @code{foobar} is a server name to which you
subscribe for shimbun articles.  That is, you have to use it per server.

If you prefer to convert zenkaku to hankaku only in the body of
articles, use the value @code{body} instead of @code{t}.  Contrarily the
value @code{header} or @code{subject} specifies to perform it only in
subjects.

@node Coding convention of Shimbun
@subsection Coding convention of Shimbun

@itemize @bullet
@item
You can use all functions defined in emacs-w3m in @file{shimbun.el}.

@item
You can use no functions defined in emacs-w3m in @file{sb-*.el}.  If you
want to use emacs-w3m functions in @file{sb-*.el}, you must add their
stubs to @file{shimbun.el}.

@item
You must avoid file names that have already used in SpeedBar.  Here is a
list of file names used in @samp{speedbar-0.14beta4}.

@multitable @columnfractions .2 .2 .2 .2
@item sb-ant.el @tab sb-html.el @tab sb-info.el @tab sb-texinfo.el
@item sb-gud.el @tab sb-image.el @tab sb-rmail.el @tab sb-w3.el
@end multitable

@item
You should select file names which remind their referring WEB servers'
URIs.  It is allowed to remove country parts (Ex. jp,de,uk,etc),
organization parts (Ex. edu,com,org,net,etc) and redundant parts
(Ex. www) if removing does not increase vagueness.

@item
You should select group names in USENET style.  It means that small
characters are preferred in group names, and that period(.)  is
preferred as an delimiter to show hierarchical structure in groups.
@end itemize

@node Tips
@chapter Some knick-knacks using emacs-w3m
@cindex Tips

Here are some handy tips to use emacs-w3m with other Emacs facilities.

@itemize @bullet
@item browse-url

You can use emacs-w3m with the @code{browse-url} feature.  For instance,
put the following lines in your @file{~/.emacs} file:

@lisp
(setq browse-url-browser-function 'w3m-browse-url)
(global-set-key "\C-xm" 'browse-url-at-point)
@end lisp

Emacs-w3m will now be invoked when you type the @w{@kbd{C-x m}} key on a
string which looks like a URL in any Emacs buffer.  In addition, you can
use emacs-w3m to preview an HTML file that you are just editing by
typing the @w{@kbd{C-c C-v}} key (note that you need to use Emacs and the
@code{html-mode} major mode to edit the HTML file).

If you'd like to use another web browser than emacs-w3m when using the
@w{@kbd{C-x m}} key when you are in an emacs-w3m buffer (who wants to do
so?), add the following advice to @file{~/.emacs} file:

@lisp
(defadvice browse-url-at-point
  (around change-browse-url-browser-function activate)
  "Use Netscape only when it is invoked in an emacs-w3m buffer."
  (let ((browse-url-browser-function
         (if (eq major-mode 'w3m-mode)
             'browse-url-netscape
           'w3m-browse-url)))
    ad-do-it))
@end lisp

@item dired

You can use emacs-w3m to browse an HTML file in a @code{dired} buffer by
typing the @w{@kbd{C-x m}} key.  Use the following settings in your
@file{~/.emacs} file:

@lisp
(eval-after-load "dired"
  '(define-key dired-mode-map "\C-xm" 'dired-w3m-find-file))

(defun dired-w3m-find-file ()
  (interactive)
  (require 'w3m)
  (let ((file (dired-get-filename)))
    (if (y-or-n-p (format "Use emacs-w3m to browse %s? "
                          (file-name-nondirectory file)))
        (w3m-find-file file))))
@end lisp

@item hnf-mode

You can see the newest diary using emacs-w3m and the hyper nikki system.
Put the following lines in your @file{~/.emacs} file and type the
@w{@kbd{C-c C-b}} key in an @code{hnf-mode} buffer:

@lisp
(defun w3m-hnf-browse-url-w3m (url &optional new-window)
  (interactive (browse-url-interactive-arg "URL: "))
  (save-selected-window
    (pop-to-buffer (get-buffer-create "*w3m*"))
    (w3m-browse-url url new-window)))
(setq hnf-browse-url-browser-function #'w3m-hnf-browse-url-w3m)
@end lisp

@item Gnus

You've mistaken the entrance if you are a Gnus user and this section is
the first page you read in this Info.  See @ref{Hooking into MUAs}
first.

By default, Gnus will not apply the treatment variables, for instance
@code{gnus-treat-strip-banner}, to @samp{text/html} parts.  To have them
applied to @samp{text/html} parts automatically, there are two ways to
do that:

@lisp
;; Apply all the treatments to text/html parts.
(eval-after-load "gnus-art"
  '(add-to-list 'gnus-article-treat-types "text/html"))
@end lisp

@lisp
;; Apply a certain treatment to text/html parts.
(setq gnus-treat-strip-banner '(or t (typep "text/html")))
@end lisp

Also @xref{Customizing Articles, ,Customizing Articles, gnus, The Gnus
Manual}, for details.

In addition, the experimental code below is used to display
@samp{multipart/related} pictures.  The place might be something wrong.

@lisp
(eval-after-load "gnus-art"
  '(or (assoc "multipart/related" gnus-mime-multipart-functions)
       (setq gnus-mime-multipart-functions
             (cons
              (cons
               "multipart/related"
               (byte-compile
                (lambda (handle)
                  (gnus-mime-display-mixed (cdr handle)))))
              gnus-mime-multipart-functions))))
@end lisp

@item yahtml-mode

You can use emacs-w3m to preview an HTML file that just you are editing
with the @code{yahtml-mode}.  Here is an example:

@lisp
(defadvice yahtml-browse-html
  (around w3m-yahtml-browse-html activate compile)
  (w3m-goto-url (ad-get-arg 0) t))
@end lisp

@item jisx0213

You can use JIS X 0213 character set in Emacs using the @code{jis0213}
module which is bundled in the Mule-UCS package.  Although the
@code{decode-char} function is overridden by @code{mucs} (@code{jis0213}
loads @code{mucs}) and it stops working properly for the @code{ucs}
coded character set, it has been reported that also to load the
@code{unicode} module seems to solve the problem. The reason has not
been made clear yet.  Here is an example for the @file{~/.emacs} file:

@lisp
(require 'unicode)
(require 'un-define)
(require 'jisx0213)
@end lisp
@end itemize

@node Mailing List
@chapter Mailing list and submitting bug reports
@cindex Subscribing to the emacs-w3m mailing list
@cindex Reporting bugs

We have set up a mailing list to discuss all things emacs-w3m.  You can
post without subscribing.  If you find a bug, have a feature request, or
have written some code, don't hesitate to post to the list.  And if
you're just a user and like the program, please tell us too!

The address is:

@display
Emacs-w3m Mailing List @t{<emacs-w3m@@namazu.org>}
@end display

You can also send a bug report using the @code{report-emacs-w3m-bug}
command (or the @w{@kbd{C-c C-b}} key) if you have set the
@code{mail-user-agent} variable that will work properly.

English and Japanese can be used when posting to this list, since many
of its members are Japanese.  Articles posted to the list are opened to
the public and you can read them on the web (at
@uref{http://emacs-w3m.namazu.org/ml/}), or in NetNews (group
@samp{gmane.emacs.w3m} on the server @samp{news.gmane.org}).

If you want to receive articles by mail, send a mail containing

@example
subscribe Your Name
@end example

(please write your name, not your email address) in its body to
@samp{emacs-w3m-ctl@@namazu.org}, then you can subscribe to the list.
To unsubscribe from it, send a mail containing just

@example
# bye
@end example

in its body to @samp{emacs-w3m-ctl@@namazu.org}.

@node Emacs-w3m Functions
@chapter Details of some emacs-w3m functions
@cindex Functions details


@node External Packages
@chapter Companion packages you might need

Even though emacs-w3m provides a wealth of features, you may want to
check out the following external packages for even more usability:

@itemize @bullet
@item
w3m-type-ahead.el

The w3m-type-ahead.el package provides ``type ahead'' searching, similar
to the feature by the same name from Mozilla browsers.  It allows you to
find anchors using an interface similar to isearch, but results are
limited to anchors in the buffer.

Download w3m-type-ahead.el from
@uref{http://alioth.debian.org/project/showfiles.php?group_id=30594}.

@item
newsticker.el

newsticker.el that has been incorporated in Emacs 22 and greater is a
rowse rss feeds and also atom feeds.  Here is a configuration example to
use newsticker.el together with emacs-w3m (put it in the @file{~/.emacs}
file):

@lisp
(require 'w3m-load)
(setq newsticker-html-renderer 'w3m-region
      browse-url-browser-function 'w3m-browse-url)
@end lisp

@pxref{Top, ,Top, Newsticker, A Newsticker for Emacs}, for details.
@end itemize

@node Authors
@chapter People who wrote this manual

@itemize @bullet
@c alphabetical order in the family names.
@item
Romain Francoise
@item
NAKAJIMA Mikio
@item
Yoichi NAKAYAMA
@item
Ryoko NARITOKU(Translation only)
@item
Hideyuki SHIRAI
@item
TSUCHIYA Masatoshi
@item
Katsumi Yamaoka
@item
Masatake YAMATO
@item
Naohiro Aota
@end itemize

@node Index
@unnumbered Index

@menu
* Concept Index::               Concept Index
* Key Index::                   Key Index
* Variable Index::              Variable Index
* Function Index::              Function Index
@end menu

@node Concept Index
@unnumberedsec Concept Index
@printindex cp

@node Key Index
@unnumberedsec Key Index
@printindex ky

@node Variable Index
@unnumberedsec Variable Index
@printindex vr

@node Function Index
@unnumberedsec Function Index
@printindex fn

@bye

@c Local Variables:
@c fill-column: 72
@c End:
