Reputation: 27013
Is there an emacs command which would apply a kbd macro to every file in dired?
e.g. query-replace-regexp
has dired-do-query-replace-regexp
I'm looking for a dired-do-call-last-kbd-macro
Upvotes: 4
Views: 919
Reputation: 10814
Another option is to do this:
Upvotes: 3
Reputation: 1796
C-h f dired-do-query-replace-regexp reveals the code for this:
(dolist (file (dired-get-marked-files nil nil 'dired-nondirectory-p)) (let ((buffer (get-file-buffer file))) (if (and buffer (with-current-buffer buffer buffer-read-only)) (error "File `%s' is visited read-only" file))))
I'd just make some elisp that does what you want using this as a template
Upvotes: 1