emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Project support and completions (Was: Re: bug#19466: 25.0.50; xref-f


From: Eli Zaretskii
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

> Date: Fri, 30 Jan 2015 08:39:17 -0500
> From: John Yates <address@hidden>
> Cc: Brief Busters <address@hidden>, Emacs developers <address@hidden>
> 
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]