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

A new tool to investigate a tags file #172

Open
AmaiKinono opened this issue Apr 21, 2024 Discussed in #47 · 0 comments
Open

A new tool to investigate a tags file #172

AmaiKinono opened this issue Apr 21, 2024 Discussed in #47 · 0 comments

Comments

@AmaiKinono
Copy link
Member

Discussed in #47

Originally posted by AmaiKinono January 23, 2021
When solving #46, I found that "xref prompts you for an identifier" is a basic tool for investigating a tags file (hence investigating the project that's tagged).

I want a more powerful tool for that. Here's what's in my mind now. After picking a tags file, it prompts you for input. You type:

psd input:scipy#kind:function kind:method

then, it asks readtags to search for tags that has psd in the name, and scipy in the input field. Then, further filtering is done on the elisp side, to pick tags whose kind is function or method.

The input scheme can be designed to be simpler, but the point is two-stage filtering. Before the #, the filter is done by readtags (asynchronously); after the #, it's done by elisp. This 2nd stage part may also be brought to citre-peek to further narrow down the results.

The tags that are filtered out are updated as you input. At any time, you can copy the name of a tag (to paste in your code), jump to its location, or convert those tags into a peek or xref session.

consult and embark are the packages to study. Consult is based on a completing-read wrapper, and has a similar UI for grep (it's asynchronous!). Embark support multiple actions in a completing-read session. Emacs doesn't come with similar functionalities, and it's not easy to implement. So at the end I may develop a separate package based on them and Citre.

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

No branches or pull requests

1 participant