all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Yates <john@yates-sheets.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs developers <emacs-devel@gnu.org>, Brief Busters <dgutov@yandex.ru>
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 08:39:17 -0500	[thread overview]
Message-ID: <CAJnXXogCBSN-oW5wQ_S2q8=AQPEt_+Tg5HFA+xLBcwHVi3dfuA@mail.gmail.com> (raw)
In-Reply-To: <838ugkn62m.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3017 bytes --]

JY> To me your proposed model of "add project" / "remove project" seemed
JY> just too reminiscent of etag's paradigm for managing tag tables.

EZ> There's nothing inherently wrong with that, is there?

JY> Of late I have been using git-new-workspace. In that setting
JY> find-tag forever seems to open the _wrong_ file. More perniciously
JY> it often opens one that looks right though in a different workspace,
JY> thereby slowing me down and making me paranoid.

EZ> I never used git-new-workspace, so I don't really understand what you
EZ> describe here.  In any case, this sounds like a problem with the
EZ> program that created the TAGS file, not with find-tag per se: the
EZ> latter just obeys what's in the database.

EZ> And I'd still want to know what are the problems with the stateful
EZ> approach I proposed.

The historic way to use git to do work across different branches within a
single code base is to multiplex a single workspace.  This means that at
any instant one has available only a single branch and a single set of
(possibly out of date) tags.  Assume then that I have branches B1 and B2,
along with tag T defined in file F1 and referenced in file F2.  I generate
a tags database while I have branch B1 checked out.  I later switch to
branch B2 though I do not rebuild nor my tags database.  I open file F2
open and want to visit the definition of tag T.  My tags database, though
somewhat out of date (it describes branch B1), correctly opens B2's version
of file F1 (the only version available) and if I am lucky still gets me to
T's definition.

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.

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 hope that helps,

/john

