A new tool to investigate a tags file #47
AmaiKinono
started this conversation in
Ideas
Replies: 1 comment
-
Any progress on this? I would love a way to jump to a tag using a completing read, a la consult. But consult-citre from #158 doesn't seem to filter tags correctly... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
then, it asks readtags to search for tags that has
psd
in the name, andscipy
in the input field. Then, further filtering is done on the elisp side, to pick tags whose kind isfunction
ormethod
.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 tocitre-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.
Beta Was this translation helpful? Give feedback.
All reactions