From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorgen Schaefer Newsgroups: gmane.emacs.devel Subject: Re: A unified project root interface Date: Sun, 17 Mar 2013 19:18:17 +0100 Message-ID: <20130317191817.764a44f5@forcix.kollektiv-hamburg.de> References: <20130309174419.6e1cadb4@forcix.kollektiv-hamburg.de> <87hakh2299.fsf@fimbulvetr.bsc.es> <513FBA1C.5040100@siege-engine.com> <87vc8vyy66.fsf@engster.org> <5143C11D.8070705@siege-engine.com> <87sj3vv35h.fsf@engster.org> <20130316160203.6b889aba@forcix.kollektiv-hamburg.de> <87ehffuf1g.fsf@engster.org> <20130317001630.125e1987@forcix.kollektiv-hamburg.de> <87y5dmsz5u.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363544306 20541 80.91.229.3 (17 Mar 2013 18:18:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Mar 2013 18:18:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Engster Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 17 19:18:51 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 1UHIAU-00019x-Sy for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2013 19:18:51 +0100 Original-Received: from localhost ([::1]:39417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHIA8-0004hs-05 for ged-emacs-devel@m.gmane.org; Sun, 17 Mar 2013 14:18:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHIA4-0004hm-A7 for emacs-devel@gnu.org; Sun, 17 Mar 2013 14:18:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHIA3-0004qu-1d for emacs-devel@gnu.org; Sun, 17 Mar 2013 14:18:24 -0400 Original-Received: from istinn.electusmatari.com ([83.169.37.145]:45405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHIA2-0004qV-Ot for emacs-devel@gnu.org; Sun, 17 Mar 2013 14:18:22 -0400 Original-Received: from forcix.kollektiv-hamburg.de (hmbg-4d06f567.pool.mediaWays.net [77.6.245.103]) by istinn.electusmatari.com (Postfix) with ESMTPSA id 1F774D10001E; Sun, 17 Mar 2013 19:18:20 +0100 (CET) In-Reply-To: <87y5dmsz5u.fsf@engster.org> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; i486-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 83.169.37.145 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:157916 Archived-At: On Sun, 17 Mar 2013 18:40:13 +0100 David Engster wrote: > > The problem I raised in this thread is that too many packages write > > their own solution because using any of the possible standard > > solutions is too cumbersome. Saying "there is a cumbersome standard > > solution" does not solve the problem. > > I do not say that. Great. I'm glad I misunderstood, and thank you for correcting me. > To hopefully prove my point, I've hacked together a small EDE project > for detecting files under git/hg/bzr version control, very similar to > how you do it in your project.el (I've dropped the CVS/.svn detection > for the moment). > [...] > and load some file under a git/hg/bzr versioned directory. There is an > example function `my-get-project-root' to print the project's root. Opening a file in a subdirectory of a repository root does not associate it with a project. I suspect this is a bug in this "proof of concept" implementation more so than a conceptual problem, though :-) Thank you for providing an example implementation. > Just to be clear: I do *not* expect that users write this stuff; > instead, Emacs should provide projects like this as defaults. If I understand this right, this looks good. I'm a bit unsure about requiring EDE, CEDET, etc. for this - it's not unlikely that people will go "meh" and not use it because of that. (I'm sorry to say so, but the complexity of CEDET is a recurring theme on the Emacs IRC channel.) So in the end, what we need for trivial implementation: - Provide a default "simple project" that auto-detects the root via VCS markers - Define a (project-root) that simply returns (and ede-object-root-project (ede-project-root-directory ede-object-root-project)) - Define a (project-set-root DIR) that does (oset this :file DIR) for the current project. If there is no current project, this should create a "simple project" for that directory so other uses of (project-root) will find it. - Ask authors of extensions to use (ede-minor-mode 1) in their mode function and simply use that function in their modes. Does this sound sensible? Regards, -- Jorgen