Emacs: Eww Web Browser

By Xah Lee. Date: . Last updated: .

Emacs 24.4 comes with a web browser! [see Emacs 24.4 Features (released 2014-10)]

To start the web browser, Alt+x eww.

emacs eww screenshot 2016 12 20
emacs eww browser
emacs eww browser keys 27289
emacs Alt+x eww browser, 2017-11-10

while in eww, pull the menu [eww] to see its most used commands, or Alt+x describe-mode to see commands.

Eww Keys

Here's most useful keys

See also: Emacs: Change Major Mode Keys

How to open a new URL?

Just Alt+x eww again.

How to open a local HTML file?

Alt+x eww-open-file.

How to switch to a real browser?

When in eww, Alt+x eww-browse-with-external-browser&】.

How to make emacs always use eww?

Put this in your emacs init file:

;; make emacs always use its own browser for opening URL links
(setq browse-url-browser-function 'eww-browse-url)

[see Emacs: Set Default Browser]

How to open URL in new buffer?

Alt+x rename-buffer to rename the first one. Then, call eww again to open a new site.

or, put this in your emacs init file:

(when (fboundp 'eww)
  (defun xah-rename-eww-buffer ()
    "Rename `eww-mode' buffer so sites open in new page.
URL `http://ergoemacs.org/emacs/emacs_eww_web_browser.html'
Version 2017-11-10"
    (let (($title (plist-get eww-data :title)))
      (when (eq major-mode 'eww-mode )
        (if $title
            (rename-buffer (concat "eww " $title ) t)
          (rename-buffer "eww" t)))))

  (add-hook 'eww-after-render-hook 'xah-rename-eww-buffer))

Where is cookies and cache location?

It's at ~/.emacs.d/url/.

The location is controlled by the following variables:

url-cookie-file
Default value is "~/.emacs.d/url/cookies"
url-configuration-directory
Default value is "~/.emacs.d/url/"

eww is written by Lars Magne Ingebrigtsen ( http://quimby.gnus.org/lmi/lmi.html ) , the same guy who wrote gnus. See also Lars Magne Ingebrigtsen blog about it at http://lars.ingebrigtsen.no/2013/06/16/eww/

Lookup Programing Docs of Word Under Cursor

Emacs: Lookup the Web, xah-lookup.el

Put $5 at https://www.patreon.com/xahlee , or goto paypal.com and pay to Xah@XahLee.org . Message me on XahLee discord, say so, ask me questions.
Or Buy Xah Emacs Tutorial

Emacs Tutorial

Emacs Init

Emacs Keys

ELisp

ELisp Examples

ELisp Write Major Mode


Emacs Tutorial

Quick Start

Manage Windows

File

Buffer

Find Replace

Copy/Paste

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc