Import feature request: tag selection

  • A.Lin

    A.Lin - 2011-06-26

    Hi joe users,

    I know this feature has been requested multiple times by several people.
    For my current project it is an issue for which I don't have a workaround, besides using another editor that supports tag selection. I would like to implement it myself, but the source code is poorly documented. :(
    If some expert (Joe?) could give me a few hints to get started quickly, it would be sincerely appreciated.

    The request is to support selection of a non-unique tag. This is especially important in a C++ context where the same member function name occurs in multiple classes. Right now, JOE's tag selection mechanisms always picks the first occurrence of the tag in the tags file. That's in many cases not the proper tag, so a selection mechanism is required here to let the user select the correct tag.

    For minimum coding effort I propose to use the same functionality that is already available for string completion using the sequence ESC-Enter, ESC-Enter. That is, the presentation of alternatives in an interactive list.
    I propose to supply one entry per tag alternative containing the tag string between '/^' and '$/;"'. If possible, the containing file name should be prepended.

    For the proposed implementation, I would like to know which sequence of commands is needed to create such a selection list.
    Any suggestions/improvements regarding the proposed implementation or functional extension are appreciated.



  • Joe Allen

    Joe Allen - 2015-03-21

    I've implemented this in Mercurial for JOE 4.0. When you hit ^K ; a menu appears with all of the possible matches. Choose a menu item to visit one of them. If you hit ^K ; again before hitting any other key, it brings the menu back with the same entries. Also there is a flag "-notagsmenu" which makes ^K ; function more like tag selection in emacs: hit ^K ; to search and visit the first match. Hit ^K ; again to visit the next match, etc.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks