The Death of Emacs

I’ve been too busy to do anything over here, too busy and slightly sick for a few days.  I’m trying to get caught up on 19 things today, and of course it’s a beautiful, sunny day out, and I think I’ve left the house once all week, so that’s beckoning me.  But I thought I’d take a second to brain dump on a few things before then, as I listen to some Black Sabbath (Master of Reality) and sit on the couch with my recently-returned MacBook Pro.

Ever since I started writing in 1993, I pretty much used emacs for everything.  Emacs is a text editor that originally gained fame on unix systems, although that’s misleading, because it’s a million things in addition to just a text editor, and it runs on pretty much every system you could thing of, aside from just unix.  It is infinitely extensible, using its own dialect of the lisp language, and I used a bunch of extensions in it to read my mail, read usenet news, write code, write books, write the earlier version of this site, keep a dream journal, and catalog all of my CDs.  I wrote all of my books in emacs, using it as a text editor and keeping track of various outlines and fragments and notes in a bunch of text files.  Right before publication, I’d usually move the files over to Word or FrameMaker, but the bulk of the work was in emacs.  I’d also use unix tools like wc and grep and find and sed to do all of my various slicing and dicing and counting and finding.  It wasn’t the best system in the world, but it worked.

I even made some money on emacs, tech editing a book for Sams on emacs.  So my brick-and-mortar book store debut on the printed page was actually back in 1999, although I wasn’t a primary author, and reading about how to write elisp config files is probably less entertaining than any of my more recent work.

But as cool as emacs was, it also sucked.  Every time some idiot in Norway suddenly had a great idea on how they thought tabs should work in a document, they would change the whole fucking thing and I’d spend 22 hours straight poring over source code diffs trying to figure out how the hell to write a shim or workaround to duct tape to the side of the thing so it would work again.  Long lines and line breaks were also a huge pain in the ass, which takes some explaining, so hang on.

When you write a paragraph in Word or any other modern word processor, you generally don’t type return at the end of a line; you just type and type and when you hit the edge of the window, the word gets pulled to the beginning of the next line, and you keep going.  The only special character is a paragraph break, which comes when you hit return once or twice at the end of a block of the text.  In emacs, what happens is that when you reach about the 72-character mark in a buffer, it drops in a carriage return and goes to the next line.

That means when you type a file in emacs and bring it into Word (or WordPress, or FrameMaker, or an email message, or anything else not designed in like 1974) you have all of these extra carriage returns, and you have to do something stupid like write a script or do some search-and-replace to replace all of the single carriage returns with spaces and all of the double carriage returns with paragraph breaks, and hope you didn’t do any weird indented text or source code snippets that will be monumentally fucked by your search and replace.

And yes, there are some workarounds in emacs, like some long-line mode, which is totally not documented, or at least not documented well, and would involve me taking two weeks off of work to completely re-engineer the whole fucking universe and probably reinstall emacs 19 times and recompile it from source and install 2834 different libraries and twelve different versions of XCode.  And the second I would get it working, some idiot in Sweden or Germany would add a fix that would completely break my system.

I should also mention that emacs has slowly been losing favor here, as far as alternative uses.  I got the Mac in 2005, and at some point switched to using full-time.  That also meant ditching BBDB, the emacs address book thing, and going to the Mac address book.  CDs are a distant memory, thanks to iTunes.  I gave up on my own blog system and moved to WordPress.  Usenet is deader than dead.  So it pretty much just came down to daily writing for emacs.

Another big issue for me is keeping track of stuff, especially in bigger writing projects.  I’ve used two different approaches to books.  When I wrote Summer Rain, each chapter was in a text file, and there was a sea of text files for notes and pieces and outlines and whatever else.  This book took a huge amount of research and planning over the course of five years, and by the end of the book, I worked off of a paper outline that summarized the main points in each chapter.  I made heavy use of grep to search for things within each chapter.  When I needed to do a global search and replace, I would use emacs and dired, which worked, sort of.  Dired-mode is powerful, but good luck remembering all of the key combinations if you don’t use it on a daily basis.  Printing out the book for review was murder, not only because of the length, but because it typically involved catting all of the files together, dropping it in Word, and doing the carriage return/paragraph break shuffle.

When I wrote Rumored to Exist, I put the entire thing in one file.  That made it easier, but it also meant a hell of a lot of scrolling around.  It also made it absolutely impossible to do stuff like move around chunks and keep track of what was where unless I printed out every damn page and spread them across every surface of my apartment like I was on some William S. Burroughs kick and about to shoot my wife in the head and write some Serious Nonlinear Fiction.  (My apartment did have a lot of bugs, which was a plus.)  Around the time I moved to New York, I decided I needed to start over, and put the entire book in a file called rumored-seattle.txt, then opened a blank file and started copying over only the good chunks.

Thinking back on it, writing Rumored was such a fucking disaster.  I had all of the content done in a couple of years, but then it took a couple more years of rewriting and moving things around and adjusting things.  I printed out every page, then cut everything up and glued it to index cards that I tried to rearrange and sort and move around.  I tried writing outlines; I tried putting everything in excel one time, with thoughts of color-coding or sorting it.  I thought about writing a PHP/MySQL app to manage everything.  I tried using the emacs outline-mode.  Nothing fucking worked.

I eventually kicked my way through it, and got everything in one file, then sat in the Kiev restaurant with a red pen and a bunch of pierogies and went through the whole god damned thing and marked up every mistake and typo, and had a total and complete draft that if I got in those corrections, would be ready for the press.  Then I walked home and got caught in a god damned typhoon, and when I got home, I had a ruined pair of dress shoes, and a clipboard of pulp and pink pages, everything completely ruined.  I was pissed as fuck. That was on September 10th, 2001, and let’s just say things got put into perspective the next morning.

So I’ve been looking for new system.  Someone has figured this out, right?

I have tried a bunch of systems and software packages, and I think I have one that works.  I also realize that I’ve written for 1300 words, and haven’t even gotten into it yet.  So I should probably make this a two-parter and tell you about the software itself next time.  And I should probably wrap this up so I can actually go write with the damn thing and work on this book.


Comments are closed.