my-emacs-d/elpa/yasnippet-20161022.646/snippets/emacs-lisp-mode/x-dired.process_marked
2016-10-24 08:30:06 +02:00

17 lines
480 B
Plaintext
Executable File

#contributor: Xah Lee (XahLee.org)
#name: process marked files in dired
# key: x-dired
# --
;; 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))
)
;; to use it, type M-x dired-myProcessFile