all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#976: 23.0.60; incorrect code for filesets-get-filelist
@ 2008-09-13 16:40 Drew Adams
  2008-09-16 20:44 ` Drew Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Drew Adams @ 2008-09-13 16:40 UTC (permalink / raw)
  To: emacs-pretest-bug

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'
 







^ permalink raw reply	[flat|nested] 12+ messages in thread
* bug#976: 23.0.60; incorrect code for filesets-get-filelist
@ 2008-09-19  4:07 cyd
  2008-09-19  7:58 ` Thomas Link
  0 siblings, 1 reply; 12+ messages in thread
From: cyd @ 2008-09-19  4:07 UTC (permalink / raw)
  To: Thomas Link; +Cc: 976

Hi Thomas,

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

http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=976

Thanks.






^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-11-24 11:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.