From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Nordl=F6w?= Newsgroups: gmane.emacs.help Subject: File System Traversal Map/Collect Date: Sat, 31 May 2008 16:03:10 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3f98cb6c-74c5-48de-b3cc-e944caf72b45@25g2000hsx.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1212277247 20222 80.91.229.12 (31 May 2008 23:40:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2008 23:40:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 01 01:41:29 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K2ahU-0006mY-9y for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Jun 2008 01:41:28 +0200 Original-Received: from localhost ([127.0.0.1]:34606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2agi-0000Xn-3D for geh-help-gnu-emacs@m.gmane.org; Sat, 31 May 2008 19:40:40 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!25g2000hsx.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 81.170.250.228 Original-X-Trace: posting.google.com 1212274991 15424 127.0.0.1 (31 May 2008 23:03:11 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 31 May 2008 23:03:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 25g2000hsx.googlegroups.com; posting-host=81.170.250.228; posting-account=ytJKAgoAAAA1tg4ScoRszebXiIldA5vg User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; sv-SE; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:159031 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54394 Archived-At: I am trying to construct a general file system traversal function which operates (map/collect) on each file using a function as argument. Such a function could be query-replace-regexp() specializing it to the functions found in findr.el. If have looked at findr.el but I find its common-lisp-inner-loop difficult to understand; Clearly not functional programming. I understand why some want to clean out the common-lisp parts of GNU Emacs. Basically I am recursively calling directory-files(). I would like the function to support both breadth- and depth-first traversals. Does such a logic already exist somewhere? My own current main motivation is that I want to extend the functionality of findr.el to skip certain directory- and file- patterns. I would also, if possible, generalize its use through TRAMP using tramp-handle-directory-files() instead of directory-files(). Thanks in advance, Nordl=F6w