Using Emacs as Ebook reader
David Kuehling
dvdkhlng at gmx.de
Tue Mar 20 18:58:54 EDT 2012
Hi,
I recently carried my nanonote with me on a longer bus trip, and used it
to read a .txt-format ebook. I didn't have any time to check for
supported ebook reader applications, so settled on just opening my book
with Emacs from the last firmware.
With some minor configuration, this worked surprisingly well:
- Just running Emacs from the menu, the font is a little small and
lacks many non-ASCII characters (even some quote characters!), so I
launched 'jfbterm' from the "terminals" menu and started Emacs by hand
- White on black text was unpleasent to my eyes. In emacs you can type
<Esc> x invert-face <Ret> default <Ret>
to get black on white text and inverse colors
- Typing <Esc> x toggle-word-wrap <Ret> does what the name suggests
Emacs in the last firmwares is already configured to use volume up/down
keys for page-wise scrolling, which comes in handy.
You'd also want to put this lines into your /root/.emacs config file:
(desktop-save-mode t)
to make emacs remember open files and cursor locations between sessions
(you might have to type <Esc> x save-desktop <Ret> and save to /root/
once to generate the first "desktop" file)
the word-wrapping of .txt files can be enabled by default via
(add-hook 'text-mode-hook '(lambda () (setq word-wrap t)))
And starting Emacs in jfbterm with black-on-white text can be
accomplished with this script:
#! /bin/sh
exec jfbterm -e emacs --eval "(invert-face 'default)"
which you can then add a gmenu2x launcher for. Yes, the next firmware
will have a proper .epub reader, but didn't have time to try it yet :)
In case you want formatted text, Emacs has support for displaying
(roff?) formatted unix manual files, via the built in 'woman' browser.
Just don't know a good way to convert .epub to roff yet.
cheers,
David
--
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20120320/9d639938/attachment.pgp>
More information about the discussion
mailing list