Shell and Comint History

A couple of weeks ago I saw this nice post on advanced Bash shortcuts over at ${me:-whatever}, If you haven’t seen it, be sure to take a look. Even though I’ve been using Bash for more years than I care to contemplate, I still learned a couple of things I didn’t know—or at least a couple of things that I may have known but had forgotten.

I was reminded of that post when I read Mickey’s latest Mastering Emacs offering, Shell & Comint Secrets: History commands. It turns out that many (most) of those Bash shortcuts are available in any comint process. That includes the shell command, of course, but it’s also true of things like the Python shell.

Mickey shows a number of ways to use these shortcuts to ease your workflow. Some of them are probably too much trouble to bother with but some are really useful. For example, you can capture the nth argument of the last command and reinsert it in the current command. If you’ve ever had to use a/really/long/path/with/ReallyLongNames in several commands in a row, you can see how this could be a real time saver.

Head on over to Mickey’s post to get the details and see some of the other shortcuts and how you can leverage them. Everything Mickey posts is a must read for Emacsers and this post is no exception.

Posted in General | Tagged | 0 Comments

An Automated Publishing Pipeline

Dale Karp wanted to publish his activity log and notes so that others could see them and he could view them remotely. To do this, he set up an automated publishing pipeline using Emacs and Org mode. The idea is that he defines a “publishing project” in Org and invokes Emacs via systemd to run the export function on the project.

It’s a nice setup and one you may find handy if you want to regularly publish some Org files. He doesn’t have to do anything other than update his log files and they automatically get published to his GitHub Pages blog once a week. Head on over to his blog for the details.

Posted in General | Tagged , | 0 Comments

Mu/Mu4e 0.9.18

I just downloaded the latest version mu/mu4e and rebuilt it on my system. That’s a pain because Apple insists on shipping a very old version of Emacs—apparently to avoid GPL 3—and mu4e won’t build because it thinks Emacs is too old. I have to figure out how to get around this every time it comes up. This time I just changed the makefile to point at the proper Emacs in /Applications.

In any event, this is a good time to mention Charl Botha’s post on mu4e 0.9.18. There are a some nice enhancements that Botha describes, which I’ll let you read in his post. One of the nice things about the post is that he provides his mu4e configuration. That’s really handy if you’re just setting mu4e up and want a working, reasonable configuration. He comments it well so you should have no problem adjusting it to your liking.

Posted in General | Tagged | 0 Comments

We Don’t Wear Suits

Lots of people love Apple. Others, not so much. But whatever your feelings about the company, you’ve got to give them props for their famous response to AT&Ts suggestion that Steve Jobs wear a suit to an upcoming meeting with AT&Ts board of directors:

We’re Apple. We don’t wear suits. We don’t even own suits.

If you’re a suit—so to speak—that may seem weird and arrogant. If you’re a techie who’s ever been forced to adhere to silly dress conventions from the last century, you can only applaud.

Posted in General | Tagged | 0 Comments

Happy 44th Birthday Dark Side of the Moon

I almost forgot. Today is the 44th anniversary of Pink Floyd’s Dark Side of the Moon. Somehow I forgot to mention it last year.

Dark Side of the Moon holds the record for the largest (by far) number of weeks on the Billboard 200 (927 weeks) and although it isn’t on the list this week—it pops on and off—it was 193 on the year end list. It’s truly one of the greatest albums of all time.

Posted in General | Tagged , | 1 Comment

Org and Emacs Resources

Ben Elijah over at Ink and Ben has posted a nice set of Org and Emacs resources. Folks are always asking for basic tutorials and other information on how to take advantage of Emacs and Org mode. Elijah’s list is mostly about Org mode but he does include some Emacs resources on the grounds that you need to know at least a little Emacs to use Org.

Posted in General | Tagged , | 0 Comments

A Warning for Web Designers

It’s only just, after all

Posted in General | Tagged , | 3 Comments

Installing Hugo and Goorgeous

The other day, I wrote about blogging with Hugo and Org. Part of that post involved how Diego Mundo worked around the fact that Hugo expects its input in markdown so that he could write his posts in Org markup. Xuchunyang commented that as of version 0.19 Hugo also supports Org mode natively.

It turns out that the Org mode integration is handled by the goorgeous module. Over at A Scriptor’s Notes there’s a nice post on how to build Hugo and goorgeous from scratch. This may be attractive if you want to keep up to date with the rapidly evolving Hugo ecosystem. The post takes you through everything you need to do to install and build from source. You’ll need to install the Go tool chain, but you don’t need to know how to program in Go.

There’s also a complete build script so once you’ve done the initial install, all you have to do is run the script. It’s probably worth your while to investigate this post if you’re using Hugo to blog.

Posted in General | Tagged , | 2 Comments

Netops

One of my favorite applications of Org mode and Babel is demonstrated by Howard Abrams’ post and video on what he calls Literate DevOps. The basic idea is that he documents his work in an Org file complete with the actual code that he uses. What Babel makes possible is that he executes the code from inside Org mode and the results are automatically added to his Org file. In the end, he has a complete record of what he did along with the results. That makes the process easily reproducible and he can send to file to a colleague wishing to build on his work or needing a go-by for a similar project.

Vincent Bernat has taken Abrams’ DevOps idea and applied it to network operations. He calls it netops. If you’re working in network operations and want a nice way of documenting your work, take a look at Bernat’s post and the accompanying three videos. As with DevOps, everything you do is documented along with the code and results.

If you aren’t a network engineer you probably won’t understand everything he’s doing but you can still follow his process. My only complaint is that the videos have no audio; Bernat just types in what he is going to do. I find videos like that harder to follow but they’re still definitely worth watching.

Posted in General | Tagged , | 2 Comments

Undo/Redo with Scrolling

The rollover joke for this XKCD cartoon says

If used with software that could keep up, a scroll wheel mapped to send a stream of ’undo’ and ’redo’ events could be kind of cool.

So of course an Emacs geek, ncsuwolf, immediately implemented it. It’s probably not something you’d really want but it is neat that it was so easy to do.

In the comments, someone else suggested using the scroll wheel to control the Git time machine. That might be slightly more useful but others really liked controlling undo/redo with the scroll wheel. If you’d like to try either one, they’re each only 3 lines in your init.el.

Posted in General | Tagged | 0 Comments