Emacs: Using Eww Web Browser

By Xah Lee. Date: . Last updated: .

Emacs 24.4 comes with a web browser! 〔►see Emacs 24.4 New Features (released 2014-10)

To start the web browser, Alt+x eww.

emacs eww screenshot 2016 12 20
emacs eww browser

while in eww, pull the menu 〖eww〗 to see its most used commands, or Alt+x describe-modeCtrl+h m】 to see commands.

How to open a new URL?

Just call 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?

Add the following to your emacs init.

;; 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 new website in new buffer?

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

You can write a hook to rename automatically. Put this in your emacs init.

(when (fboundp 'eww)
    (defun xah-rename-eww-hook ()
      "Rename eww browser's buffer so sites open in new page."
      (rename-buffer "eww" t))
    (add-hook 'eww-mode-hook 'xah-rename-eww-hook)))

〔►see Emacs: Change Major Mode Keys

Where's cookies and cache location?

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

The location is controlled by the following variables:

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 Google, Dictionary, Documentation

Like it? Buy Xah Emacs Tutorial. Thanks.