unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to use etags in emacs
@ 2009-07-08 19:36 n179911
  2009-07-08 22:37 ` n179911
  2009-07-09  3:15 ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: n179911 @ 2009-07-08 19:36 UTC (permalink / raw)
  To: help-gnu-emacs

I read this:

http://www.emacswiki.org/emacs/EmacsTags

But can you please tell me how can i
* find the occurrence of the place calling a certain function
* after i click 'M . find tag', it loads the .h file of that class.
How can i load the .cpp of that class?




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
  2009-07-08 19:36 How to use etags in emacs n179911
@ 2009-07-08 22:37 ` n179911
  2009-07-08 22:43   ` Drew Adams
  2009-07-09  3:15 ` Eli Zaretskii
  1 sibling, 1 reply; 13+ messages in thread
From: n179911 @ 2009-07-08 22:37 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I have installed icicles with etags too.
And I have read this:
http://www.emacswiki.org/emacs/EmacsTags#toc4

But I can't get it to work like cscope type of code browser.
I would like to know how to get the
* all the places which calls a function (I give the name)
* declaration (.h) and implementation (.cpp) of a given function  (I
give the name)
* open the file (I give the name)

On Wed, Jul 8, 2009 at 12:36 PM, n179911<n179911@gmail.com> wrote:
> I read this:
>
> http://www.emacswiki.org/emacs/EmacsTags
>
> But can you please tell me how can i
> * find the occurrence of the place calling a certain function
> * after i click 'M . find tag', it loads the .h file of that class.
> How can i load the .cpp of that class?
>




^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: How to use etags in emacs
  2009-07-08 22:37 ` n179911
@ 2009-07-08 22:43   ` Drew Adams
  2009-07-08 23:20     ` n179911
  0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2009-07-08 22:43 UTC (permalink / raw)
  To: 'n179911', help-gnu-emacs

By default, Emacs TAGS do not record positions where a function is _called_.
They record only positions where a function (or variable etc.) is _defined_.

I can't speak to your other questions.

None of this has anything to do with Icicles, BTW. Icicles does not change which
tags you have, that is, which locations you can visit. Icicles just makes it
easier to find them and browse among them.

> I have installed icicles with etags too.
> And I have read this:
> http://www.emacswiki.org/emacs/EmacsTags#toc4
> 
> But I can't get it to work like cscope type of code browser.
> I would like to know how to get the
> * all the places which calls a function (I give the name)
> * declaration (.h) and implementation (.cpp) of a given function  (I
> give the name)
> * open the file (I give the name)
> 
> > I read this:
> >
> > http://www.emacswiki.org/emacs/EmacsTags
> >
> > But can you please tell me how can i
> > * find the occurrence of the place calling a certain function
> > * after i click 'M . find tag', it loads the .h file of that class.
> > How can i load the .cpp of that class?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
  2009-07-08 22:43   ` Drew Adams
@ 2009-07-08 23:20     ` n179911
  2009-07-09 15:51       ` Drew Adams
  0 siblings, 1 reply; 13+ messages in thread
From: n179911 @ 2009-07-08 23:20 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

Thanks. But how can I use icicles with tag. I read

http://www.emacswiki.org/emacs/Icicles_-_Tags_Enhancements

