From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrew Hyatt Newsgroups: gmane.emacs.bugs Subject: bug#976: 23.0.60; incorrect code for filesets-get-filelist Date: Tue, 29 Dec 2015 20:16:12 -0500 Message-ID: References: <002901c915bf$811df210$0200a8c0@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1451438248 7213 80.91.229.3 (30 Dec 2015 01:17:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2015 01:17:28 +0000 (UTC) Cc: 976@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 30 02:17:17 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1aE5O7-0003hs-4J for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Dec 2015 02:17:15 +0100 Original-Received: from localhost ([::1]:50852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE5O3-0003cP-95 for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Dec 2015 20:17:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE5Nz-0003by-QQ for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 20:17:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aE5Nu-0006N2-PI for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 20:17:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE5Nu-0006Mt-Bj for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 20:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aE5Nu-0006kq-80 for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2015 20:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrew Hyatt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 01:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 976 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 976-submit@debbugs.gnu.org id=B976.145143818425910 (code B ref 976); Wed, 30 Dec 2015 01:17:02 +0000 Original-Received: (at 976) by debbugs.gnu.org; 30 Dec 2015 01:16:24 +0000 Original-Received: from localhost ([127.0.0.1]:49157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE5NI-0006jq-Kr for submit@debbugs.gnu.org; Tue, 29 Dec 2015 20:16:24 -0500 Original-Received: from mail-qg0-f46.google.com ([209.85.192.46]:35345) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aE5NG-0006ja-4J for 976@debbugs.gnu.org; Tue, 29 Dec 2015 20:16:22 -0500 Original-Received: by mail-qg0-f46.google.com with SMTP id o11so175965242qge.2 for <976@debbugs.gnu.org>; Tue, 29 Dec 2015 17:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=2khpXcwQLL6g++ID82Ffrl+hW30hIlZAB9rJuEm0e2k=; b=pyFXjJeINYaUPEB+44cyVes9L27FqlAZazHL1ilDgbUue+dZo7Yq/zXUBZ/Z8M0vuA nYM+ilmurMQh2b6ZLr6ZXJYgGtiUNrHvRxKdiwPElsUVkndYXiGjFJbLrpksi4ZCkerC 6lS5oPiy42l5PRv1BLDbTqtmFv6IUfInuLXTtXEHsq5c57KbW4s+z4pfqOinkoIbV4iv EXtMohFpdiCtraSzSspjW8TK7gkMyTMhN3z11mWOqLZ9lXo10U5cdn2o6qigcLq9omgB tbsasnvSpbYWBT8Jl5BKDh2wSmcx4ELc7HvNb/2DQMPGMU7KZReyY98M4gddw8ap9khU /o/g== X-Received: by 10.140.109.247 with SMTP id l110mr25658106qgf.52.1451438176840; Tue, 29 Dec 2015 17:16:16 -0800 (PST) Original-Received: from Andrews-MacBook-Pro.local.ahyatt-laptop (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id e92sm25791489qge.2.2015.12.29.17.16.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Dec 2015 17:16:14 -0800 (PST) In-Reply-To: <002901c915bf$811df210$0200a8c0@us.oracle.com> (Drew Adams's message of "Sat, 13 Sep 2008 09:40:59 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110998 Archived-At: "Drew Adams" writes: > 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". I'm looking into whether this still exists in Emacs 25. The code still is as you describe. Can you give steps to reproduce a user-visible bug? > > 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' >