Elisp: Get Dired Marked Files
To get marked files in dired, use
Then, you can map a function to all the files.
;; apply a function to dired's marked files (require 'dired) (defun xah-open-dired-marked () "Open marked files in dired." (interactive) (mapc 'find-file (dired-get-marked-files)) ) ;; test ;; M-x dired, then mark some files, then M-x xah-open-dired-marked ;; replace find-file to your own function