[Top][All Lists]

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

Re: [Emacs-diffs] scratch/project 106e023: Add new `project' package, a

From: Dmitry Gutov
Subject: Re: [Emacs-diffs] scratch/project 106e023: Add new `project' package, and use it in xref
Date: Wed, 8 Jul 2015 16:13:20 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 07/08/2015 06:44 AM, Stefan Monnier wrote:

I think I'd prefer a slightly more verbose name for this variable.
Also, I'd suggest you use (list #'foo ... #'bar) so that we
automatically check that those functions are known.

Sounds good. Please take a look again.

Same here: we should explicitly say if relative file names can appear or
not in the output.


+(defvar project-vc-root-files '(".git" ".hg" ".bzr"))

I'd appreciate if this could be better integrated with VC (so it
automatically picks up other names for other supported backends).

Also done.

+(defun project-try-ede (dir)
+  (when (featurep 'ede)
+    (cons 'ede (ede-directory-get-open-project dir 'ROOT))))

Why use a cons cell with the car's symbol standing for a type tag, when
the carried object is already properly self-describing (IIUC it's an
EIEIO object)?

Because then dispatching any `project-root' call fails at runtime if ede is not loaded. And I don't want to make it a runtime dependency.

This function should probably be in ede.el, and only added to project-find-functions when it's loaded.

Any comments on the "source directories" issue? I'm inclining towards having a project-source-directories-function variable now, which in emacs-lisp-mode would return load-path.

This is also complicated by `project-find-functions' being dependent on the directory, but emacs-lisp-mode can only set a buffer-local value, in its buffers.

reply via email to

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