GNU bug report logs - #976
23.0.60; incorrect code for filesets-get-filelist

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Drew Adams" <drew.adams@HIDDEN>; dated Sat, 13 Sep 2008 16:50:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 976 <at> debbugs.gnu.org:


Received: (at 976) by debbugs.gnu.org; 30 Dec 2015 02:56:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 29 21:56:40 2015
Received: from localhost ([127.0.0.1]:49188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aE6wJ-0000la-WE
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2015 21:56:40 -0500
Received: from mail-qk0-f175.google.com ([209.85.220.175]:33726)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <ahyatt@HIDDEN>) id 1aE6wI-0000lL-5D
 for 976 <at> debbugs.gnu.org; Tue, 29 Dec 2015 21:56:38 -0500
Received: by mail-qk0-f175.google.com with SMTP id p186so9557179qke.0
 for <976 <at> debbugs.gnu.org>; Tue, 29 Dec 2015 18:56:38 -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=vzagBzlNXqgnr1EC+4MHMeQdxlipkK9E54kkneP9zEg=;
 b=RW4NKf8uZDnxbftJLQJOQzl/XUqxLISs3ZO84uis6KUxSwWESuLgaieSh5We0jOop7
 FlJg9e6oXRzGTwOZmrvEX1JymaosuR3NO3HJ6BSl6uQdH6xlBsUa/1e0hSSjG30B/o0m
 tVAEXDU8n0hegaLvXHLvG9efoYaYr/dlWXMoTb/9a4TE75k51oFhY8hfXVLhtbIbYKJT
 UYyhv282YjLkEzcseu+oZptPrBH5c05EDZoBswh7q9gBrEmW3NLRHY0F0zisWlMrs+cJ
 kwLOvDUPHj2MDWq10q3K+sTXK8z3smKy/+4wetRx2UCN7N9IIRV9EkWv8vPXb/gt4iEG
 gBIg==
X-Received: by 10.55.201.25 with SMTP id q25mr23867553qki.13.1451444192653;
 Tue, 29 Dec 2015 18:56:32 -0800 (PST)
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 p17sm30148376qhb.34.2015.12.29.18.56.30
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 29 Dec 2015 18:56:30 -0800 (PST)
From: Andrew Hyatt <ahyatt@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#976: 23.0.60; incorrect code for filesets-get-filelist
References: <002901c915bf$811df210$0200a8c0@HIDDEN>
 <m2fuykivmr.fsf@HIDDEN> <db1c1633-2644-438f-adfd-5c75fd2fa899@default>
Date: Tue, 29 Dec 2015 21:56:29 -0500
In-Reply-To: <db1c1633-2644-438f-adfd-5c75fd2fa899@default> (Drew Adams's
 message of "Tue, 29 Dec 2015 17:32:56 -0800 (PST)")
Message-ID: <m27fjwiqzm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 976
Cc: 976 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Drew Adams <drew.adams@HIDDEN> writes:

>> 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?
>
> My guess is that no one has changed the filesets code, so yes,
> I'm pretty sure the problem is still there as reported.
>
> The user-visible bug is what I described.  See the original
> report, which is quite detailed wrt the problem.
>
> See also the version of `filesets-get-filelist' that I sent (in
> attachment throw.el).  It should be a fix.  If it does not fix
> everything 100%, it is at least an improvement over the current
> code, which is completely broken for :tree.
>
> You can also contact the original author of filesets.el.  As I
> said in the bug report, the GNU Emacs version does not respect
> what the author wrote, and it cannot possibly work (e.g., for
> :tree).
>
> I can't really help more than this now.  I'm sure someone on
> the Emacs Dev team can fix it, but there is not much interest
> in filesets, it seems.
>
> Apparently there was only one person (Chong Yidong) who took a
> look at the bug report, and he just asked someone else to look
> into it.  And that person never followed up (didn't even reply
> to Yidong's request, apparently).

OK, thanks for the reply.  The original report seems lost (the bug
report at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=976 starts with
your response, in fact).  But given what you've already provided, it
seems that someone familiar with filesets can reproduce and test your
fix.  We'll leave the bug open until someone gets to it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#976; Package emacs. Full text available.

Message received at 976 <at> debbugs.gnu.org:


Received: (at 976) by debbugs.gnu.org; 30 Dec 2015 01:33:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 29 20:33:09 2015
Received: from localhost ([127.0.0.1]:49168 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aE5dV-0007A9-Dz
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2015 20:33:09 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:32616)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <drew.adams@HIDDEN>) id 1aE5dT-00079w-FS
 for 976 <at> debbugs.gnu.org; Tue, 29 Dec 2015 20:33:07 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 tBU1Ww7v010433
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Wed, 30 Dec 2015 01:32:59 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tBU1WwQc014244
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Wed, 30 Dec 2015 01:32:58 GMT
Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21])
 by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id tBU1WwV7008428;
 Wed, 30 Dec 2015 01:32:58 GMT
MIME-Version: 1.0
Message-ID: <db1c1633-2644-438f-adfd-5c75fd2fa899@default>
Date: Tue, 29 Dec 2015 17:32:56 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Andrew Hyatt <ahyatt@HIDDEN>
Subject: RE: bug#976: 23.0.60; incorrect code for filesets-get-filelist
References: <002901c915bf$811df210$0200a8c0@HIDDEN>
 <m2fuykivmr.fsf@HIDDEN>
In-Reply-To: <m2fuykivmr.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 976
Cc: 976 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> 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?

My guess is that no one has changed the filesets code, so yes,
I'm pretty sure the problem is still there as reported.

The user-visible bug is what I described.  See the original
report, which is quite detailed wrt the problem.

See also the version of `filesets-get-filelist' that I sent (in
attachment throw.el).  It should be a fix.  If it does not fix
everything 100%, it is at least an improvement over the current
code, which is completely broken for :tree.

You can also contact the original author of filesets.el.  As I
said in the bug report, the GNU Emacs version does not respect
what the author wrote, and it cannot possibly work (e.g., for
:tree).

