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: [Emacs-diffs] scratch/project 106e023: Add new `project' package, and use it in xref Date: Wed, 8 Jul 2015 16:13:20 +0300 Message-ID: <559D21F0.2060607@yandex.ru> References: <20150708000935.5340.18494@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1436361233 1230 80.91.229.3 (8 Jul 2015 13:13:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jul 2015 13:13:53 +0000 (UTC) To: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 08 15:13:49 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 1ZCpAa-0003Rm-7w for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2015 15:13:48 +0200 Original-Received: from localhost ([::1]:35085 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCpAZ-0000d1-7w for ged-emacs-devel@m.gmane.org; Wed, 08 Jul 2015 09:13:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCpAH-0000ak-1K for emacs-devel@gnu.org; Wed, 08 Jul 2015 09:13:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCpAD-0000vu-1F for emacs-devel@gnu.org; Wed, 08 Jul 2015 09:13:28 -0400 Original-Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:33175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCpAC-0000vn-QR for emacs-devel@gnu.org; Wed, 08 Jul 2015 09:13:24 -0400 Original-Received: by wiwl6 with SMTP id l6so344376836wiw.0 for ; Wed, 08 Jul 2015 06:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=mcNXqhqHwNqUqCg+P749us/hjlxJEa4rRnd09j1kM+U=; b=zSGsLk8dAcoJW4UMyLG7FarWU2sNlhlplC2GV/6bNCKqDsM2oWgJ0H288SBt6YtyRd SmzNTJHrY9sy12qp2QOMy7+qmpMPzohT2AqpYprxgW2Nw8eI16RrB/ig09d3iGCBqrkl pwnpLJa10AfJkw9KBzZFkc/nKVqep4JZ8tQKzVEhDCfbYiV8SjYSX+RFXvdYGrPX1Xt6 3hnxmaklEmxb7AjHunvi+MZ1e9WX4KqE0ZkgdWMWVQmRB+tix5xGlP7EVA7DpDJsykCp EKqrX71JDUwAL0r09+XLXYCMQduvByi8yXUmdCRSqAqfFIW6IeiT9sDMinYvucismD6b VmfA== X-Received: by 10.194.86.130 with SMTP id p2mr18266153wjz.99.1436361204011; Wed, 08 Jul 2015 06:13:24 -0700 (PDT) Original-Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id ee1sm2911925wic.8.2015.07.08.06.13.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2015 06:13:23 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::231 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:187772 Archived-At: On 07/08/2015 06:44 AM, Stefan Monnier wrote: > I think I'd prefer a slightly more verbose name for this variable. > Also, I'd suggest you use (list #'foo ... #'bar) so that we > automatically check that those functions are known. Sounds good. Please take a look again. > Same here: we should explicitly say if relative file names can appear or > not in the output. Done. >> +(defvar project-vc-root-files '(".git" ".hg" ".bzr")) > > I'd appreciate if this could be better integrated with VC (so it > automatically picks up other names for other supported backends). Also done. >> +(defun project-try-ede (dir) >> + (when (featurep 'ede) >> + (cons 'ede (ede-directory-get-open-project dir 'ROOT)))) > > Why use a cons cell with the car's symbol standing for a type tag, when > the carried object is already properly self-describing (IIUC it's an > EIEIO object)? Because then dispatching any `project-root' call fails at runtime if ede is not loaded. And I don't want to make it a runtime dependency. This function should probably be in ede.el, and only added to project-find-functions when it's loaded. Any comments on the "source directories" issue? I'm inclining towards having a project-source-directories-function variable now, which in emacs-lisp-mode would return load-path. This is also complicated by `project-find-functions' being dependent on the directory, but emacs-lisp-mode can only set a buffer-local value, in its buffers.