From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 3431e82: Ignore directory symlinks in directory-files-recursively Date: Sat, 13 Dec 2014 16:01:07 +0100 Message-ID: References: <20141212105304.4186.22515@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418482925 11996 80.91.229.3 (13 Dec 2014 15:02:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Dec 2014 15:02:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 13 16:01:59 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XzoCj-0004cr-Q9 for ged-emacs-devel@m.gmane.org; Sat, 13 Dec 2014 16:01:57 +0100 Original-Received: from localhost ([::1]:33374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzoCj-00040g-2b for ged-emacs-devel@m.gmane.org; Sat, 13 Dec 2014 10:01:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzoCQ-00040Z-BR for emacs-devel@gnu.org; Sat, 13 Dec 2014 10:01:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzoCL-0007tN-1D for emacs-devel@gnu.org; Sat, 13 Dec 2014 10:01:38 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:56329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzoCK-0007tF-Qd for emacs-devel@gnu.org; Sat, 13 Dec 2014 10:01:32 -0500 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XzoBw-0002OC-1g; Sat, 13 Dec 2014 16:01:08 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVYAAD//xhVAAD79g2g omybxuvt8DZvLxdyAgX//wChz+7+/QWx1Mza5Gb//1/8+QkbWWcsAAACIElEQVQ4ja3TMYjTUBgH 8NDlXIUjcqggzyFugssZ5AZFDjq5NAjFRdTCYQvaA025wdKlbw0pkY+oxUGHR244xEoIIkKv0t7r IEqhkGwuzg5HuaF+Ly+5JvVu81ua/n/53vdeQhQ4pZT/CK4PgX4SqKpa+53P3Bg+7zPjIJc7o5mA j4ZhDHPw6t6ej/DIMMrTPLD7awhVzr1lGOBaSq9y9gYsgbd24jleMzY9DQ6y4K4/eb6dwNcs3CJY QhzG3mbgkLYIUchODO8X0DUppYU60QCsHLykbUrFYg2wGdtdwHUqc3IZujkwqVmIoS1m7EInAZua 9Tg/Q3WXMQ9+JdChMr9CqS6WsvqKL2c307xdBMbGb46BaJhfwh3QBi41WQJsoGYDz/E9A1jifmoW LeY9dlLokDpuSFRdtzhXIQWb1GXeIr4zjvZgNQFIGlqaBtY4OgI7hWv4aCltEu0qOJUJBik4CIpS ICs6OKs3M4DvCYGQZ3jPuadZsJviIWo6wqedLMB6s6Cs3MEL6/CFnwX48HBTj8f1GnlIy+lszxBm /0Dt52096XDDYU+t1CKsynmo8m+bCYR8HHpsxGQZrL8lwY6iMCy/Kyfg8VJRzrAuTFR130irP4rh KO6IavxYSsbdoYRudTzYWHSU4m8vhtpk0AsXLYYxFYDTH4QTuDgIcL+cY8x/QAKwsSU/bnGmuTyy hHy5QRB8QRC/mRj/BfP5n78pcXcUdgI4cgAAAABJRU5ErkJggg== X-Now-Playing: A New Line (Related)'s _A Roomful of Lovers_: "A Roomful of Lovers (Miles Whittaker edit)" X-Hashcash: 1:23:141213:monnier@iro.umontreal.ca::vLSS5EOuo+ytYDuC:0000000000000000000000000000000000000UzgD X-Hashcash: 1:23:141213:emacs-devel@gnu.org::PuOnVTdbIZfWTxGA:000000000000000000000000000000000000000000odRT In-Reply-To: (Stefan Monnier's message of "Fri, 12 Dec 2014 09:57:55 -0500") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1XzoBw-0002OC-1g MailScanner-NULL-Check: 1419087669.80294@fb0sqPoYnYTwVWoCwh+XHA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:180006 Archived-At: Stefan Monnier writes: >> Ignore directory symlinks in directory-files-recursively > > Could you work on merging file-tree-walk and > directory-files-recursively? As you pointed out, `file-tree-walk' has the nice property that it can stop recursing based on a predicate, so implementing it on `directory-files-recursively' would not be optimal. On the other hand, the interface for `file-tree-walk' is not what people usually want -- they just want a list of matching files. I grepped for "defun.*recurs" and there's a lot of functions basically implementing `directory-files-recursively'. Here are the first four: cedet-files-list-recursively find-lisp-find-files gnus-recursive-directory-files nnfolder-recursive-directory-files Doing it the other way around would almost be possible, but `directory-files-recursively' guarantees that leaves are returned before directories so that implementing "rm -r" is just a `mapc' over the returned values. And `file-tree-walk' doesn't call the callback function in that order, so it's fiddly. Besides, we don't have copyright paperwork for `file-tree-walk'. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no