emacs-devel
[Top][All Lists]
Advanced

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

Re: Generalizing find-definition


From: Dmitry Gutov
Subject: Re: Generalizing find-definition
Date: Fri, 07 Nov 2014 22:56:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.51 (gnu/linux)

Stephen Leake <address@hidden> writes:

>> I think it should return "baz" here, if we want to go this way at all.
>> And then that value could be passed to a "search-definition-function",
>> which will perform a full non-precise scan.
>
> When would that be useful?

In general? In situations similar to whenever a user would call
`apropos' when working with ELisp. Sometimes you don't actually know
what you're looking for, so you try one or several keywords.

>> It apparent that we won't be able to do precise searches for identifiers
>> in most cases, 
>
> It requires support from the compiler/backend, but that should always be
> available (presumably you have the compiler if you are editing the
> code). So why do you think we can't do precise searches in most cases?

You're assuming a statically typed language. Arguably, people writing in
dynamic languages are at least a significant portion of Emacs users, if
not the majority.

And C/C++ users will also be at a disadvantage here, unless they use a
Clang-based tool, which we won't support in Emacs proper at least in the
near future. Or GCC developers deliver on that front.

> Hmm, maybe you won't have the compiler installed if you are just reading
> someone else's code. I'm not sure that's an important use case.

If we don't have a tool which can respond to a
search-definition-function request, this is not an interesting situation
anyway, even if a plausible one.



reply via email to

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