And I tried "ln Icicles, you can use multi-command ‘icicle-find-tag’,
bound to `M-.’ in Icicle mode, to do all of this."

I get no output. I test it with a simple and I sure existing symbol.
And I test it the same symbol with icy-mode off, it does works.

Thank you for any more help.


On Wed, Jul 8, 2009 at 3:43 PM, Drew Adams<drew.adams@oracle.com> wrote:
> By default, Emacs TAGS do not record positions where a function is _called_.
> They record only positions where a function (or variable etc.) is _defined_.
>
> I can't speak to your other questions.
>
> None of this has anything to do with Icicles, BTW. Icicles does not change which
> tags you have, that is, which locations you can visit. Icicles just makes it
> easier to find them and browse among them.
>
>> I have installed icicles with etags too.
>> And I have read this:
>> http://www.emacswiki.org/emacs/EmacsTags#toc4
>>
>> But I can't get it to work like cscope type of code browser.
>> I would like to know how to get the
>> * all the places which calls a function (I give the name)
>> * declaration (.h) and implementation (.cpp) of a given function  (I
>> give the name)
>> * open the file (I give the name)
>>
>> > I read this:
>> >
>> > http://www.emacswiki.org/emacs/EmacsTags
>> >
>> > But can you please tell me how can i
>> > * find the occurrence of the place calling a certain function
>> > * after i click 'M . find tag', it loads the .h file of that class.
>> > How can i load the .cpp of that class?
>
>




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
       [not found] <mailman.2100.1247081770.2239.help-gnu-emacs@gnu.org>
@ 2009-07-09  1:01 ` Giorgos Keramidas
  2009-07-09  4:30   ` n179911
  0 siblings, 1 reply; 13+ messages in thread
From: Giorgos Keramidas @ 2009-07-09  1:01 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, 8 Jul 2009 12:36:02 -0700, n179911 <n179911@gmail.com> wrote:
> I read this:
>
> http://www.emacswiki.org/emacs/EmacsTags
>
> But can you please tell me how can i
> * find the occurrence of the place calling a certain function
> * after i click 'M . find tag', it loads the .h file of that class.
> How can i load the .cpp of that class?

Repeated `C-u M-.' commands will cycle through all the places marked
with the particular tag.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
  2009-07-08 19:36 How to use etags in emacs n179911
  2009-07-08 22:37 ` n179911
@ 2009-07-09  3:15 ` Eli Zaretskii
  1 sibling, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2009-07-09  3:15 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 8 Jul 2009 12:36:02 -0700
> From: n179911 <n179911@gmail.com>
> 
> But can you please tell me how can i
> * find the occurrence of the place calling a certain function

Install GNU ID-utils, and then use the "M-x gid" command that comes
with it.

> * after i click 'M . find tag', it loads the .h file of that class.
> How can i load the .cpp of that class?

"C-u M-.".




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
  2009-07-09  1:01 ` Giorgos Keramidas
@ 2009-07-09  4:30   ` n179911
  2009-07-09 11:14     ` Giorgos Keramidas
  2009-07-09 18:10     ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: n179911 @ 2009-07-09  4:30 UTC (permalink / raw)
  To: Giorgos Keramidas; +Cc: help-gnu-emacs

On Wed, Jul 8, 2009 at 6:01 PM, Giorgos
Keramidas<keramida@ceid.upatras.gr> wrote:
> On Wed, 8 Jul 2009 12:36:02 -0700, n179911 <n179911@gmail.com> wrote:
>> I read this:
>>
>> http://www.emacswiki.org/emacs/EmacsTags
>>
>> But can you please tell me how can i
>> * find the occurrence of the place calling a certain function
>> * after i click 'M . find tag', it loads the .h file of that class.
>> How can i load the .cpp of that class?
>
> Repeated `C-u M-.' commands will cycle through all the places marked
> with the particular tag.
>
>
Thanks. Is there anyway to list all the places which marked with the tag.
And when you said 'marked with the particular tag'. does it include
the place where it called that function and the place where that
function is declared and implemented?




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
  2009-07-09  4:30   ` n179911
@ 2009-07-09 11:14     ` Giorgos Keramidas
  2009-07-09 15:51       ` Drew Adams
  2009-07-09 18:10     ` Eli Zaretskii
  1 sibling, 1 reply; 13+ messages in thread
From: Giorgos Keramidas @ 2009-07-09 11:14 UTC (permalink / raw)
  To: n179911; +Cc: help-gnu-emacs

On Wed, 8 Jul 2009 21:30:41 -0700, n179911 <n179911@gmail.com> wrote:
>On Wed, Jul 8, 2009 at 6:01 PM,
>Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:
>>> But can you please tell me how can i
>>> * find the occurrence of the place calling a certain function
>>> * after i click 'M . find tag', it loads the .h file of that class.
>>> How can i load the .cpp of that class?
>>
>> Repeated `C-u M-.' commands will cycle through all the places marked
>> with the particular tag.
>
> Thanks. Is there anyway to list all the places which marked with the
> tag.  And when you said 'marked with the particular tag'. does it
> include the place where it called that function and the place where
> that function is declared and implemented?

There is `M-x tags-search RET regexp RET'.  This searches for tags
matching `regexp' and it can iterate through more than one tag table.
Once a single match is found you can find the next one with `M-,' and
repeat until you have finished going through all the matches, or you
have found what you were looking for.

The temporary buffers that have no matches are closed as tags-search
goes through the motions, so you are finally let with a buffer list
like (a sample from my iswitchb buffer list):