I can't really help more than this now.  I'm sure someone on
the Emacs Dev team can fix it, but there is not much interest
in filesets, it seems.

Apparently there was only one person (Chong Yidong) who took a
look at the bug report, and he just asked someone else to look
into it.  And that person never followed up (didn't even reply
to Yidong's request, apparently).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#976; Package emacs. Full text available.

Message received at 976 <at> debbugs.gnu.org:


Received: (at 976) by debbugs.gnu.org; 30 Dec 2015 01:16:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 29 20:16:24 2015
Received: from localhost ([127.0.0.1]:49157 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aE5NI-0006jq-Kr
	for submit <at> debbugs.gnu.org; Tue, 29 Dec 2015 20:16:24 -0500
Received: from mail-qg0-f46.google.com ([209.85.192.46]:35345)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <ahyatt@HIDDEN>) id 1aE5NG-0006ja-4J
 for 976 <at> debbugs.gnu.org; Tue, 29 Dec 2015 20:16:22 -0500
Received: by mail-qg0-f46.google.com with SMTP id o11so175965242qge.2
 for <976 <at> 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)
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)
From: Andrew Hyatt <ahyatt@HIDDEN>
To: "Drew Adams" <drew.adams@HIDDEN>
Subject: Re: bug#976: 23.0.60; incorrect code for filesets-get-filelist
References: <002901c915bf$811df210$0200a8c0@HIDDEN>
Date: Tue, 29 Dec 2015 20:16:12 -0500
In-Reply-To: <002901c915bf$811df210$0200a8c0@HIDDEN> (Drew Adams's
 message of "Sat, 13 Sep 2008 09:40:59 -0700")
Message-ID: <m2fuykivmr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 976
Cc: 976 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

"Drew Adams" <drew.adams@HIDDEN> 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'
>  




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-4.0 required=4.0 tests=BAYES_00 autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 976) by emacsbugs.donarmstrong.com; 19 Sep 2008 07:58:39 +0000
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8J7wYPC016610
	for <976@HIDDEN>; Fri, 19 Sep 2008 00:58:35 -0700
Received: (qmail invoked by alias); 19 Sep 2008 07:58:27 -0000
Received: from mk090152180002.a1.net (EHLO [90.152.180.2]) [90.152.180.2]
  by mail.gmx.net (mp007) with SMTP; 19 Sep 2008 09:58:27 +0200
X-Authenticated: #6654488
X-Provags-ID: V01U2FsdGVkX19WSrsvHqZWmhULgl9cPvDVPRyPVcaMtRItDhwiw8
	ihqhD1/h3ZTAf/
Message-ID: <48D35BA1.9060602@HIDDEN>
Date: Fri, 19 Sep 2008 09:58:25 +0200
From: Thomas Link <t.link@HIDDEN>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: cyd@HIDDEN
CC: 976 <at> debbugs.gnu.org, drew.adams@HIDDEN
Subject: Re: 23.0.60; incorrect code for filesets-get-filelist
References: <20080919000709.s4thfhu7pqo84kwk@HIDDEN>
In-Reply-To: <20080919000709.s4thfhu7pqo84kwk@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-FuHaFi: 0.55

cyd@HIDDEN wrote:
> Hi Thomas,
>
> Could you take a look at the following bug report about filesets.el?
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=
Since I don't have emacs accessible right now I'm not sure my comment 
are of much help. What I'm writing below is based on how I remember the 
code worked.

> ((: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)))
>   
It's possible this could be explained with my effort to maintain 
backward-compatibility with older versions of filesets with regard to 
values defined via the defcustom interface. Or maybe a problem with 
filesets-build-dir-submenu-now?

> The original code is completely broken
Well, it definitely worked for me when I last tried it -- but that was 4 
years ago. I rememb



> In my previously suggested code,
> `filesets-get-filelist' does the same thing for type :tree as for type :pattern
> - it returns only the files in the directory, not also the files in its
> subdirectories.
>   
When changing filesets-get-filelist, please also take a look at 
filesets-build-dir-submenu-now, which actually builds the tree in the menu.

:tree rebuilds a directory structure in the menu. It isn't supposed to 
collect all files in a directory recursively into a single fileset. So, 
every directory corresponds to one "virtual" fileset.


> The attached code might help you in fixing this
If I understand it right, this code tries to achieve something slightly 
different in collecting all files under a directory in one single 
fileset. Interesting idea. If emacs glob patterns understood something 
like "dir/**" (I assume it doesn't?), this could be done with :pattern, 
I suppose.


> In particular, I had some problems
> byte-compiling. It would be great if the version (1.8.4) in GNU Emacs could be 
> upgraded.
>   
For the latest version, everything emacs-specific is supposed to be 
located in filesets-emacs.el, which should be loaded instead of 
filesets(2).el. If igrep is xemacs-specific, it's in filesets2.el by 
accident. (It's possible that I didn't test the last version with emacs 
because of problems with cl.)


> There is no explanation of the Filesets menu items. There is an
> `About' item with a link to a non-GNU Web page
This should probably open the info page then.


>  What is the meaning of `#' and `+' in front of the
> submenus
These are keyboard shortcuts for easier navigation. If this makes sense, 
depends on whether the gui toolkit supports accelerator keys.


>  - Filesets Menu In Menu
>   
In case users don't want to clutter the main menu bar with an additional 
menu, users can select a parent menu.

>  - Filesets Menu Shortcuts Marker
>   
If the gui toolkit doesn't support accelerator keys (as they are 
commonly used on ms windows but also kde or gnome), this should be an 
empty string maybe.

>  - Filesets Menu Cache Contents
>  - Filesets Menu Cache Contents (needs to be explained better)
>   

>  - Filesets Cache Hostname Flag
>   
This may be useful if you sync emacs configuration files between hosts.

>  - Filesets Browse Dir Function (external command not clear)
>   

