emacs-devel
[Top][All Lists]
Advanced

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

Re: cl-defgeneric vs random funcall in project.el


From: Dmitry Gutov
Subject: Re: cl-defgeneric vs random funcall in project.el
Date: Sat, 1 Aug 2015 19:49:12 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0

On 08/01/2015 05:20 PM, Stephen Leake wrote:

Not at all, they need variables. You can easily set the variables from
.dir-locals.el, and any Emacs-wielding team member on the same project
will use them automatically.

Ok, I agree they could be variables.

Thinking about this more, buffer-local variables have their own complications:

- You need an buffer open, inside the given directory tree, to get their values. The project-find-functions API just passes in DIR to get a project instance. There might not even be a buffer open in that directory.

- If a user tries to set their values in init.el, that won't end well.

The point is the name should be declared in project.el, so all backends
use the same name.

You can't reuse the variables. There might be several project instances open at the same time.

The best bet seems to be to store them in the project file, which a project backend reads and saves to the project instance's slots.

Not sure what this means for the VC project backend. Git allows storing arbitrary key-value pairs in .git/config via 'git config', but that isn't true for every VCS. Bazaar doesn't, AFAICT.



reply via email to

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