From: Glenn Morris <rgm@gnu.org>
To: trentbuck@gmail.com
Cc: 4403@emacsbugs.donarmstrong.com
Subject: bug#4403: 23.1; find-dired: use "find -exec ls -ld {} +" or "find -ls" where available
Date: Mon, 14 Sep 2009 22:50:04 -0400 [thread overview]
Message-ID: <qhvdjkdiqr.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <4aaa13d9.11045a0a.0cdc.4719@mx.google.com> (trentbuck@gmail.com's message of "Fri, 11 Sep 2009 02:09:45 -0700 (PDT)")
trentbuck@gmail.com wrote:
> Recent versions of GNU find support the expressions
>
> find <query> -exec ls -ld {} +
>
> and
>
> find <query> -ls
>
> I believe these are also part of recent versions of the POSIX spec.
>
> It would be great if M-x find dired RET automatically used these forms
You can use something like:
(setq find-ls-option
(let ((help (shell-command-to-string (format "%s --help" find-program))))
(if (string-match " -ls\\>" help)
'("-ls" . "-lids")
(if (string-match "{} \\+" help)
'("-exec ls -ld {} +" . "-ld")
'("-exec ls -ld {} \\;" . "-ld")))))
The -ls version changes the output format.
> It would also mean that the output would line up better
Surely dired already takes care of the alignment?
next prev parent reply other threads:[~2009-09-15 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 9:09 bug#4403: 23.1; find-dired: use "find -exec ls -ld {} +" or "find -ls" where available trentbuck
2009-09-15 2:50 ` Glenn Morris [this message]
2009-09-15 4:55 ` Trent W. Buck
2011-04-02 20:37 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=qhvdjkdiqr.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=4403@emacsbugs.donarmstrong.com \
--cc=trentbuck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.