>  - Filesets Find File Delay (what for?)
>   
Xemacs-specific work-around.

>  - Filesets Commands (explanation unclear)
>  - Filesets External Viewers (Properties is especially unclear)
>   
This opens files with external viewers depending of file patterns. Are 
all properties unclear?

>  - Filesets Ingroup Patterns
>   
Recognize include-like statements. Only effective for :ingroup filesets. 
ingroup can be thought of as a logical tree of documents -- regardless 
of where the files are located physically. The root of an ingroup could, 
e.g., be an master tex file.

HTH a little.





Acknowledgement sent to Thomas Link <t.link@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 976) by emacsbugs.donarmstrong.com; 19 Sep 2008 06:58:27 +0000
Received: from agminet01.oracle.com (agminet01.oracle.com [141.146.126.228])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8J6wOql027668
	for <976@HIDDEN>; Thu, 18 Sep 2008 23:58:26 -0700
Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111])
	by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m8J6wGbI028600;
	Fri, 19 Sep 2008 01:58:17 -0500
Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82])
	by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m8J6wE6s024814;
	Fri, 19 Sep 2008 00:58:15 -0600
Received: from dradamslap1 (/24.23.165.218)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Fri, 19 Sep 2008 06:58:14 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <976 <at> debbugs.gnu.org>, <t.link@HIDDEN>
References: <000401c91a21$957bc7d0$0200a8c0@HIDDEN>
Subject: RE: bug#976: Please see bug #965 also (and some minor comments)
Date: Thu, 18 Sep 2008 23:58:14 -0700
Message-ID: <000a01c91a25$16922b40$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <000401c91a21$957bc7d0$0200a8c0@HIDDEN>
Thread-Index: AckaIZToyZFGiEtyT1CDYQr8IHdoigAA1XpA
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Whitelist: TRUE
X-Whitelist: TRUE

Sorry; the mail subject should have been "Please see bug #965 also", not #976.





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA,
	RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 976) by emacsbugs.donarmstrong.com; 19 Sep 2008 06:33:20 +0000
Received: from agminet01.oracle.com (agminet01.oracle.com [141.146.126.228])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8J6XGca019085
	for <976@HIDDEN>; Thu, 18 Sep 2008 23:33:17 -0700
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 m8J6XArH009939;
	Fri, 19 Sep 2008 01:33:10 -0500
Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84])
	by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m8J6X9XO025025;
	Fri, 19 Sep 2008 00:33:09 -0600
Received: from dradamslap1 (/24.23.165.218)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Fri, 19 Sep 2008 06:33:09 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <976 <at> debbugs.gnu.org>, <t.link@HIDDEN>
Subject: Please see bug #976 also (and some minor comments)
Date: Thu, 18 Sep 2008 23:33:09 -0700
Message-ID: <000401c91a21$957bc7d0$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AckaIZToyZFGiEtyT1CDYQr8IHdoig==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Whitelist: TRUE
X-Whitelist: TRUE

Hi Thomas,

It would be great if you could also take a look at bug #965
(http://debbugs.gnu.org/cgi/bugreport.cgi?bug=965), which is
about the Filesets doc in the GNU Emacs manual.


Also, I tried (briefly) to use the more recent version (2.2) on your website
(http://members.a1.net/t.link/CompEmacsFilesets.html), but I was unable to use
it with GNU Emacs (e.g. release 22.2). In particular, I had some problems
byte-compiling. It would be great if the version (1.8.4) in GNU Emacs could be
upgraded.

FWIW, here are a few minor problems I ran into with your version 2.2 (using GNU
Emacs). You might want to take a look:

1. In the defcustom of `filesets-commands': the `igrep' part should be used only
if `igrep' is defined:

("Grep <<selection>>"
     "grep"
     ("-n " filesets-get-quoted-selection " " "<<file-name>>")
     (:textual))
    ,@(and (fboundp 'igrep) ; Do nothing if not defined.
           '(("iGrep <selection>"
              igrep
              (nil filesets-get-selection "<file-list>")
              (:textual :filelist))))

2. In the defcustom for `filesets-menu-path', '("files") should be '("file").
The GNU Emacs version uses nil as the default, which makes `Filesets' a separate
menu-bar menu, but I think it makes more sense to do as you have done: make it a
submenu of the `File' menu.

3. For GNU Emacs, the code in the GNU Emacs version is needed, I think, for the
`eval-and-compile' that defines `filesets-error': `filesets-add-menu' should not
be used, I think.

4. In `filesets-get-selection', I think (and m p) should be (and m p
mark-active).

5. For GNU Emacs at least, the code that uses `beginning-of-buffer' and
`end-of-buffer' should be treated as in the GNU Emacs version.

6. Some doc string typos: `filesets-get-filelist-1': "NAME" -> "ENTRY";
`filesets-set-default(!|+)': spelling.

7. Untested, but I think in `filesets-open' the code should be
(filesets-file-open open-function this name t), not (filesets-file-open
open-function this t). It makes no sense to use `t' for the name, AFAICT, and
there is no call in the file that uses all four args.

8. In `filesets-add-file', (abbreviate-file-name fn t) should be
(abbreviate-file-name fn) for GNU Emacs.

9. In `filesets-build-menu-now', `filesets-add-submenu' should be `add-submenu'
for GNU Emacs (as in the GNU Emacs version).

10. The doc string of `filesets-dired-find-or-display' should be something like
"Find or display the file on this Dired line."

11. FWIW, `filesets-get-filelist-1' is not used anywhere(?). It seems to be a
work in progress.

Thx. I hope someone will have the time to fix this library up a bit. I've
started using filesets recently and I appreciate the feature - thanks. It needs
better doc, though, to help people try it and realize the potential - I think it
has largely gone unnoticed so far by GNU Emacs users. It would be good to have a
little more explanation of the various keywords, preferably with some simple
illustrative examples.

FWIW, I've been playing with filesets in Icicles:
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Persistent_Completions#toc3







Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=AWL,BAYES_00,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 976) by emacsbugs.donarmstrong.com; 19 Sep 2008 04:07:29 +0000
Received: from south-station-annex.mit.edu (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8J47Pnb000612
	for <976@HIDDEN>; Thu, 18 Sep 2008 21:07:27 -0700
Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82])
	by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id m8J47ONK026493;
	Fri, 19 Sep 2008 00:07:24 -0400 (EDT)
Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104])
	by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id m8J47Aa1014366;
	Fri, 19 Sep 2008 00:07:14 -0400 (EDT)
