About four months ago, I asked this question on TeX-sx. Over the previous ten years, I had looked at GNU Emacs, as a programming editor, three or four times, and, each time, given up because I thought the learning and implementation curves too challenging.
But this time, encouraged by the helpful answers to my question, I decided to invest some time in learning Emacs and tweaking it to do what I wanted. And now, four months later, I’m really pleased with the journey so far.
I’m a Windows 7 user, using TeX Live and Emacs 23.3 for Windows. As a specialised software developer, my main TeX products are proposals and design documentation (though I also use it for all my ‘domestic text processing’ tasks). I generally manage documentation source, and everything else in a project, with Git.
Editing documents with Emacs
Plain Emacs out-of-the-box does a wonderful job, but for TeX editing you need a bit more: AucTeX, which provides many useful tools for TeX editing, including a component, RefTeX, which presents you with an intelligent TOC right there in your editor, allowing you to navigate (across multiple input files, of course), and to create index entries, labels, and cross-references very easily. AucTeX also has an outlining component which allows you to fold up your section hierarchy.
Just to whet the appetite, here’s a screen shot of a (fully unfolded) piece of a RefTeX *toc*:
As well as using Emacs for TeX editing, for notes and brainstorms I can heartily recommend org-mode, which is (much more than) an outliner, with facilities for To-Do items and table manipulation, as well as the usual structural organising.
It took some time to get Emacs tailored exactly to my liking. It’s a bit like typography in that respect; there are always opportunities for ‘just one more tweak’, and a lot of self-control is needed. But you should expect to do some customization, perhaps with help from SO or TeX.se.
Things I have not been able to do
The main reason for these, I think, is that my perception of the effort and irritation needed to get `x` working exceeds the effort and irritation of ignoring it or inventing a work-around. Here are the principal ones:
- Unicode support from the keyboard: I occasionally work in multiple languages, including Welsh and Turkish, which are not catered for by ISO-8859-1. I have a customised Windows keyboard layout which generates the right Unicode characters, but Emacs, despite hours of cutting and pasting tentative solutions from the Internet, still insists on shoehorning them into ISO-8859-1: ŵ becomes w, ğ becomes g, and so on. I’ll live with it.
- I haven’t tried to get Emacs to run LaTeX and produce a preview for me — I use Texworks for that, editing a dummy file which simply points to my master document file. One day…
- I can’t seem to get references to labels in other files of the same book to work. One day…
- Doing anything to the *toc* (refreshing, for example) always seems to split the screen. Just grin and bear it.
Emacs is a fantastic editing system, and I’m gradually moving all my editing over to it from Notepad++ (something I never imagined doing). I confess to feeling a bit dizzy with all the new key combinations (I sometimes try to close other things with Ctrl-X Ctrl-C), but I’m really overjoyed at having made the move. I know Emacs isn’t for everyone, but if you’re not completely satisfied with your current editor, you really should consider it.