emacs-devel
[Top][All Lists]
Advanced

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

Re: Unified project interface


From: Stephen Leake
Subject: Re: Unified project interface
Date: Tue, 28 Jul 2015 10:45:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt)

Dmitry Gutov <address@hidden> writes:

> On 07/28/2015 02:05 PM, Stephen Leake wrote:
>
>> - Rename 'project-directories' to 'project-root-directories' or
>>    'project-roots'.
>
> Either is fine with me, but note that y having "root" in the name we
> give up on adding a special "project-root" function in the future, one
> that you described earlier.

No, I'm happy with this:

'project-root'; find the root directory of the current project.

'project-roots'; return a list of related project roots.

That's what renaming 'project-directories' to 'project-roots' gives us.
Although some will object to the small name difference between
'project-root' and 'project-roots'.

>> - 'project-search-path' should not include 'project-root-directories'.
>
> I say we document it like that (or say that it's "allowed not to
> include"), but the consumers will still take care of the duplication
> (call project--prune-directories). That's easier on the
> implementations.

Are you agreeing that the default implementation should not include
project-root-directories?

The point is that if you only customize by setting
project-search-path-function, you can't exclude project-directories.

And I thought we agreed that project-search-path is disjoint from
project-directories.

>> - 'elisp-search-path' should not include 'package-user-dir';
>>    package-user-dir is not an elisp source directory, and load-path
>>    already includes the subdirs of it, if packages are initialized.
>
> What's the harm? It's an optimization: this way, we only call 'find'
> once per elpa dir, instead of doing it for each installed package. Not
> sure what's the overhead on that, but it seems wasteful.

As with all such optimizations, it can only be justified by actual
measurement.

But I missed the fact that the default project-search-dirs uses
'project--prune-directories' to throw away the subdirs; so while
'elisp-search-dirs' contains redundant directories,
'project-search-dirs' does not.

I find it confusing mixing two customization mechanisms; I started
another thread on that.

It would be less confusing if the default definition of
project-search-path did _not_ call project--prune-directories, but
elisp-search-path _did_. Then project--prune-directories should be
renamed without the '--'.

The doc string for project-search-path says "source directories", not
"source root directories". That needs to be fixed.


--
-- Stephe



reply via email to

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