From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 3431e82: Ignore directory symlinks in directory-files-recursively Date: Sun, 14 Dec 2014 09:27:10 -0500 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 1418567268 7043 80.91.229.3 (14 Dec 2014 14:27:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2014 14:27:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 14 15:27:40 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 1Y0A95-000581-1t for ged-emacs-devel@m.gmane.org; Sun, 14 Dec 2014 15:27:39 +0100 Original-Received: from localhost ([::1]:36160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0A94-0000Pe-Ko for ged-emacs-devel@m.gmane.org; Sun, 14 Dec 2014 09:27:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0A8k-0000OS-RW for emacs-devel@gnu.org; Sun, 14 Dec 2014 09:27:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0A8d-0002Vq-BQ for emacs-devel@gnu.org; Sun, 14 Dec 2014 09:27:18 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:27772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0A8d-0002Vj-7x for emacs-devel@gnu.org; Sun, 14 Dec 2014 09:27:11 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsPAOwQflTO+ILA/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBAQEGAQEBAR6QbweESAWLAYNhjlCDOI5FgXiCN4FiIYJ3AQEB X-IPAS-Result: AjsPAOwQflTO+ILA/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSSISgnWWQEBAQEGAQEBAR6QbweESAWLAYNhjlCDOI5FgXiCN4FiIYJ3AQEB X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="101347641" Original-Received: from 206-248-130-192.dsl.teksavvy.com (HELO pastel.home) ([206.248.130.192]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Dec 2014 09:27:10 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 7B899175E; Sun, 14 Dec 2014 09:27:10 -0500 (EST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 14 Dec 2014 10:33:39 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:180081 Archived-At: > The interface isn't the same, though. I think we should perhaps ignore > the non-lexical case and get rid of the ARGS argument. Supplying a > lexical lambda predicate just makes more sense. Agreed. > 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. > -(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? > "Return all files under DIR that have file names matching MATCH (a regexp). Please specify more precisely how MATCH is used (whether it's compared to the "leaf" only, or the full absolute file name, or ...). > (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... Stefan