Filling and Unfilling Paragraphs with Emacs

Like me, Artur Malabarba is a heavy user of fill paragraph. I don’t use visual-line-mode when I’m writing so every time I make an edit I refill the paragraph. Malabarba apparently does the same but being Malabarba has found a way to improve things.

He says that sometimes he wants to unfill a paragraph and would like an easy way of doing that. He noticed that there’s no reason to call fill-paragraph twice in a row so he wrote a bit of glue code to check if the last command filled the paragraph and if so to set fill-column to point-max, which causes fill-paragraph to unfill the paragraph. Finally, he remaps 【Meta+q】 to call his glue code.

If you, like Malabarba, sometimes find yourself needing to unfill a paragraph, head on over to Endless Parentheses and copy his code.

Posted in General | Tagged | Leave a comment

Thought for the Day

Kontra has a nice quote from Vernon Sanders Law:

Posted in General | Tagged | Leave a comment

Malabarba: Mastering Emacs Review

A year ago, Mickey Petersen published Mastering Emacs, an excellent book for beginning and intermediate Emacs users. Oddly, although I’ve seen many tweets praising it, I haven’t seen any reviews. Happily, the prolific Artur Malabarba has remedied that.

If you don’t already have your own copy of Mastering Emacs, take a minute to read Malabarba’s review. I’m sure it will convince you that you’re missing out. Even if you’re relatively familiar with Emacs, you’re almost certain to learn a few things. I know I have.

Posted in General | Tagged | Leave a comment

You Must Use Emacs or Vi

Back in 2012, I wrote a blog post recounting my observation that the best developers tended to use either Emacs or Vim (and back then, possibly TextMate on OS X). I speculated that that might be because excellent developers choose the best tools available and invest in learning to master them.

Now, Sébastien Le Gall writes that developers in 2016 must learn Emacs or Vi. His post fleshes out my arguments for why great developers and those that want to be one take the time to master Emacs or Vi. He looks at two features in particular:

  1. Emacs and Vi encourage mouseless operation and this saves considerable time.
  2. Emacs—particularly with packages like Projectile—make choosing and opening a file quick and easy.

Some of you will doubtless disagree as you did with my analysis but Sébastien’s post is interesting and might encourage non-users to give Emacs or Vi a try.

Posted in General | Tagged | Leave a comment

Writing A Custom Emacs Package

Al Scott is an Emacs user and JavaScript developer who’s interested in using the TDD method. He likes to use Mocha to run JavaScript scripts for testing. Unfortunately, there’s no easy way to do that from Emacs so Scott decided to write a custom package, tied to the Emacs compile command, that would implement a Mocha test runner. His post walks us through the steps needed to write such a package.

Scott starts by noting that Emacs comes with a lot of built-in facilities to ease Elisp development and that by adding a couple of packages like flycheck and company-mode you have a pretty complete IDE for Elisp. The purpose of his Mocha-runner is to bring some of the same capabilities to JavaScript development.

The rest of the post shows the step by step development of writing the package. He even mentions the steps needed to add the package to the MELPA package repository. Even if you’re not a JavaScript developer or interested in TDD, there’s a lot of useful information in the post and I recommend it to any Elisp developer.

Posted in General | Tagged | Leave a comment

Scientific Illiteracy (2)

Remember a couple of years ago when I wrote despairingly of American scientific illiteracy and the fact that 1 in 4 Americans didn’t know that the earth revolves around the sun? I was pretty certain that that represented the infimum of such stories. I should have known better. Today, we have this:

I get that some people worry about GMOs and would rather avoid them but is it too much to ask that they know what they’re talking about? What on earth can non-genetically modified mean if your food doesn’t have DNA?

Posted in General | Tagged | Leave a comment

Emacs as a (Python) IDE

A couple of years ago, Drew Werner gave a nice talk to the New York Emacs Meetup group on An Intelligent Python IDE with Emacs, Projectile, and Jedi. I came across a reference to it today and watched the video of it. It’s well worth the 47 and half minutes even if you’re not a Python user.

Werner’s idea is that you can take his basic method of setting up a Python IDE and use it to set up an IDE for any language. Indeed, the first two components are pretty much language independent. He first sets up Projectile to handle your workflow at the project level. Then he installs auto-complete to provide context sensitive completion. The problem is that auto-complete doesn’t understand Python so its completion is rudimentary.

He solves that problem by adding EPC and Jedi, which provide Python language parsing and enable auto-complete to provide much better completions. Auto-complete has engines for other languages so with a little work you can build an IDE for many environments. See my post on Átila Neves’ talk on setting up Emacs as a C++ IDE as an example.

If you’re a Python user you should definitely watch the video. If you’re not, you may still find the ideas that Werner talks about useful for enhancing your own workflow.

Posted in General | Tagged | 1 Comment

Quoting with Org Mode

Grant Rettke, whom Irreal has mentioned from time to time, has a nice screencast on how he adds quotes to an Org document. Like many of us, Rettke takes notes on material he is watching or reading with Org mode. Sometimes he wants to add a verbatim snippet into his Org notes.

In the screencast, he shows three ways of adding these “quotes” to his notes and what the result looks when he exports the notes to, say, HTML. There’s a little less than seven minutes of content so it’s easy to find time to watch it.

I love videos like this because I always learn something from seeing how others use their tools—especially Emacs and Org mode—to lubricate their workflow. Even if you already know about the features that a particular video demonstrates, seeing how others use them can give you new ideas. I know that’s most often the case for me. In any event, Rettke’s video is interesting and well worth watching. It’s also nicely produced. Give it a look and see.

Update [2016-05-26 Thu]: Moke → Mode

Posted in General | Tagged , | 2 Comments

High Entropy

And I’m pretty sure there would be no NSA backdoor.

Posted in General | Tagged | Leave a comment

Not an Editor, Not an Operating System…

This is where its power really comes from.

Posted in General | Tagged | 3 Comments