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

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

Re: Working with different projects in Emacs


From: Vagn Johansen
Subject: Re: Working with different projects in Emacs
Date: Wed, 08 Apr 2009 20:56:18 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin)

Damian <damian.only@gmail.com> 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


reply via email to

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