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

permanently disable navigation mode #40

Closed
jamienicol opened this issue Mar 21, 2014 · 9 comments
Closed

permanently disable navigation mode #40

jamienicol opened this issue Mar 21, 2014 · 9 comments

Comments

@jamienicol
Copy link

I'm used to, and completely happy with, the regular grep/compilation mode keybindings. Is there any way to disable navigation mode from being turned on?

Great package by the way, thanks!

@leoliu
Copy link
Owner

leoliu commented Mar 22, 2014

Hi jamienicol,

Thank you for the report.

The point of the navigation mode is allowing a few keys in the compilation mode directly accessible without moving to the compilation buffer i.e. ggtags-global. Are you manually switching to that buffer to choose matches? In this case the navigation mode might be annoying indeed. Let me know you workflow so that we can fix it to accommodate more use patterns.

Cheers,
Leo

@jamienicol
Copy link
Author

Hi! thanks for the response. my workflow is something like this:

  • If there are only a few matches I will usually not change buffer. I'll use compilation mode's M-g n and M-g p to navigate through the matches, I believe these work as long as there is a compilation-mode buffer visible, regardless of which buffer you are in. I suppose navigation mode's M-n and M-p are slightly easier to press, but I'm used to the compilation mode bindings (and use them regularly with grep).
  • If there are many matches I will usually switch to the results buffer to look for likely matches.
    • Here, I'm used to using M-n/M-p to move the cursor without selecting and jumping to another match.
    • If I find a likely match I want to press enter (or C-m) to jump to it, but instead that will close the results buffer.
    • I would usually close the buffer by switching to it and pressing q, or just switching to something else.

It may well be possible for navigation mode to be adapted to suit my workflow, but I'd still have a concern that navigating ggtag matches is different than navigating grep matches. For me they are conceptually two very similar tasks, I'm not sure my wee brain can handle navigating them differently.

Cheers.

@leoliu
Copy link
Owner

leoliu commented Mar 22, 2014

Hi jamienicol,

You can now disable the navigation key bindings by setting ggtags-suppress-navigation-keys to t. Could you try it out and send me any comments? Thanks.

Leo

@jamienicol
Copy link
Author

It works perfectly! Thank you so much.

Jamie

@jamienicol
Copy link
Author

One wee thing I've noticed actually:

With my workflow there's no specific point at which I exit navigation-mode. Enter now does what it does in regular compilation mode, so I'll probably just switch away from the results buffer at some point rather than press enter to explicitly exit it. This leaves navigation-mode enabled indefinitely.

The only side-effect I've encountered of this is that the "GG[x/y]" remains in my modeline forever. To be honest, I don't ever find this useful at all and it just takes up space in my modeline, even more so when I've finish searching through the results. Is there any way to hide this?

Out of interest is there a reason why you chose an option to disable the keys, rather than an option to simply not enable navigation mode at all? Are there any other side-effects of navigation mode, other than the keys and the modeline?

@leoliu
Copy link
Owner

leoliu commented Mar 22, 2014

If you kill the ggtags-global buffer the mode is off. Or you can turn it off completely by using this snippet:

(eval-after-load 'ggtags
  '(defalias 'ggtags-navigation-mode 'ignore))

@jamienicol
Copy link
Author

perfect. thank you for being so helpful and thanks again for ggtags, it's
great.
On 22 Mar 2014 15:27, "Leo Liu" notifications@github.com wrote:

If you kill the ggtags-global buffer the mode is off. Or you can turn
it off completely by using this snippet:

(eval-after-load 'ggtags
'(defalias 'ggtags-navigation-mode 'ignore))

Reply to this email directly or view it on GitHubhttps://github.com//issues/40#issuecomment-38354365
.

@leoliu
Copy link
Owner

leoliu commented Mar 22, 2014

Glad to help and thanks for the feedback.

leoliu added a commit that referenced this issue Mar 30, 2014
to control ggtags-navigation-map. Using ggtags-navigation-mode is
unsafe because it is used more than controlling ggtags-navigation-map.

Affect #40: ggtags-suppress-navigation-keys is removed; use
ggtags-enable-navigation-keys instead.
@leoliu
Copy link
Owner

leoliu commented Apr 9, 2014

The lighter can now be disabled by setting ggtags-navigation-mode-lighter to nil since f378376

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

2 participants