: MR Name                    Size Mode             Filename/Process
: -- ----                    ---- ----             ----------------
:[ Default ]
:    setup.c                18454 C/l              /work/foo/src/setup.c
:    net.c                  18077 C/l              /work/foo/src/net.c
:  % foo                     2947 Dired by name    /work/foo/
: *  *Messages*              5070 Fundamental

The buffers under `/work/foo' are those that had at least one match.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: How to use etags in emacs
  2009-07-08 23:20     ` n179911
@ 2009-07-09 15:51       ` Drew Adams
  2009-07-09 16:21         ` n179911
  0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2009-07-09 15:51 UTC (permalink / raw)
  To: 'n179911'; +Cc: help-gnu-emacs

> Thanks. But how can I use icicles with tag. I read
> http://www.emacswiki.org/emacs/Icicles_-_Tags_Enhancements
> 
> And I tried "ln Icicles, you can use multi-command 'icicle-find-tag',
> bound to `M-.' in Icicle mode, to do all of this."
> 
> I get no output. I test it with a simple and I sure existing symbol.
> And I test it the same symbol with icy-mode off, it does works.
> 
> Thank you for any more help.

Please file an Icicles bug (using `M-x icicle-send-bug-report') if you think
there is a problem. Provide a clear recipe, starting with `emacs -Q' (no init
file, ~/.emacs) to reproduce what you see.

I cannot tell anything from the cryptic description you gave so far.

Here's how to use `M-.' in Icicle mode:

1. M-.

2. Type the text you want to match - e.g. `info'.

3. Hit `S-TAB' to see all matches, or type something (e.g. `face') to see
everything that matches that text also. You see the matches in buffer
*Completions*.

4. Hit `C-next' to vist the (source file) matches in sequence. Or hit `next' to
cycle and choose a match, then hit `C-RET' to visit it. Or type some more, to
narrow the set of matches. (IOW, you can either complete your input or cycle
among completion candidates.)

Use `RET' instead of `C-RET' if you just want to visit a single match.

You can match several patterns, as an intersection, using `S-SPC' (progressive
completion). E.g., you can match `face' and `blue':
`M-. info RET face M-SPC blue'. That lets you browse all `info' tags that
contain both strings: `face' and `blue'.

