From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: A unified project root interface Date: Tue, 12 Mar 2013 20:51:23 +0400 Message-ID: <87li9s36k4.fsf@yandex.ru> References: <20130309174419.6e1cadb4@forcix.kollektiv-hamburg.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363107109 15792 80.91.229.3 (12 Mar 2013 16:51:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Mar 2013 16:51:49 +0000 (UTC) Cc: Jorgen Schaefer , Stefan Monnier , emacs-devel@gnu.org To: Sudish Joseph Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 12 17:52:13 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 1UFSQs-0005jn-Rd for ged-emacs-devel@m.gmane.org; Tue, 12 Mar 2013 17:52:10 +0100 Original-Received: from localhost ([::1]:50716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFSQW-0006YS-K0 for ged-emacs-devel@m.gmane.org; Tue, 12 Mar 2013 12:51:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFSQN-0006NI-6o for emacs-devel@gnu.org; Tue, 12 Mar 2013 12:51:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFSQD-0000J0-HO for emacs-devel@gnu.org; Tue, 12 Mar 2013 12:51:39 -0400 Original-Received: from mail-lb0-f182.google.com ([209.85.217.182]:53489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFSQD-0000In-9s for emacs-devel@gnu.org; Tue, 12 Mar 2013 12:51:29 -0400 Original-Received: by mail-lb0-f182.google.com with SMTP id gg6so155608lbb.27 for ; Tue, 12 Mar 2013 09:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type:x-antivirus :x-antivirus-status; bh=52NJuIY2UfXn0NnWwJReXC1oIChmFSpxNTbLJusr2Nk=; b=lwQCKN/cL/79kziQVzgD24Ibzih9MXZSBgBWq+ID1n5+6KKGquWHMlseCAzDXeM1b1 QT6posXs7FTrvsYX/qgJBzoxRaHJq+TNAUkYY9WeuDt8sbZdYc8nSvMgkjHPBX2z1zMr Vy0f4e7rRcPwICGaJ2fQeKtJGb/gyPyFdBGtswwZ5pB/n3Ub2iYSO338L4Tk2OdSKKdc xTy2ov2dGewJzLXWvZHwxAMPPrmi8F2A/wtUCeZ50eAMFTmXguggX1Xm7xMZ4aLxFL/D BeZMnC1llIjvNIRrct0efkPEzeCYmQehVaQWXFbCQyyXE3oF6dzwpiz1Ary8KSun3J14 3oMw== X-Received: by 10.152.113.164 with SMTP id iz4mr14598744lab.50.1363107088210; Tue, 12 Mar 2013 09:51:28 -0700 (PDT) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPS id xw14sm9597923lab.6.2013.03.12.09.51.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 09:51:27 -0700 (PDT) In-Reply-To: (Sudish Joseph's message of "Tue, 12 Mar 2013 11:34:05 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Antivirus: avast! (VPS 130312-0, 12.03.2013), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.217.182 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:157784 Archived-At: Sudish Joseph writes: > Here's the definition of projects I'm using right now: > > (setq project-roots > `(("Rails Project" > :root-contains-files ("app" "config" "db" "lib" "script" "test") > :on-hit (lambda (p) (message (car p)))) > ("Emacs config" > :path-matches ,(format "\\(%s\\)" sj/emacs-base-dir) > :on-hit (lambda (p) (message (car p)))) > ("Perl Project" > :root-contains-files ("t" "lib") > :on-hit (lambda (p) (message (car p)))) > ("Git Project" > :root-contains-files (".git") > :on-hit (lambda (p) (message (car p)))))) This looks quite similar to eproject configuration: https://github.com/jrockway/eproject/wiki/ProjectTypes > Here's an example of a package that groups buffers by vc root that could > do an even better job with a standardized project interface in Emacs > itself: https://github.com/purcell/ibuffer-vc Indeed. As another example, if I were to start working on some programming-language specific feature, like code completion, I'd need a way to enumerate files and/or buffers that belong to the same project. So, to add to the list of the required features, the project root mechanism will need a way to enumerate all files in the project (or maybe all files of a certain type), and a way to ignore files and directories, for example to improve performance of the enumerator function.