Download: Lisp:tab-in-tabular.el
What is Here:
tab-in-tabular.el contains a couple of functions to make emacs treat `&’s more like cell separators in e.g. excell. This makes sense if you are using the tabular environment in LaTeX all the time. Maybe other times as well.
There are two core functions: tab-in-tabular and backtab-in-tabular, the first of which tries first to find a logical next ampersand to jump to, and if there isn’t one it checks if there is an amp on the previous line that it can align a new one with.
If there are no appropriate ampersands, it does the normal tab-thing.
backtab-in-tabular just checks if there is an amp before point on this line or the immediately preceding line and moves point to the left of the word inside the field, sort of.
What is not here (bugs):
- re-search-backward, or match-beginning/end doesn’t do what i want, so i can’t seem to make point go to the left of a word.
- Basically, the leftmost column doesn’t do exactly what i want, because of that bug.
- It’s kind of ugly that i search for a (nearly) impossible string instead of just returning nil at the end of my utility functions. Can’t find a function to return nil, though. Help/advice welcome.
- More?
To Do:
- It would be nice if it only tried to break your tab if you were in the tabular environment. I couldn’t find any documentation in LaTeX-mode or AucTeX that suggested there was an easy way to figure this out. (A buffer- or mode-specific variable would be delicious) Any information about this would allow me to do a whole heck of a lot more without fear of destroying your document.
- ??? Fix those bugs, or if you have any ideas,