I love it when a plan comes together
We have a functioning org-blog-save
3 minutes to read
Michael Alan Dorman
The gateway to the server
The machinery of interacting with WordPress
3 minutes to read
Michael Alan Dorman
Beginning to weave things together
Getting ready to hit the server
3 minutes to read
Michael Alan Dorman
And now I will turn this hat into a rabbit
Converting from a wordpress response back to a post
5 minutes to read
Michael Alan Dorman
Creating a new post (redux)
With transformations done, we can create new posts
3 minutes to read
Michael Alan Dorman
Creating a relationship between a buffer and a post (part 2)
Merging a post structure into a buffer
5 minutes to read
Michael Alan Dorman
Creating a relationship between a buffer and a post (part 1)
Introducing the notion of a post
6 minutes to read
Michael Alan Dorman
Creating a new post
Beginning the implementation of org-blog-new
3 minutes to read
Michael Alan Dorman
John Scalzi does not have to die
There will be a Human Division Season 2
One minute to read
Michael Alan Dorman
The design and implementation of org-blog
Introducing org-blog
2 minutes to read
Michael Alan Dorman
Roger Ebert is dead, alas
<p>
I was sad, if not entirely surprised, to hear that Roger Ebert had died.</p>
<p>
I don't have—and I don't think I will ever have—the relationship
with movies that he had; while I find movies entertaining, I also own a
T-shirt that sums up my feelings startlingly well: "The book was
better."</p>
<p>
Roger Ebert bridged the gap for me. I enjoyed reading his reviews and
essays enourmously. He made me want to be a better, more informed,
member of the audience.</p>
2 minutes to read
Michael Alan Dorman
The return of 'Do You Even Lisp?'
I disappeared, now I reappear
One minute to read
Michael Alan Dorman
Keeping what I need to know at finger's length
How I set up my cheat-sheet
One minute to read
Michael Alan Dorman
The joy of an integrated environment
elisp programming is easy when references are at your fingertips
- C-H F
- C-H V
- Describe-Function
- Describe-Variable
- Goto-Line
- Ido-Ubiquitous
- If
- M-@
- M-G M-G
- M-X
- Progn
- Query-Replace
One minute to read
Michael Alan Dorman
Weekly Wrap-Up #3
Getting to it late, but hey, I was hacking elisp instead
One minute to read
Michael Alan Dorman
Choosing the API and defining some ADTs
A first step down the road
5 minutes to read
Michael Alan Dorman
Beginning of wp2o2b
A simple downloader for articles in WordPress
2 minutes to read
Michael Alan Dorman
Building blocks
<p>
The two tasks I do most in Emacs (which are two of the three tasks I do
most at the computer) are read email and write programs.</p>
<p>
I probably spend far more of my time in those tasks editing than I ever
do writing—that is, I may write a first draft of a paragraph in an
email, or a function in a program, in five minutes, and then spend
fifteen getting it right.</p>
- C-M-@
- C-M-H
- C-X C-P
- C-X H
- M-@
- M-H
- Mark-Defun
- Mark-Page
- Mark-Paragraph
- Mark-Sexp
- Mark-Whole-Buffer
- Mark-Word
2 minutes to read
Michael Alan Dorman
Welcome to Functional Paradise!
What the hell is Functional Paradise?
2 minutes to read
Michael Alan Dorman
Do it again (again)
<p>
Q: How did I not know about this? A: You never read the manual.</p>
<p>
(A close friend of mine from college with whom I've worked
professionally now and again, once suggested that the secret to our
individual successes was that we were the ones willing to read the
manuals. Obviously in this instance I failed.)</p>
<p>
Oh, good lord, the number of times I've done <code class="verbatim">M-x UP RETURN RETURN</code> to
re-do <code class="verbatim">query-replace</code> on a new buffer, when I could have just done
<code class="verbatim">C-x ESC ESC (repeat-complex-command)</code>.</p>
One minute to read
Michael Alan Dorman
Banging out the HTML
<p>
I suspect I heard about the <a href="https://github.com/rooney/zencoding">Emacs zencoding mode</a> from its (I believe)
original author, Chris Done—he did <a href="http://www.youtube.com/watch?v=pf79WkXHnEM">a screencast about using Emacs
for Haskell development</a> that I found interesting, and I imagine that I
found a reference while looking at his material about that.</p>
<p>
Anyway, I created a Debian package for it, and installed it…and
didn't use it for squat. Although the idea makes great sense—use a
CSS-selector like language to create HTML (an idea I was first exposed
to with Kris Zyp's <a href="https://github.com/kriszyp/put-selector">put-selector</a> JavaScript library)—I never even
bothered to learn the keystroke to activate it.</p>
One minute to read
Michael Alan Dorman
In which I humble myself terribly…
<p>
This is how poor a user of Emacs I am: I still habitually use
<code class="verbatim">C-@ (set-mark-command)</code> to set the mark. I mean, on what planet is that
easier or more ergonomic than <code class="verbatim">C-SPC (set-mark-command)</code>?</p>
<p>
I actually started retraining myself to use <code class="verbatim">C-SPC</code> a while ago, and
it's mostly taken—but I still occasionally catch myself going for that
awkward pinky-thumb-middle-finger chord that fires <code class="verbatim">C-@</code>.</p>
<p>
More interesting for me to learn how to use effectively is
<code class="verbatim">C-x C-x (exchange-point-and-mark)</code>. I know I spend a lot of unnecessary
time scrolling around the screen rather than targetting where I want to
go. Internalizing <code class="verbatim">C-x C-x</code> is, I think, the first step in moving a
little faster.</p>
One minute to read
Michael Alan Dorman
That's why the editor is a tramp?
<p>
I suppose that was the obvious joke.</p>
<p>
Here's something that I've known about for awhile, and used
occasionally, but have only now decided I will <strong>learn</strong> and <strong>retain</strong>: you
can edit local files as another user (including root) using <code class="verbatim">TRAMP</code> and
<code class="verbatim">sudo</code>.</p>
<p>
All you have to do is <code class="verbatim">C-x C-f (find-file)</code> to open a file, then type
<code class="verbatim">/sudo:</code>. This will start prompting you for the user and host
information, and then a password (<em>your</em> password), at which point you
will be able to use filename autocompletion and such to your heart's
content to load a file that you would otherwise not be able to access.</p>
One minute to read
Michael Alan Dorman
Weekly Wrap-up #2
<p>
This week saw me get very behind on writing these posts—I had a lot of
other commitments, and I didn't work hard enough to make the time.</p>
<p>
I did find myeslf using <code class="verbatim">C-o</code> in the minibuffer a few times, and I did
use <code class="verbatim">M-<num></code> a couple of times when using numeric prefixes, but I
didn't make any great progress in efficiency.</p>
<p>
One thing I did do, that I'm not quite ready to talk about here, is
work a lot on my Org-mode setup. Though there are things about
Org-mode that I do not love—the biggest of which is that it's
free-form-ness often leaves me feeling like good structure is
impossible to find—it's an astonishingly useful tool once you begin
to adapt to it. I've been doing more of that of late—my use of
<a href="https://github.com/punchagan/org2blog">org2blog</a> for this blog is part of this—and I hope to do even more,
perhaps even getting into writing some elisp.</p>
One minute to read
Michael Alan Dorman
Even faster ways to get through the minibuffer
<p>
I am a long-time user of short-lived Emacs sessions who is now trying to
take advantage of having a browser that runs for days or weeks at a
time—I've configured my desktop shell to auto-start <code class="verbatim">emacs –daemon</code>
when I log in, and I rarely restart it (though it's probably still do it
more often than a really hard-core Emacs user would).</p>
<p>
As a consequence, my minibuffer history starts to fill up with good
stuff that I want to re-use in order to increase my efficiency.</p>
- --Daemon
- C-R
- Isearch-Backward
- M-R
- M-S
- Minibuffer
- Next-Matching-History-Element
- Previous-History-Line
- Previous-Matching-History-Element
- UP
One minute to read
Michael Alan Dorman
Staying on home row…
<p>
I've long known about using the <code class="verbatim">UP (previous-history-element)</code> and
<code class="verbatim">DOWN (next-history-element)</code> keys to move through the minibuffer
history. It's always been a little jarring that <code class="verbatim">C-p (previous-line)</code>
and <code class="verbatim">C-n (next-line)</code>, which I'm very habituated to use (perhaps even
more than the actual arrow keys, since I touch type, and can use them
without moving my hands) don't work in the minibuffer—Emacs just beeps
unhappily at me.</p>
<p>
I was pleased to find out that, in addition to the dedicated arrow keys,
<code class="verbatim">M-p (previous-history-element)</code> and <code class="verbatim">M-n (next-history-element)</code> scroll
through the minibuffer history. The should be much more easily
accessible to me—and I do scroll through the minibuffer a lot.</p>
- C-N
- C-P
- DOWN
- M-N
- M-P
- Minibuffer
- Next-History-Element
- Next-Line
- Previous-History-Element
- Previous-Line
- UP
One minute to read
Michael Alan Dorman
Do it again
<p>
<code class="verbatim">C-x z (repeat)</code> is a little bit of a mystery to me.</p>
<p>
That is, I don't know when you would use it.</p>
<p>
I mean, if you need to kill five lines, giving a numerical prefix to the
kill line command, like <code class="verbatim">M-5 C-k</code>, makes good sense to me—you have an
idea of how much you need to delete, do it all in one fell swoop.</p>
<p>
Or if you've got a simple set of commands you need repeated, whip up a
small keyboard macro, and then repeat it with
<code class="verbatim">C-x e (kmacro-end-and-call-macro)</code>, and then keep hitting <code class="verbatim">e</code> until
you're done.</p>
One minute to read
Michael Alan Dorman
Further remedial keystrokes
<p>
As I've mentioned before, the first systems on which I used Emacs had
keyboard support that was spotty-to-nonexistent for anything but the
most common keystrokes.</p>
<p>
Consequently, I learned to use <code class="verbatim">ESC</code> for a lot of stuff where you'd use
<code class="verbatim">Meta</code>. For most of those things I've retrained myself, but until I was
actually reading the GNU Emacs Manual, I didn't know that you didn't
have to hit <code class="verbatim">ESC</code> to do a numerical argument.</p>
One minute to read
Michael Alan Dorman
Closing down the competition
<p>
Well yesterday I talked about <code class="verbatim">C-o (open-line)</code> that opens up additional
lines beneath the line you're currently on, and how little I used it.</p>
<p>
A related key that I use even less, but could see more opportunity for,
is <code class="verbatim">C-x C-o (delete-blank-lines)</code>, which collapses repeated lines of
whitespace into a single line.</p>
<p>
The first thing I find myself wondering, though, is "Why <code class="verbatim">C-x</code>?" It
seems to me that most other commands like this—variations on a shorter
set of keystrokes—use the <code class="verbatim">C-u</code> prefix to say, "do the opposite-ish".</p>
One minute to read
Michael Alan Dorman
Opening up your document
<p>
I'm actually a bit of a fan of whitespace in code. I know a lot of
people who…are of a different opinion, to say the least. Perhaps it's
because I don't have some of the more sophisticated code-motion keys
down in Emacs, but I like to have the whitespace to break up semantic
units and help me understand how lines of code are interrelated.</p>
<p>
So it's surprising that I haven't ever really cottoned to
<code class="verbatim">C-o (open-line)</code>.</p>
One minute to read
Michael Alan Dorman
Weekly Wrap-up #1
<p>
This blog is supposed to be about what I'm learning and how the process
of refining my use of Emacs is going, so each week I'll be looking at
what I wrote about in the past week (or perhaps earlier) and assessing
how much I've been able to change my habits or otherwise make use of my
new knowledge.</p>
<p>
So this first week has gone pretty well—using <code class="verbatim">M-g M-g (goto-line)</code>
instead of <code class="verbatim">M-x goto-line</code> has come up a couple of times and I've
remembered the new way of doing things, and similarly <code class="verbatim">C-/ (undo)</code> for
undo. The change back to the prior handling of <code class="verbatim">line-move-visual</code> hasn't
come up as much as I expected—I have a much wider terminal these days,
so it's less of an issue—but I'm nonetheless glad to have made the
change back.</p>
- Backward-Word
- C-<SLASH>
- C-LEFT
- C-RIGHT
- Forward-Word
- Goto-Line
- Left-Word
- Line-Move-Visual
- M-B
- M-F
- M-G M-G
- M-X Goto Line
- Right-Word
- Undo
- Weekly Wrap-Up
2 minutes to read
Michael Alan Dorman
The existential pain of naming Backspace and Delete
<p>
When I first started using uEmacs, one of the most confusing things was
the fact that the adaptation had not been entirely completed, or at
least on my platform (an Atari ST), the keyboard mappings were not
entirely idiomatic—they hadn't kept up with the differences between
VT-100-style keyboards and, well, everything else.</p>
<p>
I think this explains why I got very habituated to the alphabetic keys
for deleting stuff, but don't have the non-alphabetic keys as deeply
ingrained.</p>
One minute to read
Michael Alan Dorman
I thee undo
<p>
For years I've been using <code class="verbatim">C-x u (undo)</code> for undo. As much as I use it,
though, I really need to get <code class="verbatim">C-/ (undo)</code> under my fingers.</p>
<p>
I never remember <code class="verbatim">revert-buffer</code>, since I rarely get myself to the point
where I want to just nuke everything from orbit—so perhaps it's not
surprising I rarely think about it.</p>
<p>
In fact, I think the interface of GNU Emacs' undo facility is one of the
few places where it falls dramatically short of its potential. I really
don't know what sort of facilities that other editors have, but given
the way that Emacs stores the history, I'm surprised that the baked-in
functionality provides no way to access it more efficiently—I mean,
there's not even an explicit <em>redo</em> command, you have to just undo your
undoings, ad infinitum. I've often accidentally started redoing things
when I hit an injudicious key, etc.</p>
One minute to read
Michael Alan Dorman
Visual versus logical lines
<p>
In GNU Emacs 23 the default line-movement behavior changed with regard
to wrapped lines.</p>
<p>
Not that I realized it at the time, entirely—like not realizing that
I not only knew <code class="verbatim">M-f (forward-word)</code> and <code class="verbatim">M-b (backward-word)</code>, but
used them every day, I was so habituated to the prior behavior that I
couldn't articulate what had changed, I just knew something was
different that was annoying me to no end.<sup class="footnote-reference"><a id="footnote-reference-1" href="#footnote-1">1</a></sup></p>
<p>
It was only when I found a reference to <code class="verbatim">line-move-visual</code> in the GNU
Emacs Manual, that I realized exactly what it was that had
changed—and, more importantly, how to change it back:<sup class="footnote-reference"><a id="footnote-reference-2" href="#footnote-2">2</a></sup></p>
2 minutes to read
Michael Alan Dorman
Just getting around
<p>
The this blog had its genesis when I sat down to read the GNU Emacs
Manual while we were travelling over the holidays—I figured I could
skim it, maybe pick up one or two new things, but, really, it would
mostly be just speed-reading.</p>
<p>
What it actually proved was that I had never tried to read the manual
recently, perhaps ever. I would stumble across basic stuff I feel like
I should have known all along, and then an hour or two later would
have to work very hard to remember what it was that I had stumbled
across.</p>
- Backward-Word
- C-LEFT
- C-RIGHT
- Editing
- Forward-Word
- Goto-Line
- Left-Word
- M-B
- M-F
- M-G G
- M-G M-G
- M-LEFT
- M-RIGHT
- Navigation
- Right-Word
2 minutes to read
Michael Alan Dorman
Welcome to 'Do you even lisp?'
<p>
I was first exposed to the Emacs command set some time in 1990, while
I was a sophomore in college; I owned an Atari ST, and stumbled across
a port of <a href="http://en.wikipedia.org/wiki/MicroEMACS">Conroy's uEmacs</a> for TOS. It was a good little
editor—capable and easy to use. In fact, as I was learning C at the
time, I spent some time converting the source to ANSI C as an
exercise.</p>
<p>
I have used and even become pretty facile with a couple of other
editors—I spent a lot of my last couple of years of college using
<a href="http://en.wikipedia.org/wiki/Turbo_Pascal">Turbo Pascal</a>, whose embedded editor used a command set derived from
<a href="http://en.wikipedia.org/wiki/WordStar">WordStar</a>, and in my first job out of college I spent a lot of time
writing <a href="http://en.wikipedia.org/wiki/Clipper_(programming_language)">Clipper</a> code using <a href="http://en.wikipedia.org/wiki/Brief_(text_editor)">Brief</a>—but I've always had Emacs hovering
in the background.</p>
2 minutes to read
Michael Alan Dorman
The vision that I suspect religious groups really fear…
<p>
I would recommend you read
<a href="http://brianmclaren.net/archives/blog/i-read-recently-about-your.html">this
whole post from Brian McLaren</a>, where he responds to someone who has
decided they can no longer consider themselves his ally because of his
acceptance of homosexuality. It is sad, affectionate, understanding,
gentle and accepting. I've never heard of him before in my life, and
despite not considering myself to be a Christian of any stripe—I'm of
the Gandhian "I like your Christ, I do not like your Christians"
school—I <em>like</em> this guy. He demonstrates in this response those
attributes I would wish to be able to embody myself.</p>
3 minutes to read
Michael Alan Dorman
Of course the only thing that could be cooler…
<p>
than an <a href="http://www.theironmaidens.com/">all-female Iron Maiden</a> cover band (seen here performing Aces
High) <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/16mf4m7v_hw?autoplay=0&controls=1&end=0&loop=0&mute=0&start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
</div>
would be an all-female Metallica
cover band. Oh, what's that? <a href="http://www.misstallica.com/">There is one</a>, you say?</p>
<p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/r-XD-1yCGFw?autoplay=0&controls=1&end=0&loop=0&mute=0&start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
</div>
</p>
One minute to read
Michael Alan Dorman
"Did I get it confused?"
<p>
Apparently some people didn't like, or at least did not look upon
<a href="http://en.wikipedia.org/wiki/Quantum_of_solace"><em>Quantum of Solace</em></a>
with anticipation.</p>
<p>
I think they express their issues concisely and amusingly in this
proposed theme song.</p>
<p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/h6CoNUE5Zho?autoplay=0&controls=1&end=0&loop=0&mute=0&start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
</div>
</p>
<p>
Personally, I thought many things about it were very beautifully
presented—the chase that opens the movie may be the finest one ever
done in a Bond film; it certainly takes my breath away—though the
overall plot is…weird. Not the "water is the next great resource to
control" part, which actually makes sense to me, but the "there is a
great big pervasive conspiracy" bit that is supposed to drive the whole
film, but doesn't quite cohere enough to work as its engine.</p>
One minute to read
Michael Alan Dorman
The prank gone wrong
<figure>
<img src="/damp.jpg" alt="/damp.jpg" title="/damp.jpg" /><figcaption>
It was a hot day anyway…
</figcaption>
</figure>
One minute to read
Michael Alan Dorman
Don't ask why
<p> There's no answer that's really going to be satisfactory, so just enjoy this video of homemade lava being poured onto a sheet of ice.</p> <p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <iframe src="https://player.vimeo.com/video/19260895?dnt=1" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allow="fullscreen"> </iframe> </div> </p> <p> <a href="http://www.jwz.org/blog/2012/08/make-your-own-lava-then-pour-it-onto-ice/">Via</a></p>
One minute to read
Michael Alan Dorman