-
Notifications
You must be signed in to change notification settings - Fork 79
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
Unbind C-c ?
and C-c C-h
(maybe)
#273
Comments
Hi all,
I believe that's a very good point: Emacs' native BTW, I've seen in the Emacs' manual page "D.2 Key Binding Conventions" that they include this recommendation:
But, instead of "unbinding" Given with this mere rebinding, if some users often relied on What do you think?
|
However, I believe it's unneeded to change anything regarding |
Actually, it seems both
|
It also affects I'll see what can be done about these problems. |
Set `tuareg-interactive-last-phrase-pos-in-source` to the actual start of the region sent to the REPL. Previously, the incorrect position caused error locations to be off, causing `tuareg-interactive-next-error-source` to fail (see ocaml#273, ocaml#231). Rewrite to follow the spirit of the original code: extend the region to contain all phrases it intersects.
I'm fine with binding |
Set `tuareg-interactive-last-phrase-pos-in-source` to the actual start of the region sent to the REPL. Previously, the incorrect position caused error locations to be off, causing `tuareg-interactive-next-error-source` to fail (see ocaml#273, ocaml#231). Rewrite to follow the spirit of the original code: extend the region to contain all phrases it intersects.
Set `tuareg-interactive-last-phrase-pos-in-source` to the actual start of the region sent to the REPL. Previously, the incorrect position caused error locations to be off, causing `tuareg-interactive-next-error-source` to fail (see ocaml#273, ocaml#231). Rewrite to follow the spirit of the original code: extend the region to contain all phrases it intersects.
indeed inherited from caml-mode. I'm not too keen on <kbd>C-cM-h</kbd> as
I find it cumbersome to type. Maybe <kbd>C-cC-y</kbd> — although it is less
mnemonic or <kbd>C-cC-?</kbd>? What are other modes using?
ELisp mode uses `C-h o`, then there's `C-h S` but I don't think it
offers any way for caml-help.el to hook itself into it, and arguably
this kind of functionality could be part of Xref but it's missing there.
Oh and there's also Company-mode which makes it available in its list of
completions, whee it's bound to F1 and `C-h`.
Stefan
|
All the good bindings seem to be taken. Maybe And yes, I too wish Emacs had a standard way for showing documentation in programming modes. |
Hi all,
maybe… or maybe not 😅 So, counterproposal: would you be fine for binding I see that in the fairly standard AUCTeX mode, we have the binding:
The advantage is that the meaning of Incidentally, it appears tuareg currently uses this binding, fortunately with another existing, synonymous binding
So even if this should be changed as well, I guess that'd be OK because WDYT? |
Sorry @mattiase, I've just realized you had already suggested the same, in your previous comment:
but this doesn't change my opinion that rebinding Kind regards |
Good bindings are indeed hard to come by. I note that Merlin also has the unbound command I've looked at other packages and predictably, there is no consensus about keybindings or anything else. The closest appears to be Ideally Emacs would have a standard (short! one key!) binding for a mode-specific describe-thing-at-point, with an extendible framework for actually displaying the information (in a window, in the echo area, in a popup overlay, etc) and with standard faces. Tuareg & friends would then use it to show the type, signature, parameter names and doc comment (markup-processed, not raw like At least the above is what you would expect from any remotely modern programmer's editor. It may also be useful to have a standard for other documentation-related commands, or a prefix for a collection of such commands. Several packages use |
Hi, indeed it seems all good solutions we could find for rebinding But after the comments above by @mattiase
and mine:
it seems that this latter choice would be at the same time natural, and causing the least harm (because So, if you don't object for replacing |
Set `tuareg-interactive-last-phrase-pos-in-source` to the actual start of the region sent to the REPL. Previously, the incorrect position caused error locations to be off, causing `tuareg-interactive-next-error-source` to fail (see ocaml#273, ocaml#231). Rewrite to follow the spirit of the original code: extend the region to contain all phrases it intersects.
Well, failing the introduction of a standard Emacs key binding (don't hold your breath) I'd favour However there are multiple candidates. Here's a question: if there were a single standard Emacs key for "display help for what is under the cursor without prompting the user for further information", what would you bind it to?
|
For me, it would be |
Well, failing the introduction of a standard Emacs key binding (don't hold
your breath) I'd favour `C-c C-d` and asking the Merlin maintainers very
politely if they can think of an alternative key for
`merlin-destruct`.
BTW, we could treat the doc as a kind of "definition", and thus add the
doc as a possible choice in `M-.`.
Stefan
|
Yes, and I had a brief chat with Dmitry about it. It doesn't really looks like it fits with the framework or the concept. And the prospect of a universal single-keystroke context-sensitive documentation key is tempting, and has proven very useful in other programming environments. It would also water down |
> BTW, we could treat the doc as a kind of "definition", and thus add the
doc as a possible choice in `M-.`.
Yes, and I had a brief chat with Dmitry about it.
It doesn't really looks like it fits with the framework or the concept.
Yeah, it's indeed not quite right.
|
I was thinking that C-c C-o would be good for |
|
I agree (I discovered M-? after posting this 😀). This is part of the issue I am writing for Merlin. |
How about |
How about `C-h .`? That's what Eglot uses.
Fine by me (it's a kind of natural mix of `C-h` and `M-.`).
It will collide with Eglot, for those using the OCaml LSP server, tho,
but presumably those users won't be bothered to have Tuareg's
binding hidden by Eglot's.
|
(following the discussion in ocaml#273)
(following the discussion in ocaml#273)
(following the discussion in ocaml#273)
Emacs expects
?
,C-h
and<f1>
to be unbound in prefix maps because these keys are used to display a list of commands beginning with that prefix. For instance,M-s C-h
normally shows all keys starting withM-s
and so on.Unfortunately Tuareg binds
C-c ?
andC-c C-h
, leaving only<f1>
for looking at theC-c
space. This hampers discoverability a bit. The prefix maps (C-c in particular) are often crowded and shared by multiple packages, which is why this feature can be quite useful both for users and developers.I understand that these bindings have been with Tuareg for a long time and some people may have them in their muscle memory; if you think that is more important, do close this issue as WONTFIX.
The text was updated successfully, but these errors were encountered: