Ed in Emacs

You live long enough, you see everything. I just came across ed-mode. If you’re an Emacs user who also has retro tendencies and likes to play around with old-time editors, now you can explore the “standard Unix editor” from the comfort of Emacs. Ed-mode allows you to run an ed emulation on the current buffer.

It is, I suppose, a nice way to practice with ed against the day that you need it for a rescue operation but I do the same thing by firing up ed on a log file and using it to perform basic operations. By doing that regularly, I’m confident that I have enough ed skills to see me through a boot disaster. Of course, as a macOS user I’m not apt to need that but I do occasionally boot Linux system where that knowledge could definitely be useful.

Truth to tell, I don’t expect to ever need to use ed in anger but it’s nice to know how to use it if only because every Unix-head should. The ed editor is actually pretty easy to learn and suffers only from being a line editor. If you’re interested in learning it, ed-mode may be a good vehicle. Take a look at Brian Kernighan’s excellent tutorials (1, 2) and then fire up ed or ed-mode. You’ll be able to amaze your colleagues.

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