Received: from w92-130-webmail-2.mit.edu (WEBMAIL-SNAT.MIT.EDU [18.7.22.108])
	)
	by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id m8J479Rk003309;
	Fri, 19 Sep 2008 00:07:09 -0400 (EDT)
Received: (from nobody@localhost) by w92-130-webmail-2.mit.edu (8.12.4)
	id m8J4795e012188; Fri, 19 Sep 2008 00:07:09 -0400
Received: from c-24-63-201-57.hsd1.ma.comcast.net
	(c-24-63-201-57.hsd1.ma.comcast.net [24.63.201.57])   (User authenticated
	as cyd@HIDDEN) by webmail.mit.edu (Horde MIME library) with HTTP;
	Fri, 19 Sep 2008 00:07:09 -0400
Message-ID: <20080919000709.s4thfhu7pqo84kwk@HIDDEN>
Date: Fri, 19 Sep 2008 00:07:09 -0400
From: cyd@HIDDEN
To: Thomas Link <t.link@HIDDEN>
Cc: 976 <at> debbugs.gnu.org
Subject: Re: 23.0.60; incorrect code for filesets-get-filelist
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) H3 (4.0.3)
X-Scanned-By: MIMEDefang 2.42

Hi Thomas,

Could you take a look at the following bug report about filesets.el?

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=976

Thanks.




Acknowledgement sent to cyd@HIDDEN:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,NEXTPART,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 976) by emacsbugs.donarmstrong.com; 16 Sep 2008 21:28:10 +0000
Received: from rgminet01.oracle.com (rgminet01.oracle.com [148.87.113.118])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8GLS6af011923
	for <976@HIDDEN>; Tue, 16 Sep 2008 14:28:07 -0700
Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110])
	by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m8GLRwU9020354;
	Tue, 16 Sep 2008 15:27:58 -0600
Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84])
	by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m8GLRvIq021506;
	Tue, 16 Sep 2008 15:27:58 -0600
Received: from dradamslap1 (/141.144.58.96)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Tue, 16 Sep 2008 21:27:57 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <976 <at> debbugs.gnu.org>, <emacs-pretest-bug@HIDDEN>
References: <002901c915bf$811df210$0200a8c0@HIDDEN> <002c01c9183c$fc7e2680$0200a8c0@HIDDEN>
Subject: RE: bug#976: 23.0.60; incorrect code for filesets-get-filelist
Date: Tue, 16 Sep 2008 14:28:35 -0700
Message-ID: <003701c91843$2db4aa20$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0038_01C91808.8155D220"
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <002c01c9183c$fc7e2680$0200a8c0@HIDDEN>
Thread-Index: AckVv4Ci1hEH5okgSQ2EUXtBuurWggCetBEgAAIp8qA=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Whitelist: TRUE
X-Whitelist: TRUE

This is a multi-part message in MIME format.

------=_NextPart_000_0038_01C91808.8155D220
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Sorry for the added noise, but it's probably better for the default behavior to
use absolute filenames. The attached code does that.


> From: Drew Adams Sent: Tuesday, September 16, 2008 1:44 PM
> The attached code might help you in fixing this - if not, 
> ignore it. I haven't
> tested all of the code that calls `filesets-get-filelist', 
> but the version of
> `filesets-get-filelist' attached seems to DTRT, AFAICT.
> 
> The problem with the original code, and with the suggestion I 
> sent earlier, is
> that `filesets-get-filelist' does not DTRT for type :tree. 
> The original code is
> completely broken - does nothing here. In my previously 
> suggested code,
> `filesets-get-filelist' does the same thing for type :tree as 
> for type :pattern
> - it returns only the files in the directory, not also the 
> files in its
> subdirectories.
> 
> See attached file for proposed new definition (with new function
> filesets-files-under).
> 
> HTH
> 
> 
> > From: Drew Adams Sent: Saturday, September 13, 2008 9:41 AM 
> > 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'
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> 

------=_NextPart_000_0038_01C91808.8155D220
Content-Type: application/octet-stream;
	name="throw.el"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="throw.el"

;;; filesets+.el --- Extensions to `filesets.el'.
;;
;; Filename: filesets+.el
;; Description: Extensions to `filesets.el'.
;; Author: Drew Adams
;; Maintainer: Drew Adams
;; Copyright (C) 2008, Drew Adams, all rights reserved.
;; Created: Tue Sep 16 14:11:36 2008 (-0700)
;; Version: 22.0
;; Last-Updated: Tue Sep 16 14:27:01 2008 (-0700)
;;           By: dradams
;;     Update #: 13
;; URL: http://www.emacswiki.org/cgi-bin/wiki/filesets+.el
;; Keywords:
;; Compatibility: GNU Emacs 22.x
;;
;; Features that might be required by this library:
;;
;;   Required feature throw was not provided.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;;  This library provides some fixes to standard library
;;  `filesets.el'.  The reference version of that library is 1.8.4,
;;  but I believe the same fixes are appropriate for other versions
;;  (e.g. 2.2, named `filesets2.el', which is the latest version by
;;  the original author, at
;;  http://members.a1.net/t.link/CompEmacsFilesets.html).
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Change log:
;;
;;
;; 2008/09/16 dadams
;;     Created.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
;; Floor, Boston, MA 02110-1301, USA.;;; Code:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:

