all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Filesets question
@ 2008-12-03  4:03 锁住子
  2008-12-03  6:28 ` Drew Adams
       [not found] ` <mailman.1778.1228285716.26697.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: 锁住子 @ 2008-12-03  4:03 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm having an issue with filesets: I can create a "pattern" type
fileset that works fine, but the moment I change the type to
"directory tree" (what I actually want), it tells me the fileset does
not exist. So far as I know, the settings for pattern vs directory
tree should be exactly the same: a directory name to act as root, and
a regex to find files. But when I use the "pattern" type, it finds all
the appropriate files under the root directory, and when I use the
"directory tree" type, it finds nothing at all. I've tried editing the
settings via the customize buffer and directly in .emacs, and the
results are the same. Can someone please take a look at this and tell
me what I'm doing wrong? All I want is a fileset containing all .py
files in "myrootdir" and below.

'(filesets-data (quote (("pr" (:tree "~/dev/myrootdir" "^.+\\.py
$")))))

Thanks!
Eric


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

* RE: Filesets question
  2008-12-03  4:03 Filesets question 锁住子
@ 2008-12-03  6:28 ` Drew Adams
       [not found] ` <mailman.1778.1228285716.26697.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Drew Adams @ 2008-12-03  6:28 UTC (permalink / raw)
  To: '???', help-gnu-emacs

> I'm having an issue with filesets: I can create a "pattern" type
> fileset that works fine, but the moment I change the type to
> "directory tree" (what I actually want), it tells me the fileset does
> not exist. So far as I know, the settings for pattern vs directory
> tree should be exactly the same: a directory name to act as root, and
> a regex to find files. But when I use the "pattern" type, it finds all
> the appropriate files under the root directory, and when I use the
> "directory tree" type, it finds nothing at all. I've tried editing the
> settings via the customize buffer and directly in .emacs, and the
> results are the same. Can someone please take a look at this and tell
> me what I'm doing wrong? All I want is a fileset containing all .py
> files in "myrootdir" and below.
> 
> '(filesets-data (quote (("pr" (:tree "~/dev/myrootdir" "^.+\\.py$")))))

A value of (("pr" (:tree "~/dev/myrootdir" "^.+\\.py$"))) for `filesets-data'
looks OK to me. But I don't recognize the form you have: a list starting with
`filesets-data' (unless that is supposed to be a `let' binding). If I use
Customize on `filesets-data' and create such a value, it works for me.

What you should see, if you give `filesets-data' a value of
(("pr" (:tree "~/dev/myrootdir" "^.+\\.py$"))):

When you choose the submenu Filesets > pr you should see menu entries for each
of the files in ~/dev/myrootdir that have extension py, and you should see
submenus for each of the subdirectories. In those submenus you should see
similar matching files from the subdirectories or more submenus (for
subsubdirectories), and so on. 

IOW, the pr menu and its submenus should _together_ lead you to all of the files
under ~/dev/myrootdir that have extension py. The fileset is not manifested as a
single flat set of files; instead, the files are available only interactively
and individually, and only via a hierarchy of menus.

If you do get the behavior I just described, but you expected something
different (e.g. all of the files in a single explicit set), then see below,
after the line (----). Else, maybe someone else can help. 

If you don't get the above behavior, it's possible that you have an old version
of filesets.el. This is the author's Filesets site:
http://members.a1.net/t.link/CompEmacsFilesets.html. However, I just tried with
vanilla Emacs 22.3 (-q), and it seems to do what I described above.

----

You might want to take a look at this bug report, especially the last message in
the thread, by Tom Link (filesets author):
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=976

Excerpts:

 :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.

These bug reports might also be helpful (dunno):
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=965
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=977

