Org-Page

If you’re looking for a static-page blogging engine that you can post to from Emacs, you should take a look at Calum MacRae’s post on blogging with org-page. MacRae writes about his setup in detail so that you can set up your own blog relatively easily. His setup uses Ansible, which you may or may not want to implement.

I like the idea of static web pages but I’m not sure I like how org-page displays things. Basically, it reproduces the Org-mode buffer complete with much of the (deemphasized) markup. My source files look similar to MacRae’s but WordPress (or rather org2blog/wp) generates a display that could have been typeset with the default WordPress editor or even LaTex. I like what org2blog/wp does much better but take a look at MacRae’s post and see what you think.

A lot of bloggers I respect that I know are Emacs users are not posting from Emacs. I really don’t understand that. There are lots of blog solutions available that allow you to post directly from Emacs. Why would you not want to do this?

Posted in Blogging | Tagged , | Leave a comment

Cleaning Up Garbage

Regular readers know that one of my New Year’s resolutions is to learn more LaTeX. I’ve been having a lot of fun learning and using AUCTeX to write LaTeX documents. I created a tex directory to hold my .tex files and the resulting PDFs. The problem with TeX is that it’s pretty noisy as far as creating intermediate files is concerned and those files mostly stick around. But, hey, this is Emacs so I thought, “I’ll just write some quick Elisp to clean things up.”

I hadn’t gotten around to that when I decided to scroll through some of abo-abo’s old posts to see if I’d missed anything. Good thing I did because it turns out that there’s already a way clean up garbage from directories. Here’s what to do:

  1. Bring up the target directory in dired1. 【Ctrl+x Ctrl+j】 is often a good way of doing this.
  2. Press 【%】【&】 to mark the “garbage” files.
  3. Press 【x】 to delete the files.

That’s all there is to it. Exactly what constitutes garbage is determined by the dired-garbage-files-regexp variable. It defaults to

"\\(?:\\.\\(?:aux\\|bak\\|dvi\\|log\\|orig\\|rej\\|toc\\)\\)\\'"

but you can customize it to include other types of temporary files you deal with. You can check out abo-abo’s post for one example of this. If you’re a neat-freak about your file system, this is good way to keep things spic and span.

UPDATE: See the comment by David McWilliams on how to do this from AUCTeX (for TeX detritus, of course). Very Handy.

Footnotes:

1

I’m using dired+ so I don’t know if this works in plain dired but you really should enable dired+. It’s much more powerful.

Posted in General | Tagged | 3 Comments

Clearing the Comint Buffer

Bozhidar Batsov over at the excellent Emacs Redux has a very nice post on how to clear comint buffers. Comint is the machinery behind Eshell, and Shell mode. It is a general-purpose mode for communicating with interactive subprocesses and is thus behind many of the REPL systems such as Lisp and Ruby.

Oddly, comint has no way of clearing the buffer, something I’ve often wanted when working with Eshell. Bozhidar shows us how to do that with just a few lines of Elisp. If you use any of the comint-based mechanisms, you should take a look. It will make your life just a bit easier.

Posted in General | Tagged | Leave a comment

Word versus LaTeX Again

Remember that silly paper purporting to compare the efficiency of Word versus LaTeX that I wrote about a couple of times? Daniel Lemire has a nice followup on the paper that incorporates some of the original authors’ responses to its critics. The TL;DR is that LaTeX users are an irrational sect that is anti-scientific. As Lemire says, the paper is an opinion piece not science. Read the comments too.

Posted in General | Tagged | Leave a comment

Narrowing with Multiple Cursors

Grant Rettke points to a discussion in the comments from a Sacha Chua post. It turns out that when you’re in multiple cursors you can narrow the view to just those lines having a cursor. That’s something I didn’t know.

All you need do is turn on hide-unmatched-lines-mode. You can do that by typing 【Ctrl+'】. This is nice because it eliminates a lot of clutter and allows you to concentrate on the text you’re changing. Where is really shines, though, is with a large buffer where you normally wouldn’t be able to see all the cursors.

