More Examples of DWIM Shell Commands

The other day I wrote about Álvaro Ramírez’s DWIM Shell Commands package. The TL;DR is that it’s a template framework for executing shell commands from within Emacs when the shell command has tricky syntax or hard to remember options.

Since writing the package, Ramírez has been revisiting some of his custom Elisp functions that call shell commands and refactoring them to use his new package. The first example is password protecting one or more PDFs. This example is noteworthy for how much shorter it is using the framework than it was originally. As Ramírez says, the fact that it’s so short and easy to write a custom function for invoking a shell utility means that he’ll do it more often and therefore streamline his workflow.

The second example involves converting a png file to a series of icns files. This example is distinguished by the fact that it’s more like a script than a single invocation of some utility.

You could, of course, do all this with a shell script or some custom Elisp but using the DWIM-shell-command package makes it easy because it does a lot of the work for you. If you find yourself invoking utilities via the shell command from Emacs, you should definitely take a look at Ramírez’s package.

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