Libraries

You can almost hear the outraged wailing and dire predictions about the end of the publishing industry. It’s a knife aimed at the heart of the industry!

Posted in General | Tagged | Leave a comment

From WordPress to Org

Part of the reason that I moved Irreal from Blogger to WordPress was that I wanted to use org2blog to write and publish my posts directly from Emacs. As a result, every post on Irreal started life as—and is maintained as—an Org file. If I need to update a post, I just update the Org file and republish it.

Grant Rettke over at Wisdom and Wonder, on the other hand, just recently started using org2blog. I’m happy to welcome Rettke to the one true way™ but the conversion does raise a problem: how can he convert those old posts to Org documents so that he has a uniform method of maintaining the posts?

Rettke found an excellent solution. It turns out that Punchagan, the author of org2blog, also wrote org2blog-importers, a way of importing WordPress files into Org mode. Rettke shows that he can import WordPress posts into Org mode, modify them, and republish them perfectly. If you have an existing WordPress blog and would like to start using org2blog, you should definitely take a look at Rettke’s post. It will delight you.

Posted in General | Tagged , | 2 Comments

Patching the Production Server

(via Jean-Philippe Paradis)

Posted in General | Tagged | Leave a comment

Literate DevOps Video

I’ve mentioned Howard Abrams’ posts on Literate DevOps before. I think of it as a sort of reproducible research where you record the steps you use to create a deployment image including the code for each step. Abrams does this using Org mode and Babel so that he can execute the code directly from his Org file. This makes it easy to share his results with colleagues, reproduce an image for testing, or even just remember how he did it.

At the EmacsConf 2015, Abrams gave a talk on the subject and subsequently made a video recreating his talk. It’s a really interesting talk that has ideas applicable to anyone who might need to share or recreate a complicated task. That’s almost all of us. How many times have you figured out how to perform some non-trivial process, needed to do it again later, and couldn’t remember exactly how you did it? It happens to me all the time.

Using Abrams’ techniques you write a story about what you’re doing and why and you put the necessary code right in the document and execute it from there. Then if you later need to do it again or if someone asks you how to do it, you have a file with all the steps and code. Abrams shows how to execute the code on remote machines and even how to execute the code on a machine protected by a firewall.

It’s a great video and everyone can probably learn some ideas from it. It’s about 28 and a half minutes so you’ll need to schedule a bit of viewing time.

Posted in General | Tagged , | 1 Comment

SBCL 1.2.15

The new SBCL (version 1.2.15) is out and ready for download. This release fixes some bugs, updates to ASDF 3.1.5, and makes some small improvements to PROGN and DEFCLASS. See the NEWS page for the details.

As usual, I compiled from source and ran the regression tests. One of the tests failed but everything else was Okay. These broken tests usually get fixed in the next release or two so I’m not concerned about it.

I say it every month but it bears repeating: If you want to get started with Common Lisp or you’re looking for an excellent CL system, you can’t do better than SBCL. It’s free, open source, and very well maintained. Add in Emacs and Slime and you have a world class CL environment.

Posted in General | Tagged , | Leave a comment

Move Back to Last Misspelling

One of the handiest things I’ve learned from Pragmatic Emacs is using 【Ctrl+;】 to cycle through possible corrections for the last misspelled word. It’s especially handy because the point doesn’t have to be on or at the end of the word you want to correct. It can be after the word and other text as long as there are no intervening misspellings.

Ben Maughan is back with a related tip. Sometimes, flyspell can’t find the proper spelling and you need to fix things up by hand. If you’re still at the word, that’s easy but if the point is after the word you need to jump back to the typo to make the correction. Maughan gives us a bit of Elisp to do just that. It’s a small thing, of course, but as with all such micro-optimizations it makes our editing experience a bit more efficient and pleasant.

Posted in General | Tagged | Leave a comment

File Local Variables in an Org File

A nice tip from Artur Malabarba: It’s often convenient to use file local variables in your Emacs files. It provides a way of setting certain Emacs variables—mode, fill-column, comment-column, etc.—on a per file basis.

There’s a problem, though, when using them in an Org file. Org considers anything after a heading to be part of that heading’s subtree. Thus, if you move the node that the file local variables are in, they get dragged along with the node. The answer, Malabarba says, is to put the file local variables in their own COMMENT subtree. Those subtrees don’t get exported so it’s a perfect solution when using Org to write text intended for export to HTML, LaTeX, Word, and so forth.

Malabarba also gives us a bit of Elisp to make navigating such a buffer easier. If you often use file local variables in Org files, you will probably want to add his code to your Emacs configuration.

Posted in General | Tagged , | Leave a comment

Pages in Emacs

Eric James Michael Ritz over at One More Game-Dev and Programming Blog has a nice post on how and why to use pages in Emacs. Pages in Emacs are text separated by form feeds (0xC)1. As Ritz explains, it’s easy to move between pages by using 【Ctrl+x [】 (backward-page) and 【Ctrl+x ]】 (forward-page).

Most of us don’t use pages but Ritz gives us a good use case. As he points out, you can install a package such as Steve Purcell’s page-break-lines package that will make the breaks explicit and others that make navigation easier. Go read his post and see if you can make pages work for you.

Footnotes:

1

Although, like everything else in Emacs, that’s configurable. It’s controlled by the page-delimiter variable.

Posted in General | Tagged | Leave a comment

Org Mode and Pandoc

Bsag over at But She’s a Girl has a nice post on using Org mode and Pandoc. She says that she’s abandoned Markup in favor of Org mode because, among other things, it provides a rich set facilities for handling the structured text. You can move headers and their associated trees up or down and you can promote or demote them in the hierarchy. And, of course, it has especially rich table editing capabilities. Markup is wonderful and all—I mean that—but if you’re using Emacs as your editor, Org brings you everything Markdown does and much more. You really should be using it.

I’ve written extensively about my own system of using Org mode for writing. Normally, that means I write in Org and then export to HTML, PDF, or this blog. I use the native Org exporters for that so I don’t usually need Pandoc. Bsag, has gone another route and uses ox-pandoc as her export engine. That means that all the conversion is done by Pandoc. I don’t know if that’s better or worse than my system but if you’re just getting started you might want to give bsag’s systems a try.

She also mentions using Org and Pandoc to implement a lab notebook. If you’re working in the sciences and need to keep a lab notebook, you should definitely give her post a read.

Posted in General | Tagged , | Leave a comment

Emacs is Sexy

Posted in General | Tagged | 1 Comment