From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#29513: 25.2; find-dired-centinel Date: Fri, 1 Dec 2017 11:48:34 -0600 Message-ID: <38386.76649.232989.23073@gargle.gargle.HOWL> References: <42830.33502.227610.23072@gargle.gargle.HOWL> <87wp26uawl.fsf@web.de> <11f379e3-0125-4c3a-9980-a38b9078cb88@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1512157274 20984 195.159.176.226 (1 Dec 2017 19:41:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Dec 2017 19:41:14 +0000 (UTC) Cc: Michael Heerdegen , 29513@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 01 20:41:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKrBJ-0004wG-7E for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Dec 2017 20:41:05 +0100 Original-Received: from localhost ([::1]:60225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKrBQ-0005kE-Db for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Dec 2017 14:41:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKpR0-0004dL-Tt for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2017 12:49:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKpQt-0006Yf-Si for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2017 12:49:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKpQt-0006YE-OS for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2017 12:49:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eKpQs-0004gI-Ci for bug-gnu-emacs@gnu.org; Fri, 01 Dec 2017 12:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Roland Winkler" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Dec 2017 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29513 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29513-submit@debbugs.gnu.org id=B29513.151215052517970 (code B ref 29513); Fri, 01 Dec 2017 17:49:02 +0000 Original-Received: (at 29513) by debbugs.gnu.org; 1 Dec 2017 17:48:45 +0000 Original-Received: from localhost ([127.0.0.1]:40355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKpQb-0004fm-3s for submit@debbugs.gnu.org; Fri, 01 Dec 2017 12:48:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKpQa-0004fb-6W for 29513@debbugs.gnu.org; Fri, 01 Dec 2017 12:48:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKpQR-0006KU-MK for 29513@debbugs.gnu.org; Fri, 01 Dec 2017 12:48:38 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKpQR-0006KQ-IR; Fri, 01 Dec 2017 12:48:35 -0500 Original-Received: from lukas.physics.niu.edu ([131.156.224.124]:39438 helo=lukas) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1eKpQR-0006ec-6s; Fri, 01 Dec 2017 12:48:35 -0500 In-Reply-To: <11f379e3-0125-4c3a-9980-a38b9078cb88@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140595 Archived-At: 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.)