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

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

bug#976: 23.0.60; incorrect code for filesets-get-filelist


From: Thomas Link
Subject: bug#976: 23.0.60; incorrect code for filesets-get-filelist
Date: Fri, 19 Sep 2008 09:58:25 +0200
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

cyd@MIT.EDU wrote:
Hi Thomas,

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

http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=
Since I don't have emacs accessible right now I'm not sure my comment are of much help. What I'm writing below is based on how I remember the code worked.

((: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)))
It's possible this could be explained with my effort to maintain backward-compatibility with older versions of filesets with regard to values defined via the defcustom interface. Or maybe a problem with filesets-build-dir-submenu-now?

The original code is completely broken
Well, it definitely worked for me when I last tried it -- but that was 4 years ago. I rememb



In my previously suggested code,
`filesets-get-filelist' does the same thing for type :tree as for type :pattern
- it returns only the files in the directory, not also the files in its
subdirectories.
When changing filesets-get-filelist, please also take a look at filesets-build-dir-submenu-now, which actually builds the tree in the menu.

: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. If emacs glob patterns understood something like "dir/**" (I assume it doesn't?), this could be done with :pattern, I suppose.


In particular, I had some problems
byte-compiling. It would be great if the version (1.8.4) in GNU Emacs could be upgraded.
For the latest version, everything emacs-specific is supposed to be located in filesets-emacs.el, which should be loaded instead of filesets(2).el. If igrep is xemacs-specific, it's in filesets2.el by accident. (It's possible that I didn't test the last version with emacs because of problems with cl.)


There is no explanation of the Filesets menu items. There is an
`About' item with a link to a non-GNU Web page
This should probably open the info page then.


 What is the meaning of `#' and `+' in front of the
submenus
These are keyboard shortcuts for easier navigation. If this makes sense, depends on whether the gui toolkit supports accelerator keys.


 - Filesets Menu In Menu
In case users don't want to clutter the main menu bar with an additional menu, users can select a parent menu.

 - Filesets Menu Shortcuts Marker
If the gui toolkit doesn't support accelerator keys (as they are commonly used on ms windows but also kde or gnome), this should be an empty string maybe.

 - Filesets Menu Cache Contents
 - Filesets Menu Cache Contents (needs to be explained better)

 - Filesets Cache Hostname Flag
This may be useful if you sync emacs configuration files between hosts.

 - Filesets Browse Dir Function (external command not clear)

 - Filesets Find File Delay (what for?)
Xemacs-specific work-around.

 - Filesets Commands (explanation unclear)
 - Filesets External Viewers (Properties is especially unclear)
This opens files with external viewers depending of file patterns. Are all properties unclear?

 - Filesets Ingroup Patterns
Recognize include-like statements. Only effective for :ingroup filesets. ingroup can be thought of as a logical tree of documents -- regardless of where the files are located physically. The root of an ingroup could, e.g., be an master tex file.

HTH a little.







reply via email to

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