bug-global
[Top][All Lists]
Advanced

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

Re: on ordering the entries returned by global.


From: Gautam Thaker
Subject: Re: on ordering the entries returned by global.
Date: Mon, 25 May 2015 13:56:20 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hello Shigio:

I applied the patch to v6.4 and played around w/ it a bit. It works as I am expecting (though of course my testing is not 100% exhaustive.) I like it. I think the concept of "NEAREST/Locality" can be quite powerful/useful.

Gautam

On 5/24/2015 7:48 PM, Shigio YAMAGUCHI wrote:
Hi,
It's very interesting. I have made a patch for it.

The -N (--nearest) option is available with the -S or -l option.

$ cd libutil
$ global -xl main               # local search -> not found
$ global -xl main -N            # nearest search
main              363 ../global/global.c main(int argc, char **argv)
main              198 ../gozilla/gozilla.c main(int argc, char **argv)
...

Would you please try it?

Regards,
Shigio


2015-05-25 0:35 GMT+09:00 Gautam Thaker <address@hidden>:
I use global (mostly w/ ggtags in emacs.) Work quite well, thanks.

I have one feature request/idea.  In a large software system there are often 10s of function definitions w/ the same name. Global finds them all, but does not offer to order them in any sense of "nearness" to the place where global is being called from.  It would be nice if global had an option where it would find matches as it does w/ the "-l" option (in present directory or below), but if no entries are found it would then go up one directory and repeat this process till at least 1 definition is found.

This feature would greatly help manage navigation in large source trees.  I asked author of "ggtags" itself if this feature can be implemented in ggtags, and his reply was:

"Ordering is harder. We have to wait until getting all matches before re-ordering it. At the moment, ggtags is async by means of compile.el. I think this feature might be best implemented in global itself."

Again, thanks for "global".

Gautam


_______________________________________________
Bug-global mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-global




--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3


reply via email to

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