Skip to content
Web search from Emacs and the terminal
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests * tests/web-search-tests: Drop realpath. Sep 2, 2017
.gitignore Add .gitignore Aug 15, 2017
.travis.yml Update travis.yml Jun 20, 2019
Makefile Revert "* Makefile: Fix load-path for Emacs-24.x from Travis-CI." Sep 2, 2017 Add MELPA Stable badge Jun 20, 2019
web-search * web-search (_realpath): Delete quote around wildcards. Sep 11, 2017
web-search.el Update copyright year, my name and version Jun 20, 2019

web-search.el Build Status MELPA MELPA Stable

Web search from Emacs and the terminal. Open URL in your default web browser.

From Emacs, type M-x web-search.

From the terminal, use web-search:

$ web-search -h
Web search from the terminal.

Usage: web-search <query> [options]

  -h, --help              display help
  -l, --list-providers    list supported providers
      --list-tags         list available tags
  -o, --output            output only mode
  -p, --provider string   search provider (default "Google")
  -t, --tag string        search tag
  -v, --verbose           verbose mode
      --version           display version
      --completion        display completion code for Bash/Zsh


Search for puppies on google.

;; From Emacs
M-x web-search RET puppies RET

# From the terminal
$ web-search puppies

Search for rhinos on wikipedia

;; From Emacs
C-u M-x web-search RET Wikipedia RET rhinos RET

# From the terminal
$ web-search -p wikipedia rhinos

Search providers tagged "Code" for string-length.

;; From Emacs
C-u C-u M-x web-search RET Code RET string-length RET

# From the terminal
$ web-search -t code string-length


See the user option web-search-providers and web-search-default-provider. To customize the command line program web-search, you can put your configuration into $HOME/.config/web-search-config.el or $HOME/.web-search-config.el, it will be loaded after web-search.el has been loaded.

For example, to change the default provider from Google to Bing:

(setq web-search-default-provider "Bing")

and to search something on Emacs China:

(push '("Emacs China" "")

Bash/Zsh Completion

Put the following line to your Bash or Zsh configuration file such as ~/.bashrc or ~/.zshrc.

eval "$(web-search --completion)"

Supported Providers

  • 500px
  • Arch Package
  • Arch Wiki
  • Bandcamp
  • Bing
  • Debian Manpages
  • Debian Package
  • DuckDuckGo
  • Gist
  • GitHub
  • Google
  • Hacker News
  • MacPorts
  • Pinterest
  • Reddit
  • RubyGems
  • Soundcloud
  • Stack Overflow
  • Wikipedia
  • YouTube
  • Zhihu


This project is inspired by

You can’t perform that action at this time.