diff options
author | Alberto Luaces Fernández <aluaces@udc.es> | 2015-05-13 19:45:06 +0100 |
---|---|---|
committer | Alberto Luaces Fernández <aluaces@udc.es> | 2015-05-13 19:45:06 +0100 |
commit | f4123b269fe5af6d04d68a643d16fea9fa388e2d (patch) | |
tree | 4361a69e833eaa18c49cad6bf594c9cddfcc6f89 /emacs-lisp-mode/x-dired.process_marked |
Import yasnippet-snippets_0~git20150512.orig.tar.gz
[dgit import orig yasnippet-snippets_0~git20150512.orig.tar.gz]
Diffstat (limited to 'emacs-lisp-mode/x-dired.process_marked')
-rwxr-xr-x | emacs-lisp-mode/x-dired.process_marked | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/emacs-lisp-mode/x-dired.process_marked b/emacs-lisp-mode/x-dired.process_marked new file mode 100755 index 0000000..9af5a26 --- /dev/null +++ b/emacs-lisp-mode/x-dired.process_marked @@ -0,0 +1,17 @@ +#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
\ No newline at end of file |