From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric M. Ludlam" Newsgroups: gmane.emacs.devel Subject: Re: A unified project root interface Date: Tue, 12 Mar 2013 19:28:28 -0400 Message-ID: <513FBA1C.5040100@siege-engine.com> References: <20130309174419.6e1cadb4@forcix.kollektiv-hamburg.de> <87hakh2299.fsf@fimbulvetr.bsc.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1363130922 24925 80.91.229.3 (12 Mar 2013 23:28:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Mar 2013 23:28:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 13 00:29:07 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 1UFYd0-0001OS-Se for ged-emacs-devel@m.gmane.org; Wed, 13 Mar 2013 00:29:06 +0100 Original-Received: from localhost ([::1]:57722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFYce-0001nf-CW for ged-emacs-devel@m.gmane.org; Tue, 12 Mar 2013 19:28:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFYcW-0001lw-5Y for emacs-devel@gnu.org; Tue, 12 Mar 2013 19:28:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFYcT-000551-1B for emacs-devel@gnu.org; Tue, 12 Mar 2013 19:28:36 -0400 Original-Received: from mail-qa0-f43.google.com ([209.85.216.43]:33967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFYcS-00054s-TZ for emacs-devel@gnu.org; Tue, 12 Mar 2013 19:28:32 -0400 Original-Received: by mail-qa0-f43.google.com with SMTP id dx4so1934047qab.9 for ; Tue, 12 Mar 2013 16:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=6rb+Fg4SlH3e063/+P6wNsTJAdRTDf9DzUFLRjsSS74=; b=o+EsFYWI4WE/X8RTitaRfwWy02vqadtfjoAjWfC3CQmrrbfkD2CPmkr0pBF8DcUrvN s46V0qRcqG8EJPUGXboYsbqyoCmacXbgtxlKLl0J52HpYFJz+DAPK0+/M+C7VFJTxyKV CuFm2VyyQ2owjorZeZdua6v0ywovC/4fUgfYvpwwZwfm7CMhIsNhxYDJ6/ajxsW129F0 4kvlIYt1j0hif7BavRxS5fCkVcfNXQLKvtRNVyVOCg6KOc7aRM/SgjPSgvYd64OagfuU kNboWwRzF6pCEK7FUYgMw5Tj9JHmf+/XAtLg/4qa0Tw5/5+EQ2LjpCcWSZ9wo71M7jf8 fsNA== X-Received: by 10.224.168.144 with SMTP id u16mr9444153qay.18.1363130911843; Tue, 12 Mar 2013 16:28:31 -0700 (PDT) Original-Received: from [192.168.1.201] (pool-72-74-140-235.bstnma.fios.verizon.net. [72.74.140.235]) by mx.google.com with ESMTPS id eb7sm34385875qab.11.2013.03.12.16.28.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 16:28:30 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091222 Shredder/3.1a1pre In-Reply-To: <87hakh2299.fsf@fimbulvetr.bsc.es> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.43 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:157803 Archived-At: On 03/11/2013 02:57 PM, Lluís wrote: > Stefan Monnier writes: > >>> So this is my somewhat verbose request to say "yes, let's do this" and >>> pick a library to provide the functionality. > >> Agreed. There are already different such things distributed with Emacs: >> .dir-locals.el is one of them. CEDET has its own notion. >> As mentioned .dir-local.el often acts as a project root, but it can also >> appear in sub-directories of a project, so it's not sufficient. >> It should at least be augmented so that some .dir-locals.el can be >> flagged as "non-root". > >> If the only need is to figure out the "root directory of the project", >> then maybe a simple solution is: > >> (defvar project-root-predicate >> (lambda () (file-exists-p ".dir-locals.el"))) >> (defun project-root () >> (locate-dominating-file default-directory project-root-predicate)) > >> where packages can (add-function :until-before (default-value >> project-root-predicate)) to recognize other "tell tale >> sign" of a project root (e.g. a Tupfile). > > 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, scons, > 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 in 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. I know some people think of EDE as being this big thing for creating your Makefiles, but its most common use really is to just tag the root of a project, and hang some configuration features for semantic auto completion. Adding new detectable projects to EDE would be a win all around. Eric