A speed reading mode for Emacs
The story continues at gnu.org
Put spray.el into a “load-path”ed directory, and load it in your init file.
(require 'spray)
Then you can start spraying from the cursor position with M-x
spray-mode
. Binding some keys may also be useful.
(global-set-key (kbd "<f6>") 'spray-mode)
In spray-mode buffers, following commands are available.
spray-start/stop
(SPC)- pause or resume spraying
spray-backward-word
(h, <left>)- pause and back to the last word
spray-forward-word
(l, <right>)-
inverse of
spray-backward-word
spray-faster
(f)- increases speed
spray-slower
(s)- decreases speed
spray-quit
(q, <return>)-
quit
spray-mode
You may customize spray by modifying following items:
- [Variable] spray-wpm
- [Variable] spray-height
- [Variable] spray-margin-top
- [Variable] spray-margin-left
- [Variable] spray-ramp
- [Keymap] spray-mode-map
- [Face] spray-base-face
- [Face] spray-accent-face
You could create a function to toggle the emacs theme to one that works with spray, and then put that in the spray mode hook. For example:
(defun toggle-night ()
(interactive)
(if (equal (car custom-enabled-themes) 'naquadah)
(override-theme 'leuven)
(override-theme 'naquadah)))
(add-hook 'spray-mode-hook 'toggle-night)
Alternatively, one user found ways to setup a single buffer with better colors, using
- http://www.emacswiki.org/emacs/BufferBackgroundColor
- https://github.com/vic/color-theme-buffer-local
He also found this library useful: https://github.com/ShingoFukuyama/ov.el
All on: https://gitlab.com/iankelling/spray
There’s lots of features and enhancements to do. The algorithm and interface could certainly be improved in various ways.
Available in marmalade or github It has several nice features and does not align on an accent character. Eventually I’d like to merge the two packages.
The algorithm is inspired from OpenSpritz.
Mostly as of June 28, 2014.
For all other projects:
- It is very difficult to save your place and come back later. Emacs has lots of built in features like bookmarks or just making a note which make this easy.
- No keybinds. This is especially useful for common, quickly used functionality like pause and back up.
Specific projects:
- speed-readerff firefox extension.
- squirt javascript bookmarklet.
- OpenSpritz javascript bookmarklet.
- Very difficult selecting where to start / what exactly to read.
- Very difficult to figure out where you are within a document.
- spray website you paste text into.
- Very difficult to figure out where you are within a document.
- spread0r Perl program.
- No apparent way to resize text.
- Very difficult to figure out where you are within a document.
- sprits-it website or bookmarklet. Looks most promising of the web based projects.
- Very difficult selecting where to start / what exactly to read.
- Somewhat difficult to figure out where you are in a document.
Programs that I, Ian Kelling, didn’t try, and why. They also probably have a lot of the problems listed above.
- https://github.com/pasky/speedread No simple way to resize text from default of too small.
- https://github.com/ds300/jetzt Chrome plugin: Chrome is proprietary, and its open source version is unfriendly to linux distros so they don’t package it, and it’s readme does not list any benefit to this program over others.
- https://github.com/Fr4ncis/openspritz-ios ios program. I don’t have an ios device, and this does not appear to have any compelling features.
- https://github.com/OnlyInAmerica/OpenSpritz-Android android program. If I knew how to quickly move reading material to my phone, I would try this out. But, it’s readme shows that the program is pretty sparse and would have some of the same problems as listed above, so not worth it.
Downsides compared to similar projects:
- The emacs learning curve.
- Would be hard to get running on a phone.
In ./spray.el
, the functions spray--word-at-point
, spray--update
and spray-start
contain the main algorithm of choosing a word, an accent character and an interval to display it. Word splitting is also duplicated the same way as in those functions throughout ./spray.el.
Words are split at space, tab, newline, and emdash characters.
Each word is displayed for (60 / the choosen wpm) seconds, except if the
word ends with .!?,;:—
or is greater than 9 characters long, in which
case it is displayed for twice as long.
When started, an added delay is optionally added, based on the spray-ramp variable. See it’s documentation for details.
The accent location is chosen as the nth character in a word, depending on its length, based on the following table
length | accent position |
1 | 1 |
2-5 | 2 |
6-9 | 3 |
10-13 | 4 |
14+ | 5 |