summaryrefslogblamecommitdiffstats
path: root/emacs.d/snippets/text-mode/emacs-lisp-mode/dired.process_marked
blob: 1b42597764a6ee41da17ac2cd7715063c8ee1a8a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                
#name : process marked files in dired
#contributor : Xah Lee
# --
;; 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