(require 'filesets)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defcustom filesets-menu-path '("file") ; Original was nil.
  "The menu under which the filesets menu should be inserted.
See `add-submenu' for documentation."
  :set (function filesets-set-default)
  :type 'sexp :group 'filesets)

(defcustom filesets-menu-before "Open File..." ; Original was "File".
  "The name of a menu before which this menu should be added.
See `add-submenu' for documentation."
  :set (function filesets-set-default)
  :type 'sexp :group 'filesets)

(defun filesets-get-filelist (entry &optional mode event)
  "Get all files for fileset ENTRY.
Assume MODE (see `filesets-entry-mode'), if provided."
  (let* ((mode (or mode (filesets-entry-mode entry)))
         (fl (case mode
               ((:files)   (filesets-entry-get-files entry))
               ((:file)    (list (filesets-entry-get-file entry)))
               ((:ingroup)
                (let ((entry (expand-file-name
                              (if (stringp entry)
                                  entry
                                (filesets-entry-get-master entry)))))
                  (cons entry (filesets-ingroup-cache-get entry))))
               ((:tree)
                (let* ((dirpatt  (filesets-entry-get-tree entry))
                       (dir      (nth 0 dirpatt))
                       (patt     (nth 1 dirpatt))
                       (depth    (or (filesets-entry-get-tree-max-level entry)
                                     filesets-tree-max-level)))
                  (filesets-files-under 0 depth entry dir patt)))
               ((:pattern)
                (let ((dirpatt (filesets-entry-get-pattern entry)))
                  (if dirpatt
                      (let ((dir (filesets-entry-get-pattern--dir dirpatt))
                            (patt (filesets-entry-get-pattern--pattern dirpatt)))
                        (filesets-directory-files dir patt ':files t))
                    (filesets-error 'error "Filesets: malformed entry: "
                                    entry)))))))
    (filesets-filter-list
     fl (lambda (file) (not (filesets-filetype-property file event))))))

(defun filesets-files-under (level depth entry dir patt &optional relativep)
  "Files under DIR that match PATT.
LEVEL is the current level under DIR.
DEPTH is the maximal tree scanning depth for ENTRY.
ENTRY is a fileset.
DIR is a directory.
PATT is a regexp that included file names must match.
RELATIVEP non-nil means use relative file names."
  (and (or (= depth 0) (< level depth))
       (let* ((dir         (file-name-as-directory dir))
              (files-here  (filesets-directory-files
                            dir patt nil (not relativep)
                            (filesets-entry-get-filter-dirs-flag entry)))
              (subdirs     (filesets-filter-dir-names files-here))
              (files
               (filesets-filter-dir-names
                (apply #'append
                       files-here
                       (mapcar
                        (lambda (subdir)
                          (let* ((subdir (file-name-as-directory subdir))
                                 (full-subdir  (concat dir subdir)))
                            (filesets-files-under (+ level 1) depth entry
                                         full-subdir patt)))
                        subdirs))
                t)))
         files)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(provide 'filesets+)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; filesets+.el ends here

------=_NextPart_000_0038_01C91808.8155D220--





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,NEXTPART,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 16 Sep 2008 21:28:28 +0000
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 m8GLSOXQ011943
	for <submit@HIDDEN>; Tue, 16 Sep 2008 14:28:26 -0700
Received: from mail.gnu.org ([199.232.76.166]:38629 helo=mx10.gnu.org)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Kfi44-00045X-IE
	for emacs-pretest-bug@HIDDEN; Tue, 16 Sep 2008 17:26:29 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Kfi5q-0006zC-0R
	for emacs-pretest-bug@HIDDEN; Tue, 16 Sep 2008 17:28:22 -0400
Received: from rgminet01.oracle.com ([148.87.113.118]:30302)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1Kfi5o-0006y2-Um
	for emacs-pretest-bug@HIDDEN; Tue, 16 Sep 2008 17:28:17 -0400
Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110])
	by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m8GLRwU9020354;
	Tue, 16 Sep 2008 15:27:58 -0600
Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84])
	by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m8GLRvIq021506;
	Tue, 16 Sep 2008 15:27:58 -0600
Received: from dradamslap1 (/141.144.58.96)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Tue, 16 Sep 2008 21:27:57 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <976 <at> debbugs.gnu.org>, <emacs-pretest-bug@HIDDEN>
References: <002901c915bf$811df210$0200a8c0@HIDDEN> <002c01c9183c$fc7e2680$0200a8c0@HIDDEN>
Subject: RE: bug#976: 23.0.60; incorrect code for filesets-get-filelist
Date: Tue, 16 Sep 2008 14:28:35 -0700
Message-ID: <003701c91843$2db4aa20$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0038_01C91808.8155D220"
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <002c01c9183c$fc7e2680$0200a8c0@HIDDEN>
Thread-Index: AckVv4Ci1hEH5okgSQ2EUXtBuurWggCetBEgAAIp8qA=
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-CrossAssassin-Score: 2

This is a multi-part message in MIME format.

------=_NextPart_000_0038_01C91808.8155D220
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Sorry for the added noise, but it's probably better for the default behavior to
use absolute filenames. The attached code does that.


> From: Drew Adams Sent: Tuesday, September 16, 2008 1:44 PM
> The attached code might help you in fixing this - if not, 
> ignore it. I haven't
> tested all of the code that calls `filesets-get-filelist', 
> but the version of
> `filesets-get-filelist' attached seems to DTRT, AFAICT.
> 
> The problem with the original code, and with the suggestion I 
> sent earlier, is
> that `filesets-get-filelist' does not DTRT for type :tree. 
> The original code is
> completely broken - does nothing here. In my previously 
> suggested code,
> `filesets-get-filelist' does the same thing for type :tree as 
> for type :pattern
> - it returns only the files in the directory, not also the 
> files in its
> subdirectories.
> 
> See attached file for proposed new definition (with new function
> filesets-files-under).
> 
> HTH
> 
> 
> > From: Drew Adams Sent: Saturday, September 13, 2008 9:41 AM 
> > 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'
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> 

------=_NextPart_000_0038_01C91808.8155D220
Content-Type: application/octet-stream;
	name="throw.el"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="throw.el"

;;; filesets+.el --- Extensions to `filesets.el'.
;;
;; Filename: filesets+.el
;; Description: Extensions to `filesets.el'.
;; Author: Drew Adams
;; Maintainer: Drew Adams
;; Copyright (C) 2008, Drew Adams, all rights reserved.
;; Created: Tue Sep 16 14:11:36 2008 (-0700)
;; Version: 22.0
;; Last-Updated: Tue Sep 16 14:27:01 2008 (-0700)
;;           By: dradams
;;     Update #: 13
;; URL: http://www.emacswiki.org/cgi-bin/wiki/filesets+.el
;; Keywords:
;; Compatibility: GNU Emacs 22.x
;;
;; Features that might be required by this library:
;;
;;   Required feature throw was not provided.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;;  This library provides some fixes to standard library
;;  `filesets.el'.  The reference version of that library is 1.8.4,
;;  but I believe the same fixes are appropriate for other versions
;;  (e.g. 2.2, named `filesets2.el', which is the latest version by
;;  the original author, at
;;  http://members.a1.net/t.link/CompEmacsFilesets.html).
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Change log:
;;
;;
;; 2008/09/16 dadams
;;     Created.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
;; Floor, Boston, MA 02110-1301, USA.;;; Code:
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:

(require 'filesets)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defcustom filesets-menu-path '("file") ; Original was nil.
  "The menu under which the filesets menu should be inserted.
See `add-submenu' for documentation."
  :set (function filesets-set-default)
  :type 'sexp :group 'filesets)

(defcustom filesets-menu-before "Open File..." ; Original was "File".
  "The name of a menu before which this menu should be added.
See `add-submenu' for documentation."
  :set (function filesets-set-default)
  :type 'sexp :group 'filesets)

(defun filesets-get-filelist (entry &optional mode event)
  "Get all files for fileset ENTRY.
Assume MODE (see `filesets-entry-mode'), if provided."
  (let* ((mode (or mode (filesets-entry-mode entry)))
         (fl (case mode
               ((:files)   (filesets-entry-get-files entry))
               ((:file)    (list (filesets-entry-get-file entry)))
               ((:ingroup)
                (let ((entry (expand-file-name
                              (if (stringp entry)
                                  entry
                                (filesets-entry-get-master entry)))))
                  (cons entry (filesets-ingroup-cache-get entry))))
               ((:tree)
                (let* ((dirpatt  (filesets-entry-get-tree entry))
                       (dir      (nth 0 dirpatt))
                       (patt     (nth 1 dirpatt))
                       (depth    (or (filesets-entry-get-tree-max-level entry)
                                     filesets-tree-max-level)))
                  (filesets-files-under 0 depth entry dir patt)))
               ((:pattern)
                (let ((dirpatt (filesets-entry-get-pattern entry)))
                  (if dirpatt
                      (let ((dir (filesets-entry-get-pattern--dir dirpatt))
                            (patt (filesets-entry-get-pattern--pattern dirpatt)))
                        (filesets-directory-files dir patt ':files t))
                    (filesets-error 'error "Filesets: malformed entry: "
                                    entry)))))))
    (filesets-filter-list
     fl (lambda (file) (not (filesets-filetype-property file event))))))

(defun filesets-files-under (level depth entry dir patt &optional relativep)
  "Files under DIR that match PATT.
LEVEL is the current level under DIR.
DEPTH is the maximal tree scanning depth for ENTRY.
ENTRY is a fileset.
DIR is a directory.
PATT is a regexp that included file names must match.
RELATIVEP non-nil means use relative file names."
  (and (or (= depth 0) (< level depth))
       (let* ((dir         (file-name-as-directory dir))
              (files-here  (filesets-directory-files
                            dir patt nil (not relativep)
                            (filesets-entry-get-filter-dirs-flag entry)))
              (subdirs     (filesets-filter-dir-names files-here))
              (files
               (filesets-filter-dir-names
                (apply #'append
                       files-here
                       (mapcar
                        (lambda (subdir)
                          (let* ((subdir (file-name-as-directory subdir))
                                 (full-subdir  (concat dir subdir)))
                            (filesets-files-under (+ level 1) depth entry
                                         full-subdir patt)))
                        subdirs))
                t)))
         files)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(provide 'filesets+)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; filesets+.el ends here

------=_NextPart_000_0038_01C91808.8155D220--





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,MIME_QP_LONG_LINE,NEXTPART,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 976) by emacsbugs.donarmstrong.com; 16 Sep 2008 20:43:57 +0000
Received: from rgminet01.oracle.com (rgminet01.oracle.com [148.87.113.118])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8GKhrLH027961
	for <976@HIDDEN>; Tue, 16 Sep 2008 13:43:54 -0700
Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111])
	by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m8GKhfNE020907;
	Tue, 16 Sep 2008 14:43:41 -0600
Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82])
	by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m8GKhdF1003548;
	Tue, 16 Sep 2008 14:43:39 -0600
Received: from dradamslap1 (/141.144.58.96)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Tue, 16 Sep 2008 20:43:38 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <976 <at> debbugs.gnu.org>, <emacs-pretest-bug@HIDDEN>
References: <002901c915bf$811df210$0200a8c0@HIDDEN>
Subject: RE: bug#976: 23.0.60; incorrect code for filesets-get-filelist
Date: Tue, 16 Sep 2008 13:44:16 -0700
Message-ID: <002c01c9183c$fc7e2680$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_002D_01C91802.501F4E80"
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <002901c915bf$811df210$0200a8c0@HIDDEN>
Thread-Index: AckVv4Ci1hEH5okgSQ2EUXtBuurWggCetBEg
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Brightmail-Tracker: AAAAAQAAAAI=
X-Whitelist: TRUE
X-Whitelist: TRUE

This is a multi-part message in MIME format.

------=_NextPart_000_002D_01C91802.501F4E80
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

The attached code might help you in fixing this - if not, ignore it. I haven't
tested all of the code that calls `filesets-get-filelist', but the version of
`filesets-get-filelist' attached seems to DTRT, AFAICT.

The problem with the original code, and with the suggestion I sent earlier, is
that `filesets-get-filelist' does not DTRT for type :tree. The original code is
completely broken - does nothing here. In my previously suggested code,
`filesets-get-filelist' does the same thing for type :tree as for type :pattern
- it returns only the files in the directory, not also the files in its
subdirectories.

See attached file for proposed new definition (with new function
filesets-files-under).

HTH


> From: Drew Adams Sent: Saturday, September 13, 2008 9:41 AM 
> 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'
>  
> 
> 
> 
> 
> 
> 

------=_NextPart_000_002D_01C91802.501F4E80
Content-Type: application/octet-stream;
	name="throw.el"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="throw.el"

(defun filesets-get-filelist (entry &optional mode event)=0A=
  "Get all files for fileset ENTRY.=0A=
Assume MODE (see `filesets-entry-mode'), if provided."=0A=
  (let* ((mode (or mode (filesets-entry-mode entry)))=0A=
         (fl (case mode=0A=
               ((:files)   (filesets-entry-get-files entry))=0A=
               ((:file)    (list (filesets-entry-get-file entry)))=0A=
               ((:ingroup)=0A=
                (let ((entry (expand-file-name=0A=
                              (if (stringp entry)=0A=
                                  entry=0A=
                                (filesets-entry-get-master entry)))))=0A=
                  (cons entry (filesets-ingroup-cache-get entry))))=0A=
               ((:tree)=0A=
                (let* ((dirpatt  (filesets-entry-get-tree entry))=0A=
                       (dir      (nth 0 dirpatt))=0A=
                       (patt     (nth 1 dirpatt))=0A=
                       (depth    (or (filesets-entry-get-tree-max-level =
entry)=0A=
                                     filesets-tree-max-level)))=0A=
                  (filesets-files-under 0 depth entry dir patt)))=0A=
               ((:pattern)=0A=
                (let ((dirpatt (filesets-entry-get-pattern entry)))=0A=
                  (if dirpatt=0A=
                      (let ((dir (filesets-entry-get-pattern--dir =
dirpatt))=0A=
                            (patt (filesets-entry-get-pattern--pattern =
dirpatt)))=0A=
                        (filesets-directory-files dir patt ':files t))=0A=
                    (filesets-error 'error "Filesets: malformed entry: "=0A=
                                    entry)))))))=0A=
    (filesets-filter-list=0A=
     fl (lambda (file) (not (filesets-filetype-property file event))))))=0A=
=0A=
(defun filesets-files-under (level depth entry dir patt &optional =
absolutep)=0A=
  "Files under DIR that match PATT.=0A=
LEVEL is the current level under DIR.=0A=
DEPTH is the maximal tree scanning depth for ENTRY.=0A=
ENTRY is a fileset.=0A=
DIR is a directory.=0A=
PATT is a regexp that included file names must match.=0A=
ABSOLUTEP non-nil means use absolute file names."=0A=
  (and (or (=3D depth 0) (< level depth))=0A=
       (let* ((dir         (file-name-as-directory dir))=0A=
              (files-here  (filesets-directory-files=0A=
                            dir patt nil absolutep=0A=
                            (filesets-entry-get-filter-dirs-flag entry)))=0A=
              (subdirs     (filesets-filter-dir-names files-here))=0A=
              (files=0A=
               (filesets-filter-dir-names=0A=
                (apply #'append=0A=
                       files-here=0A=
                       (mapcar=0A=
                        (lambda (subdir)=0A=
                          (let* ((subdir (file-name-as-directory subdir))=0A=
                                 (full-subdir  (concat dir subdir)))=0A=
                            (filesets-files-under (+ level 1) depth entry=0A=
                                         full-subdir patt)))=0A=
                        subdirs))=0A=
                t)))=0A=
         files)))=0A=

------=_NextPart_000_002D_01C91802.501F4E80--





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,FOURLA,
	HAS_BUG_NUMBER,MIME_QP_LONG_LINE,NEXTPART,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY
	autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 16 Sep 2008 20:44:14 +0000
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 m8GKiAcO027971
	for <submit@HIDDEN>; Tue, 16 Sep 2008 13:44:11 -0700
Received: from mx10.gnu.org ([199.232.76.166]:34633)
	by fencepost.gnu.org with esmtp (Exim 4.67)
	(envelope-from <drew.adams@HIDDEN>)
	id 1KfhNG-0005gM-B6
	for emacs-pretest-bug@HIDDEN; Tue, 16 Sep 2008 16:42:14 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1KfhP2-00070P-Gz
	for emacs-pretest-bug@HIDDEN; Tue, 16 Sep 2008 16:44:08 -0400
Received: from rgminet01.oracle.com ([148.87.113.118]:64895)
	by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1KfhP1-0006yx-77
	for emacs-pretest-bug@HIDDEN; Tue, 16 Sep 2008 16:44:04 -0400
Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111])
	by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m8GKhfNE020907;
	Tue, 16 Sep 2008 14:43:41 -0600
Received: from acsmt704.oracle.com (acsmt704.oracle.com [141.146.40.82])
	by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m8GKhdF1003548;
	Tue, 16 Sep 2008 14:43:39 -0600
Received: from dradamslap1 (/141.144.58.96)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Tue, 16 Sep 2008 20:43:38 +0000
From: "Drew Adams" <drew.adams@HIDDEN>
To: <976 <at> debbugs.gnu.org>, <emacs-pretest-bug@HIDDEN>
References: <002901c915bf$811df210$0200a8c0@HIDDEN>
Subject: RE: bug#976: 23.0.60; incorrect code for filesets-get-filelist
Date: Tue, 16 Sep 2008 13:44:16 -0700
Message-ID: <002c01c9183c$fc7e2680$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_002D_01C91802.501F4E80"
X-Mailer: Microsoft Office Outlook 11
In-reply-to: <002901c915bf$811df210$0200a8c0@HIDDEN>
Thread-Index: AckVv4Ci1hEH5okgSQ2EUXtBuurWggCetBEg
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-CrossAssassin-Score: 2

This is a multi-part message in MIME format.

------=_NextPart_000_002D_01C91802.501F4E80
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

The attached code might help you in fixing this - if not, ignore it. I haven't
tested all of the code that calls `filesets-get-filelist', but the version of
`filesets-get-filelist' attached seems to DTRT, AFAICT.

The problem with the original code, and with the suggestion I sent earlier, is
that `filesets-get-filelist' does not DTRT for type :tree. The original code is
completely broken - does nothing here. In my previously suggested code,
`filesets-get-filelist' does the same thing for type :tree as for type :pattern
- it returns only the files in the directory, not also the files in its
subdirectories.

See attached file for proposed new definition (with new function
filesets-files-under).

HTH


> From: Drew Adams Sent: Saturday, September 13, 2008 9:41 AM 
> 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'
>  
> 
> 
> 
> 
> 
> 

------=_NextPart_000_002D_01C91802.501F4E80
Content-Type: application/octet-stream;
	name="throw.el"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="throw.el"

(defun filesets-get-filelist (entry &optional mode event)=0A=
  "Get all files for fileset ENTRY.=0A=
Assume MODE (see `filesets-entry-mode'), if provided."=0A=
  (let* ((mode (or mode (filesets-entry-mode entry)))=0A=
         (fl (case mode=0A=
               ((:files)   (filesets-entry-get-files entry))=0A=
               ((:file)    (list (filesets-entry-get-file entry)))=0A=
               ((:ingroup)=0A=
                (let ((entry (expand-file-name=0A=
                              (if (stringp entry)=0A=
                                  entry=0A=
                                (filesets-entry-get-master entry)))))=0A=
                  (cons entry (filesets-ingroup-cache-get entry))))=0A=
               ((:tree)=0A=
                (let* ((dirpatt  (filesets-entry-get-tree entry))=0A=
                       (dir      (nth 0 dirpatt))=0A=
                       (patt     (nth 1 dirpatt))=0A=
                       (depth    (or (filesets-entry-get-tree-max-level =
entry)=0A=
                                     filesets-tree-max-level)))=0A=
                  (filesets-files-under 0 depth entry dir patt)))=0A=
               ((:pattern)=0A=
                (let ((dirpatt (filesets-entry-get-pattern entry)))=0A=
                  (if dirpatt=0A=
                      (let ((dir (filesets-entry-get-pattern--dir =
dirpatt))=0A=
                            (patt (filesets-entry-get-pattern--pattern =
dirpatt)))=0A=
                        (filesets-directory-files dir patt ':files t))=0A=
                    (filesets-error 'error "Filesets: malformed entry: "=0A=
                                    entry)))))))=0A=
    (filesets-filter-list=0A=
     fl (lambda (file) (not (filesets-filetype-property file event))))))=0A=
=0A=
(defun filesets-files-under (level depth entry dir patt &optional =
absolutep)=0A=
  "Files under DIR that match PATT.=0A=
LEVEL is the current level under DIR.=0A=
DEPTH is the maximal tree scanning depth for ENTRY.=0A=
ENTRY is a fileset.=0A=
DIR is a directory.=0A=
PATT is a regexp that included file names must match.=0A=
ABSOLUTEP non-nil means use absolute file names."=0A=
  (and (or (=3D depth 0) (< level depth))=0A=
       (let* ((dir         (file-name-as-directory dir))=0A=
              (files-here  (filesets-directory-files=0A=
                            dir patt nil absolutep=0A=
                            (filesets-entry-get-filter-dirs-flag entry)))=0A=
              (subdirs     (filesets-filter-dir-names files-here))=0A=
              (files=0A=
               (filesets-filter-dir-names=0A=
                (apply #'append=0A=
                       files-here=0A=
                       (mapcar=0A=
                        (lambda (subdir)=0A=
                          (let* ((subdir (file-name-as-directory subdir))=0A=
                                 (full-subdir  (concat dir subdir)))=0A=
                            (filesets-files-under (+ level 1) depth entry=0A=
                                         full-subdir patt)))=0A=
                        subdirs))=0A=
                t)))=0A=
         files)))=0A=

------=_NextPart_000_002D_01C91802.501F4E80--





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,
	RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 13 Sep 2008 16:41:10 +0000
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 <submit@HIDDEN>; Sat, 13 Sep 2008 09:41:07 -0700
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 <drew.adams@HIDDEN>)
	id 1KeY9S-0000Yg-Bg
	for emacs-pretest-bug@HIDDEN; Sat, 13 Sep 2008 12:39:14 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>)
	id 1KeYBB-0004EU-3I
	for emacs-pretest-bug@HIDDEN; Sat, 13 Sep 2008 12:41:04 -0400
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 <drew.adams@HIDDEN>)
	id 1KeYBA-0004Cs-4Y
	for emacs-pretest-bug@HIDDEN; Sat, 13 Sep 2008 12:41:00 -0400
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 <emacs-pretest-bug@HIDDEN>; Sat, 13 Sep 2008 11:40:50 -0500
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 <emacs-pretest-bug@HIDDEN>; Sat, 13 Sep 2008 10:40:50 -0600
Received: from dradamslap1 (/24.23.165.218)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Sat, 13 Sep 2008 09:40:49 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
To: <emacs-pretest-bug@HIDDEN>
Subject: 23.0.60; incorrect code for filesets-get-filelist
Date: Sat, 13 Sep 2008 09:40:59 -0700
Message-ID: <002901c915bf$811df210$0200a8c0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
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

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'
 





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#976; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 30 Dec 2015 03:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.