I've been using Emacs for years, and love it. Some time ago, I
noticed that keyboard macros stopped working as they used to for me.
It's been annoying, but I can usually work around it. Today it got
annoying enough that I'm stopping to ask for help.
Say I have a set of lines, each of which has two fields, separated by
a tab. I want to "swap" the fields, bringing the second field to the
front of each line. I used to do this kind of thing effortlessly with
keyboard macros. Something happened to Emacs "recently", and I now
have big problems. It happened about the time that RETURNs became the
way to terminate incremental searches.
Anyway, I try
ESC-< goto beginning of the buffer
C-x ( start defining keyboard macro
C-SPC set mark here
C-s TAB incremental search for TAB
RET terminate search
C-w kill the region (the first field and the TAB)
C-e go to the end of the line
TAB insert the new field separator
C-y restore yanked text
DEL delete that* TAB
C-n go to next line
C-a go to front of the line
C-x ) terminate keyboard macro
This works as expected on the first line, while I'm defining the
macro, but subsequent "C-x e" commands do weird things. It works if I
replace the "C-s TAB" with "M-x search-forward TAB RET", but then the
macros gets extremely slow.
What am I doing wrong?