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

Consider adding imenu support #3022

Closed
DamienCassou opened this issue Mar 10, 2017 · 5 comments
Closed

Consider adding imenu support #3022

DamienCassou opened this issue Mar 10, 2017 · 5 comments
Labels
enhancement New feature or request

Comments

@DamienCassou
Copy link
Contributor

It would be nice to be able to use imenu in magit buffers:

  • in magit-log, imenu could let the user go to a commit rapidly by hash or description
  • in magit-rev, imenu could let the user go to a file rapidly by filename
  • in magit status, imenu could let the user go to a section rapidly
@tarsius tarsius added the enhancement New feature or request label Mar 10, 2017
@tarsius tarsius changed the title Add imenu support Consider adding imenu support Mar 26, 2017
@tarsius
Copy link
Member

tarsius commented May 12, 2017

That would be nice, and implementing it might actually help me use imenu more (in other contexts). But it's not a high priority.

DamienCassou added a commit to DamienCassou/magit that referenced this issue May 17, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 17, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 17, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 18, 2017
@tarsius
Copy link
Member

tarsius commented May 18, 2017

Is there anything else you want to add, or can we close this?

@DamienCassou
Copy link
Contributor Author

DamienCassou commented May 18, 2017

We could add it to git-rebase-mode too, I forgot it. What do you think?

@tarsius
Copy link
Member

tarsius commented May 18, 2017

Feel free to do that if/when you have time to do it. Eventually someone will ask for it, so why not add it sooner rather than later.

@kyleam
Copy link
Member

kyleam commented May 19, 2017

We could add it to git-rebase-mode too

A few other candidates:

  • magit-refs-mode

  • magit-diff-mode and magit-stash-mode

    I think it'd make sense to define a single set of imenu functions
    for diff/revision/stash buffers, setting these functions in
    magit-diff-mode rather than magit-revision-mode.
    magit-revision-mode and magit-stash-mode would then inherit
    these from magit-diff-mode.

  • magit-reflog-mode and magit-stashes-mode

    Right now, these inherit the log's imenu functions, which don't
    return useful results. If the regexp of the log's imenu
    functions aren't easily extended to work with these, I think
    these mdoes should have their own imenu functions or should at
    least set the imenu functions to nil.

DamienCassou added a commit to DamienCassou/magit that referenced this issue May 23, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 23, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 23, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 23, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 24, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 24, 2017
Moving support to magit-diff-mode allows both magit-revision-mode and
magit-stash-mode to benefit from it.
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 24, 2017
magit-log-mode has two derived modes (magit-reflog-mode and
magit-stashed mode) automatically inheriting imenu support. This patch
fixes current implementation in magit-log-mode to support these two.
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 24, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 24, 2017
magit-log-mode has two derived modes (magit-reflog-mode and
magit-stashed mode) automatically inheriting imenu support. This patch
fixes current implementation in magit-log-mode to support these two.
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 24, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 26, 2017
tarsius added a commit to DamienCassou/magit that referenced this issue May 28, 2017
tarsius added a commit to DamienCassou/magit that referenced this issue May 28, 2017
tarsius pushed a commit to DamienCassou/magit that referenced this issue May 28, 2017
tarsius added a commit to DamienCassou/magit that referenced this issue May 28, 2017
tarsius added a commit to DamienCassou/magit that referenced this issue May 28, 2017
tarsius pushed a commit to DamienCassou/magit that referenced this issue May 28, 2017
tarsius added a commit to DamienCassou/magit that referenced this issue May 28, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
This commit moves all imenu-related code to magit-imenu. In
particular, this commit:

* Extracts function magit-imenu--index-function from
  magit-status. This function is useful for both magit-refs-mode and
  magit-status-mode.

* Moves magit-revision's imenu support to magit-diff-mode. This allows
  both magit-revision-mode and magit-stash-mode to benefit from it.

* Adapts magit-log's imenu support for its derived
  modes (magit-reflog-mode and magit-stashes-mode). This patch fixes
  current implementation in magit-log-mode to support these two.
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
This commit moves all imenu-related code to magit-imenu. In
particular, this commit:

* Extracts function magit-imenu--index-function from
  magit-status. This function is useful for both magit-refs-mode and
  magit-status-mode.

* Moves magit-revision's imenu support to magit-diff-mode. This allows
  both magit-revision-mode and magit-stash-mode to benefit from it.

* Adapts magit-log's imenu support for its derived
  modes (magit-reflog-mode and magit-stashes-mode). This patch fixes
  current implementation in magit-log-mode to support these two.
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 29, 2017
kyleam added a commit to DamienCassou/magit that referenced this issue May 31, 2017
kyleam added a commit to DamienCassou/magit that referenced this issue May 31, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 31, 2017
DamienCassou added a commit to DamienCassou/magit that referenced this issue May 31, 2017
@kyleam kyleam closed this as completed Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants