Emacs’ jump-to-register In Exploratory Programming

I’ve written before about Emacs Registers and how you can store the mark in a register with 【Ctrl+x r Spaceregister. That’s one of those things that’s occasionally useful because you can then jump to that position with 【Ctrl+x r jregister but in my experience, I just don’t use it that often. However, while I was doing exploratory programming for my series on executable log records, I found that it was extraordinarily useful.

As I explained in the exploratory programming post, I developed the code by writing some exploratory functions and then trying them out on a record sexpr. I used the same file for the entire series and as I added additional posts to the series, I just added code to the end of the buffer. Then I would try it out on one of the records that were at the top of the buffer. By storing the mark in a register, I was able to quickly return to the end of the record and execute it with 【Ctrl+x Ctrl+e】. Then I could return to the code I was working on by simply going to the end of the buffer with 【Meta+>】.

None of this is extraordinary or ground breaking but it does show how a simple Emacs command can really speed up development. Without storing the position of the record in a register, I would have had to move to it with a much more complicated series of keystrokes. This is another example of Emacs providing the very tool you need for a specific task.

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