From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thomas Link Newsgroups: gmane.emacs.bugs Subject: bug#976: 23.0.60; incorrect code for filesets-get-filelist Date: Fri, 19 Sep 2008 09:58:25 +0200 Message-ID: <48D35BA1.9060602@gmx.at> References: <20080919000709.s4thfhu7pqo84kwk@webmail.mit.edu> Reply-To: Thomas Link , 976@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1221830623 23371 80.91.229.12 (19 Sep 2008 13:23:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2008 13:23:43 +0000 (UTC) Cc: 976@emacsbugs.donarmstrong.com To: cyd@MIT.EDU Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 19 15:24:40 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KgfyQ-0003nE-EN for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 15:24:39 +0200 Original-Received: from localhost ([127.0.0.1]:50104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgfxO-0005O7-8c for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 09:23:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kgb1j-000179-Gg for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 04:07:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kgb1h-00016F-4p for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 04:07:42 -0400 Original-Received: from [199.232.76.173] (port=38856 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kgb1g-000166-VS for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 04:07:41 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:29516) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kgb1g-00052l-1o for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 04:07:40 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kgb1e-0006w0-VC for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 04:07:39 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8J87ZP1020682; Fri, 19 Sep 2008 01:07:35 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8J8566F019349; Fri, 19 Sep 2008 01:05:06 -0700 X-Loop: don@donarmstrong.com Resent-From: Thomas Link Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 19 Sep 2008 08:05:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 976 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 976-submit@emacsbugs.donarmstrong.com id=B976.122181111916617 (code B ref 976); Fri, 19 Sep 2008 08:05:06 +0000 Original-Received: (at 976) by emacsbugs.donarmstrong.com; 19 Sep 2008 07:58:39 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8J7wYPC016610 for <976@emacsbugs.donarmstrong.com>; Fri, 19 Sep 2008 00:58:35 -0700 Original-Received: (qmail invoked by alias); 19 Sep 2008 07:58:27 -0000 Original-Received: from mk090152180002.a1.net (EHLO [90.152.180.2]) [90.152.180.2] by mail.gmx.net (mp007) with SMTP; 19 Sep 2008 09:58:27 +0200 X-Authenticated: #6654488 X-Provags-ID: V01U2FsdGVkX19WSrsvHqZWmhULgl9cPvDVPRyPVcaMtRItDhwiw8 ihqhD1/h3ZTAf/ User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <20080919000709.s4thfhu7pqo84kwk@webmail.mit.edu> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.55 X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Fri, 19 Sep 2008 04:07:42 -0400 X-Mailman-Approved-At: Fri, 19 Sep 2008 09:23:30 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20649 Archived-At: 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.