From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 3431e82: Ignore directory symlinks in directory-files-recursively Date: Sun, 21 Dec 2014 12:57:44 +0100 Message-ID: <87vbl5z03r.fsf@building.gnus.org> 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 1419163151 9442 80.91.229.3 (21 Dec 2014 11:59:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Dec 2014 11:59:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 21 12:59:05 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 1Y2fA8-0006M2-4S for ged-emacs-devel@m.gmane.org; Sun, 21 Dec 2014 12:59:04 +0100 Original-Received: from localhost ([::1]:37112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2fA7-0000DB-D3 for ged-emacs-devel@m.gmane.org; Sun, 21 Dec 2014 06:59:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2f9q-00006w-CH for emacs-devel@gnu.org; Sun, 21 Dec 2014 06:58:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2f9h-00051x-NS for emacs-devel@gnu.org; Sun, 21 Dec 2014 06:58:46 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:40525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2f9h-00051n-GX for emacs-devel@gnu.org; Sun, 21 Dec 2014 06:58:37 -0500 Original-Received: from [138.62.237.24] (helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Y2f9L-0000m6-OV; Sun, 21 Dec 2014 12:58:19 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEXX08yRjIX+/v0oKi6T maX///9SRjtSXW2OfGFqaWmNTVvhAAACSUlEQVQ4jcWUwWrcMBCGtYtLyG0HRBLdFpM+gUFLbhJV 2vq6kAcwLnJ97MVCx0AOyVHEWJ237YycTWhJzh0MWutj/vk9M6y4+yDE/wb16eVYnhMwW+fqer+t r+t9VV+b+gSsdM6BdABWgZPz7gUct/WWEuq9oKPEKWM27lpsKiHdP8WNEXshxN5Uf4OjeDc+iSMi gsKMmIBtWI8cBJKiM2V+SwDmDSDG9AIwJedeQciRfqwACUzlJJADgVgoVQNYThkAOQwEuJQ0Fl9B RCo/TZSRpJVGLRhCKDXoKk9+8AGB7KoGfYwjgaZEfyhuQdoF4yql/ZDJVJQKpbO2WshgjkWKImCc gYCrzFcqkcMKuFpkoStw9oyUJn9LUnEgHxiSUlePP505ZzOc4cMwhBCHlC6eHu9h10a6X4E/BHJE n50sPEGOdL+Cpu9cAqXgN8BGUXNWMMS+STBiBqlAim+k4L2+ZVeDR3UI0ygBHqrLSXsFigCVQrXo ZRmTsyDa3NEmKZIqAyQQf+GD3RH44SiVQIu4jL1+HjuFqqvUJWU4S8CU5ob+Bse5nW2bR2kdZ5iW tXA5LHpUpq0ub16A23A386SJz4ImguSagRSQIPcDDZDXiqZIEgw60Sa40Gh5fjaBA5sDd9ebs6gS Lw4Hjfd7Wifo5y+NHyib5kedxHvVrWCEZx66HyIvK60xGV8BLl4z0pE3W+lGqwKaG9/7HJggOW29 7kRpSXPw1P8w9ax3vhEwO7F3DHQBHL5pDr3mxaNe3dXvxucP/xn+AMAjfGPrdBE8AAAAAElFTkSu QmCC X-Now-Playing: burn's _306 (Back to the 80s)_: "Split!Oval, _Liturgy!02-Oval_-_Kreak" In-Reply-To: (Stefan Monnier's message of "Sun, 14 Dec 2014 09:27:10 -0500") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1Y2f9L-0000m6-OV MailScanner-NULL-Check: 1419767900.09184@J3YpcyLbQtl73ZvP1WXXsQ 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:180425 Archived-At: Stefan Monnier writes: >> And I don't like passing in the DIR and LEAF separately. > > It can avoid calling expand-file-name only to call file-name-directory > (or file-name-nondirectory) right after. It can, but in the use cases I've typically seen, you wouldn't do that, I think? You'd say `(directory-name-p file)' and then... something... >> -(defun directory-files-recursively (dir match &optional include-directories) >> +(defun directory-files-recursively (dir match &optional >> + include-directories predicate) > > Can we reduce the number of arguments? That would be nice, but I'm not sure what to remove. The canonical, that most of the callers use (from the other versions of this function included in various packages in Emacs) is (directory-files-recursively "~/" "~\\'") or something. And then there are a couple that want the directories, too. And then there's `file-tree-walk', which is the new thing. Uhm... we could make MATCH be the predicate if it's not a string? >> (path (expand-file-name leaf dir))) > > This is not a "path", it's a file name. Remember: by convention > a "path" is a list of directories, as in load-path, $PATH, etc... Right. But do we have a word for "string that designates either a file or a directory"? That's usually called "a path"... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/