Previous section   Next section

Hack 39 Text Editing with Emacs on Your TiVo

figs/moderate.giffigs/hack39.gif

Nothing says text editing like Emacs, the other default Unix editor.

Ask anybody in any Linux forum which editor is better, vi or Emacs, and you're bound to start a brawl. People love vi due to its simplicity, while Emacs people complain that using vi is too limiting. vi people complain that Emacs is bloated; Emacs people complain that vi is nonintuitive.

Let's fan the flames of this particularly geeky religious war by bringing TiVo users into the debate, shall we?

The version of Emacs for TiVo is actually called JASSPA's MicroEmacs, freely downloadable from http://www.jasspa.com/down0212.html. The full version of Emacs with all its ELisp files is going to be a little too much for your TiVo. Think of MicroEmacs as a version of Emacs that is packaged to be small enough to fit on one floppy.

For the TiVo, Greg Sadaway compiled nanoemacs, the smallest MicroEmacs you can get for the TiVo, and made it available at http://alt.org/forum/index.php?t=getfile&id=44. Grab yourself a copy, move it over to your TiVo [Hack #36], and drop it into the /var/hack/bin directory.

I usually find it helpful to rename the program from nec-static to nec or just plain emacs:

bash-2.02# mv /var/hack/bin/nec-static /var/hack/bin/emacs

Also, don't forget to make the program executable, like so:

bash-2.02# chmod 755 /var/hack/bin/nec

Chances are that emacs, just like elvis, won't "just work" at this point (unless you have elvis [Hack #38] installed), but give it a shot:

bash-2.02# emacs
Unrecognized TERM type

If you see this error message, you will have to snag yourself a copy of elvis [Hack #38], pull out the terminfo.tar from the Series 1's archive, and install it into /var/hack/terminfo:

bash-2.02# mkdir /var/hack/terminfo
bash-2.02# cd /var/hack
bash-2.02# cpio -I -H tar --make-directories < terminfo.tar

Don't forget to also set the TERMINFO environment variable. Why not also make the change permanent by adding it to your /.profile file?

bash-2.02# export TERMINFO=/var/hack/terminfo
bash-2.02# mount -o remount,rw /
bash-2.02# emacs /.profile
bash-2.02# mount -o remount,ro /

  Previous section   Next section
Top