[Top][All Lists]

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

Re: A project-files implementation for Git projects

From: Dmitry Gutov
Subject: Re: A project-files implementation for Git projects
Date: Fri, 4 Oct 2019 16:16:38 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 04.10.2019 10:58, Tassilo Horn wrote:

Oh wait, forget that.  What I really would like to have is a way to get
*all* project files but relative to the given directory.  Right now, if
I specify a project subdirectory, I only get the files in there which is
sensible, of course.  So I have to call `project-files' for the project
given that "git ls-files <subdir>" only returns the files in <subdir>
and then call `file-relative-name' on the results.

That's, um... we don't actually guarantee that project-files will work when passed anything other than one of the project roots. But as long as it works for you, good.

In any case, your suggested return format is probably a no-go. The DIRS argument is to specify the set of files to be returned, we really can't interpret it in a conflicting way.

The good news is that you still can use file-relative-name even if the first argument is relative already (but to default-directory):

> (file-relative-name "foo/bar" "/tmp")

=> "../home/dgutov/vc/emacs-master/lisp/progmodes/foo/bar"

But alas, file-relative-name is not free.

reply via email to

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