This is related, but it doesn't directly respond to your question:
http://www.emacswiki.org/emacs/Icicles_-_Persistent_Completions#toc5.
It lets you combine filesets into supersets, and it lets you use patterns to
define a single set of files under (not just in) a directory (which is what bug
#976 says :tree should do but doesn't). If you need to manifest a list of files
under a directory that match your pattern, this will do that.

HTH.





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

* Re: Filesets question
       [not found] ` <mailman.1778.1228285716.26697.help-gnu-emacs@gnu.org>
@ 2008-12-03  7:11   ` 锁住子
  2008-12-03 13:51     ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: 锁住子 @ 2008-12-03  7:11 UTC (permalink / raw)
  To: help-gnu-emacs

On Dec 3, 2:28 pm, "Drew Adams" <drew.ad...@oracle.com> wrote:
> > I'm having an issue with filesets: I can create a "pattern" type
> > fileset that works fine, but the moment I change the type to
> > "directory tree" (what I actually want), it tells me the fileset does
> > not exist. So far as I know, the settings for pattern vs directory
> > tree should be exactly the same: a directory name to act as root, and
> > a regex to find files. But when I use the "pattern" type, it finds all
> > the appropriate files under the root directory, and when I use the
> > "directory tree" type, it finds nothing at all. I've tried editing the
> > settings via the customize buffer and directly in .emacs, and the
> > results are the same. Can someone please take a look at this and tell
> > me what I'm doing wrong? All I want is a fileset containing all .py
> > files in "myrootdir" and below.
>
> > '(filesets-data (quote (("pr" (:tree "~/dev/myrootdir" "^.+\\.py$")))))
>
> A value of (("pr" (:tree "~/dev/myrootdir" "^.+\\.py$"))) for `filesets-data'
> looks OK to me. But I don't recognize the form you have: a list starting with
> `filesets-data' (unless that is supposed to be a `let' binding). If I use
> Customize on `filesets-data' and create such a value, it works for me.

Yes, I just copied that bit out of the customize section of my .emacs,
forgot to mention that.

I've since solved the problem – more googling led me to filesets+.el
(which, now that I look at it, is your handiwork), and whatever was in
there solved the problem. But thank you very much for the detailed
explanation (and the patch!). I don't use menus at all, but it's
working as expected now, and I'll be taking a closer look at Icicles
and persistent completion.

Thanks again,
Eric



>
> What you should see, if you give `filesets-data' a value of
> (("pr" (:tree "~/dev/myrootdir" "^.+\\.py$"))):
>
> When you choose the submenu Filesets > pr you should see menu entries for each
> of the files in ~/dev/myrootdir that have extension py, and you should see
> submenus for each of the subdirectories. In those submenus you should see
> similar matching files from the subdirectories or more submenus (for
> subsubdirectories), and so on.
>
> IOW, the pr menu and its submenus should _together_ lead you to all of the files
> under ~/dev/myrootdir that have extension py. The fileset is not manifested as a
> single flat set of files; instead, the files are available only interactively
> and individually, and only via a hierarchy of menus.
>
> If you do get the behavior I just described, but you expected something
> different (e.g. all of the files in a single explicit set), then see below,
> after the line (----). Else, maybe someone else can help.
>
> If you don't get the above behavior, it's possible that you have an old version
> of filesets.el. This is the author's Filesets site:http://members.a1.net/t.link/CompEmacsFilesets.html. However, I just tried with
> vanilla Emacs 22.3 (-q), and it seems to do what I described above.
>
> ----
>
> You might want to take a look at this bug report, especially the last message in
> the thread, by Tom Link (filesets author):http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=976
>
> Excerpts:
>
>  :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.
>
> These bug reports might also be helpful (dunno):http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=965http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=977
>
> This is related, but it doesn't directly respond to your question:http://www.emacswiki.org/emacs/Icicles_-_Persistent_Completions#toc5.
> It lets you combine filesets into supersets, and it lets you use patterns to
> define a single set of files under (not just in) a directory (which is what bug
> #976 says :tree should do but doesn't). If you need to manifest a list of files
> under a directory that match your pattern, this will do that.
>
> HTH.



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

* RE: Filesets question
  2008-12-03  7:11   ` 锁住子
@ 2008-12-03 13:51     ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2008-12-03 13:51 UTC (permalink / raw)
  To: '???', help-gnu-emacs

> I've since solved the problem – more googling led me to filesets+.el
> (which, now that I look at it, is your handiwork), and whatever was in
> there solved the problem. But thank you very much for the detailed
> explanation (and the patch!). I don't use menus at all, but it's
> working as expected now, and I'll be taking a closer look at Icicles
> and persistent completion.

FYI, filesets+.el is exactly the "attached code" that has the fix that Tom
referred to as being an "interesting idea" but a different approach:

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

IOW, tree filesets as originally designed are intended to work only via the
menu. filesets+.el changes that.

IMO, Emacs should at least clarify the filesets doc, so that users such as you
and I don't get the wrong idea about what tree filesets offer. That was part of
the bug report.





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

end of thread, other threads:[~2008-12-03 13:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03  4:03 Filesets question 锁住子
2008-12-03  6:28 ` Drew Adams
     [not found] ` <mailman.1778.1228285716.26697.help-gnu-emacs@gnu.org>
2008-12-03  7:11   ` 锁住子
2008-12-03 13:51     ` Drew Adams

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.