Re: make_ctags: use -I option to ignore pg_node_attr macro
Tatsuo Ishii <ishii@sraoss.co.jp>
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: nagata@sraoss.co.jp
Cc: alvherre@alvh.no-ip.org, pgsql-hackers@postgresql.org
Date: 2022-10-12T11:40:21Z
Lists: pgsql-hackers
Attachments
- v3_make_ctags.patch (text/x-patch) patch v3
Hi, >> > I found that tag files generated by src/tools/make_ctags >> > doesn't include some keywords, that were field names of node >> > structs, for example norm_select in RestrictInfo. Such fields >> > are defined with pg_node_attr macro that was introduced >> > recently, like: >> > >> > Selectivity norm_selec pg_node_attr(equal_ignore); >> > >> > In this case, pg_node_attr is mistakenly interpreted to be >> > the name of the field. So, I propose to use -I option of ctags >> > to ignore the marco name. Attached is a patch to do it. I found the same issue with make_etags too. > I updated the patch to ignore the code under tmp_install and add > some file types like sql, p[lm], and so on. .sgml or .sh is not > included because they don't seem to be beneficial for ctags. I tried to apply the v2 patch approach to make_etags but noticed that make_ctags and make_etags have quite a few duplicate codes, that would bring maintenance headache. I think we could merge make_etags into make_ctags, then add "-e" option (or whatever) to make_ctags so that it generates tags files for emacs if the option is specified. Patch attahced. Best reagards, -- Tatsuo Ishii SRA OSS LLC English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp
Commits
-
Fix make_etags breakage on certain platforms.
- af26f28b9fdd 15.4 landed
- ae66716bf3ef 16.0 landed
-
Fix make_etags failure on Mac.
- 87f21d2c6890 16.0 landed
-
Enhance make_ctags and make_etags.
- d1e2a380cb91 16.0 cited