Customizing the Ace-Window Selection Face

Abo-abo has made a slight enhancement to ace-window that makes it possible to customize the face of the selection character of each window. Take a look at the example in abo-abo’s post to see what I mean. It makes the character much easier to see and looks very nice.

If you’re trying to squeeze the last drop of efficiency from your key bindings, notice how abo-abo has mapped the selection characters to be a s d f g h j k l rather than the default 1 2 3 4 5 6 7 8 9. That means the selection keys are on the home row and very easy to reach. Another micro-optimization that helps make Emacs use as frictionless as possible.

Posted in General | Tagged | 4 Comments

Reproducible Research with Docker

Karl Voit retweets this

that points to this post from Stacy Konkiel that, in turn, tells us to read this excellent post from Melissa Gymrek on using Docker to do reproducible research.

One of main problems with reproducible research is that even if all the data and computer source code is available, it can be hard to reproduce the environment used by the original researcher. You may have a different version of the operating system, a different compiler, a new version of R or similar tool. As much as we might wish it otherwise, these things can and do affect the results of complex computations.

All of that aside, if you’ve ever tried to understand someone else’s build system, you know how hard it can be to figure out which scripts produce which pieces of the finished product. Things like Org mode can help a lot with that problem but not everyone is an Emacs user and most researchers are more concerned with the actual research than with providing an easy to duplicate environment.

That’s were Docker comes in. The researcher does all his work in a Docker virtual machine, saves away the Docker image, and makes it available to other researchers. Subsequent researchers will then have the same the same build tools and data as the original researcher.

Gymrek has details on how to go about this and I recommend you read her post. There are, as she relates, even repositories analogous to GitHub where you can stash your Docker images so others can get at them. Again, see Gymrek’s post for details. Her post is one of the most useful things I’ve read on reproducible research in some time.

Posted in General | Tagged | Leave a comment

The Emacs Way

Howard Abrams over at howardism.org has a nice post on the The Tao of Emacs. His idea is to compare the Emacs workflow with that of other editors such as Vim. While Vim users have a shell-centric workflow where actions such as editing, compiling and testing are orchestrated from the shell, Emacs users prefer to stay in their editor and run the compilation and testing from there. Emacs, of course, has the tools to do this easily and “never leave Emacs” is a sacred precept for many Emacs users. Certainly almost all proficient Emacs users will perform the entire development cycle completely from with the editor.

Abrams then moves on to considering editing remote files. With Tramp, it’s easy to retrieve a file on a remote server that’s behind a firewall or even a set of firewalls. For frequently used files, this can be configured so that it happens automatically, but even a one-off edit is pretty easy because you can specify the series of hosts to go through in the file path. If you’re using ssh keys, as you should, this will be almost transparent because you won’t be prompted for passwords.

Abrams gives a nice example of something I hadn’t thought about: you can make a call to sudo the last hop in the sequence of hosts in the file path. This allows you to edit file owned by root (or others) on the remote host. See Abrams post for the details. One final thing I didn’t know is that you can bookmark a remote file and access it again very easily by simply invoking the bookmark. Again, see Abrams post for the details.

This is a nice post that makes explicit how the Emacs workflow differs from that of other editors. The bits about using Tramp may teach you things you didn’t know. It’s well worth a read.

UPDATE: Be sure to see Phil’s comment about using sudo at the end of a chain of intermediate hosts.

Posted in General | Tagged | 2 Comments

Yet Another Convert

It appears that org2blog is on track for world domination. At least the world of Emacs and WordPress.

Posted in General | Tagged , | Leave a comment

The prin* Family

This is really a note to myself but I’ll bet many of you are in the same boat. When I want to print something in Elisp, I usually use format but sometimes one of the prin* functions is really what I need. The problem is that I can never remember exactly what they do. What, for example, is the difference between princ, print, and prin1?

