greghendershott / racket-mode

Emacs major and minor modes for Racket: edit, REPL, check-syntax, debug, profile, packages, and more.
https://www.racket-mode.com/
GNU General Public License v3.0
682 stars 93 forks source link

racket-unicode-input-method.el and "follows" #723

Closed soegaard closed 1 month ago

soegaard commented 1 month ago

Could "follows" be removed from racket-unicode-input-method.el?

racket-unicode-input-method.el

image
greghendershott commented 1 month ago

First, I'm OK making just this change, quickly, especially if it's urgently annoying you.

But before I just do that and declare success:

So I think maybe the "real" answer is #718 -- which I could dust off, and finish. When I looked at the agda2 input method, it seemed very well designed w.r.t. customizing individual translation, prefixes, suffixes, inheriting from other quail input methods, etc., using a simple "tweak-all" expression with combinators. TL;DR I would like to steal that.

Any thoughts?

soegaard commented 1 month ago

Not urgent at all.

I actually like the current state of affairs - except for symbols which interfere with commonly used english words.

An easier way of customizing would be nice to have - but it's just a nice-to-have.

greghendershott commented 1 month ago

How would you feel about a "leader" (prefix) key like \, as a default?

So e.g. you'd need to type "\oint" or "\follows".

I think that would avoid all (99.9%?) conflicts.

So my working plan is to add that, as a default:

soegaard commented 1 month ago

Typing "\alpha" or "\alpha " would be fine, as long as I don't need to type \ twice (as in DrRacket).

greghendershott commented 1 month ago

Thanks for the feedback!

I'm close to merging something from the issue-718 branch, to close this issue via closing #718.

greghendershott commented 1 month ago

OK merged. After you update, your existing configuration should "just work" as before to activate the input method. You will need to use the \ (single backslash) prefix.

There's also a plain old command flavor of this: M-x racket-insert-symbol, which uses the minibuffer completion UI including previews of the symbols shown as annotations. (Works with the old school completions buffer UI, but especially spiffy IMHO with things like vertico.)

greghendershott commented 1 month ago

Online docs: https://www.racket-mode.com/#Inserting-Unicode-math-symbols