[-- Attachment #2: Type: text/html, Size: 3351 bytes --]

  reply	other threads:[~2015-01-30 13:39 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 19:27 bug#19466: 25.0.50; xref-find-def doesn't find C functions Eli Zaretskii
2014-12-30  4:57 ` Dmitry Gutov
2014-12-30 15:31   ` Eli Zaretskii
2014-12-30 18:05     ` Stefan Monnier
2014-12-30 18:25       ` Dmitry Gutov
2014-12-30 18:34         ` Eli Zaretskii
2014-12-30 18:38           ` Dmitry Gutov
2014-12-30 22:44           ` Stefan Monnier
2015-01-02 17:52             ` Dmitry Gutov
2015-01-04 20:10               ` Stefan Monnier
2015-01-04 20:29                 ` Eli Zaretskii
2015-01-04 23:14                   ` Dmitry Gutov
2015-01-05  3:36                     ` Eli Zaretskii
2015-01-05  6:11                       ` Stefan Monnier
2015-01-16  3:37                       ` Dmitry Gutov
2015-01-16  7:47                         ` martin rudalics
2015-01-16  9:04                           ` Eli Zaretskii
2015-01-16  9:28                             ` martin rudalics
2015-01-19  3:31                           ` Dmitry Gutov
2015-01-19  8:28                             ` martin rudalics
2015-01-19 13:32                               ` Dmitry Gutov
2015-01-20  8:01                                 ` martin rudalics
2015-01-20 12:14                                   ` Dmitry Gutov
2015-01-20 14:51                                     ` martin rudalics
2015-01-21  7:20                                       ` Dmitry Gutov
2015-01-21 10:49                                         ` martin rudalics
2015-01-21 14:24                                           ` Dmitry Gutov
2015-01-21 16:54                                             ` martin rudalics
2015-01-21 18:00                                               ` martin rudalics
2015-01-21 20:02                                                 ` Stefan Monnier
2015-01-22  2:32                                                   ` Dmitry Gutov
2015-01-22 18:22                                                   ` martin rudalics
2015-01-21 19:02                                               ` Dmitry Gutov
2015-01-22  2:26                                               ` Dmitry Gutov
2015-01-22 18:22                                                 ` martin rudalics
2015-01-19 17:41                               ` Eli Zaretskii
2015-01-20  2:54                                 ` Dmitry Gutov
2015-01-20 17:24                                   ` Eli Zaretskii
2015-01-20 20:49                                     ` Dmitry Gutov
2015-01-21 16:25                                       ` Eli Zaretskii
2015-01-22  2:43                                         ` Dmitry Gutov
2015-01-22 18:02                                           ` Eli Zaretskii
2015-01-22 21:02                                             ` Dmitry Gutov
2015-01-23  9:03                                               ` Eli Zaretskii
2015-01-23 17:34                                                 ` Dmitry Gutov
2015-01-23 21:03                                                   ` Eli Zaretskii
2015-01-23 22:23                                                     ` Dmitry Gutov
2015-01-24  9:40                                                       ` Eli Zaretskii
2015-01-24 16:47                                                         ` Dmitry Gutov
2015-01-31  8:52                                                           ` Eli Zaretskii
2015-02-01  2:24                                                             ` Dmitry Gutov
2015-02-01 16:01                                                               ` Eli Zaretskii
2015-02-01 20:11                                                                 ` Dmitry Gutov
2015-02-01 20:30                                                                   ` Eli Zaretskii
2015-02-01 20:53                                                                     ` Dmitry Gutov
2015-02-02  3:32                                                                       ` Eli Zaretskii
2015-02-23  2:01                                                                         ` Dmitry Gutov
2015-01-24 18:43                                                         ` Project support and completions (Was: Re: bug#19466: 25.0.50; xref-find-def doesn't find C functions) Dmitry Gutov
2015-01-24 22:26                                                           ` Eli Zaretskii
2015-01-24 23:25                                                             ` Dmitry Gutov
2015-01-25  0:21                                                               ` John Yates
2015-01-25 16:09                                                                 ` Eli Zaretskii
2015-01-29 21:19                                                                   ` John Yates
2015-01-30  6:19                                                                     ` Eli Zaretskii
2015-01-30 13:39                                                                       ` John Yates [this message]
2015-01-30 15:36                                                                         ` Eli Zaretskii
2015-01-30 18:14                                                                           ` Project support and completions Stefan Monnier
2015-01-30 21:34                                                                             ` Eli Zaretskii
2015-01-31  6:37                                                                               ` Stefan Monnier
2015-01-31  7:38                                                                                 ` Eli Zaretskii
2015-01-31 22:52                                                                                   ` Stefan Monnier
2015-02-01 20:42                                                                             ` Stephen Leake
2015-01-30 16:17                                                                       ` Stefan Monnier
2015-01-30 16:26                                                                         ` Eli Zaretskii
2015-01-30 20:36                                                                         ` Scott Frazer
2015-01-25 16:08                                                               ` Eli Zaretskii
2015-01-25 18:18                                                                 ` Dmitry Gutov
2015-01-25 19:22                                                                   ` Eli Zaretskii
2015-01-25 23:03                                                                     ` Dmitry Gutov
2015-01-26  5:51                                                                       ` Eli Zaretskii
2015-01-25 18:31                                                                 ` Stephen Leake
2015-01-25 15:01                                                             ` Stefan Monnier
2015-01-25 16:01                                                               ` Eli Zaretskii
2015-01-25 18:33                                                                 ` Stefan Monnier
2015-01-25 19:24                                                                   ` Eli Zaretskii
2015-01-25 22:43                                                                     ` Stefan Monnier
2015-01-25 23:05                                                                       ` Dmitry Gutov
2015-01-26  3:46                                                                         ` Stefan Monnier
2015-01-26  4:23                                                                           ` Dmitry Gutov
2015-01-26 15:07                                                                             ` Stefan Monnier
2015-01-26 17:33                                                                               ` Eli Zaretskii
2015-01-26 18:51                                                                                 ` Stephen Leake
2015-01-26  5:44                                                                       ` Eli Zaretskii
2015-01-26 15:11                                                                         ` Stefan Monnier
2015-01-26 17:34                                                                           ` Eli Zaretskii
2015-01-23 21:15                                                   ` bug#19466: 25.0.50; xref-find-def doesn't find C functions Stefan Monnier
2015-01-23 21:34                                                     ` Eli Zaretskii
2015-01-16  9:00                         ` Eli Zaretskii
2015-01-04 22:14                 ` Dmitry Gutov
2014-12-30 20:43     ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJnXXogCBSN-oW5wQ_S2q8=AQPEt_+Tg5HFA+xLBcwHVi3dfuA@mail.gmail.com' \
    --to=john@yates-sheets.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.