views:

281

answers:

2

Hello,

I would like to edit text in boustrophedon in emacs. For those of you who don't know boustrophedon text direction goes "like an ox turns" in a field or like a printer inkjet. For the same reasons this is efficient on a farm or in a printer this text is very efficient to read once you get used to it (which doesn't take too long).

more on boustrophedon typesetting/layout: http://www.ntg.nl/pipermail/aleph/2004-March/000094.html

To my knowledge there are no implementations of this typesetting style and I am stumped on how to implement it.

Any ideas as to how this could be done?

Thanks, Andreas

+1  A: 

I assume that advising self-insert-command, intercepting the events, and modifying the buffer accordingly is what you want to do. You will then need to rebind the directional commands (forward-char and friends are reversed on opposite lines), and so on.

A lot of work, but definitely possible.

Before you write anything too complicated, ask on emacs-devel. As the comments suggest, it might be useful to have generic support for something like this... although arbitrary snippets of text with different directions won't word-wrap (when inserting) the same way your text will.

Edit: Apparently advising self-insert-command doesn't quite work for this, so you will need to setup a keymap (and bind ?a to (my-new-insert-command ?a) and so on...).

jrockway
A: 

There is linux software for 'turning the ox'. Check out http://traevoli.com/boust/ Enjoy!