* TAGS for multiply project.
@ 2010-07-22 21:32 Oleksandr Gavenko
2010-07-22 22:28 ` Andrea Crotti
0 siblings, 1 reply; 14+ messages in thread
From: Oleksandr Gavenko @ 2010-07-22 21:32 UTC (permalink / raw)
To: help-gnu-emacs
Usually I work on two source hierarchy simultaneously
(one working and one as example code or copy of working
for small fixes, testing, experimenting).
It is essential have "goto definition" feature in both
hierarchies.
Etags/Exuberant Ctags/GNU GLOBAL allow
this for single project and I actively use Etags.
But in case of Etags when I switch to another project
I need reset tag buffer.
It is possible working simultaneously on
different source hierarchy with TAGS easy?
I like solution that function like:
I press M-.
Emacs get visited file path: /path/to/proj1/subdir/file.c
and search for TAGS file in: /path/to/proj1/subdir,
/path/to/proj1, /path/to, /path sequentially.
With first TAGS occurrence Emacs do search in TAGS
for identifier and go to its definition.
For me easy put TAGS file on top of source hierarchy,
so in this case prompt for TAGS path avoided.
If 'find-tag' still have usable performance I will be happy!!!
--
Best regards!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-22 21:32 TAGS for multiply project Oleksandr Gavenko
@ 2010-07-22 22:28 ` Andrea Crotti
2010-07-23 19:36 ` Oleksandr Gavenko
0 siblings, 1 reply; 14+ messages in thread
From: Andrea Crotti @ 2010-07-22 22:28 UTC (permalink / raw)
To: help-gnu-emacs
[...]
Well I think that with semantic you could get something like this.
In C for example once you set up correctly your include path then you
can jump to the definition of anything you want from whatever symbol...
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-22 22:28 ` Andrea Crotti
@ 2010-07-23 19:36 ` Oleksandr Gavenko
2010-07-23 20:11 ` Andrea Crotti
0 siblings, 1 reply; 14+ messages in thread
From: Oleksandr Gavenko @ 2010-07-23 19:36 UTC (permalink / raw)
To: help-gnu-emacs
On 2010-07-23 1:28, Andrea Crotti wrote:
>
> [...]
>
> Well I think that with semantic you could get something like this.
> In C for example once you set up correctly your include path then you
> can jump to the definition of anything you want from whatever symbol...
>
Thx for replay. I try use Semantic.
I like some it feture, so put into .emacs:
(semantic-mode 1)
(global-semantic-idle-summary-mode 1)
(global-semantic-highlight-func-mode 1)
I have 2 question about semantic.
How can a go back after "C-c , J" (semantic-complete-jump)
like "M-*" (pop-tag-mark) for TAGS?
How can I tell where lies system header, so I can see
identifier types by 'global-semantic-idle-summary-mode' and
jump to definition by 'semantic-complete-jump'?
I try:
(mapc (lambda (item) (semantic-add-system-include item))
'(
"C:/Program Files/Microsoft Visual Studio 9.0/VC/ATLMFC/INCLUDE"
"C:/Program Files/Microsoft Visual Studio 9.0/VC/INCLUDE"
"C:/Program Files/Microsoft SDKs/Windows/v6.1/include"
))
but seems this must be evaluated per buffer (not work globally).
--
Best regards!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-23 19:36 ` Oleksandr Gavenko
@ 2010-07-23 20:11 ` Andrea Crotti
2010-07-24 8:48 ` Štěpán Němec
2010-07-25 16:19 ` Oleksandr Gavenko
0 siblings, 2 replies; 14+ messages in thread
From: Andrea Crotti @ 2010-07-23 20:11 UTC (permalink / raw)
To: help-gnu-emacs
> I like some it feture, so put into .emacs:
>
> (semantic-mode 1)
> (global-semantic-idle-summary-mode 1)
> (global-semantic-highlight-func-mode 1)
>
> I have 2 question about semantic.
>
> How can a go back after "C-c , J" (semantic-complete-jump)
> like "M-*" (pop-tag-mark) for TAGS?
>
Good question, I never asked myself since C-x b RET gets me back to the
original file, but it would be nice to have something like that.
More nice would be open the buffer in a different window because
normally that's what I want...
>
> I try:
>
> (mapc (lambda (item) (semantic-add-system-include item))
> '(
> "C:/Program Files/Microsoft Visual Studio 9.0/VC/ATLMFC/INCLUDE"
> "C:/Program Files/Microsoft Visual Studio 9.0/VC/INCLUDE"
> "C:/Program Files/Microsoft SDKs/Windows/v6.1/include"
> ))
>
> but seems this must be evaluated per buffer (not work globally).
Mm reading the documentation is exactly what they wanted.
And I think it actually makes sense somehow since you might need
different include paths for different projects.
I didn't see either how to do it globally, but there must be some way.
$INCLUDEPATH maybe?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-23 20:11 ` Andrea Crotti
@ 2010-07-24 8:48 ` Štěpán Němec
2010-07-24 21:05 ` Oleksandr Gavenko
2010-07-25 16:19 ` Oleksandr Gavenko
1 sibling, 1 reply; 14+ messages in thread
From: Štěpán Němec @ 2010-07-24 8:48 UTC (permalink / raw)
To: Andrea Crotti; +Cc: help-gnu-emacs
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>> How can a go back after "C-c , J" (semantic-complete-jump)
>> like "M-*" (pop-tag-mark) for TAGS?
>>
>
> Good question, I never asked myself since C-x b RET gets me back to the
> original file, but it would be nice to have something like that.
> More nice would be open the buffer in a different window because
> normally that's what I want...
I never used Semantic, but one would expect that `pop-global-mark' (C-x
C-SPC by default) will do what you want.
Štěpán
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-24 8:48 ` Štěpán Němec
@ 2010-07-24 21:05 ` Oleksandr Gavenko
2010-07-24 22:46 ` Richard Riley
0 siblings, 1 reply; 14+ messages in thread
From: Oleksandr Gavenko @ 2010-07-24 21:05 UTC (permalink / raw)
To: help-gnu-emacs
On 2010-07-24 11:48, Štěpán Němec wrote:
> Andrea Crotti<andrea.crotti.0@gmail.com> writes:
>
>>> How can a go back after "C-c , J" (semantic-complete-jump)
>>> like "M-*" (pop-tag-mark) for TAGS?
>>>
>>
>> Good question, I never asked myself since C-x b RET gets me back to the
>> original file, but it would be nice to have something like that.
>> More nice would be open the buffer in a different window because
>> normally that's what I want...
>
> I never used Semantic, but one would expect that `pop-global-mark' (C-x
> C-SPC by default) will do what you want.
>
Interesting command, but it seems not working as 'pop-tag-mark'.
For example I visit .el file mark position, visit .cxx
file, go to definition of local function by "C-c , j"
and try go back by "C-x C-SPC". Sadly switched to .el buffer.
--
Best regards!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-24 21:05 ` Oleksandr Gavenko
@ 2010-07-24 22:46 ` Richard Riley
2010-07-25 8:04 ` Oleksandr Gavenko
0 siblings, 1 reply; 14+ messages in thread
From: Richard Riley @ 2010-07-24 22:46 UTC (permalink / raw)
To: help-gnu-emacs
Oleksandr Gavenko <gavenkoa@gmail.com> writes:
> On 2010-07-24 11:48, Štěpán Němec wrote:
>> Andrea Crotti<andrea.crotti.0@gmail.com> writes:
>>
>>>> How can a go back after "C-c , J" (semantic-complete-jump)
>>>> like "M-*" (pop-tag-mark) for TAGS?
>>>>
>>>
>>> Good question, I never asked myself since C-x b RET gets me back to the
>>> original file, but it would be nice to have something like that.
>>> More nice would be open the buffer in a different window because
>>> normally that's what I want...
>>
>> I never used Semantic, but one would expect that `pop-global-mark' (C-x
>> C-SPC by default) will do what you want.
>>
> Interesting command, but it seems not working as 'pop-tag-mark'.
>
> For example I visit .el file mark position, visit .cxx
> file, go to definition of local function by "C-c , j"
> and try go back by "C-x C-SPC". Sadly switched to .el buffer.
The tags file used is set based on project hierarchy if I understand you
properly.
http://www.emacswiki.org/emacs/EtagsTable
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-24 22:46 ` Richard Riley
@ 2010-07-25 8:04 ` Oleksandr Gavenko
2010-07-25 8:23 ` Thierry Volpiatto
0 siblings, 1 reply; 14+ messages in thread
From: Oleksandr Gavenko @ 2010-07-25 8:04 UTC (permalink / raw)
To: help-gnu-emacs
On 2010-07-25 1:46, Richard Riley wrote:
> Oleksandr Gavenko<gavenkoa@gmail.com> writes:
>
>> On 2010-07-24 11:48, Štěpán Němec wrote:
>>> Andrea Crotti<andrea.crotti.0@gmail.com> writes:
>>>
>>>>> How can a go back after "C-c , J" (semantic-complete-jump)
>>>>> like "M-*" (pop-tag-mark) for TAGS?
>>>>>
>>>>
>>>> Good question, I never asked myself since C-x b RET gets me back to the
>>>> original file, but it would be nice to have something like that.
>>>> More nice would be open the buffer in a different window because
>>>> normally that's what I want...
>>>
>>> I never used Semantic, but one would expect that `pop-global-mark' (C-x
>>> C-SPC by default) will do what you want.
>>>
>> Interesting command, but it seems not working as 'pop-tag-mark'.
>>
>> For example I visit .el file mark position, visit .cxx
>> file, go to definition of local function by "C-c , j"
>> and try go back by "C-x C-SPC". Sadly switched to .el buffer.
>
>
> The tags file used is set based on project hierarchy if I understand you
> properly.
>
> http://www.emacswiki.org/emacs/EtagsTable
>
Many thanks to Richard Riley.
With
(require 'etags-table)
(setq etags-table-search-up-depth 1)
Emacs automatically search for TAGS file starting
from current directory and go up until found.
This allow use TAGS for multiply project
by building TAGS file on the root of each project.
And performance is good (need no more than second time wait
when go to definition).
'semantic' I also will be use for 'global-semantic-idle-summary-mode'
but I don't want replace TAGS with it
as I know how TAGS works and with etags/ctags I can
easy parse new file type based on regexp
(no need for elisp programming).
'etags-table.el' have only 100 line of elist.
Why do not include it into official Emacs?
Automatic TAGS search up depth very useful feature.
--
Best regards!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-25 8:04 ` Oleksandr Gavenko
@ 2010-07-25 8:23 ` Thierry Volpiatto
2010-07-25 16:39 ` Richard Riley
0 siblings, 1 reply; 14+ messages in thread
From: Thierry Volpiatto @ 2010-07-25 8:23 UTC (permalink / raw)
To: help-gnu-emacs
Oleksandr Gavenko <gavenkoa@gmail.com> writes:
> On 2010-07-25 1:46, Richard Riley wrote:
>> Oleksandr Gavenko<gavenkoa@gmail.com> writes:
>>
>>> On 2010-07-24 11:48, Štěpán Němec wrote:
>>>> Andrea Crotti<andrea.crotti.0@gmail.com> writes:
>>>>
>>>>>> How can a go back after "C-c , J" (semantic-complete-jump)
>>>>>> like "M-*" (pop-tag-mark) for TAGS?
>>>>>>
>>>>>
>>>>> Good question, I never asked myself since C-x b RET gets me back to the
>>>>> original file, but it would be nice to have something like that.
>>>>> More nice would be open the buffer in a different window because
>>>>> normally that's what I want...
>>>>
>>>> I never used Semantic, but one would expect that `pop-global-mark' (C-x
>>>> C-SPC by default) will do what you want.
>>>>
>>> Interesting command, but it seems not working as 'pop-tag-mark'.
>>>
>>> For example I visit .el file mark position, visit .cxx
>>> file, go to definition of local function by "C-c , j"
>>> and try go back by "C-x C-SPC". Sadly switched to .el buffer.
>>
>>
>> The tags file used is set based on project hierarchy if I understand you
>> properly.
>>
>> http://www.emacswiki.org/emacs/EtagsTable
>>
> Many thanks to Richard Riley.
>
> With
>
> (require 'etags-table)
> (setq etags-table-search-up-depth 1)
>
> Emacs automatically search for TAGS file starting
> from current directory and go up until found.
>
> This allow use TAGS for multiply project
> by building TAGS file on the root of each project.
>
> And performance is good (need no more than second time wait
> when go to definition).
>
> 'semantic' I also will be use for 'global-semantic-idle-summary-mode'
> but I don't want replace TAGS with it
> as I know how TAGS works and with etags/ctags I can
> easy parse new file type based on regexp
> (no need for elisp programming).
>
> 'etags-table.el' have only 100 line of elist.
> Why do not include it into official Emacs?
>
> Automatic TAGS search up depth very useful feature.
See also:
http://www.emacswiki.org/emacs/download/anything-etags.el
--
Thierry Volpiatto
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-25 8:23 ` Thierry Volpiatto
@ 2010-07-25 16:39 ` Richard Riley
0 siblings, 0 replies; 14+ messages in thread
From: Richard Riley @ 2010-07-25 16:39 UTC (permalink / raw)
To: help-gnu-emacs
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Oleksandr Gavenko <gavenkoa@gmail.com> writes:
>
>> On 2010-07-25 1:46, Richard Riley wrote:
>>> Oleksandr Gavenko<gavenkoa@gmail.com> writes:
>>>
>>>> On 2010-07-24 11:48, Štěpán Němec wrote:
>>>>> Andrea Crotti<andrea.crotti.0@gmail.com> writes:
>>>>>
>>>>>>> How can a go back after "C-c , J" (semantic-complete-jump)
>>>>>>> like "M-*" (pop-tag-mark) for TAGS?
>>>>>>>
>>>>>>
>>>>>> Good question, I never asked myself since C-x b RET gets me back to the
>>>>>> original file, but it would be nice to have something like that.
>>>>>> More nice would be open the buffer in a different window because
>>>>>> normally that's what I want...
>>>>>
>>>>> I never used Semantic, but one would expect that `pop-global-mark' (C-x
>>>>> C-SPC by default) will do what you want.
>>>>>
>>>> Interesting command, but it seems not working as 'pop-tag-mark'.
>>>>
>>>> For example I visit .el file mark position, visit .cxx
>>>> file, go to definition of local function by "C-c , j"
>>>> and try go back by "C-x C-SPC". Sadly switched to .el buffer.
>>>
>>>
>>> The tags file used is set based on project hierarchy if I understand you
>>> properly.
>>>
>>> http://www.emacswiki.org/emacs/EtagsTable
>>>
>> Many thanks to Richard Riley.
>>
>> With
>>
>> (require 'etags-table)
>> (setq etags-table-search-up-depth 1)
>>
>> Emacs automatically search for TAGS file starting
>> from current directory and go up until found.
>>
>> This allow use TAGS for multiply project
>> by building TAGS file on the root of each project.
>>
>> And performance is good (need no more than second time wait
>> when go to definition).
>>
>> 'semantic' I also will be use for 'global-semantic-idle-summary-mode'
>> but I don't want replace TAGS with it
>> as I know how TAGS works and with etags/ctags I can
>> easy parse new file type based on regexp
>> (no need for elisp programming).
>>
>> 'etags-table.el' have only 100 line of elist.
>> Why do not include it into official Emacs?
>>
>> Automatic TAGS search up depth very useful feature.
> See also:
> http://www.emacswiki.org/emacs/download/anything-etags.el
I tend to find "anything" pretty much overkill for something as "quickly
interactive" as tag hopping. Id love to see a video capture of you using
anything in a programming environment!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-23 20:11 ` Andrea Crotti
2010-07-24 8:48 ` Štěpán Němec
@ 2010-07-25 16:19 ` Oleksandr Gavenko
2010-07-25 18:53 ` Oleksandr Gavenko
1 sibling, 1 reply; 14+ messages in thread
From: Oleksandr Gavenko @ 2010-07-25 16:19 UTC (permalink / raw)
To: help-gnu-emacs
On 2010-07-23 23:11, Andrea Crotti wrote:
>> I like some it feture, so put into .emacs:
>>
>> (semantic-mode 1)
>> (global-semantic-idle-summary-mode 1)
>> (global-semantic-highlight-func-mode 1)
>>
>> I have 2 question about semantic.
>>
>> How can a go back after "C-c , J" (semantic-complete-jump)
>> like "M-*" (pop-tag-mark) for TAGS?
>>
>
> Good question, I never asked myself since C-x b RET gets me back to the
> original file, but it would be nice to have something like that.
> More nice would be open the buffer in a different window because
> normally that's what I want...
>
C-x b RET good work if you goto header prototype.
Really you just see it and back.
But if you go to implementation and try understand it
you also may want goto implemetation of called function,
return, read more, goto, return, read more ...
and finally return into original place.
In that case Emacs MUST organize list of jumps
and function which can binding to keys
to get easy return in original place.
Visual Studio, NetBeans, Eclipce, IAR Embedded Workbench
and many other IDE remember all jumps and allow
browse backward/forward like Firefox/Opera/Chrome
for links.
Really no one need this feature or it implemented?
--
Best regards!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-25 16:19 ` Oleksandr Gavenko
@ 2010-07-25 18:53 ` Oleksandr Gavenko
2010-07-25 19:49 ` Štěpán Němec
0 siblings, 1 reply; 14+ messages in thread
From: Oleksandr Gavenko @ 2010-07-25 18:53 UTC (permalink / raw)
To: help-gnu-emacs
On 2010-07-25 19:19, Oleksandr Gavenko wrote:
> On 2010-07-23 23:11, Andrea Crotti wrote:
>>> I like some it feture, so put into .emacs:
>>>
>>> (semantic-mode 1)
>>> (global-semantic-idle-summary-mode 1)
>>> (global-semantic-highlight-func-mode 1)
>>>
>>> I have 2 question about semantic.
>>>
>>> How can a go back after "C-c , J" (semantic-complete-jump)
>>> like "M-*" (pop-tag-mark) for TAGS?
>>>
>>
>> Good question, I never asked myself since C-x b RET gets me back to the
>> original file, but it would be nice to have something like that.
>> More nice would be open the buffer in a different window because
>> normally that's what I want...
>>
> C-x b RET good work if you goto header prototype.
> Really you just see it and back.
>
> But if you go to implementation and try understand it
> you also may want goto implemetation of called function,
> return, read more, goto, return, read more ...
> and finally return into original place.
>
> In that case Emacs MUST organize list of jumps
> and function which can binding to keys
> to get easy return in original place.
>
> Visual Studio, NetBeans, Eclipce, IAR Embedded Workbench
> and many other IDE remember all jumps and allow
> browse backward/forward like Firefox/Opera/Chrome
> for links.
>
> Really no one need this feature or it implemented?
>
Eric M. Ludlam answer me in emacs.semantic:
http://article.gmane.org/gmane.emacs.semantic/2449
Seems his solution useful but I have trouble with
C-x B key binding, which defined in mru-bookmark.el:
(define-key km "\C-xB" 'semantic-mrub-switch-tags)
It was hidden by iswitchb.el:
(global-set-key "\C-xb" 'iswitchb-buffer)
C-h k C-x B say:
C-x b (***translated from*** C-x B) runs the command iswitchb-buffer
What mean marked by * text?
--
Best regards!
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: TAGS for multiply project.
2010-07-25 18:53 ` Oleksandr Gavenko
@ 2010-07-25 19:49 ` Štěpán Němec
0 siblings, 0 replies; 14+ messages in thread
From: Štěpán Němec @ 2010-07-25 19:49 UTC (permalink / raw)
To: Oleksandr Gavenko; +Cc: help-gnu-emacs
Oleksandr Gavenko <gavenkoa@gmail.com> writes:
[...]
> http://article.gmane.org/gmane.emacs.semantic/2449
>
> Seems his solution useful but I have trouble with
> C-x B key binding, which defined in mru-bookmark.el:
>
> (define-key km "\C-xB" 'semantic-mrub-switch-tags)
>
> It was hidden by iswitchb.el:
>
> (global-set-key "\C-xb" 'iswitchb-buffer)
>
> C-h k C-x B say:
>
> C-x b (***translated from*** C-x B) runs the command iswitchb-buffer
>
> What mean marked by * text?
It means what it says :-P
When Emacs does not find a binding for a shifted key, it translates it
to the unshifted variant and gives you that. So the message indicates
you *don't* really have anything bound to C-x B (or it is a bug, but I
haven't heard about that one yet (and such bindings have always worked
for me) so I tend to assume it's the former).
HTH,
Štěpán
^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <mailman.5.1279834337.32138.help-gnu-emacs@gnu.org>]
* Re: TAGS for multiply project.
[not found] <mailman.5.1279834337.32138.help-gnu-emacs@gnu.org>
@ 2010-07-23 13:28 ` Scott Frazer
0 siblings, 0 replies; 14+ messages in thread
From: Scott Frazer @ 2010-07-23 13:28 UTC (permalink / raw)
To: help-gnu-emacs
On 7/22/10 5:32 PM, Oleksandr Gavenko wrote:
> Usually I work on two source hierarchy simultaneously
> (one working and one as example code or copy of working
> for small fixes, testing, experimenting).
>
> It is essential have "goto definition" feature in both
> hierarchies.
>
> Etags/Exuberant Ctags/GNU GLOBAL allow
> this for single project and I actively use Etags.
>
> But in case of Etags when I switch to another project
> I need reset tag buffer.
>
> It is possible working simultaneously on
> different source hierarchy with TAGS easy?
>
> I like solution that function like:
>
> I press M-.
>
> Emacs get visited file path: /path/to/proj1/subdir/file.c
> and search for TAGS file in: /path/to/proj1/subdir,
> /path/to/proj1, /path/to, /path sequentially.
>
> With first TAGS occurrence Emacs do search in TAGS
> for identifier and go to its definition.
>
> For me easy put TAGS file on top of source hierarchy,
> so in this case prompt for TAGS path avoided.
>
> If 'find-tag' still have usable performance I will be happy!!!
>
I use (and wrote) this:
http://www.emacswiki.org/emacs/EtagsTable
Scott
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2010-07-25 19:49 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 21:32 TAGS for multiply project Oleksandr Gavenko
2010-07-22 22:28 ` Andrea Crotti
2010-07-23 19:36 ` Oleksandr Gavenko
2010-07-23 20:11 ` Andrea Crotti
2010-07-24 8:48 ` Štěpán Němec
2010-07-24 21:05 ` Oleksandr Gavenko
2010-07-24 22:46 ` Richard Riley
2010-07-25 8:04 ` Oleksandr Gavenko
2010-07-25 8:23 ` Thierry Volpiatto
2010-07-25 16:39 ` Richard Riley
2010-07-25 16:19 ` Oleksandr Gavenko
2010-07-25 18:53 ` Oleksandr Gavenko
2010-07-25 19:49 ` Štěpán Němec
[not found] <mailman.5.1279834337.32138.help-gnu-emacs@gnu.org>
2010-07-23 13:28 ` Scott Frazer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).