This post is meant to be a cheat sheet for the family. Although it’s not really part of the prin* family, I’ve included pp as well because I always forget about it.

  • prin1
    Output a printed representation of the argument with quoting. Output will be readable if possible.
  • prin1-char
    Return a string representation of the argument, which must be a character.
  • prin1-to-string
    Return a string representation of the argument with quoting. Like prin1 but returns the string rather than outputting it. Output will be readable if possible.
  • princ
    Output the printed representation of the argument without quoting.
  • princ-list
    Print all arguments with princ followed by a newline. OBSOLETE: Use mapc and princ instead.
  • print
    Output the printed representaton of the argument with newlines around it. Output will be quoted and readable if possible.
  • print-buffer
    Paginate and print buffer contents.
  • print-diary-entries
    Print a hard copy of the diary display.
  • print-help-return-message
    OBSOLETE: use help-print-return-message instead.
  • print-region
    Paginate and print the region contents.
  • pp
    Output a pretty-printed representation of the argument with quoting. Output will be readable if possible.
Posted in Programming | Tagged | Leave a comment

An Interview with Carsten Dominik

I recently came across an old but interesting interview of Carsten Dominik. The interview was by Randal Schwartz on his FLOSS Weekly Netcast back in September 2010. Despite its age, the netcast doesn’t seem dated at all.

Dominik is a very interesting and engaging guy. He makes you feel that you’d really enjoy sitting down with him and chatting over a beer. The interview is a 53 minutes long conversation (no demonstrations or code perusal) so you can almost feel as if you had that chance to chat.

Schwartz takes Dominik from the beginnings of Org Mode (a personal itch arising from some shortcomings of Outline Mode) up through the export system and finally to Babel. That’s pretty much where Org stands today so the age of the interview doesn’t matter very much.

You can really see Dominik’s enthusiasm for and love of Org Mode in his chat with Schwartz. He says he spends most of his day in it and uses it for just about everything. A few years before the interview Dominik thought that development on Org Mode was pretty much over; everything he could imagine for it was already in it. Then some new ideas came pouring in and they pretty much haven’t stopped.

If you’re not, yet, an Org Mode user, you might enjoy the video and get some idea of what it can do for you. It’s definitely worth an hour of your time.

Posted in General | Tagged , | Leave a comment

The Wages of Sin (Lenovo Edition)

$10B.

The article estimates that 1,000,000 people in America were affected. That means that I have to revise my previous estimate to 25¢.

Posted in General | Leave a comment

SBCL 1.2.9

Steel Bank Common Lisp is out and available at the usual place. This month’s release has some optimizations and a bunch of bug fixes. You can get the details from SBCL’s NEWS page.

As I say every month, if you’re looking for an excellent Common Lisp system that’s easy to install and use, I can recommend SBCL without hesitation.

Posted in Programming | Tagged , | Leave a comment

Just When You Thought It Couldn’t Get Worse

What could make the Lenovo/SuperFish scandal worse than it already is? This could:

If true and you bought one of those laptops, it probably means that Lenovo sold you and your safety out for less than a dollar.

Here’s the Forbes story.

Posted in General | Tagged , | Leave a comment

Act While You Can

Gabriel Weinberg, the founder and CEO of DuckDuckGo has an impassioned plea to all of us to take a stand in the coming debate over Internet privacy. “Internet privacy” is a large and complex subject that includes abuses by the NSA and other government agencies as well as commercial enterprises that are eager to exploit our personal data for commercial gain.

It’s reasonable to be a bit pessimistic about being able to yank back our privacy from the government but it does seem possible to get the advertisers and data brokers under control. As Weinberg reports, the Obama administration is set to introduce legislation to do just that. We can expect major pushback from those who want to keep mining our personal information and building ever more comprehensive dossiers on us.

Weinberg says that this is a fight where we can actually make a difference and he suggests some ways to claw back our privacy. You should head on over and read his post. As he says, it’s now or probably never.

AFTERWORD: Here’s the EFF’s take on the upcoming legislation.

Posted in General | Tagged | 2 Comments