unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'???'" <girzel@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Filesets question
Date: Tue, 2 Dec 2008 22:28:30 -0800	[thread overview]
Message-ID: <006901c95510$5c643ac0$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <97af65b9-f0c0-44ac-9fd9-c93ac920e2c2@i18g2000prf.googlegroups.com>

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





  reply	other threads:[~2008-12-03  6:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03  4:03 Filesets question 锁住子
2008-12-03  6:28 ` Drew Adams [this message]
     [not found] ` <mailman.1778.1228285716.26697.help-gnu-emacs@gnu.org>
2008-12-03  7:11   ` 锁住子
2008-12-03 13:51     ` Drew Adams

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='006901c95510$5c643ac0$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=girzel@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).