From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: progmodes/project.el and search paths Date: Tue, 04 Aug 2015 14:49:14 -0500 Message-ID: <86vbcudebp.fsf@stephe-leake.org> References: <55BE209F.1000009@siege-engine.com> <55BE509B.2080307@yandex.ru> <87r3nkjxby.fsf@isaac.fritz.box> <87h9ogyq6s.fsf@isaac.fritz.box> <86mvy7e6hr.fsf@stephe-leake.org> <55C0F9C7.8010006@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438717806 21605 80.91.229.3 (4 Aug 2015 19:50:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2015 19:50:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 04 21:49:56 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZMiDk-00042I-6Z for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2015 21:49:56 +0200 Original-Received: from localhost ([::1]:37474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMiDj-0006ix-Qc for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2015 15:49:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMiDT-0006ia-EN for emacs-devel@gnu.org; Tue, 04 Aug 2015 15:49:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMiDP-0005yW-9v for emacs-devel@gnu.org; Tue, 04 Aug 2015 15:49:39 -0400 Original-Received: from gproxy5-pub.mail.unifiedlayer.com ([67.222.38.55]:60619) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZMiDP-0005yK-36 for emacs-devel@gnu.org; Tue, 04 Aug 2015 15:49:35 -0400 Original-Received: (qmail 15743 invoked by uid 0); 4 Aug 2015 19:49:29 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy5.mail.unifiedlayer.com with SMTP; 4 Aug 2015 19:49:29 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw3 with id 0ppK1r00M2UdiVW01ppNFh; Tue, 04 Aug 2015 19:49:28 -0600 X-Authority-Analysis: v=2.1 cv=Qc314Krv c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=y7kgw_RnJtkA:10 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=uRRa74qj2VoA:10 a=vaJtXVxTAAAA:8 a=gos0xRgEbpQU_vXluHIA:9 a=Bu2hnlDS2-IoJ5gd:21 a=_W-h3bZGAYDh14bB:21 Original-Received: from [76.218.37.33] (port=50772 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZMiD9-0008S9-Vh for emacs-devel@gnu.org; Tue, 04 Aug 2015 13:49:20 -0600 In-Reply-To: <55C0F9C7.8010006@yandex.ru> (Dmitry Gutov's message of "Tue, 4 Aug 2015 20:43:35 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 67.222.38.55 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188410 Archived-At: Dmitry Gutov writes: > > 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. Better. I suggest adding "and Emacs core functions", to emphasize that grep etc should use the project facilities, and also mention existing backends: ;; The goal is to make it easy for Lisp programs, and Emacs core ;; functions, to operate on the current project, without having to know ;; which package handles detection of that project type, parsing its ;; config files, etc. Existing project packages should provide thin ;; wrappers around their functions to implement this API. > There's wrapper for EDE living in > lisp/cedet/ede.el already. That's a start. > Projectile "should" include its own wrapper as well. Yes. >> 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. I thought you agreed that the compilation-mode output of grep was better for this than the xref display. grep currently searches a user-specified directory; it could offer the choice of project search path via C-u 1 or some such. And we could add a grep-project command so the choice shows up in command completion. grep-project could get filename patterns from the project, as ede almost provides. That would require an additional wrapper in ede, for project-file-pattern. -- -- Stephe