Hot answers tagged

22 votes
Accepted

How to customize background color for some web pages opened with eww?

I'm not sure why the background color is there either, but it seems to be controlled by the function shr-color-check, which is supposed to check that the contrast between the fg and bg is sufficient ...
user avatar
  • 2,745
18 votes
Accepted

How can I use eww as a renderer for mu4e?

eww is basically an interactive wrapper around the shr package, which renders HTML as Emacs text (the actual HTML parsing is done by the libxml package). You can use it in mu4e by setting mu4e-...
user avatar
  • 4,968
16 votes
Accepted

How to make eww default browser in Emacs?

As noted in the EWW info manual node you can use EWW as a target for browse-url, which is what Org uses if a URI starts with "http", "https", etc. You can of course customize browse-url behaviour with ...
user avatar
  • 1,051
13 votes
Accepted

How can I toggle displaying images in eww without a page refresh?

Background Eww, as many other packages, uses the display text property to display images. That is why toggling the invisible text property didn’t help. You’re making the text itself invisible but the ...
user avatar
  • 22.4k
11 votes
Accepted

How can I ask for a web server to serve their "mobile friendly" version of their web pages with eww?

eww uses the url library, so we can add advice to url-http-user-agent-string to fake the User-Agent string: (advice-add 'url-http-user-agent-string :around (lambda (ignored) ...
user avatar
  • 8,992
10 votes

eww ---> libxml2 library not found

As @Drew noted, Emacs doesn't include this library so on Windows you need to install it separately. See the Emacs README.w32 section "Optional dependency libraries" for more information. As of Emacs ...
user avatar
  • 19.4k
10 votes
Accepted

Use a different color theme for eww buffers

Update: load-theme-buffer-local.el (GitHub repository) is supposed to do what I tried to do, but do it the right way. To use it with eww, install it and add (add-hook 'eww-mode-hook (...
user avatar
  • 8,992
8 votes

How can I toggle displaying images in eww without a page refresh?

As of Emacs 25.1 you can pass an argument to eww-reload to load from the cache rather than the network. I'm using the following: (defun my/eww-toggle-images () "Toggle whether images are loaded and ...
user avatar
  • 19.4k
7 votes
Accepted

Simple method for creating multiple eww buffers

You are correct that eww does not automatically create new buffers for you. But I have been using this trick from ergoemacs.org and it works great! With the below eval'ed, each time you do M-x eww ...
user avatar
  • 24.3k
7 votes
Accepted

Can I configure eww to use pdf-view-mode (from pdf-tools) for PDFs instead of DocView?

Warning: dirty work-around ahead Since you "greatly prefer [pdf-tools] to DocView", is it safe to assume that using it to view all pdfs is acceptable? The following code snippet will switch the ...
user avatar
  • 4,113
6 votes
Accepted

How to prevent shr from making network connections

shr.el has a (defvar shr-inhibit-images nil), and a (defcustom shr-blocked-images nil "Images that have URLs matching this regexp will be blocked." :version "24.1" :group 'shr :type '(choice (...
user avatar
  • 3,828
6 votes
Accepted

How can I install eww or shr in Emacs 23?

shr and eww can't work in Emacs 23. Regardless of other incompatibilities, they require Emacs to have been compiled with libxml2 support, and that ability came in 24.1 If you want to try eww, you ...
user avatar
  • 43.8k
6 votes
Accepted

How to open eww in readable mode?

This doesn't work The reason calling eww-readable right after eww does not work is because eww is asynchronous; when eww-readable is called the eww buffer is not yet rendered, so there are no "...
user avatar
  • 11.4k
5 votes

Back a page in eww browser?

You can go back with l (which is bound to eww-back-url). As with any major mode, you can get an overview of available keybindings by typing C-h m in a eww buffer. The keybinding l is meant to be ...
user avatar
  • 4,612
5 votes

Simple method for creating multiple eww buffers

Update This behaviour was discussed in bug#34374 and merged on 2019-02-15. So in Emacs 27, calling eww with a prefix argument tells it to use a new buffer instead of reusing the default *eww* buffer....
user avatar
  • 11.4k
5 votes
Accepted

How to save images from buffer?

As far as I can tell *eww* buffers store image data in the display text property. So, to save an image we need to get this property and save it to a file. Here is a sketch of a solution. (defun my-...
user avatar
  • 8,992
5 votes

eww bookmark mangagement?

For posterity, you can delete EWW bookmarks simply by C-k (or M-x eww-bookmark-kill) in the *eww bookmarks* buffer.
user avatar
  • 51
4 votes
Accepted

How do I auto-refresh eww pages?

Solution Start a file-notify watch when opening a file in eww. In the callback function for that watch, do 2 things: Reload the *eww* buffer every time the function is triggered by file-notify ...
user avatar
  • 24.3k
4 votes
Accepted

Enabling shr-external-rendering-functions Variable in EWW

If you want to generally change/add the rendering of nodes of a certain tag type you just add an association from the tag as symbol to the rendering function in the list shr-external-rendering-...
user avatar
  • 30.4k
3 votes

Compiling Emacs from source on Ubuntu - problems with libxml2

I've just solved the same problem, trying to install Emacs 25.1.rc1 on Ubuntu 15.10, by installing: apt install libxml2-dev before calling ./configure.
user avatar
  • 6,081
3 votes
Accepted

Compiling Emacs from source on Ubuntu - problems with libxml2

This problem was caused by pkg-config being installed in two places. Once by apt, the other time by Linuxbrew. The path was finding the Linuxbrew pkg-config copy first, which was configured to look ...
user avatar
  • 998
3 votes

How to prevent eww from truncating lines?

I'm using eww, and needed line wrapping. First I tried line truncation, but that cut through the middle of words. visual-line-mode seems to provide intelligent line-wrapping on whitespace in the most ...
user avatar
  • 410
3 votes

Simple method for creating multiple eww buffers

It seems eww is designed to avoid this behavior. This function, eww-new, can be called when a new eww buffer is desired: (defun eww-new () (interactive) (let ((url (read-from-minibuffer "Enter ...
user avatar
3 votes

eww bookmark mangagement?

Bookmark+ gives you lots of ways to manage sets of normal Emacs bookmarks, including for EWW. It also offers several unique possibilities for bookmarking URLs with EWW, if you use Emacs 25 or later. ...
user avatar
  • 70.2k
3 votes

Could not create connection to github.com:443

It would seem that this version of Emacs(emacs-mac from Brew) and the latest version of gnutls from Brew are incompatible. Installing emacs-plus solved issue for me.
user avatar
3 votes
Accepted

Displaying LaTeX equations with EWW

Looks like this is bug#24111, which was fixed for Emacs 26 in "Fix rendering of some complex SVG images" of 2017-01-24. It is always recommended to use the latest Emacs version possible, especially ...
user avatar
  • 11.4k
3 votes
Accepted

Search in readable eww buffer

You seem to be using dynamic binding which means that str would be evaluated once your lambda function is executed at which time the variable str is no longer in scope. You should turn on lexical ...
user avatar
2 votes

How do I auto-refresh eww pages?

I fixed the same issue with a noob solution so here it is: I basically added a hook that calls eww-reload on the "other frame" -that supposedly has the web page open- once the markdown gets saved. ...
user avatar
  • 121
2 votes
Accepted

eww: error in process sentinel: url-cookie-generate-header-lines: Wrong type argument: listp, \.\.\

Glenn Morris on the emacs.bugs mailing list pointed out a bug of emacs-24.5. One has to delete the cookie caching file saved in url-cookie-file because it can became saved in an incorrect format. http:...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible