From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vagn Johansen Newsgroups: gmane.emacs.help Subject: Re: Working with different projects in Emacs Date: Wed, 08 Apr 2009 20:56:18 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1239219662 30497 80.91.229.12 (8 Apr 2009 19:41:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Apr 2009 19:41:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 08 21:42:21 2009 Return-path: Envelope-to: geh-help-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 1Lrdf3-0000XW-SF for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 21:42:14 +0200 Original-Received: from localhost ([127.0.0.1]:44158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lrddf-0000BV-FZ for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 15:40:47 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) Cancel-Lock: sha1:1wd0V32bO69JxUkqG9z0JlvgSGM= Original-Lines: 58 Original-NNTP-Posting-Host: 89.239.230.209 Original-X-Trace: news.sunsite.dk DXC=AM2\GDcmYJ5@g6i]76MRQ6YSB=nbEKnk; 4?N7_EgM4b51]Odi5o\aC3gNbeFAXTM>54X23ZgHoIA3LIbBQDMe\E?eMSgD9Uh>a7 Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:168308 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63590 Archived-At: Damian writes: > Hello, > > I work in several projects. Every project has a list of files > associated to it (for instance several source code files or latex > files). I would like that every time I start working in one of these > projects, all the files could be found quickly without specifying the > whole path. > > The filesets almost serve this purpose, but the problem is that they > open all the files in the fileset, and I just want to be able to > auto-complete its filename (when I open a file using C-x C-f). > > File cache is not an option, since I need several "caches" for each > project and I don't want to load them all when emacs starts. > > And I'm unable to understand Icicles documentation (and Icicles is > more powerful than the tool I'm looking for). > > Until now, I was able to find a solution for every problem (in the > good sense) in emacs, but for this one I cannot find one. > > What can I do? You could try my vps package http://ozymandias.dk/emacs/emacs.html#vps It caches both the filelists and the directory list. The latter is needed for projects that use directory recursion to avoid excessive directory traversals. The caches are rebuilt when they become to old. Use M-i l (vps-list-dirs) to get a buffer with all the filenames in the current project. You can then use search, C-s, ,, , RET RET to search for and open a file. For fast and convenient file selection of a file in the current project you could use anything.el combined with the vps source show below: (defvar anything-source-vps-files '((name . "Project Files") (candidates . (lambda () (when vps-project-name (if (not (file-exists-p (vps-filelist-filename))) (error "Run M-x vps-write-filelist RET manually")) (start-process "anything-source-vps-files" nil "grep" "-i" (replace-regexp-in-string "^-" "." anything-pattern) (vps-filelist-filename))))) (type . file) (requires-pattern . 4)) "Source for retrieving files (cached) vps filelist.") -- Vagn Johansen