From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: running EDE from a file that is not under a project root dir Date: Thu, 06 Aug 2015 09:39:22 -0500 Message-ID: <8637zwa3c5.fsf@stephe-leake.org> References: <861tfiexaz.fsf@stephe-leake.org> <55C14848.8030904@yandex.ru> <86wpxab2hb.fsf@stephe-leake.org> <55C1D79D.2020906@yandex.ru> <867fp8c0cg.fsf@stephe-leake.org> <55C33823.6070804@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438872015 22456 80.91.229.3 (6 Aug 2015 14:40:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Aug 2015 14:40:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 06 16:40:04 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 1ZNMKy-0005zk-2T for ged-emacs-devel@m.gmane.org; Thu, 06 Aug 2015 16:40:04 +0200 Original-Received: from localhost ([::1]:45418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNMKx-0007eY-1g for ged-emacs-devel@m.gmane.org; Thu, 06 Aug 2015 10:40:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNMKh-0007eM-2Y for emacs-devel@gnu.org; Thu, 06 Aug 2015 10:39:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNMKd-0001dD-Qe for emacs-devel@gnu.org; Thu, 06 Aug 2015 10:39:46 -0400 Original-Received: from gproxy1-pub.mail.unifiedlayer.com ([69.89.25.95]:40624) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZNMKd-0001cj-JO for emacs-devel@gnu.org; Thu, 06 Aug 2015 10:39:43 -0400 Original-Received: (qmail 14294 invoked by uid 0); 6 Aug 2015 14:39:38 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy1.mail.unifiedlayer.com with SMTP; 6 Aug 2015 14:39:38 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw3 with id 1YfV1r00e2UdiVW01YfYuK; Thu, 06 Aug 2015 14:39:37 -0600 X-Authority-Analysis: v=2.1 cv=Qc314Krv c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=y7kgw_RnJtkA:10 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=uRRa74qj2VoA:10 a=vaJtXVxTAAAA:8 a=UnKG3sFEIHwr6HaF8poA:9 Original-Received: from [76.218.37.33] (port=53079 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZNMKP-0000y0-W8 for emacs-devel@gnu.org; Thu, 06 Aug 2015 08:39:30 -0600 In-Reply-To: <55C33823.6070804@yandex.ru> (Dmitry Gutov's message of "Thu, 6 Aug 2015 13:34:11 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 69.89.25.95 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:188501 Archived-At: Dmitry Gutov writes: > On 08/06/2015 11:01 AM, Stephen Leake wrote: > >>> As long as we're reusing semantic-symref-find-references-by-name, we >>> need some way to make it use the ignores. Probably not by making it >>> aware of project.el. >> >> Why not? that seems to fit perfectly with "provide project information >> to other elisp programs" > > Sure, if you want to rewrite it. Should probably get Eric's agreement first. > >> There's a very good reason; there should be _one_ global variable that >> stores the _one_ currently active project. > > You seem to be arguing from some ideological standpoint. There's no > practical need for this, for you to get the desired behavior, AFAICT. > >> You are completely missing the point of this functionality. > > How so? As long as your project-find-functions element knows which > variable to look up, you should be all set. How would it know that? Suppose I have a gpr project backend for AdaCore gprbuild projects, and a gradle backend for Android gradle projects. There are corresponding global variables; gpr-global-project, gradle-global-project, each with a project-find function. I set project-find-functions to '(gpr-find-project gradle-find-project). I first open a gpr project, which sets gpr-global-project, then later open a gradle project, which sets gradle-global-project. Next time (project-current) is called, it returns gpr-global-project, which is wrong. I'm proposing to fix this by having one global variable with one find-function. You seem to have some other solution in mind; what would it be? Hmm. Perhaps the "select project" function could change project-find-functions as well, using delq and add-to-list. But that messes with the order of the list, which the user may have carefully set. For example, I currently have it set to '(project-try-ede project-find-prj-root project-explicit-prj). -- -- Stephe