Re: Help! Need to display shorter paths in emacs using gtags-mode...
Marco Gidde <[email protected]>
| Newsgroups | gmane.comp.gnu.global.general |
|---|---|
| Organization | Linux Private Site |
| Message-ID | <[email protected]> |
Hi, "SV" <[email protected]> writes: > In that case, would it be possible to display the path names > wrapped and indented the way it is displayed by cscope, for > instance? a few months ago I switched from cscope to global because cscope wasn't able to parse my c++ sources properly. Since xcscope.el is in my opinion superior to gtags.el I took gtags.el and rewrote it almost completely. If you are (or anybody else here is) interested in testing it, I might send the resulting xgtags.el either as a private email or maybe directly to this list. Because I took the cscope interface as a guide xgtags.el differs from gtags.el in a lot of ways. First of all, it is completely stack based: there is only one *xgtags* buffer that is filled with the results of the current search. If you pop the stack, the previous search results are restored (this is even better than xcscope.el :-)) The xgtags-minor mode provides some useful operations on this search/select buffer (without switching to it): next and previous result, pop stack and (maybe the highlight) query-replace. Some aspects of the original gtags.el behavior can be customized: - overwrite the original find-tag/pop-tag bindings or not - mouse support - open files read only - kill buffers on pop-stack The default values are like those of gtags.el. xgtags.el also supports queries on different GTAGS databases and automatic incremental update of the databases. The mode line entry of the minor mode provides you with the number of items currently on the stack, while the select major mode shows the number of search results and the number of the currently selected tag. The output looks like this: /home/mg/LANG/C++/global/libutil/find.c find_read[67] * while (path = find_read()) { find_read[469] * find_read: read path without GPATH. find_read[474] find_read(void) find_read[486] die("find_read: internal error."); /home/mg/LANG/C++/global/libutil/find.h find_read[27] char *find_read(void); /home/mg/LANG/C++/global/libutil/xargs.c find_read[104] * repeatable find_read find_read[112] return repeat_lastpath = find_read(); What it misses (as you probably guessed) is some documentation. It should be quite usable, at least I use it every day on the job. Currently it is only tested with gnus emacs 21.3.1, but should also work with xemacs, when the usual compatibility packages are loaded. Feel free to contact me if all this sounds interesting to you. Regards, Marco