unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Hyatt <ahyatt@gmail.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 976@debbugs.gnu.org
Subject: bug#976: 23.0.60; incorrect code for filesets-get-filelist
Date: Tue, 29 Dec 2015 20:16:12 -0500	[thread overview]
Message-ID: <m2fuykivmr.fsf@gmail.com> (raw)
In-Reply-To: <002901c915bf$811df210$0200a8c0@us.oracle.com> (Drew Adams's message of "Sat, 13 Sep 2008 09:40:59 -0700")

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





  parent reply	other threads:[~2015-12-30  1:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-13 16:40 bug#976: 23.0.60; incorrect code for filesets-get-filelist Drew Adams
2008-09-16 20:44 ` Drew Adams
2008-09-16 21:28   ` Drew Adams
2015-12-30  1:16 ` Andrew Hyatt [this message]
2015-12-30  1:32   ` Drew Adams
2015-12-30  2:56     ` Andrew Hyatt
2015-12-30 16:42       ` Drew Adams
2020-11-20 15:39 ` Mauro Aranda
2020-11-21 22:40   ` Drew Adams
2020-11-24 11:05 ` Mauro Aranda
  -- strict thread matches above, loose matches on Subject: below --
2008-09-19  4:07 cyd
2008-09-19  7:58 ` Thomas Link

Reply instructions:

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

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

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m2fuykivmr.fsf@gmail.com \
    --to=ahyatt@gmail.com \
    --cc=976@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

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

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

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).