[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15504: 24.3; find-dired's numerous prompts are inflexible and annoyi
From: |
Kevin Rodgers |
Subject: |
bug#15504: 24.3; find-dired's numerous prompts are inflexible and annoying |
Date: |
Thu, 03 Oct 2013 22:16:34 -0600 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 |
On 10/1/13 7:45 PM, Trent W. Buck wrote:
I prefer to do M-x grep RET and then type something complicated like
grep -r --include '*.c' --exclude-dir .git . -e foo -e bar
...rather than M-x rgrep which has lots of stupid prompts that then get
stuck together in a fixed kind of way.
In the same vein, I hate M-x find dired RET multiple prompts. For a few
years I've been using a munged up replacement that just asks for a
single command, and runs it (below). The history handling is a bit
buggered, and it breaks the existing multi-prompt style (presumably some
people prefer it).
I'm afraid I don't get what you're saying, since `M-x find-dired' only prompts
for the directory to search and the long string of arguments you love to type:
find-dired is an interactive autoloaded Lisp function in
`find-dired.el'.
(find-dired DIR ARGS)
Run `find' and go into Dired mode on a buffer of the output.
The command run (after changing into DIR) is
find . \( ARGS \) -ls
except that the variable `find-ls-option' specifies what to use
as the final argument.
And the implementation confirms the documentation:
(defun find-dired (dir args)
...
(interactive (list (read-file-name "Run find in directory: " nil "" t)
(read-string "Run find (with args): " find-args
'(find-args-history . 1))))
...
PS: find -ls's output is actually crap, because the entries don't line
up properly and files with spaces become "foo\ bar" which dired mode
doesn't like, so I generally end up doing "find -exec ls -lidsh {} +".
Apparently that is what `find-ls-option' is for.
--
Kevin Rodgers
Denver, Colorado, USA