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

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

bug#29513: 25.2; find-dired-centinel


From: Roland Winkler
Subject: bug#29513: 25.2; find-dired-centinel
Date: Fri, 1 Dec 2017 11:48:34 -0600

On Fri Dec 1 2017 Drew Adams wrote:
> > If we do this - wouldn't supporting other sort predicates also make
> > sense (e.g. sort by last change time)?
> 
> My thought exactly.  Pretty much anywhere we sort stuff
> it makes sense to ask ourselves whether it might be
> good to let users specify the sort predicate/order.

Fine with me, I'd be happy to be able to use such a feature.
The only question is how to achieve that.  The point is that (as far
as I understand these things) something like dired-sort-toggle-or-edit
ultimately relies on the shell command ls to sort its output.

Sorting the output of find by predicates such as last change time
requires to parse its output more carefully.  I believe that
currently dired's parsing capabilities are restricted to identifying
the file name, and my patch for find-dired-sentinel relies on that.

In other words, other predicates require somewhat more work than my
patch.

(All this reminds me of when I wrote proced.el years ago.  Initially
this code relied on the shell command ps that comes with zillions of
flavors on different OSs, which made the code rather fragile.
Things got much cleaner when Eli wrote the built-ins
list-system-processes and process-attributes (thank you Eli!!).  But
I expect that we do not want to re-invent the shell command find for
Emacs.  -- Phrased differently: I do not know how many flavors of
find we may have to cover to sort its output by predicates such as
last change time.)





reply via email to

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