From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> |
Cc: | masao(dot)fujii(at)oss(dot)nttdata(dot)com, nagata(at)sraoss(dot)co(dot)jp, alvherre(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: make_ctags: use -I option to ignore pg_node_attr macro |
Date: | 2023-05-29 13:35:25 |
Message-ID: | CAD21AoDmCqpS+U6b9Bc-b4OFx3tz=Nv6O2KVkoVg7sHk60spjA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Tue, Feb 14, 2023 at 8:15 PM Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:
>
> >> I fixed the above issues and refactored the code.
> >> Attached is the updated version of the patch. Thought?
> >
> > Thank you! Looks good to me.
>
> Fix pushed. Thank you!
In my Mac environment where non-Exuberant ctags and emacs 28.2 are
installed, the generated etags file cannot be loaded by emacs due to
file format error. The generated TAGS file is:
% head -10 TAGS
) /
sizeof(BlockNumber)sizeof(BlockNumber)117,3750
my
@newa newa395,10443
variadic array[1,2]:array[1,2]56,1803
variadic array[]::inarray[]::i72,2331
variadic array[array64,2111
variadic array[array68,2222
variadic array[array76,2441
(2 * (2 53,1353
my $fn fn387,10147
startblock 101,4876
Since the etags files consist of multiple sections[1] we cannot sort
the generated etags file. With the attached patch, make_etags (with
non-Exuberant ctags) generates a correct format etags file and it
works:
% head -10 TAGS
/Users/masahiko/pgsql/source/postgresql/GNUmakefile,1187
subdir 7,56
top_builddir 8,65
docs:docs13,167
world-contrib-recurse:world-contrib-recurse19,273
world-bin-contrib-recurse:world-bin-contrib-recurse24,394
html man:html man26,444
install-docs:install-docs29,474
install-world-contrib-recurse:install-world-contrib-recurse35,604
BTW regarding the following comment, as far as I can read the
Wikipedia page for ctags[1], Exuberant ctags file doesn't have a
header section.
# Exuberant tags has a header that we cannot sort in with the other entries
# so we skip the sort step
# Why are we sorting this? I guess some tag implementation need this,
# particularly for append mode. bjm 2012-02-24
if [ ! "$IS_EXUBERANT" ]
Instead, the page says that sorting non-Exuberant tags file allows for
faster searching on of the tags file. I've fixed the comment
accordingly too.
Regards,
[1] https://en.wikipedia.org/wiki/Ctags#Etags_2
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
fix_make_ctags.patch | application/octet-stream | 924 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Giuseppe Broccolo | 2023-05-29 13:51:30 | Re: vector search support |
Previous Message | Giuseppe Broccolo | 2023-05-29 13:18:03 | Re: vector search support |