Variadic Comparisons in Emacs Lisp

One of the ways that Emacs Lisp differs from other Lisps is that it doesn’t support multiple arguments for comparisons. That is, you can’t write things like

(if (= a b c) do-this else-do-that)

or

(when (< a b c) ...)

You can still express those comparisons, of course, but you have to connect two or more two-argument comparisons with and.

Now, as Bozhidar Batsov points out, that’s about to change. Emacs 24.4 will support variadic comparisons. That’s not a huge change but it does bring Elisp in line with other Lisps and makes it easier to express complex comparisons concisely and clearly. As I wrote before, I’m really impressed with this release and looking forward to its availability.

Posted in Programming | Tagged | 1 Comment

Cory Doctorow on the Politics of Copyright

Cory Doctorow appears in an interesting video where he discusses the politics of copyright and how our current policies just don’t make any sense. He repeatedly applies those policies to other areas where everyone can see how ridiculous they are. Somehow, though, as soon as we start talking about “media” people think it all makes sense.

The video is about 17 minutes long but well worth your time. Watching it made me angry at how stupidly we’re behaving and that no one can see that the purpose of copyright as currently applied is the preservation of the business models of a few large conglomerates. It’s shameful, really.

Posted in General | Tagged | 1 Comment

Tutorial on Using Org Mode to Write Papers

Arne Babenhauserheide has posted another great how-to on using Org Mode. This time it’s on using Org to write technical papers for publication. As with his previous post that I wrote about, this one can be exported to HTML or PDF but renders nicely in either format.

Some of the post is specific to the ACPD Journal but is easily extended to any other journal given their LaTeX style sheet. The nice thing about the tutorial is that it takes a reproducible research approach to writing scientific papers. As faithful Irreal readers know, I’m a big fan reproducible research and hope to see it become the standard for all journal papers.

If your situation requires the publication of papers and you’re an Emacs user, you should take a look at this post. These days, I do almost all my writing through Org Mode and I’m always happy to see ways to see it used for other writing tasks.

Posted in General | Tagged , | 1 Comment

Emacs 24.4 Desktop-Save-Mode

Like many Emacs users, I keep Emacs running continuously on my machines. To maintain the illusion of a constantly running Emacs, I use desktop-save-mode to maintain my configuration across invocations of Emacs or even reboots. Other than things like forgetting my org2blog/wp password, Emacs presents a consistent representation of my work space even if Emacs or the OS restarts.

As Xah Lee explains, Emacs 24.4 expands on these capabilites. These are not huge improvements but incremental changes to make our work flows a bit better. Hop on over to Lee’s post to see what these improvements are.

The more I find out about Emacs 24.4, the more impressed I am. The new release is looking to be a great improvement. Between Lee, Bozhidar Batsov, and, of course, Mickey we’re getting a preview into a really great new release.

Posted in General | Tagged | 1 Comment

Superword- and Subword-Mode in Emacs 24.4

If you like—or are forced to use—camelCaseWords, Emacs has subword-mode that will cause word-based cursor movements to stop at each of the individual words. This can sometimes be useful when you repeatedly need to move to one of the constituent words of a series of compound words.

I rarely have a need to edit camel case words so I never need subword-mode but often have a related problem. In Emacs, when the cursor is in front (or behind) of compound-word or compound_word, moving by word will stop at each constituent word. That’s seldom what you want. You’d like to jump over the whole thing because you’re normally thinking of it as a single word.

As Xah Lee tells us, Emacs 24.4 will have superword-mode that will treat things like compound-word as a single word. That will be handy for programmers who often deal with compound-words or other_compound_words. Lee’s post has the details but notice how the two modes achieve a unification: with subword-mode you always move by word constituents; with superword-mode you always move by the entire compound word, no matter how it’s formed. That’s why the two modes are mutually exclusive.

Posted in General | Tagged | 2 Comments

Writing Books with Org Mode

Oscar Perpiñán Lamigueiro is writing a book. Lots of people do that, of course, but Lamigueiro is doing it with Org Mode. Just the other day, I wrote that Emacs is multifaceted and Lamigueiro demonstrates another of those facets and a pretty high powered one at that.

If you’ve wondered how one might go about producing camera ready copy for a technical book, give Lamigueiro’s post a read. You should also take a look at the Memoir Class documentation that he mentions in the post. I don’t know about you but I love reading things like this. It’s always great to see how people are using Emacs, especially if it’s in ways I haven’t thought of.

Posted in General | Tagged , | Leave a comment

Why Use Org Mode?

Regular Irreal readers know that I’m always talking up Org Mode and urging people to try it out. Many Org Mode users say they switched to Emacs just to get Org Mode. One of the things about Org Mode is that it has so many facets different folks can use it for non-overlapping purposes. I use it to manage my agenda, organize various projects, and for writing and posting my blog posts.

Gregor Riegler has his own answer to the question of what is Org Mode’s killer app? You’ll have to read his post to find out what that answer is but suffice to say, it allows him to replace 20 other apps with Org Mode.

So run on over to Riegler’s blog and read yet another reason you should be using Org Mode. If you’re already using Emacs you really have no excuse not to try it out. If you’re not already using Emacs, Org Mode might give you just the nudge you need.

Posted in General | Tagged , | 1 Comment

Git Flow

Recently I’ve seen a lot of articles about git-flow but it was sort of hard to understand exactly how to integrate into your work flow. Happily Kevin Basarab has come to the rescue with a video that shows you how to use git-flow in a typical development environment. As Basarab says, git-flow just automates certain sequences of standard git commands so you could do everything it does “by hand” but git-flow makes it easy and prevents the errors that always seem to occur when performing a fiddly sequence of commands.

The video uses the command line for all it’s demonstrations but there is a magit interface. Sadly, it doesn’t seem to have been integrated into the magit release yet. I think developers will find git-flow so useful that it will be integrated into magit soon.

The video is about 31 minutes so you’ll need to set aside a bit of time but it’s well worth the half hour.

Posted in Programming | Tagged , | Leave a comment

The Wages of Sin

The U.S. Government in the guise of the NSA believed that they were beyond reproach for their spying on innocent citizens all over the world. Everyone expects governments to spy on their enemies and perhaps on the government of even their allies. Spying on random citizens, domestic and foreign, is beyond the pale and everyone but the NSA and its apologists know this.

It turns out that there is a price to be paid. The European Union is expressing its disapproval in a dramatic and unmistakable fashion. They are threatening to suspend TTIP negotiations, something dear to the those lobbying—and donating to—the government for stronger copyright protections.

They are also calling for an end to the safe harbor provisions of data transferred to U.S. corporations and the termination of the SWIFT program that helps track bank transactions. In addition, the EU is calling for an EU only Internet structure to help keep the NSA out.

The NSA, of course, cares about none of this. They’ll just keep on doing what they’re doing. But the tech community in the U.S. is already feeling the blowback from these programs and will be sure to make their displeasure known to the government. The government can and will ignore this in the short term, but at the end of the day there’s too much money and influence from the business community to ignore. When that day comes, I hope those who believe in their impunity are called to answer for their actions.

Posted in General | Tagged | Leave a comment

All Those Pesky Commas

Posted in Programming | Tagged | Leave a comment