Actually, hide-unmatched-lines-mode will provide some context—2 lines above and below each cursor, by default—but, of course, you can configure that. This is another great enhancement to one of my favorite packages. Another gift from Magnar Sveen.

Posted in General | Tagged | 1 Comment

A Hydra Video

If you took my advice and starting following (or emacs you’ll be familiar with abo-abo’s hydra package. It started out as a relatively simple macro, def-rep-command, that allows a command with a prefix to be repeated by merely pressing the last key. That got a lot of favorable attention so he refactored it into an ELPA package.

Then Sacha picked it up and made a small enhancement that allowed her to use it to control window switching. Since then, abo-abo has made continuous enhancements to the package making it a very flexible tool. Now abo-abo has produced a video that demonstrates its power. The video shows hydra being used for a variety of different tasks and will be sure to give you some ideas.

If you follow the link above, it will take you to a post by abo-abo that, in turn, has a link to the video. It also shows the current version of his window switching code. You’ll see that it now handles most of usual window handling chores including calling ido for another buffer and loading frequently used files with a single key by bookmark+. You can also call executable code so it has about the same power as John Kitchin’s Emacs/Helm hotspots setup that I wrote about previously.

I have to say that I’m really tempted by this. It seems like a nice way of loading frequently used files and switching between, swapping, and deleting windows. It has the advantage over Kitchin’s solution of loading hydra, which can be useful for other chores. On the other hand, the same can be said of Helm. A fine example of Buridan’s ass.

Posted in General | Tagged | Leave a comment

The Guardian on Cursive

Since we’re talking about cursive, let’s take a look at what the Guardian has to say. They report that in Britain and the United States handwriting of all types—printing as well as cursive—is rapidly disappearing. Of course, we all write more than we think. We sign our names, fill out forms, and maybe jot a quick note to ourselves but mostly all our writing is done at a keyboard. Except for the usual suspects, this is mostly regarded as a good thing.

The Guardian’s piece is relatively evenhanded. They make the obvious case for why cursive is dying and then consider why it might not be a good thing. First they trot out the usual nonsense: we won’t be able to read the constitution in the original; it’s a traditional art form that must be preserved at all cost; and, of course, children won’t be able to develop fine motor skills without it. None of those arguments need be considered seriously.

Then they discuss several studies that, on their face, appear to make a case for learning handwriting. These mostly have to do with cognitive and learning side effects. My problem with those studies is that it’s hard to see why the putative benefits of cursive don’t apply just as well to printing. Despite the first paragraph no one is saying that kids shouldn’t be taught handwriting; only that we shouldn’t waste their time by making them learn something—cursive—that they won’t need or use.

I’m sticking with my original curmudgeonly conclusion: the real reason these people are insisting on the teaching of cursive is “I had to learn it so why should these little blighters get off?” I’m also sticking with my conclusion: the dissenters may be able to delay the inevitable but it’s still inevitable.

Posted in General | Leave a comment

Google It

Via Magnar, here are some tips on fine tuning a Google search:

Posted in General | Leave a comment

Vox on Cursive

I haven’t written about cursive handwriting in a while so here’s some red meat for those, like me, who hope to see its elimination from the curriculum. Vox.com posted an article with the provocative title Cursive handwriting is useless, but politicians want students to learn it anyway.

The title tells you the tenor of their argument: cursive is well past its expiration date and is only holding on because some politicians have chosen to make it a beachhead in the culture wars. Sadly, some state legislatures are passing laws mandating that cursive be taught. Vox concludes that these laws will delay but not prevent the demise of cursive.

Vox concludes that the arguments in favor of cursive—fine motor control and enabling students to read the constitution and Declaration of Indenpence—are pretty weak and ultimately unpersuasive. The other major argument is that “well, I had to learn it so…”

The Vox article has an interesting history of the teaching of handwriting that you might enjoy. I’m hoping that it won’t be too long before posts like this are beside the point.

Posted in General | Leave a comment

Help GNUPG

Here’s why. If you can chip in a few dollars to keep this absolutely vital project going, please do. Kock’s a hero and deserves our thanks and help. You can donate here.

Posted in General | Tagged | Leave a comment