* sorting by filename with find-dired
@ 2017-11-29 17:33 Roland Winkler
2017-11-29 17:40 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Roland Winkler @ 2017-11-29 17:33 UTC (permalink / raw)
To: help-gnu-emacs
Is it possible to teach find-dired to sort its output by filename
the way that ls and thus dired work by default? I looked at
find-ls-option, but this seems not to do the job.
Thanks, Roland
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: sorting by filename with find-dired
2017-11-29 17:33 sorting by filename with find-dired Roland Winkler
@ 2017-11-29 17:40 ` Drew Adams
2017-11-29 17:57 ` Roland Winkler
2017-11-29 19:19 ` Eli Zaretskii
2017-11-29 19:35 ` Glenn Morris
2 siblings, 1 reply; 9+ messages in thread
From: Drew Adams @ 2017-11-29 17:40 UTC (permalink / raw)
To: Roland Winkler, help-gnu-emacs
> Is it possible to teach find-dired to sort its output by filename
> the way that ls and thus dired work by default? I looked at
> find-ls-option, but this seems not to do the job.
If you use library `find-dired+.el' then, on MS Windows,
`find-ls-option' uses the value of `dired-listing-switches'.
IOW, on Windows, `find-ls-option' is (cons "-ls" dired-listing-switches).
https://www.emacswiki.org/emacs/download/find-dired%2b.el
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: sorting by filename with find-dired
2017-11-29 17:40 ` Drew Adams
@ 2017-11-29 17:57 ` Roland Winkler
2017-11-29 18:58 ` Drew Adams
0 siblings, 1 reply; 9+ messages in thread
From: Roland Winkler @ 2017-11-29 17:57 UTC (permalink / raw)
To: Drew Adams; +Cc: help-gnu-emacs
On Wed Nov 29 2017 Drew Adams wrote:
> If you use library `find-dired+.el' then, on MS Windows,
> `find-ls-option' uses the value of `dired-listing-switches'.
>
> IOW, on Windows, `find-ls-option' is (cons "-ls" dired-listing-switches).
I am sorry, this doesn't help me with GNU find under a GNU/linux
system. The way I understand it the problem is that the sort order
of the output of find reflects the order of the files "on disk".
Then find-dired takes this output without sorting and the cdr of
find-ls-option is not really relevant for this. (So I believe the
same problem exists if one wanted to have any other well-defined
sort order in the dired buffer generated by find-dired.)
A custom hook in find-dired might help.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: sorting by filename with find-dired
2017-11-29 17:33 sorting by filename with find-dired Roland Winkler
2017-11-29 17:40 ` Drew Adams
@ 2017-11-29 19:19 ` Eli Zaretskii
2017-11-29 19:35 ` Glenn Morris
2 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2017-11-29 19:19 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Wed, 29 Nov 2017 11:33:51 -0600
> From: "Roland Winkler" <winkler@gnu.org>
>
> Is it possible to teach find-dired to sort its output by filename
> the way that ls and thus dired work by default?
You do know that find-dired runs the shell command asynchronously,
right? If you want it to sort the output, it will have to be run
synchronously, in order to have the entire list of files before
sorting them, which means the user (you) will have to wait for all the
files to be read and processed, before seeing any output. Is that a
good idea?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: sorting by filename with find-dired
2017-11-29 17:33 sorting by filename with find-dired Roland Winkler
2017-11-29 17:40 ` Drew Adams
2017-11-29 19:19 ` Eli Zaretskii
@ 2017-11-29 19:35 ` Glenn Morris
2017-11-29 20:42 ` Roland Winkler
2017-11-29 22:18 ` Stefan Monnier
2 siblings, 2 replies; 9+ messages in thread
From: Glenn Morris @ 2017-11-29 19:35 UTC (permalink / raw)
To: Roland Winkler; +Cc: help-gnu-emacs
"Roland Winkler" wrote:
> Is it possible to teach find-dired to sort its output by filename
> the way that ls and thus dired work by default?
find-dired works asynchronously. You obviously can't sort by filename
until all the output has arrived.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-11-30 3:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-29 17:33 sorting by filename with find-dired Roland Winkler
2017-11-29 17:40 ` Drew Adams
2017-11-29 17:57 ` Roland Winkler
2017-11-29 18:58 ` Drew Adams
2017-11-29 19:19 ` Eli Zaretskii
2017-11-29 19:35 ` Glenn Morris
2017-11-29 20:42 ` Roland Winkler
2017-11-29 22:18 ` Stefan Monnier
2017-11-30 3:37 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).