EWW == Emacs Web Browser EWW is a light-weight Web browser built into Emacs starting with Emacs-24.4 . This module speech-enables EWW.
It implements additional interactive commands for navigating
the DOM. It also provides a set of filters for interactively
filtering the DOM by various attributes such as id, class and
role. Finally, this module updates EWW’s built-in key-bindings
with Emacspeak conveniences — for a complete list of
key-bindings, invoke command describe-bindings
in an EWW
buffer by pressing C-h
b.
These commands use EWW’s HTML DOM to display different
filtered views of the Web page. With an interactive prefix
argument, these commands prompt for a list of filters.
Command emacspeak-eww-restore
bound to DEL can be used to restore
the previous view.
eww-view-dom-having-attribute
Display
DOM nodes having specified attribute. Valid attributes
are available via completion.
eww-view-dom-having-class
Display DOM nodes having specified class. Valid classes
are available via completion.
eww-view-dom-having-elements
Display
specified elements from the Dom. Valid element names are
available via completion.
eww-view-dom-having-id
Display DOM nodes having specified ID. Valid id values
are available via completion.
eww-view-dom-element-having-text
lines
containing pattern. Useful to filter down RSS feeds.
eww-view-dom-having-role
Display DOM nodes having specified role. Valid roles are
available via completion.
eww-view-dom-not-having-attribute
Filter
out DOM nodes having specified attribute. Valid attribute
values are available via completion.
eww-view-dom-not-having-class
Filter out
DOM nodes having specified class. Valid class values are
available via completion.
eww-view-dom-not-having-elements
Filter
out specified element DOM nodes. Valid element names are
available via completion.
eww-view-dom-not-having-id
Dfilter out
Display DOM nodes having specified ID. Valid id values
are available via completion.
eww-view-dom-not-having-role
Filter out
DOM nodes having specified role. Valid role values are
available via completion.
Contrast this with filtering described in the previous
section. There, we discussed commands that filter the DOM to render specific types of
elements. For HTML as spoken on the Web, there is a separate
use-case that is helpful as a dual to filtering, namely,
displaying a specific portion of a page, typically the
contents of a div
element. These
elements often appear many times on a page, and can be deeply
nested, making it difficult to focus on the relevant content
on the page, e.g. news sites. Commands emacspeak-eww-dive-into-div
help in such cases,
C-d renders the div
containing point in a separate buffer As
with the filtering commands, l returns
to the buffer where these commands were executed. Long-term
users of Emacspeak who still remember Emacs-W3 will recognize
this as the focus command
implemented by Emacspeak for W3.
These key-bindings are available when point is on a link.
They enable context-specific actions for following links,
e.g., to play media streams, or to open various feed-types
such as ATOM
, RSS
, or OPML
.
shr-copy-url
Copy URL
under point to the kill-ring.
emacspeak-eww-play-media-at-point
Play
media URL under point using emacs-m-player
. Handles URL fragment as
time-stamp where we resume; use J
in M-Player to jump to that offset.
emacspeak-eww-url-to-register
Accumulate
url under point to registeru
.
Sample use-cases include building up a playlist of links
in the right sort order after a YT search.
emacspeak-feeds-select-feed
Display link
under point as an ATOM
,
OPML
or RSS
feed.
empv-play
Play link
-under point as a Youtube stream.
Summary Of Keyboard Commands:
Emacspeak EWW supports table navigation via keys
M-., M-LEFT and
M-RIGHT, to speak the current,
previous and next table cell respectively. The latter
commands also move to the cell being spoken. You can get a
sense of the table’s size via M-,
which speaks the number of rows and cells in the table. This
works for plain tables, not nested tables; for nested tables,
first have then unnested
using one of the XSLT transforms like sort-tables
.
emacspeak-eww-play-audio/video
When on
an audio element, plays audio under point.
emacspeak-eww-fillin-field
When on an
input field, insert username/password information
accessed via auth-source.
emacspeak-speak-rest-of-buffer
Speak
rest of current Web page starting from point.
eww-add-bookmark
Bookmark
current Web page.
dtk-toggle-punctuation-mode
Toggle punctuation mode.
emacspeak-google-similar-to-this-page
Google similarity search.
emacspeak-google-command
Prefix key to invoke Google-specific commands.
emacspeak-eww-links-rel
Display any related links discovered via the document’s
meta
tag.
emacspeak-kill-buffer-quietly
Delete
this buffer.
eww-view-source
Display
Web page source.
emacspeak-we-xsl-map
Prefix key for invoking XSLT-based filters.
eww-copy-page-url
Copy
page URL to kill-ring.
In addition, see commands in See emacspeak-google, for Google-Search specific commands, many of which are available via prefix-key G.
emacspeak-we-junk-by-class-list
Prompts
for list of class-names with completion, and filters out
matching elements.
emacspeak-we-count-matches
Prompts for
XPath expression, and returns count of matching
elements.
emacspeak-we-xpath-junk-and-follow
Follows link under point, and displays that page after
filtering by a specified XPath expression.
emacspeak-we-count-tables
Display a count of tables in the page.
emacspeak-we-count-nested-tables
Counts
nested tables.
emacspeak-we-extract-by-class-list
Prompts for a list of class-names, and displays matching
elements.
emacspeak-we-junk-by-class-list
Filters
out elements having specified class attributes.
emacspeak-we-extract-by-id-list
Extracts
elements by specified list of ID values.
emacspeak-we-extract-tables-by-match-list
Extracts tables that match specified selection
pattern.
emacspeak-we-follow-and-extract-main
Follows link under point, and extracts readable content,
by default, this is all paragraphs and headings.
emacspeak-we-style-filter
Filters content by style attribute.
emacspeak-we-extract-tables-by-position-list
Extracts tables by their position on the page.
emacspeak-we-extract-nested-table-list
Extracts nested tables.
emacspeak-we-xslt-apply
Prompt for and apply specified XSLT transform to current
page.
emacspeak-we-follow-and-filter-by-id
Follow link under point, and filter by specified id
value.
emacspeak-we-extract-by-class
Extracts
elements by class.
emacspeak-we-junk-by-class
Filters out
elements having specified class value.
emacspeak-we-url-expand-and-execute
Follow link under point, but pass the result to a custom
executor. Availability of special executors for link
under point is indicated by auditory icon item instead of button You can then experiment by
pressing RET
or e e
. Special executors are available for
Reddit Links, Wikipedia Links etc.
emacspeak-we-xslt-filter
Apply a specified XSLT filter (XPath) to current
page.
emacspeak-we-extract-by-id
Extract
elements by id value.
emacspeak-we-xslt-junk
Filter out elements matching specified pattern.
emacspeak-we-toggle-xsl-keep-result
Debugging tool — retains the HTML source after XSLT.
emacspeak-we-extract-table-by-match
Extract matching table.
emacspeak-we-xpath-follow-and-filter
Follow link under point, and filter results by a
specified XPath filter.
emacspeak-we-extract-by-role
Extract
elements by specified role value.
emacspeak-we-xslt-select
Select default XSLT transform that is applied before
rendering the page.
emacspeak-we-extract-table-by-position
Extracts tables by their position on the page.
emacspeak-we-extract-matching-urls
Display matching links on the page.
emacspeak-we-class-follow-and-filter-link
Follow link under point, and filter by specified class
value.
emacspeak-we-extract-by-property
Extract
element using a combination of DOM attributes.
emacspeak-we-extract-nested-table
Extract a nested table using a match-list.
emacspeak-we-class-follow-and-filter
Follow link under point and filter by class values.
Modules emacspeak-epub and emacspeak-bookshare provide
EBook front-ends to EPub-2 and Daisy EBooks. Both modules now
use EWW to render these EBooks. Module emacspeak-eww provides
a simple bookmarking facility — called eww-marks (to avoid
confusion with EWW’s Web Bookmarks). When reading an EBook,
you can use m
to create an EWW-mark
at that position. These marks are automatically saved across
Emacs sessions. To open a previously created eww-mark, use
command emacspeak-eww-open-mark
bound to C-x r e
. This command
reads a eww-mark name with completion. Use this command with
an interactive prefix arg to delete a previously created
eww-mark.
By default, EWW includes a simple readability filter, eww-readable
bound to s
. Emacspeak extends this facility with
rdrview[ -- see https://github.com/eafer/rdrview]
,
a command-line tool that extracts page contents using a
simplified view filter that
mirrors the implementation in Firefox.
You can use Emacspeak commands emacspeak-eww-rdr- follow
and emacspeak-eww-rdr-reload
both bound to
S
with variable levels of success
on various Web sites.
Interactively add a mark with name title+‘name’ at current position. Also store it as an org link for later insertion into ‘notes’.‘m (fn NAME)
Open with Chrome. (fn URL)
Interactively delete a mark with name ‘name’ at current position. (fn NAME)
Focus on current div by rendering it in a new buffer.
Fill in user or passwd field using auth-source backend.
Display Link tags of type rel. Web pages for which alternate links are available are cued by an auditory icon on the header line.
A light-weight mode for the ‘*Emacspeak EWW Marks Browser*’. 1. Enables org integration via command ‘org-store-link’ bound to M-x org-store-link. 2. Stored links can be inserted into org files in the same directory via command ‘org-insert-link’ bound to M-x org-insert-link. In addition to any hooks its parent mode ‘special-mode’ might have run, this mode runs the hook ‘emacspeak-eww-marks-mode-hook’, as the final or penultimate step during initialization.
Save Emacspeak EWW marks.
Move forward to the next dd. Optional interactive prefix arg speaks the dd. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The dd is automatically spoken if there is no user activity.
Move forward to the next dl. Optional interactive prefix arg speaks the dl. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The dl is automatically spoken if there is no user activity.
Move forward to the next dt. Optional interactive prefix arg speaks the dt. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The dt is automatically spoken if there is no user activity.
Move forward to the next specified element. (fn EL &optional SPEAK)
Uses element navigation history to decide where we jump.
Moves to next element like current. Prompts if content at point is enclosed by multiple elements. (fn ELEMENT)
Move forward to the next h. Optional interactive prefix arg speaks the h. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The h is automatically spoken if there is no user activity.
Move forward to the next h1. Optional interactive prefix arg speaks the h1. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The h1 is automatically spoken if there is no user activity.
Move forward to the next h2. Optional interactive prefix arg speaks the h2. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The h2 is automatically spoken if there is no user activity.
Move forward to the next h3. Optional interactive prefix arg speaks the h3. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The h3 is automatically spoken if there is no user activity.
Move forward to the next h4. Optional interactive prefix arg speaks the h4. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The h4 is automatically spoken if there is no user activity.
Move forward to the next h5. Optional interactive prefix arg speaks the h5. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The h5 is automatically spoken if there is no user activity.
Move forward to the next h6. Optional interactive prefix arg speaks the h6. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The h6 is automatically spoken if there is no user activity.
Move forward to the next li. Optional interactive prefix arg speaks the li. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The li is automatically spoken if there is no user activity.
Move forward to the next ol. Optional interactive prefix arg speaks the ol. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The ol is automatically spoken if there is no user activity.
Move forward to the next p. Optional interactive prefix arg speaks the p. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The p is automatically spoken if there is no user activity.
Move forward to the next table. Optional interactive prefix arg speaks the table. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The table is automatically spoken if there is no user activity.
Move forward to the next ul. Optional interactive prefix arg speaks the ul. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. Second interactive prefix arg toggles default value of this flag. The ul is automatically spoken if there is no user activity.
Play media url under point. Interprets url-fragment identifier #nnn as time-offset in seconds. Optional interactive prefix arg ‘playlist-p’ treats link as a playlist. A second interactive prefix arg adds mplayer option -allow-dangerous-playlist-parsing (fn &optional PLAYLIST-P)
Move backward to the next dd. Optional interactive prefix arg speaks the dd. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The dd is automatically spoken if there is no user activity.
Move backward to the next dl. Optional interactive prefix arg speaks the dl. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The dl is automatically spoken if there is no user activity.
Move backward to the next dt. Optional interactive prefix arg speaks the dt. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The dt is automatically spoken if there is no user activity.
Move backward to the previous specified element. (fn EL &optional SPEAK)
Uses element navigation history to decide where we jump.
Moves to next element like current. Prompts if content at point is enclosed by multiple elements. (fn ELEMENT)
Move backward to the next h. Optional interactive prefix arg speaks the h. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The h is automatically spoken if there is no user activity.
Move backward to the next h1. Optional interactive prefix arg speaks the h1. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The h1 is automatically spoken if there is no user activity.
Move backward to the next h2. Optional interactive prefix arg speaks the h2. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The h2 is automatically spoken if there is no user activity.
Move backward to the next h3. Optional interactive prefix arg speaks the h3. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The h3 is automatically spoken if there is no user activity.
Move backward to the next h4. Optional interactive prefix arg speaks the h4. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The h4 is automatically spoken if there is no user activity.
Move backward to the next h5. Optional interactive prefix arg speaks the h5. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The h5 is automatically spoken if there is no user activity.
Move backward to the next h6. Optional interactive prefix arg speaks the h6. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The h6 is automatically spoken if there is no user activity.
Move backward to the next li. Optional interactive prefix arg speaks the li. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The li is automatically spoken if there is no user activity.
Move backward to the next ol. Optional interactive prefix arg speaks the ol. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The ol is automatically spoken if there is no user activity.
Move backward to the next p. Optional interactive prefix arg speaks the p. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The p is automatically spoken if there is no user activity.
Move backward to the next table. Optional interactive prefix arg speaks the table. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The table is automatically spoken if there is no user activity.
Move backward to the next ul. Optional interactive prefix arg speaks the ul. Second interactive prefix toggles this flag. See user option ‘emacspeak-eww-autospeak’ on how to reverse this behavior. The ul is automatically spoken if there is no user activity.
Follow link under point, but use rdr to load page.
Reload current Web page using ‘emacspeak-eww-rdr’.
Setup speech-rate, punctuation and split-caps for reading prose.
Restore buffer to pre-filtered canonical state.
Run specified shell command on URL at point. (fn &optional PROMPT)
Toggle between shr and native outliner.
Add a URL to the specified location in smart tabs. (fn CHAR URL)
Load our smart tabsfrom a file.
Save our smart tabs to a file for reloading.
Speak current .
View table at point as a data table using Emacspeak Table UI.
Speak next cell after making it current. Interactive prefix arg moves to the last cell in the table. (fn &optional PREFIX)
Speak cell after moving to next row. Optional interactive prefix arg moves to end of table. (fn &optional PREFIX)
Speak previous cell after making it current. With interactive prefix arg, move to the start of the table. (fn &optional PREFIX)
Speak cell after moving to previous row. Optional interactive prefix arg moves to start of table. (fn &optional PREFIX)
Speak current cell.
Speak number of rows and cells.
Display tags at point.
Turn this on to make section navigation autospeak. This also reverses the meaning of the prefix-arg to section nav commands.
Default Value:
t
Turn this on to avoid rendering images.
Default Value:
nil