Function: eww-readable

eww-readable is an interactive and byte-compiled function defined in eww.el.gz.

Signature

(eww-readable)

Documentation

View the main "readable" parts of the current web page.

This command uses heuristics to find the parts of the web page that contains the main textual portion, leaving out navigation menus and the like.

Probably introduced at or before Emacs version 25.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
(defun eww-readable ()
  "View the main \"readable\" parts of the current web page.
This command uses heuristics to find the parts of the web page that
contains the main textual portion, leaving out navigation menus and
the like."
  (interactive nil eww-mode)
  (let* ((old-data eww-data)
	 (dom (with-temp-buffer
		(insert (plist-get old-data :source))
		(condition-case nil
		    (decode-coding-region (point-min) (point-max) 'utf-8)
		  (coding-system-error nil))
                (eww--preprocess-html (point-min) (point-max))
		(libxml-parse-html-region (point-min) (point-max))))
         (base (plist-get eww-data :url)))
    (eww-score-readability dom)
    (eww-save-history)
    (eww-display-html nil nil
                      (list 'base (list (cons 'href base))
                            (eww-highest-readability dom))
		      nil (current-buffer))
    (dolist (elem '(:source :url :title :next :previous :up))
      (plist-put eww-data elem (plist-get old-data elem)))
    (eww-update-header-line-format)))