You can change the pattern to match at any time (after you enter the initial
pattern, e.g. `info', using RET). E.g., remove `face' from the minibuffer and
type `file' instead, to find `info' tags that contain `file'.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: How to use etags in emacs
  2009-07-09 11:14     ` Giorgos Keramidas
@ 2009-07-09 15:51       ` Drew Adams
  0 siblings, 0 replies; 13+ messages in thread
From: Drew Adams @ 2009-07-09 15:51 UTC (permalink / raw)
  To: 'Giorgos Keramidas', 'n179911'; +Cc: help-gnu-emacs

> > Is there anyway to list all the places which marked with the
> > tag.  And when you said 'marked with the particular tag'. does it
> > include the place where it called that function and the place where
> > that function is declared and implemented?
> 
> There is `M-x tags-search RET regexp RET'.  This searches for tags
> matching `regexp' and it can iterate through more than one tag table.
> Once a single match is found you can find the next one with `M-,' and
> repeat until you have finished going through all the matches, or you
> have found what you were looking for.

Since the OP is using Icicles: Use `icicle-tags-search' to search and replace
text in source files that are indexed by a TAGS file. It does what
`tags-search', `tags-query-replace', and `tags-loop-continue' (`M-,') do
together (and more).





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
  2009-07-09 15:51       ` Drew Adams
@ 2009-07-09 16:21         ` n179911
  2009-07-09 17:00           ` Drew Adams
  0 siblings, 1 reply; 13+ messages in thread
From: n179911 @ 2009-07-09 16:21 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

Thank you very much for your detailed explanation.

Does `S-TAB' mean Space key with Tab key? or Shift key with Tab Key
What does 'C-next' mean? Control key with what key?
Does 'S-SPC' mean Space key with Space key?

Thank you.




On Thu, Jul 9, 2009 at 8:51 AM, Drew Adams<drew.adams@oracle.com> wrote:
>> Thanks. But how can I use icicles with tag. I read
>> http://www.emacswiki.org/emacs/Icicles_-_Tags_Enhancements
>>
>> And I tried "ln Icicles, you can use multi-command 'icicle-find-tag',
>> bound to `M-.' in Icicle mode, to do all of this."
>>
>> I get no output. I test it with a simple and I sure existing symbol.
>> And I test it the same symbol with icy-mode off, it does works.
>>
>> Thank you for any more help.
>
> Please file an Icicles bug (using `M-x icicle-send-bug-report') if you think
> there is a problem. Provide a clear recipe, starting with `emacs -Q' (no init
> file, ~/.emacs) to reproduce what you see.
>
> I cannot tell anything from the cryptic description you gave so far.
>
> Here's how to use `M-.' in Icicle mode:
>
> 1. M-.
>
> 2. Type the text you want to match - e.g. `info'.
>
> 3. Hit `S-TAB' to see all matches, or type something (e.g. `face') to see
> everything that matches that text also. You see the matches in buffer
> *Completions*.
>
> 4. Hit `C-next' to vist the (source file) matches in sequence. Or hit `next' to
> cycle and choose a match, then hit `C-RET' to visit it. Or type some more, to
> narrow the set of matches. (IOW, you can either complete your input or cycle
> among completion candidates.)
>
> Use `RET' instead of `C-RET' if you just want to visit a single match.
>
> You can match several patterns, as an intersection, using `S-SPC' (progressive
> completion). E.g., you can match `face' and `blue':
> `M-. info RET face M-SPC blue'. That lets you browse all `info' tags that
> contain both strings: `face' and `blue'.
>
> You can change the pattern to match at any time (after you enter the initial
> pattern, e.g. `info', using RET). E.g., remove `face' from the minibuffer and
> type `file' instead, to find `info' tags that contain `file'.
>
>




^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: How to use etags in emacs
  2009-07-09 16:21         ` n179911
@ 2009-07-09 17:00           ` Drew Adams
  0 siblings, 0 replies; 13+ messages in thread
From: Drew Adams @ 2009-07-09 17:00 UTC (permalink / raw)
  To: 'n179911'; +Cc: help-gnu-emacs

> Thank you very much for your detailed explanation.
> 
> Does `S-TAB' mean Space key with Tab key? or Shift key with Tab Key
> What does 'C-next' mean? Control key with what key?
> Does 'S-SPC' mean Space key with Space key? Thank you.

See the Emacs manual, node `User Input'. This is the standard Emacs key
notation, which is good to learn.

`S-' means press and hold the Shift key.
`C-' means press and hold the Control key.
`M-' means press and hold the meta key, which is typically the ALT key.
`SPC' means hit the space bar.
`S-SPC' means press and hold `Shift while hitting the space bar.

The `next' and `prior' keys are typically labeled `Page Down' and `Page Up',
respectively, on your keyboard. `C-next' means press and hold the Control key
while hitting `next'.

Start by learning to walk, before you try to run. You need to spend some time
reading the Emacs doc. Start by following the Emacs tutorial: `C-h t' or menu
Help > Tutorial. 





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to use etags in emacs
  2009-07-09  4:30   ` n179911
  2009-07-09 11:14     ` Giorgos Keramidas
@ 2009-07-09 18:10     ` Eli Zaretskii
  1 sibling, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2009-07-09 18:10 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Wed, 8 Jul 2009 21:30:41 -0700
> From: n179911 <n179911@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> Is there anyway to list all the places which marked with the tag.

Is "M-x tags-apropos" what you are looking for?

> And when you said 'marked with the particular tag'. does it include
> the place where it called that function and the place where that
> function is declared and implemented?

No, only the definitions and declarations.  If you want all the places
including where it is used, you need a different tool, such as
ID-Utils.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-07-09 18:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08 19:36 How to use etags in emacs n179911
2009-07-08 22:37 ` n179911
2009-07-08 22:43   ` Drew Adams
2009-07-08 23:20     ` n179911
2009-07-09 15:51       ` Drew Adams
2009-07-09 16:21         ` n179911
2009-07-09 17:00           ` Drew Adams
2009-07-09  3:15 ` Eli Zaretskii
     [not found] <mailman.2100.1247081770.2239.help-gnu-emacs@gnu.org>
2009-07-09  1:01 ` Giorgos Keramidas
2009-07-09  4:30   ` n179911
2009-07-09 11:14     ` Giorgos Keramidas
2009-07-09 15:51       ` Drew Adams
2009-07-09 18:10     ` Eli Zaretskii

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).