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: Shigio YAMAGUCHI
Subject: Re: on ordering the entries returned by global.
Date: Mon, 25 May 2015 08:48:12 +0900

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

Attachment: global.diff
Description: Text document


reply via email to

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