From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#976: 23.0.60; incorrect code for filesets-get-filelist Date: Sat, 13 Sep 2008 09:40:59 -0700 Message-ID: <002901c915bf$811df210$0200a8c0@us.oracle.com> Reply-To: Drew Adams , 976@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1221325682 8865 80.91.229.12 (13 Sep 2008 17:08:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Sep 2008 17:08:02 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 13 19:08:57 2008 Return-path: Envelope-to: geb-bug-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 1KeYc4-00073P-K6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Sep 2008 19:08:49 +0200 Original-Received: from localhost ([127.0.0.1]:45947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeYb3-0002et-BZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 13 Sep 2008 13:07:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeYay-0002eP-R4 for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2008 13:07:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeYax-0002e6-21 for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2008 13:07:40 -0400 Original-Received: from [199.232.76.173] (port=36335 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeYaw-0002e3-Q3 for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2008 13:07:38 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43383) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KeYaw-0008S5-CK for bug-gnu-emacs@gnu.org; Sat, 13 Sep 2008 13:07:38 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8DH7Xo4021550; Sat, 13 Sep 2008 10:07:34 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8DGo4EH014331; Sat, 13 Sep 2008 09:50:04 -0700 X-Loop: don@donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 13 Sep 2008 16:50:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 976 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122132407011956 (code B ref -1); Sat, 13 Sep 2008 16:50:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 13 Sep 2008 16:41:10 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8DGf5S7011950 for ; Sat, 13 Sep 2008 09:41:07 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:57008 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KeY9S-0000Yg-Bg for emacs-pretest-bug@gnu.org; Sat, 13 Sep 2008 12:39:14 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KeYBB-0004EU-3I for emacs-pretest-bug@gnu.org; Sat, 13 Sep 2008 12:41:04 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]:17202) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KeYBA-0004Cs-4Y for emacs-pretest-bug@gnu.org; Sat, 13 Sep 2008 12:41:00 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m8DGeoWf024917 for ; Sat, 13 Sep 2008 11:40:50 -0500 Original-Received: from acsmt701.oracle.com (acsmt701.oracle.com [141.146.40.71]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m8DGensx018593 for ; Sat, 13 Sep 2008 10:40:50 -0600 Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Sep 2008 09:40:49 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AckVv4Ci1hEH5okgSQ2EUXtBuurWgg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 13 Sep 2008 13:07:40 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20528 gmane.emacs.pretest.bugs:23048 Archived-At: The part that treats a :tree of the code defining `filesets-get-filelist' is not correct and never could have been correct. And it does not correspond to the (correct) code from the filesets author. One wonders if the GNU Emacs code was ever tested. This is the `case' clause that treats :tree in the definition of `filesets-get-filelist': ((:tree) (let ((dir (nth 0 entry)) (patt (nth 1 entry))) (filesets-directory-files dir patt ':files t))) But `entry' here is a complete fileset, which is of the form ("my-fs" (:tree "/some/directory" "^.+\.suffix$")) The above code thus tries to use "my-fs" as the directory, whereas it should use "/some/directory". This is the (correct) code in the latest version from the author (http://members.a1.net/t.link/CompEmacsFilesets.html). (The comment is from the author.) ((:tree) ;;well, the way trees are handled is a mess +++ (let* ((dirpatt (if (consp (nth 1 entry)) (filesets-entry-get-tree entry) entry)) (dir (nth 0 dirpatt)) (patt (nth 1 dirpatt))) (filesets-list-dir dir patt ':files t))) However, I think the following would be sufficient: ((:tree) (let* ((dirpatt (filesets-entry-get-tree entry)) (dir (nth 0 dirpatt)) (patt (nth 1 dirpatt))) (filesets-directory-files dir patt ':files t))) I don't see why the author's more complex treatment would ever be needed, since in order for the :tree clause of the `case' to be reached (consp (nth 1 entry)) must be a cons, AFAICT. At any rate, either the author's code or what I suggest immediately above is needed. There is no way that the current GNU Emacs code can work with a :tree fileset. In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-09-03 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping'