* etags in tex files
@ 2021-07-17 18:05 Colin Baxter
2021-07-17 18:33 ` Óscar Fuentes
2021-07-17 18:38 ` Eli Zaretskii
0 siblings, 2 replies; 8+ messages in thread
From: Colin Baxter @ 2021-07-17 18:05 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
I like to use etags in tex files in order to search for occurrences of
equation labels. This works well if the label is a string of only
digits and/or letters, say \label{123abc}. However, if there's a colon
in the label, say \label{123:abc} then etags will only search for the
portion of the string before the colon, i.e. 123.
Is there any way in which I can configure etags to recognise everything
with the curly brackets of a \label? I could always use grep but I like
etags and would like to stick with them.
Thanks.
Colin Baxter.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: etags in tex files
2021-07-17 18:05 etags in tex files Colin Baxter
@ 2021-07-17 18:33 ` Óscar Fuentes
2021-07-17 20:18 ` Colin Baxter
2021-07-17 18:38 ` Eli Zaretskii
1 sibling, 1 reply; 8+ messages in thread
From: Óscar Fuentes @ 2021-07-17 18:33 UTC (permalink / raw)
To: help-gnu-emacs
Colin Baxter <m43cap@yandex.com> writes:
> Hello,
>
> I like to use etags in tex files in order to search for occurrences of
> equation labels. This works well if the label is a string of only
> digits and/or letters, say \label{123abc}. However, if there's a colon
> in the label, say \label{123:abc} then etags will only search for the
> portion of the string before the colon, i.e. 123.
>
> Is there any way in which I can configure etags to recognise everything
> with the curly brackets of a \label? I could always use grep but I like
> etags and would like to stick with them.
Dunno about (c|e)tags, but other implementations such as Universal Ctgas
lets you to define your own language. It is quite simple and works fine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: etags in tex files
2021-07-17 18:33 ` Óscar Fuentes
@ 2021-07-17 20:18 ` Colin Baxter
2021-07-18 6:35 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Colin Baxter @ 2021-07-17 20:18 UTC (permalink / raw)
To: Óscar Fuentes; +Cc: help-gnu-emacs
>>>>> Óscar Fuentes <ofv@wanadoo.es> writes:
> Colin Baxter <m43cap@yandex.com> writes:
>> Hello,
>>
>> I like to use etags in tex files in order to search for
>> occurrences of equation labels. This works well if the label is a
>> string of only digits and/or letters, say
>> \label{123abc}. However, if there's a colon in the label, say
>> \label{123:abc} then etags will only search for the portion of
>> the string before the colon, i.e. 123.
>>
>> Is there any way in which I can configure etags to recognise
>> everything with the curly brackets of a \label? I could always
>> use grep but I like etags and would like to stick with them.
> Dunno about (c|e)tags, but other implementations such as Universal
> Ctgas lets you to define your own language. It is quite simple and
> works fine.
Thanks. I'll have a look at your suggestion if T don't make progress
with etags.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: etags in tex files
2021-07-17 20:18 ` Colin Baxter
@ 2021-07-18 6:35 ` Eli Zaretskii
0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2021-07-18 6:35 UTC (permalink / raw)
To: help-gnu-emacs
> From: Colin Baxter <m43cap@yandex.com>
> Date: Sat, 17 Jul 2021 21:18:49 +0100
> Cc: , help-gnu-emacs@gnu.org
>
> >>>>> Óscar Fuentes <ofv@wanadoo.es> writes:
>
> > Colin Baxter <m43cap@yandex.com> writes:
> >> Hello,
> >>
> >> I like to use etags in tex files in order to search for
> >> occurrences of equation labels. This works well if the label is a
> >> string of only digits and/or letters, say
> >> \label{123abc}. However, if there's a colon in the label, say
> >> \label{123:abc} then etags will only search for the portion of
> >> the string before the colon, i.e. 123.
> >>
> >> Is there any way in which I can configure etags to recognise
> >> everything with the curly brackets of a \label? I could always
> >> use grep but I like etags and would like to stick with them.
>
> > Dunno about (c|e)tags, but other implementations such as Universal
> > Ctgas lets you to define your own language. It is quite simple and
> > works fine.
>
> Thanks. I'll have a look at your suggestion if T don't make progress
> with etags.
If the TAGS file produced by Emacs's etags includes the problematic
labels, then switching to another etags/ctags implementation will not
help, AFAIU.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: etags in tex files
2021-07-17 18:05 etags in tex files Colin Baxter
2021-07-17 18:33 ` Óscar Fuentes
@ 2021-07-17 18:38 ` Eli Zaretskii
2021-07-17 20:15 ` Colin Baxter
1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-07-17 18:38 UTC (permalink / raw)
To: help-gnu-emacs
> From: Colin Baxter <m43cap@yandex.com>
> Date: Sat, 17 Jul 2021 19:05:47 +0100
>
> I like to use etags in tex files in order to search for occurrences of
> equation labels. This works well if the label is a string of only
> digits and/or letters, say \label{123abc}. However, if there's a colon
> in the label, say \label{123:abc} then etags will only search for the
> portion of the string before the colon, i.e. 123.
Is the problem in the TAGS file, or is the problem in etags.el
functions that search for the tags? I think it's the latter, but if
so, then...
> Is there any way in which I can configure etags to recognise everything
> with the curly brackets of a \label?
...which "etags" do you want to configure and how?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: etags in tex files
2021-07-17 18:38 ` Eli Zaretskii
@ 2021-07-17 20:15 ` Colin Baxter
2021-07-18 6:34 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Colin Baxter @ 2021-07-17 20:15 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>> From: Colin Baxter <m43cap@yandex.com> Date: Sat, 17 Jul 2021
>> 19:05:47 +0100
>>
>> I like to use etags in tex files in order to search for
>> occurrences of equation labels. This works well if the label is a
>> string of only digits and/or letters, say
>> \label{123abc}. However, if there's a colon in the label, say
>> \label{123:abc} then etags will only search for the portion of
>> the string before the colon, i.e. 123.
> Is the problem in the TAGS file, or is the problem in etags.el
> functions that search for the tags? I think it's the latter, but
> if so, then...
>> Is there any way in which I can configure etags to recognise
>> everything with the curly brackets of a \label?
> ...which "etags" do you want to configure and how?
I don't really know at this stage, but I think part of the problem lies
with
defun find-tag-tag (string)
which seems to reserve a significant use for the colon. I'll have to
invest time in trying to understand at least a little of what etags.el
does, but as that file's commentary puts it, "The namespacing of this
package is a mess:". I agree.
Colin Baxter.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: etags in tex files
2021-07-17 20:15 ` Colin Baxter
@ 2021-07-18 6:34 ` Eli Zaretskii
2021-07-21 14:20 ` Colin Baxter
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-07-18 6:34 UTC (permalink / raw)
To: help-gnu-emacs
> From: Colin Baxter <m43cap@yandex.com>
> Cc: help-gnu-emacs@gnu.org
> Cc:
> Date: Sat, 17 Jul 2021 21:15:56 +0100
>
> > Is the problem in the TAGS file, or is the problem in etags.el
> > functions that search for the tags? I think it's the latter, but
> > if so, then...
>
> >> Is there any way in which I can configure etags to recognise
> >> everything with the curly brackets of a \label?
>
> > ...which "etags" do you want to configure and how?
>
> I don't really know at this stage
Look at the produced TAGS file: does it include the problematic
labels? If it does, then etags the program is not your problem.
> but I think part of the problem lies with
>
> defun find-tag-tag (string)
>
> which seems to reserve a significant use for the colon.
How do you see its "reserving a significant use for the colon"?
> as that file's commentary puts it, "The namespacing of this package
> is a mess:". I agree.
That comment is about the naming conventions, not about the code
itself.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: etags in tex files
2021-07-18 6:34 ` Eli Zaretskii
@ 2021-07-21 14:20 ` Colin Baxter
0 siblings, 0 replies; 8+ messages in thread
From: Colin Baxter @ 2021-07-21 14:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>> From: Colin Baxter <m43cap@yandex.com> Cc: help-gnu-emacs@gnu.org
>> Cc: Date: Sat, 17 Jul 2021 21:15:56 +0100
>>
>> > Is the problem in the TAGS file, or is the problem in etags.el
>> > functions that search for the tags? I think it's the latter,
>> but > if so, then...
>>
>> >> Is there any way in which I can configure etags to recognise
>> >> everything with the curly brackets of a \label?
>>
>> > ...which "etags" do you want to configure and how?
>>
>> I don't really know at this stage
> Look at the produced TAGS file: does it include the problematic
> labels? If it does, then etags the program is not your problem.
>> but I think part of the problem lies with
>>
>> defun find-tag-tag (string)
>>
>> which seems to reserve a significant use for the colon.
> How do you see its "reserving a significant use for the colon"?
>> as that file's commentary puts it, "The namespacing of this
>> package is a mess:". I agree.
> That comment is about the naming conventions, not about the code
> itself.
Ok, thanks for the explanations. I think I understand a little more. I
have discovered however that if I use xref-find-apropos and not
xref-find-definitions then strings with colons are found. Perhaps I
should have realised this at the beginning.
Colin Baxter.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-07-21 14:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-17 18:05 etags in tex files Colin Baxter
2021-07-17 18:33 ` Óscar Fuentes
2021-07-17 20:18 ` Colin Baxter
2021-07-18 6:35 ` Eli Zaretskii
2021-07-17 18:38 ` Eli Zaretskii
2021-07-17 20:15 ` Colin Baxter
2021-07-18 6:34 ` Eli Zaretskii
2021-07-21 14:20 ` Colin Baxter
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).