On Switching to Emacs
Wednesday, April 22, 2015
Late last year, I became intrigued
by the potential of the "Org Mode" of the Emacs text editor to solve a
variety of problems I was attacking simultaneously, quite apart from
its legendary power as a text editor. The twin attractions of
becoming better organized generally and having much less work to do
along the way to developing a personal knowledge base overcame my
reluctance to train myself to use the arcane software. Some time soon
after that post, I decided the best way to learn Emacs would be to
practice a little each day, by using it to create my blog posts in the morning.
I've barely started using Emacs in the way I
ultimately intend, but I think it is worth noting the improvements
to my writing work flow I have already achieved.
For the
past few years, I'd been composing posts in Version 3.4.7 of TinyMCE, which provides WYSIWYG HTML
editing within a tab of Firefox. (Interestingly, the toolbar is blown
up out of proportion in the current version of Firefox, but not in
that of Pale
Moon, to which I recently switched.) For reasons I no longer
remember, I was never able to save directly to disk from that editor,
and so always had to copy and paste into another editor, gedit, from a special text
editing window. (I often used that for other purposes, too, including
certain edits.) Over the years, I had also accumulated a variety of
scripts that made certain things easier, such as putting titles into
title case or replacing junk characters in excerpts from other
sites. To use these scripts I'd have to switch to yet another window
than the browser (TinyMCE and whatever web page I was commenting on)
and gedit. While superior, at least for the way I work, to the Blogger
editor, this was still cumbersome and placed any work I was
readying for publication at least partially at the mercy of any system
freezes caused by Firefox. (See link for Pale Moon.) I was never
satisfied with having to either type in HTML tags or use my mouse to
select areas of text to which to apply a tag. It always seemed like I
should be able to create a simple shortcut for tags I commonly used
that I could type in as needed, or (a little like Markdown), to
be able to use some kind of shorthand for later conversion to
HTML. So I had an okay way to write posts that I was never completely
happy with, and whose dependence on Firefox always bothered me. Also,
with all the going back-and-forth between not completely compatible
software tools, annoying types of errors (especially spelling)
frequently wound up published.
Enter Emacs. The way I
started out almost sent me back to TinyMCE: HTML-mode, no
modifications to the editor itself, and not knowing how to do lots of
simple things made editing anything for the first week or so a
real chore. But I got better at the "Emacs way" of doing ordinary
things, and started learning how to customize both the editor
itself and the way I would interact with it when composing HTML
(or anything else). Now, I simply type whatever is on my mind. If I
need to stick in a link, I hit a couple of keys (that I got to
choose) simultaneously (before pasting in the URL, again before the words to be highlighted, and again afterwards). Other formatting is even easier. For example, I
use "qi" pressed simultaneously to insert italics tags AND move my
cursor between them. CTRL-e skips past the end of any closing tag so I can keep writing. In addition to staying within the editor for normal
things like saving the file, I also can run my editing scripts from
within the editor, be it on a selection of text or the whole
document. I also like many other features of the editor, such as the
built-in spell-checker much more than anything I'd used before. For
possible misspellings, it provides an enumerated list of alternatives,
which can be selected simply by hitting a number key.
My
work flow when writing is now much smoother than it has ever been. I
can think more about what I want to say and less about how to make it
look good. It is hard to quantify how much time Emacs saves me over my
old way of editing since I am frequently interrupted while I work, but
I'd estimate that composing a post takes about ten minutes less than it used to, discounting browser crashes or freezes, which are not an issue any more. (This is because (1) I no longer need a browser to edit and (2) I switched to one much less prone to these problems.) The editing process is certainly also far less annoying. In addition to the time savings, I now
have an editor with two nice extra features, one of which I had wanted
for some time and another I thought would be nice, especially when
using a netbook's limited screen area. Regarding the first feature,
Emacs has a built-in ability to offer a split-screen view of a
document, which is quite helpful for long documents, and which I had
been unable to find in text editors that met my other criteria for
acceptable writing software. Regarding the second feature, I had often
seen "minimalist" editors touted for "distraction-free writing". As
you have probably guessed by now, I don't like bothering with using a
mouse when I write. Emacs does have a toolbar enabled by default, but
one day, I wondered: "You can change damned near anything in
Emacs. I wonder If I can dump the toolbar and free up more space." A
quick Internet search and a configuration file change later, Emacs now
boots up without a toolbar. Now, I have exactly the editing
environment of my dreams. That's a nice return on my effort, and I'm
just learning its organizational capabilities (which have nevertheless
also already proven helpful).
-- CAV
No comments:
Post a Comment