-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Remove "oint" keybinding in racket-unicode input method #717
Conversation
Thanks for the PR! This is one feature I don't "dog food" myself. So I don't have any useful opinion. I'm happy to defer to you, and merge this. Comment: I didn't realize these trigger in the middle of words. That seems... tricky. Question: Just out of curiosity, are these case sensitive? If so, would it make any sense maybe to change it from "oint" to "Oint"? (Not seeking a long discussion. Just wanted to ask before merging.) |
I feel like we should use a leader/prefix key to turn on the unicode input method |
Yea, this came up on the Racket Discord channel and some others seem to have experienced the same issue.
Yea what i generally do is
The bindings are case sensitive. I would personally be fine with "Oint" as the mapping and agree that is better than removing the binding completely |
|
I was not clear. In the agda2 mode, the Agda unicode input method is turned on by default, but one needs to press \ to input the unicode symbols. |
I would be fine with something similar to Agda mode. I also use the |
It looks like The customization is extremely generalized; including predefined functions. (First glance, I wonder is that excessive? But subsequent glances, maybe I'd say sure why not.) |
In any case, some customizable prefix (and/or suffix?) seems the way to go. For example, if I were using this mode, a \ prefix would drive me nuts given how often I need that for escapes in Racket strings and regexps. In fact that's bound to |
This seems like the right direction to proceed. I'd be fine cargo-cult-ing all of the agda-mode code (because, hell, originally this was mostly cargo-cult-ed from haskell-mode). Of course, just using the rackety translations, instead. I'd also be fine limiting the predefined utility functions, for users when customizing, to just the stuff pertaining to changing the prefix. No strong opinion here either way. @bkc39 I don't know if this is something you would still like to do as a PR? If that feels like too much: I could take a crack at this, probably within a week after getting a finish on another issue I'm currently working on. |
@greghendershott I could probably take a swing at this this weekend. Do you think this should be included in this PR or submitted separately? Do you think we should update I actually have the beginnings of this in my personal config but I am not sure the best way to port it into the |
It seems that the existing translation table could be fine, provided there's a way users can customize a prefix or suffix? If you do agree, then I'd say the PR could morph into or be replaced by the new "cargo cult agda2-input" plan. But maybe you disagree, because you'd rather not type any prefix at all; you just want to change "oint" to "Oint" and you'd be happy? So for you the esting PR would suffice? If so, that's OK, too. Just let me know. I could merge your simpler change, and then you or I could tackle the bigger change, later. Or, |
I agree.
I think that in the immediate term the "oint" binding specifically is what I and others would like change and in that sense the existing PR would suffice to remove the pain point.
My preference would be to merge this change and then have a separate PR for the bigger change as that is likely to warrant more scrutiny. |
Merged; thanks! |
Add two customization variables from which the quail input method is defined: racket-input-prefix and racket-input-translations. The prefix defaults to \ and avoids common conflicts. Add a minor mode to activate the input method: racket-input-mode. The old racket-unicode-input-method-enable is now just a defalias for that. Add a plain command, as an alternative to the input method as a way to use racket-input-translations: racket-insert-symbol. Closes #718. Closes #723. Related to already-closed issue #717: This commit reverts the change from "oint" to "Oint", on the theory that it's unnecessary now with the prefix. Even if someone wanted to have no prefix (like before), they could easily M-x customize that, and they could easily M-x customize "oint" back to "Oint" or whatever they want. TL;DR the whole point of this commit is to enable most such changes to be a customization instead of a PR.
@bkc39 I wanted to give you a heads up about commit 36c7062, which I just merged. Among other things, it:
If you try this, you might like it. But if you don't, you could restore things exactly to the previous status quo:
In other words the default should reduce conflicts. And for people who don't like a prefix, they can remove that, and I hope I explained this well; if you have any questions please let me know. And thanks again contributing the original PR, it was helpful in the meantime! |
The
oint
quail prefix activates when writing common identifiers such aspoint
andpointer
. This removes the binding from the input method out of convenience.