FelipeLema / emacs-counsel-gtags

GNU Global with ivy completion
22 stars 5 forks source link

Adding a function to list tags in the file of the current buffer. #14

Closed Mikiya closed 1 year ago

Mikiya commented 3 years ago

Hello Felipe -

I need a functionality to find tags in the current file, as implemented in the patch. The patch is simple, and working well in my environment. I really appreciate if you agree to add such a functionality.

Kind regards, Mikiya Okuno

FelipeLema commented 3 years ago

this is an interesting use case I hadn't thought of

Some things to consider:

Thanks for taking your time for this feature

Mikiya commented 3 years ago

Hello FelipeLema,

Thank you for your reply.

Can you document this new function? Context of use, what to expect...

I expect a very similar result to what "imenu" provides, but the underlying method is "global".

Can you add tests for this? Since this is very simple one new test should be enough

I tried to write a test, but I don't have a technique to write tests for ivy/counsel. Can you show me an example? Which line should I refer to?

How does this contrasts with Imenu? Perhaps we should plug this functionality to Imenu instead of counsel.

The main advantage when using global is that there is a line number on each line. This is informative in certain case. If you feel this is trivial, and not worthy to implement, please go ahead close the PR.

Kind regards, Mikiya Okuno

FelipeLema commented 3 years ago

Hey, Mikiya

I just added initial code for unit test. Please, modify until test passes.

To run all unit tests, run make test at root directory. You can also run unit tests interactively with ERT commands

FelipeLema commented 1 year ago

closing as it seems the author is not going to complete this

feel free to open a new PR for this... completing the unit tests