Tag Archives: emacs configuration

Shaving time with goto-chg

Through Irreal I found Arne Babenhauserheide’s Emacs configuration. His setup is glean-friendly, using Org-babel. Literate programming is great for config-files. It is probably the best way for people to actually comment their configurations.

shaving and saving time


Arne has lots of little things I want to try. The first one goto-chg is a must-have. From the package:

Goto the point of the most recent edit in the buffer.
When repeated, goto the second most recent edit, etc.
Negative argument, C-u -, for reverse direction.
Works by looking into buffer-undo-list to find points of edit.

I love such packages, they help, but don’t get in the way. If you open a file, you have to start somewhere, so why not at the last place you changed something? Brilliantly simple! It is not a big change, but it will shave a couple of seconds here and there when you revisit a file you edited before, and now you need to make another small change.

As Arne says: “And then you get used to it and it becomes absolutely indispensable.”

Install it (I used el-get) and configure it:

;;(package-require 'goto-chg) ;; you might need this
(global-set-key [(control .)] 'goto-last-change)
; M-. can conflict with etags tag search. But C-. can get overwritten
; by flyspell-auto-correct-word. And goto-last-change needs a really
; fast key.
(global-set-key [(meta .)] 'goto-last-change)
;;(global-set-key [(control ?,)] 'goto-last-change-reverse) ;;I don't use this

That’s it! Simple, but a great time-s(h)aver.