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: xref--read-identifier should call project-identifier-completion-table? Date: Mon, 03 Aug 2015 10:24:33 -0500 Message-ID: <86zj28fl8u.fsf@stephe-leake.org> References: <86k2tchfem.fsf@stephe-leake.org> <55BF3ABE.3020505@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438615507 1222 80.91.229.3 (3 Aug 2015 15:25:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Aug 2015 15:25:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 03 17:24:55 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 1ZMHbi-0006xy-Ii for ged-emacs-devel@m.gmane.org; Mon, 03 Aug 2015 17:24:54 +0200 Original-Received: from localhost ([::1]:59569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMHbh-0002yQ-Oj for ged-emacs-devel@m.gmane.org; Mon, 03 Aug 2015 11:24:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMHbe-0002yL-Ba for emacs-devel@gnu.org; Mon, 03 Aug 2015 11:24:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMHba-0008U2-Ic for emacs-devel@gnu.org; Mon, 03 Aug 2015 11:24:50 -0400 Original-Received: from gproxy8-pub.mail.unifiedlayer.com ([67.222.33.93]:37262) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ZMHba-0008TY-Bl for emacs-devel@gnu.org; Mon, 03 Aug 2015 11:24:46 -0400 Original-Received: (qmail 28808 invoked by uid 0); 3 Aug 2015 15:24:44 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy8.mail.unifiedlayer.com with SMTP; 3 Aug 2015 15:24:44 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by CMOut01 with id 0FQd1r00S2UdiVW01FQg2T; Mon, 03 Aug 2015 09:24:43 -0600 X-Authority-Analysis: v=2.1 cv=NJxGpSKg 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=gL_LwD783XvJKrbVLqQA:9 Original-Received: from [76.218.37.33] (port=54369 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1ZMHbR-0004os-R7 for emacs-devel@gnu.org; Mon, 03 Aug 2015 09:24:38 -0600 In-Reply-To: <55BF3ABE.3020505@yandex.ru> (Dmitry Gutov's message of "Mon, 3 Aug 2015 12:56:14 +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: 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:188347 Archived-At: Dmitry Gutov writes: > On 08/03/2015 12:47 PM, Stephen Leake wrote: > >> The default method for project-identifier-completion-table uses the >> current xref buffer-local variable, so that's the same as the current >> behavior. It might be better to change that to have a project- prefix. > > What's the use, if the rest of the operations still use the > buffer-local value of xref-find-function? I'm not clear if you are just talking about the rename here (that's what you quoted), or the larger issue of having xref--read-identifier call project-identifier-completion-table. I'll assume you are talking about the larger issue. Obviously I'll have to override functions that use xref-find-function (and other similar function variables) as well, in my elisp project backend. One step at a time ... > The natural extension of this approach would be to have a > project-xref-backend accessor, but do we really need that? I don't know what that would be; can you give a more complete description? The project backend should be fully determined by the result of (project-current). It is only the presence of the function variables used in non-dispatching functions that defeats that. > The same minor mode that enables your project globally could set > xref-backend (the variable is still called xref-find-function, but not > for long) in all buffers. It'll actually be a list, so you'll put an > always-active element at its head, just like with > project-find-functions. That's one approach. But I'd rather get rid of all of these function variables in my backend; they just confuse things. That's the point of my proposed change; to allow backends to eliminate the use of the function variables. -- -- Stephe