[Top][All Lists]

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

Re: progmodes/project.el and search paths

From: Dmitry Gutov
Subject: Re: progmodes/project.el and search paths
Date: Tue, 4 Aug 2015 20:43:35 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0

On 08/04/2015 12:40 PM, Stephen Leake wrote:

It would help if the header comment in project.el said something along
those lines.

There is a big difference between:

"provide an interface between projects and the rest of Emacs"


"provide a core API for implementing projects".

The current project.el header is unclear as to which it is intended to

Would adding this help?

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index d849f93..16578f1 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -22,6 +22,10 @@
 ;; This file contains generic infrastructure for dealing with
 ;; projects, and a number of public functions: finding the current
 ;; root, related project directories, search path, etc.
+;; The goal is to make it easy for Lisp programs to operate on the
+;; current project, without having to know which package handles
+;; detection of that project type, parsing its config files, etc.

 ;;; Code:

If it's really the former, that puts a much different light on things;
it should be providing wrappers/adaptors for EDE, projectile, etc, so
grep, compile etc can use project information.

"Should" is a strong word. There's wrapper for EDE living in lisp/cedet/ede.el already. Projectile "should" include its own wrapper as well.

In particular, there should be no "xref-find-regexp"; instead, "grep"
and similar commands should be enhanced to optionally use project
functions to get the search path.

xref-find-regexp can still be useful: it'll search a user-specified directory and present the results using the xref interface.

At the moment, xref-find-regexp offers both types of searches. To search in an arbitrary directory, you preface it with C-u.

reply via email to

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