Eww (the Emacs Web Wowser) is a Web browser written in elisp and based on shr.el.
Eww is included in Emacs 24.4 and later.
Eww uses the ‘shr’
HTML renderer, so we can change how Eww web pages look by setting the shr variables.
(setq browse-url-browser-function 'eww-browse-url ; Use eww as the default browser shr-use-fonts nil ; No special fonts shr-use-colors nil ; No colours shr-indentation 2 ; Left-side margin shr-width 70 ; Fold text to 70 columns eww-search-prefix "https://wiby.me/?q=") ; Use another engine for searching
You can use ‘M-x customize-group’
on ‘eww’
or ‘shr’
to see more options.
Start Eww with ‘M-x eww’
. You’ll be prompted for a search term or URL.
You can see a list of keybindings with ?
. Common keys include:
TAB
– Next linkShift+TAB
– Previous linkb
– Add bookmarkB
– View bookmarksl
– Go backr
– Go forwardH
– View historyG
– Enter a new URL or searchw
– Copy the current URLM-<RET>
– Open link in new tabs
– Get a list of eww tabsTo open .onion
links, run ‘torsocks emacs’
from the terminal. From then, you should be able to load .onion
URLs Emacs-wide.
ErcProxy has a lot of helpful advice.
You can create an alias or function to call eww
from the command line:
# In ~/.bashrc eww() { emacsclient -a '' -t -e '(eww-browse-url "'"$1"'")' } # Or from non-client Emacs: alias eww="emacs -f eww-browse $1"
Then use the command from your terminal:
eww "some search query"
eww emacswiki.org
Windows may need libxml2
and GnuTLS
installed and added to %PATH%
. Both of these are provided by ezwinports.
You may also need TLS certificates, as explained in “GnuTLS for Emacs 24 on Windows”.