From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: running EDE from a file that is not under a project root dir Date: Tue, 04 Aug 2015 21:57:07 -0400 Message-ID: <55C16D73.6080801@siege-engine.com> References: <861tfiexaz.fsf@stephe-leake.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 1438739859 29659 80.91.229.3 (5 Aug 2015 01:57:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2015 01:57:39 +0000 (UTC) To: Stephen Leake , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 05 03:57:30 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 1ZMnxR-0001c1-Cq for ged-emacs-devel@m.gmane.org; Wed, 05 Aug 2015 03:57:29 +0200 Original-Received: from localhost ([::1]:38752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMnxQ-0002Gi-5V for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2015 21:57:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMnxC-0002GD-Dw for emacs-devel@gnu.org; Tue, 04 Aug 2015 21:57:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMnx8-0008QZ-1S for emacs-devel@gnu.org; Tue, 04 Aug 2015 21:57:14 -0400 Original-Received: from mail-vk0-f44.google.com ([209.85.213.44]:35001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMnx7-0008QN-Sx for emacs-devel@gnu.org; Tue, 04 Aug 2015 21:57:09 -0400 Original-Received: by vkhg129 with SMTP id g129so10481354vkh.2 for ; Tue, 04 Aug 2015 18:57:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=S/eBpPvP5IgCzhP7DoR99XmPDQjbG19WtwIIyeXAWbQ=; b=Wtv5YzOjrevDgJy1A4WOmZOkLv5mzpBjPpy0p5qUBaay+1CDb8IxqQtiU0WSas5G4n R+cD72USZUKbMM2mGPPoHJC0LUTLI+gOkG2MIXE9UXAO0NuEWDGvwk7QzKwtRvWH/7nJ u5+hbv5jQgtc63zlmCLtDVwlnFHnegF4828wfuhCaOzZGrq9enqGrWvWxcQmFOTip7Mh rpg4d64dh6dcubL53NsBYqKORAAX2eSESiwCSX6DylGyMTwM69ps5IOTTAMC04rvictM Rpdqwehg4nKn60audjW+1SWYabGddH4hFgJYMo4I9A75iTwyNVKYeoOd8DU23ZxIRwTi 7qTg== X-Received: by 10.52.32.98 with SMTP id h2mr9388940vdi.92.1438739829468; Tue, 04 Aug 2015 18:57:09 -0700 (PDT) Original-Received: from [192.168.1.202] (pool-71-184-198-118.bstnma.fios.verizon.net. [71.184.198.118]) by smtp.googlemail.com with ESMTPSA id ce9sm274825vdc.4.2015.08.04.18.57.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 18:57:08 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <861tfiexaz.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.213.44 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:188420 Archived-At: On 08/04/2015 02:13 PM, Stephen Leake wrote: > I often have "notes" files that are outside a project directory. For > example, my Emacs notes are not in the emacs/master directory; it is > controlled by git, and I don't want to commit my notes to that, nor > clutter .gitignore. > > At the same time, I'd like to be able to invoke "search for symbol at > point" from the notes text buffer; I have notes on functions/vars I'm > using at the moment. ... > My question is this; what is the minimum change I should make to EDE to > support these use cases? > > I think I need three things: > > - add a "file patterns" element to the EDE project (or target?) data > structure, and have semantic-symref-derive-find-filepatterns check that > before the alists. I'm not sure what matching file patterns has to do with core project functionality. Your use case sounds like something that would want a specialized tool, the same way there are tools that jump between 'doc' and 'code'. For example, if you keep notes in org mode (I assume everyone here uses org mode these days) then perhaps what is needed is tooling that knows how to keep TODO files in an org file tied to a project and the desired language, and then the project would form the root of any symref call. I suspect symref needs a tweak so that the major mode in question is passed along far enough to get into the pattern matcher. Once that is done, a tool that goes from your notes to src could call symref however it is needed. > - add an ede-global-project variable that I can set to my current > project, to bypass the project root detection. > > I've proposed the same change to project.el; there, it can be used > by one of the project-find functions. I find the global project concept scary. I can't say how many times I've edited Emacs code that was wasn't on my load path because I had multiple checkouts of the same code. Mostly just too many times. > - some way to set up the EDE project object for elisp, especially the > file patterns. I don't think you need to do anything project specific here. Symref doesn't do anything with EDE past getting the root. > The EDE info manual in Emacs master mentions ede-proj-elisp.el in > section 8 Extending EDE, but I don't see that file in Emacs master > git. That is a piece of the large Make/Automake project system that builds makefiles for you. Symref only uses EDE to identify a starting place for the search, or a place to find tooling caches (like GTAGS). EDE is then used by the semantic part that builds up the output buffer by parsing tags which needs various include paths depending on language. Eric