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: running EDE from a file that is not under a project root dir Date: Tue, 04 Aug 2015 13:13:56 -0500 Message-ID: <861tfiexaz.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438712099 26168 80.91.229.3 (4 Aug 2015 18:14:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2015 18:14:59 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 04 20:14: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 1ZMgjf-0007yP-6C for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2015 20:14:47 +0200 Original-Received: from localhost ([::1]:36665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMgje-0006O7-Fl for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2015 14:14:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMgjH-0006NN-Pf for emacs-devel@gnu.org; Tue, 04 Aug 2015 14:14:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMgjE-0002Xp-HZ for emacs-devel@gnu.org; Tue, 04 Aug 2015 14:14:23 -0400 Original-Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:60534) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZMgjE-0002Xf-9s for emacs-devel@gnu.org; Tue, 04 Aug 2015 14:14:20 -0400 Original-Received: (qmail 27873 invoked by uid 0); 4 Aug 2015 18:14:15 -0000 Original-Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy8.mail.unifiedlayer.com with SMTP; 4 Aug 2015 18:14:15 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw4 with id 0iE71r00j2UdiVW01iEAwe; Tue, 04 Aug 2015 12:14:15 -0600 X-Authority-Analysis: v=2.1 cv=OJm0g0qB 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=gaqNO9uI6fo5mfLNkKYA:9 Original-Received: from [76.218.37.33] (port=50088 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZMgj0-0003hh-Ez for emacs-devel@gnu.org; Tue, 04 Aug 2015 12:14:06 -0600 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: 67.222.33.93 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:188404 Archived-At: 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. Currently, I'm trying to use xref-find-references on the elisp function temp-buffer-window-show (defined in window.el). That delegates to semantic-symref-find-references-by-name, which is where EDE comes in. This uses semantic-symref-detect-symref-tool to get the search tool; it picks grep (meaning grep-find), which is fine. But then it uses semantic-symref-derive-find-filepatterns to get the file patterns to pass to grep. Since I'm starting from a text-mode buffer, that returns (*.letter *.article *.te?xt). Which is _not_ what I want; I want *.el. Creating an EDE project would not help, because semantic-symref-derive-find-filepatterns doesn't use the EDE project, only semantic-symref-filepattern-alist and auto-mode-alist. A related use case is searching for C identifiers from a LaTeX documentation file in a C project; then EDE will find the right root and project, but still return the wrong file patterns. 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. - 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. - some way to set up the EDE project object for elisp, especially the file patterns. 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. -- -- Stephe