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: João Távora
Subject: Re: cl-defgeneric vs random funcall in project.el
Date: Tue, 4 Aug 2015 20:59:56 +0100

On Sat, Aug 1, 2015 at 5:49 PM, Dmitry Gutov <address@hidden> wrote:
> 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.
> 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.

You can probably

(with-temp-buffer (setq default-directory DIR) (hack-dir-local-variables))
   ...)

Won't that work? I use this ocasionally for my personal horrible ad-hoc
project  managing code (that I hope to replace with project.el eventually).

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

What happens by default when a user sets other dir-local variables in
her init file? I'd be happy with that ending.

> 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.

I'd prefer that .dir-locals is used if you can manage it. I don't want to
have to debug other sources of variable settings other than the ones
I have to know now. It also makes backend writing much easier.

-- 
João Távora



reply via email to

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