all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 3431e82: Ignore directory symlinks in directory-files-recursively
Date: Sat, 13 Dec 2014 16:01:07 +0100	[thread overview]
Message-ID: <m3fvcj387g.fsf@stories.gnus.org> (raw)
In-Reply-To: <jwvoar8vs3g.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Fri, 12 Dec 2014 09:57:55 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> 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



  reply	other threads:[~2014-12-13 15:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20141212105304.4186.22515@vcs.savannah.gnu.org>
     [not found] ` <E1XzNqL-000168-2E@vcs.savannah.gnu.org>
2014-12-12 14:57   ` [Emacs-diffs] master 3431e82: Ignore directory symlinks in directory-files-recursively Stefan Monnier
2014-12-13 15:01     ` Lars Magne Ingebrigtsen [this message]
2014-12-14  4:59       ` Stefan Monnier
2014-12-14  9:33         ` Lars Magne Ingebrigtsen
2014-12-14 14:27           ` Stefan Monnier
2014-12-21 11:57             ` Lars Ingebrigtsen
2014-12-22  3:02               ` Stefan Monnier
2015-01-16  0:08                 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3fvcj387g.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.