all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19466@debbugs.gnu.org, eller.helmut@gmail.com
Subject: bug#19466: 25.0.50; xref-find-def doesn't find C functions
Date: Sat, 24 Jan 2015 18:47:46 +0200	[thread overview]
Message-ID: <54C3CCB2.5030708@yandex.ru> (raw)
In-Reply-To: <83h9vgsehi.fsf@gnu.org>

On 01/24/2015 11:40 AM, Eli Zaretskii wrote:

>> To cut this part of discussion short, yes, the project system can well
>> be designed so that the "current project" depends not on the current
>> buffer but on the user's choice. So to switch between projects, you
>> invoke an explicit command, but don't visit a buffer belonging to the
>> other project. And xref can work with such a system (just as it works
>> with etags) without significant problems.
>
> Can you tell how can this be set up with xref, or point me to the
> relevant documentation?

I did. "Just like it works with etags" was a big hint in the quote above.

> I said I will -- when I have time.  I didn't have that time yet,
> sorry.

Please respond after you've found that time, then. Is it is, the current 
discussion is getting nowhere.

> I believe you it's the easiest approach.  But that doesn't yet make it
> viable, because IMO it doesn't scale.  Only very simple projects will
> be happy with such a design.  The example I described is not very
> complicated, either, but it already bumps into this limitation.  I
> think this is a clear sign that the limitation should be lifted.

Just for the sake of the argument: instead of visiting two tag tables at 
the same time from Emacs, you could instead include the external 
library's tag file in the application's tag file ("--include" etags 
argument). That doesn't seem like it'll work with several external 
libraries, but maybe it should.

That wouldn't allow you to jump from a library file to the application's 
file (I think; you'd have to use e.g. switch-buffer instead), but there 
is a certain semantic strictness in that (the library doesn't know about 
the application).

> However, it sounds like xref is not yet ready for that, either, is it?
> If so, I suggest to add these simple features, because that would
> allow to lift the limitation and make the feature much more scalable.

It's quite ready. xref will work with any such backend.

> Then there should be a projectile-add-project and
> projectile-remove-project as well.  I'm sure someone already thought
> about that.

Maybe they didn't but they haven't shared that with the rest of us. 
Given Projectile's current behavior, though it would cause 
incompatibility or complications in the implementation.

But anyway, I think I'm starting to like the idea of this approach. 
Maybe I'll try to implement it sometime.

> (I know nothing about Projectile, except that I think the
> name is unfortunate -- take this from someone who has an intimate
> familiarity with real projectiles.)

I think it's fine. A projectile is not necessarily an ammo round.

>> That is, a backend can use this approach as well.
>
> "Can" and "does" have a large gap between them, from the user's POV.
> Do we already have such a backend?  If not, I suggest to add it.

etagggggsss.

Its only drawback, from your standpoint, stems from it being the default 
one (which major modes can override), instead from being assigned in a 
globalized minor mode.

I'm not sure if we want to have it both as default, and have a minor 
mode (a by-default-on minor mode won't be good enough).

 > I'm here merely as a user, providing feedback for features someone
 > else develops.  I hope this is helpful; if not, feel free to
 > discontinue the discussion at any point you like.

I you were just a user, I'd have stopped a while ago, since I still 
don't think this feature request is useful to the majority of users.

Since you're a valued core contributor, though, I'd really like to 
accommodate your needs. However, that comes with the expectation that 
you can participate in the design and provide more nuanced requirements 
than an ordinary user would do. Maybe you'd a least look at the code, if 
not implement the improvements yourself.

> So perhaps some users, like myself, will benefit from preventing the
> override?  Is that possible with the current master?

Yes: you use the snippets I provided together with the current master. 
Whether any part of them is worthy of installing into master, is yet to 
be determined.

> Maybe I am, I don't know.  I don't care how this is called.  What I do
> care is to be able to start working on a project with minimal fuss.
> Having to spend a significant time telling Emacs just what constitutes
> the project is therefore a turn-off: it is why I dislike Visual Studio
> like "projects" and "solutions" system -- it might be OK for starting
> a project from scratch, but sucks when you need to work on an existing
> project, let alone a large one.

I'm pretty sure some users would consider having to call 
visit-tags-table as "having to spend time telling Emacs just what 
constitutes a project", as opposed to Projectile's current approach.

> It is a very much related discussion, since you think the features I
> miss in xref should be implemented by "project support".

No: the xref features should work with etags without additional 
infrastructure. We won't know that for certain, though, until you find 
that free time.

I mentioned project support, which we don't have, because you've 
expanded the discussion to supporting "this mode of work" in different 
languages and, I'm assuming, for different features. And not every 
language/framework ecosystem considers the tag files to be the best 
solution for code navigation, completion, etc.

I'll respond to the rest of this email in a separate thread, but that 
discussion is likely premature.

> etags seems to seamlessly let me have that.  So if xref is meant to
> replace etags, it should provide the same functionality, and if that
> requires some rudimentary "project support", we should include it when
> we announce deprecation of etags.

xref is meant to replace `find-tag' and `tags-apropos'. etags, as a 
package, is unlikely to ever be deprecated.





  reply	other threads:[~2015-01-24 16:47 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 [this message]
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
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=54C3CCB2.5030708@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=19466@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=eller.helmut@gmail.com \
    /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.