From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Project support and completions (Was: Re: bug#19466: 25.0.50; xref-find-def doesn't find C functions) Date: Fri, 30 Jan 2015 17:36:23 +0200 Message-ID: <83k304l1qg.fsf@gnu.org> References: <8361cucl3u.fsf@gnu.org> <54A230CD.3040309@yandex.ru> <83vbktb1ct.fsf@gnu.org> <54A2EE15.3020406@yandex.ru> <831tnhasx0.fsf@gnu.org> <54A6DAF6.5070605@yandex.ru> <831tna9tmr.fsf@gnu.org> <54A9C94F.8040701@yandex.ru> <83vbkl99vm.fsf@gnu.org> <54B8878A.4050506@yandex.ru> <54B8C22B.3080200@gmx.at> <54BC7A77.5020307@yandex.ru> <54BCC033.2010104@gmx.at> <83oapuy8ew.fsf@gnu.org> <54BDC34C.5070309@yandex.ru> <83wq4hwejl.fsf@gnu.org> <54BEBF63.9050709@yandex.ru> <8361c0w16n.fsf@gnu.org> <54C063E3.8020401@yandex.ru> <83a91avglz.fsf@gnu.org> <54C1655E.4050403@yandex.ru> <83r3uluawd.fsf@gnu.org> <54C28635.8070606@yandex.ru> <83twzhryyq.fsf@gnu.org> <54C2C9DC.1050908@yandex.ru> <83h9vgsehi.fsf@gnu.org> <54C3E7B6.2020006@yandex.ru> <837fwbstls.fsf@gnu.org> <54C429D8.6010302@yandex.ru> <83twzerges.fsf@gnu.org> <838ugkn62m.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422632216 11105 80.91.229.3 (30 Jan 2015 15:36:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Jan 2015 15:36:56 +0000 (UTC) Cc: emacs-devel@gnu.org, dgutov@yandex.ru To: John Yates Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 30 16:36:56 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 1YHDcp-0005FC-OB for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 16:36:51 +0100 Original-Received: from localhost ([::1]:37398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHDcp-0004jB-6g for ged-emacs-devel@m.gmane.org; Fri, 30 Jan 2015 10:36:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHDcU-0004io-Mz for emacs-devel@gnu.org; Fri, 30 Jan 2015 10:36:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHDcR-000242-Dh for emacs-devel@gnu.org; Fri, 30 Jan 2015 10:36:30 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:33578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHDcR-00023x-0y for emacs-devel@gnu.org; Fri, 30 Jan 2015 10:36:27 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NIZ00200XLIVJ00@mtaout29.012.net.il> for emacs-devel@gnu.org; Fri, 30 Jan 2015 17:32:50 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIZ0001CXUQBX40@mtaout29.012.net.il>; Fri, 30 Jan 2015 17:32:50 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.185 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:182062 Archived-At: > Date: Fri, 30 Jan 2015 08:39:17 -0500 > From: John Yates > Cc: Brief Busters , Emacs developers > > The git-new-workstation script automates setting up light weight per branch > workspaces. (They are light weight primarily in the sense that they share a > single history database stored in a common parent workspace.) This arrangement > enables multiplexing work across multiple directories merely by opening a > different path. Note: no need even to cd to a different directory. So now there > are multiple copies of every file, some different, most identical, in congruent > directory trees. Going back to my earlier example using git-new-workspace I > would now have two workspaces, B1 and B2, corresponding to my two branches, > each containing files F1 and F2 and each containing an up to date tags > database. I perform some work in B1 with the net effect that I have a loaded > tags table describing B1. I then visit B2::F2, do some work involving tag T > causing me to want to visit T's definition. At this point C-. takes me to T's > definition in B1::F1, not in B2::F1 as I would want. The problem is that both > files exist on my disk and are similar if not identical. Thus, unless I am > especially vigilant, I edit and save the wrong file. You could do one of 2: (a) have both TAGS tables for both workspaces loaded at all times. Then M-. will consider both, although this is less efficient (and the efficiency goes down with more workspaces) because there are more candidates for each tag. The other possibility is to switch TAGS tables when you switch to the other workspace. This is slightly more complex, but scales much better. You could do this via find-file-hook, for example, or some other device. Emacs has enough features that can be used for this. All in all, I see no problems either way, and I don't understand your gripe. > To reiterate my effort to switch branch contexts was nothing more than C-x C-f > or C-x b. Given the current tags implementation getting emacs to use the > correct tags database involves explicit manipulation of session state via > visit-tags-table. Hence my gripe about statefulness. I see no problem here. Your own state changes as well.