From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: A unified project root interface Date: Wed, 13 Mar 2013 19:03:45 +0100 Message-ID: <87vc8vyy66.fsf@engster.org> References: <20130309174419.6e1cadb4@forcix.kollektiv-hamburg.de> <87hakh2299.fsf@fimbulvetr.bsc.es> <513FBA1C.5040100@siege-engine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1363197834 16056 80.91.229.3 (13 Mar 2013 18:03:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2013 18:03:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Eric M. Ludlam" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 13 19:04:19 2013 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 1UFq2E-0004TA-Jd for ged-emacs-devel@m.gmane.org; Wed, 13 Mar 2013 19:04:18 +0100 Original-Received: from localhost ([::1]:50052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFq1r-0001P8-JF for ged-emacs-devel@m.gmane.org; Wed, 13 Mar 2013 14:03:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFq1o-0001N7-Ab for emacs-devel@gnu.org; Wed, 13 Mar 2013 14:03:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFq1m-0005tu-14 for emacs-devel@gnu.org; Wed, 13 Mar 2013 14:03:52 -0400 Original-Received: from randomsample.de ([83.169.19.17]:60161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFq1l-0005ta-Kq for emacs-devel@gnu.org; Wed, 13 Mar 2013 14:03:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=LnrvktwfkTOpC6ffsyXFGpM3Gj9h3CNJfU1h1na7f2c=; b=GS6Pa+cFvWcZwJviL2SXbWToMIl5bet+EfFJfjoQ15qh2b0cCBBJ8meIuocFi5BqshW+/uzeBAvLTu/SrJ5iQiZwp/8zv1I7hiLYNr0g0Ewoy5yuHBqt3s5KiLda/vW7; Original-Received: from dslc-082-082-171-222.pools.arcor-ip.net ([82.82.171.222] helo=spaten) by randomsample.de with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UFq1j-0001Yf-3D; Wed, 13 Mar 2013 19:03:47 +0100 In-Reply-To: <513FBA1C.5040100@siege-engine.com> (Eric M. Ludlam's message of "Tue, 12 Mar 2013 19:28:28 -0400") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.93 (gnu/linux) Mail-Followup-To: "Eric M. Ludlam" , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 83.169.19.17 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:157818 Archived-At: Eric M. Ludlam writes: > On 03/11/2013 02:57 PM, Llu=EDs wrote: >> CEDET provides this in two ways (as part of the EDE subsystem): >> >> * If a Project.ede file exists, that's the root (similar to .dir-locals.= el in >> this context) >> >> * If signs of a "project-like" structure exist (e.g., (auto)makefiles, s= cons, >> java, etc), uses system-specific knowledge to automatically >> detect the project >> root. >> I'm commenting this because, first, managing projects is the purpose of = EDE >> (although it tries to do more than just identifying their root) and it's >> integrated in Emacs; and second, because the auto-detection could help i= n making >> the process simpler and, in the best case, auto-magical. > > I, of course, agree with Lluis. EDE is already setup to automatically > find projects as was requested. Adding new projects through the > generic' system is a pretty simple prospect. Yes, but we cannot envision all the kinds of projects people would want and create those for them beforehand. And defining own projects with ede-generic is simple, but not simple enough for end users. Let's take the example for defining those simple projects in project-roots.el, given by Sudish Joseph in this thread: ("Perl Project" :root-contains-files ("t" "lib") :on-hit (lambda (p) (message (car p)))) You can create a project like this with ede-generic, but then you have to write a little defclass inheriting from ede-generic, call ede-generic-new-autoloader, and to actually *do* something when the project is loaded you have to define methods like `ede-generic-setup-configuration'. This is just too much boilerplate for such a simple thing like the above. Also, even most Emacs developers are not familiar with the CLOS-like syntax that's needed to define those things. There's no doubt that EDE can do all what's needed, but is has to be wrapped in something that's easier to use, at least for simple stuff like what project-roots.el does. -David