\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{