Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lisp: ctags seems to think all symbols are functions #2423

Closed
AmaiKinono opened this issue Feb 12, 2020 · 8 comments · Fixed by #2425
Closed

Lisp: ctags seems to think all symbols are functions #2423

AmaiKinono opened this issue Feb 12, 2020 · 8 comments · Fixed by #2425
Assignees

Comments

@AmaiKinono
Copy link
Member

AmaiKinono commented Feb 12, 2020

The name of the parser: lisp (I guess)

The command line you used to run ctags:

$ ctags --options=NONE --fields=K -f- ./example.el

The content of input file:

(defun some-func () nil)
(defmacro some-macro () nil)
(defvar some-var nil)
(defconst some-const nil)

The tags output you are not satisfied with:

some-const	./example.el	/^(defconst some-const nil)$/;"	function
some-macro	./example.el	/^(defmacro some-macro () nil)$/;"	function
some-var	./example.el	/^(defvar some-var nil)$/;"	function

(I tried $ ctags --list-kinds=lisp, and there is only a "function" kind. So this is understandable.)

The tags output you expect:

some-const	./example.el	/^(defconst some-const nil)$/;"	const
some-macro	./example.el	/^(defmacro some-macro () nil)$/;"	macro
some-var	./example.el	/^(defvar some-var nil)$/;"	variable

(Actually I don't need it to be accurate like this. I only need to distinguish callable and non-callable symbols.)

The version of ctags:

$ ctags --version
Universal Ctags 0.0.0(a3c87ab5), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jan  7 2020, 22:54:55
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc

How do you get ctags binary: From the official repo of Manjaro Linux.

@masatake
Copy link
Member

Just a question. What dialect (or implementation) of lisp do you use with ctags?
common lisp, emacs lisp, scheme, or clojure?

@AmaiKinono
Copy link
Member Author

I am using emacs lisp.

Actually I don't use it with ctags often (Emacs has built in support for it anyway). I am developing an Emacs package that based on universal ctags, and I test it on its own code.

@masatake
Copy link
Member

Interesting.
Which file does your package read, tags file or TAGS file?

In this issue, you show your interest is about kinds. That implies your package may read tags file and utilizes kinds information.

As an emacs user, I'm very interested in your tool. I am eager for an elisp utilizing all fields of tags file.
For more than five years, I had served for vim users as u-ctags maintainer:-P.
I would like to work with emacs hacker.:-)

If your package is already in public, could you tell me URL? I would like to study it.

@masatake
Copy link
Member

I would like to write a library used in ctags internal for developing parsers for the lisp family.

#988
#519 (comment)

@AmaiKinono
Copy link
Member Author

Which file does your package read, tags file or TAGS file?

tags file (i.e. universal ctags format, not emacs TAGS format).

If your package is already in public, could you tell me URL? I would like to study it.

Currently it's not. It's still in the early stage of development. Thanks for your interest, I'll send a tarball and some README information to your email later today or tomorrow ;)

I would like to write a library used in ctags internal for developing parsers for the lisp family.

That would be cool. Actually I don't know much (or at all) about the internal of ctags. I'll take a look later.

@masatake
Copy link
Member

tags file (i.e. universal ctags format, not emacs TAGS format).

Nice.

Writing the library is ideal. However, I cannot find enough time for it now. So I will introduce simpler (however, incomplete) solution for this issue.

@masatake masatake self-assigned this Feb 14, 2020
masatake added a commit to masatake/ctags that referenced this issue Feb 14, 2020
masatake added a commit to masatake/ctags that referenced this issue Feb 14, 2020
@masatake
Copy link
Member

See #2425.

masatake added a commit to masatake/ctags that referenced this issue Feb 14, 2020
@AmaiKinono
Copy link
Member Author

@masatake Hi, I've sent a mail to you but didn't get your reply. I wonder if you received it correctly?

masatake added a commit to masatake/ctags that referenced this issue Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants