help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mask files and run command on them?


From: José A . Romero L .
Subject: Re: mask files and run command on them?
Date: Fri, 20 Apr 2012 04:32:47 -0700 (PDT)
User-agent: G2/1.0

W dniu czwartek, 19 kwietnia 2012 10:27:42 UTC+2 użytkownik David Belohrad 
napisał:
(...)
> dired
> mark dirs using 'm'
> -do- svn rm command on each of the selected directories
> 
> how I could handle this?
(...)

Have a look at `dired-do-shell-command' in dired-aux.el:

    dired-do-shell-command is an interactive compiled Lisp function in
    `dired-aux.el'.
    
    (dired-do-shell-command COMMAND &optional ARG FILE-LIST)
    
    Run a shell command COMMAND on the marked files.
    If no files are marked or a specific numeric prefix arg is given,
    the next ARG files are used.  Just M-x universal-argument means the current 
file.
    The prompt mentions the file(s) or the marker, as appropriate.
    
    If there is a `*' in COMMAND, surrounded by whitespace, this runs
    COMMAND just once with the entire file list substituted there.
    
    If there is no `*', but there is a `?' in COMMAND, surrounded by
    whitespace, this runs COMMAND on each file individually with the
    file name substituted for `?'.
    
    Otherwise, this runs COMMAND on each file individually with the
    file name added at the end of COMMAND (separated by a space).

You may need to add a (require 'dired-aux) to you .emacs file to have
it available. It's usuable mapped to '!'.

Cheers,
--
José A. Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]