‘w3m-search’ provides a convenient interface to various internet search engines.

‘s’ Search, fetching results in the current buffer, using your default search engine. ‘S’ Search, fetching results in a new buffer, using your default search engine.

Running either command with the default prefix ‘C-u’ allows you to choose from any of the non-default pre-configured searcg engines (and of course you can always customize and add your own).

See also: w3m support for Emacs Wiki.


The default search engine is set in ‘w3m-search-default-engine’. Its value should match an entry in ‘w3m-search-engine-alist’. Both are defined using ‘defcustom’ so you can use the emacs customization-group interface to modify them.

Make the previous search engine the default for the next search

    (defadvice w3m-search (after change-default activate)
      (let ((engine (nth 1 minibuffer-history)))
	(when (assoc engine w3m-search-engine-alist)
	  (setq w3m-search-default-engine engine))))

Ideas for other search engines

Here are some more entries that can be added to ‘w3m-search-engine-alist’, as above:

Typing the search engine and query at once like Firefox

By default, google and yahoo have uri shortcuts defined, so from any url prompt, you can type `gg:<your search string>’ or `ya:<your search string>’.

Shortcuts are defined in variable ‘w3m-uri-replace-alist’, which is defined using defcustom for easy customization.

See Also: WThreeM, CategoryHypermedia