Author: XahXah Date: Sep 8, 2008 13:58
On Sep 8, 9:06 am, "Sean McLaughlin" wrote:
> Having marked some buffers in a buffer menu, how do I execute a
> particular command upon them? Specifically, I want to change a
> bunch of buffers that are erroneously in "xml-mode" to
> "nxml-mode".
>
> This is with 22.2.1.
To apply a function to marked files in dired, use “dired-get-marked-
files”, like this:
;; idiom for processing a list of files in dired's marked files
;; suppose myProcessFile is your function that takes a file path
;; and do some processing on the file
(defun dired-myProcessFile ()
"apply myProcessFile function to marked files in dired."
(interactive)
(require 'dired)
(mapc 'myProcessFile (dired-get-marked-files))
)
|