Emacs As Your Shell

I’m finally finding time to watch more of the videos from the Emacs Conference 2019. Howard Abrams gave an interesting talk on using Emacs as his shell and scripting language. As he says, it’s just him trying out some ideas meant for his personal use.

He starts out with a typical shell pipeline and wonders how the same thing might be done in Emacs. Why would you want to do that? The problem is that a pipeline’s intermediate results are pretty much opaque. You see the input and you see the output but not what’s happening in the middle. By using Emacs, you can see what the data looks like at every step. Abrams also says that in general Emacs tools are superior to the shell so you gain there too. It turns out not to be very difficult to use Emacs interactively to do a task that you might otherwise use a pipeline for. Abrams demonstrates this by using Emacs to do the same thing as his original pipeline.

In the second half of the talk, Abrams considers how you might use Elisp as a scripting language. He puts together some macros and functions that lets him write vaguely shell-like scripts but within Emacs. The advantage to this approach is that he has the full power of Emacs available whenever he needs it.

I can imagine circumstances where I might use Emacs interactively instead of a pipeline but I don’t think I’d bother with the scripting. I’m happy to use a shell script if that’s what the job requires. Still, Abrams’ approach was interesting and definitely worth taking a look at. You might even decided to adopt his approach.

Sadly, there were technical problems and the video feed was lost in the middle of the talk. That’s not as serious as it could have been because it happened near the end of the talk proper and mostly affected the Q&A. Secondly, Abrams has provided a sort of transcript of the talk complete with the slides. That makes it pretty easy to follow along in the part without video. As usual with Abrams’ videos, you’ll probably learns some new things and it is definitely worth your while.

This entry was posted in General and tagged . Bookmark the permalink.