emacsemacs23emacs24

Emacs 24 Keyboard Macros Running Slow


I've noticed keyboard macros running very slowly in emacs 24

for example - I just tried running a macro to append a '0' to the end of each line in a 105615 line text file

C-x ( C-e TAB 0 C-n C-a C-x )

then

C-u 105615 C-x e

takes about 5 mins to complete

I never noticed them running so slow before, wondered if it had anything to do with upgrading from 23 to 24?

Is there anything I can do to improve performance?


Solution

  • Yes, you are right, it's damn slow.

    For this particular task you can use replace-regexp.

    M-x buffer-disable-undo
    M-x replace-regexp $ <ENTER> C-q TAB 0 <ENTER>