[Top][All Lists]

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

Re: [Emacs-diffs] master 11cf3e9: Implement a new function directory-fil

From: Lars Magne Ingebrigtsen
Subject: Re: [Emacs-diffs] master 11cf3e9: Implement a new function directory-files-recursively
Date: Wed, 10 Dec 2014 05:39:04 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Eric's version allows precise control those subdirectories in which we
> want to recurse and those in which we don't.  This is a very
> important functionality.

Oh, I missed that.  It was buried rather far down in the doc string...

> And here you make the same mistake that I already pointed out to Eric:
> using directory-files followed by file-directory-p on each file is about
> 10 times slower than using file-name-all-completions and checking the
> presence of a final / instead.

I peeked quickly at 

(file-name-all-completions FILE DIRECTORY)

Return a list of all completions of file name FILE in directory DIRECTORY.
These are all file names in directory DIRECTORY which begin with FILE.

and it was not immediately obvious to me how this would help here.  Can
FILE be "" to get all files in a directory?  I guess so.

I've now rewritten the function to use that instead.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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