help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problems with filesets


From: consspam
Subject: problems with filesets
Date: Thu, 09 Aug 2007 12:10:18 -0000
User-agent: G2/1.0

Hello! I tried to address my problem at comp.emacs without much
success (no one answered...), so I try again at this group instead:

I have problems when defining a fileset from different paths.
For example: I want fileset "myfileset" to consist of all files in ~/
src0/ and ~/src1/. Now it seems I've got 3 alternatives when setting
the variable 'filesets-data':

1) Use ':files' and specifically name each file in a list (easiest to
do in the Customize buffer by typing filesets-edit):

(setq filesets-data '(("myfileset" (:files "~/src0/file0.txt" "~/src0/
file1.txt" "~/src1/file0.txt"))))  ;...and so on

This is a really bad alternative, since I then have to edit the
variable 'filesets-data' each time I add a file in my folders. The
very reason I'm looking into Emacs is to get away from unintelligent
approaches.

2) Use ':pattern' and according to the docs specify a DIR and a
PATTERN (regexp):

(setq filesets-data '(("myfileset" (:pattern "~/src0/" "^.+\\.txt
$"))))

Better, but there are some problems with this approach:

a) It seems I can only specify 1 dir. If that is true it's useless. I
need several arbitrary dirs.

The docs states "PATTERN is a regular expression comprising path and
file pattern -- e.g. 'PATH/^REGEXP$'.  Note the `^' at the beginning
of the file name pattern."

b) This implies that I could use a regexp in PATTERN to sort of solve
my problem:
(setq filesets-data '(("myfileset" (:pattern "~/" "src./^.+\\.txt
$"))))
but that simply doesn't work. When executing filesets-open, nothing
happens with no error message.

c) I wrote "sort of" above, because even if it did work, it wouldn't
solve the problem of arbitrary dirs like ~/src0/ and ~/babba/hubbba/
src1/ (maybe with nasty regexp - but who wants to walk the unreadable-
path when its better to just list them instead?)

d) what is it with the doc-remark "...Note the `^' at the beginning of
the file name pattern."? It's very unlogical and it works fine without
it. What am I missing?

3) Use ':tree' and according to the docs specify a ROOT-DIR and a
PATTERN and set some magic variable filters-dirs-flag:

a) What is the difference between using :pattern and :tree?
b) What does the magic variable filters-dirs-flag do?
c) When testing:

(setq filesets-data '(("test" (:tree "~/src0/" "^.+\\.txt$") (:filter-
dirs-flag t))))

the error message "does not exist" is displayed. What am I doing
wrong?

Multiple filehandling is an important feature for me in my choice of
text editor. If someone could help me with this final thing (otherwise
Emacs is of course the obvious winner), you have won a lifetime Emacs-
advocate :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]