Back in the day when I first started studying I did not know anything about LaTeX or editors, I didn’t know that Linux/Unix existed, and a computer was some tool to play games with and write reports with MS Word. I remember that I once saw a report by a fellow student that looked much better than mine or anyone else’s and asked her how she created it. Lay-tech, hmm? Sounded weird. But an automatic table of contents sounded cool… That didn’t have much impact on me, though. I produced my reports with an early version of LibreOffice which then still was OpenOffice at that time, mostly because I couldn’t afford to purchase a copy of MS Office. This changed slowly when I did a computer course where we were supposed to write a program that calculated the potential energy surface for the reaction of a two-particle molecule colliding linearly with a third atom, HH + F, say. We were to use fortran95 (I think) and were introduced to vi. What a strange experience that was. And the computers at the university had some older versions of SuSE installed which was how I learned about Linux and that an alternative to Windows existed. When a few months (? years?) later I needed to buy a new computer and I still had not much money I remembered that Linux thingy and decided to give it a try. Creating reports with SuSE 9.3 and OpenOffice was not at all a pleasant experience, though. And there also was no alternative to ChemDraw, so it seemed. That was when I remembered my classmate and LaTeX. I could install it through the package manager and also found out about kile. I discovered ochem and my love to LaTeX began. Long years of learning followed. I eventually learned about TeX and the history of LaTeX, about CTAN and TeX Live, I discovered pdftex and heard about the LaTeX Companion, a book which changed both the way how I created documents and my understanding of LaTeX immensely. The more I learned about LaTeX the more I also learned about kile, a good companion and beloved editor for years. So much handier to use than that strange vi thing we had to use in that computer course. Little did I know… I needed to learn about programming LaTeX first which was and still is a way full of stones and pitfalls. But it made me realize eventually that I did not at all work efficiently. Maintaining my first packages was a pain. For one thing I didn’t know what I was doing. I also had a very complicated way of maintaining versions. What a discovery git was! I’m pretty sure I still don’t use it as efficient as I could — but way more efficient than my workflow before. What still bothered me until very recently was the feeling that working with kile was more complicated than things had to be. I constantly read about people arguing if vi (that strange thing from my past) or emacs were the better choice for an editor. Another name never fell. So a few months ago I decided to give vi (or rather vim) another try. To be frank: I did not have a good start. I was much slower than what I was used to, I had a hard time finding out how to customize the thing and so on and so on. I probably simply had not found the right beginner’s tutorial or something. Anyway, I never got around using it, really. But there still was that magical emacs thing in the back of my mind. Maybe two weeks ago I gave it a try. I started the console version which immediately started with a tutorial. If it hadn’t the story would probably have been over but here I was knowing the most important things: how to navigate, how to copy, cut and paste, what buffers, windows and frames are, how to open, safe and close files, how to search and how to replace strings… The need to copy and paste from emacs to other programs made me then use the gui version which luckily is pretty much the same as the console version. I also almost immediately discovered AUCTeX and RefTeX. (You can’t hang around on without hearing about them eventually.) Those two were a revelation, especially in combination with a question and its answers on Useful shortcuts or key bindings or predefined commands for emacs+AUCTeX! Now I only needed to find out how to use arara and biber (which was quite easy, actually). I was nearly convinced to switch editors — but not completely still. Until I found out how to set a master file for a TeX project. And now a simple call of [cce inline=”true” lang=”latex”]C-c[/cce] suffices from any of my files to have arara’s full power! Wow. I know that I still know basically nothing about emacs and already am faster than I ever was with kile! I’m definitely not going back to my beloved editor which served me well through the years. I’ll keep it in good memory and probably will still use it every now and then but I do have a new sweetheart.

5 thoughts on “How I fell in love with emacs

  1. Svend says:

    Emacs + AUCTeX is my favorite editor too. You can get Emacs to do absolutely everything.

  2. Claudio says:

    I’m still using the console version of emacs. I gave AUCTeX a try, but I didn’t see benefits for me, yet I’d recommend any beginner to check it out. Emacs is great due to it’s extensibility via elisp. I’ve written a short script to insert latex snippets for figures, tables and plots which sped up the writing process enormously.

    I’ve recently discovered a way to get a performance boost on the whole compilation process using makefiles and a precompiled preamble. Since you’re already on linux, you maybe want to give it a shot:

    1. cgnieder says:

      I actually do use AUCTeX and RefTeX from the start… in a way that means that I don’t have a comparison to [i]not[/i] using them. They do have some nice features.

      A precompiled preamble makes sense if you have a lot of similar documents that actually share a preamble. I cannot say that’s the case for me very often. Most of my documents comile in a fey seconds anyway so that even threefold compilation with a biber run in between (automated thanks to arara) is under a minute — good enough for me.

  3. anonymous says:

    I love emacs and auctex certainly felt like a big improvement over everything that I’d done until that point.

    While I continue to use emacs, I use latexmk for typesetting these days. I can run `latexmk -pvc` and be done. (once configured properly), it runs all the necessary commands for me, launches my preferred viewer, runs latex (biber, etc.) again once I touch a file, tells my previewer about it… it really feels like a dream. You should give it a try.

    1. cgnieder says:

      Hi. I know of latexmk but I’ve never used it. I use arara instead each time I have a longer compilation series. Most of the time I don’t use any automation tool, though. When debugging I like to see the LaTeX errors directly.

Leave a Reply

Your email address will not be published. Required fields are marked *