I have Caps lock set to compose key, and then à is Caps lock, a, backtick (`). Need to memorize a bunch of compose short cuts though, but it’s also available everywhere on my Linux desktop, not just emacs.
Yes, compose is much more powerful. I love how it makes very easy to remember to type characters for most Scandinavian and Latin languages. Even typing ™ is just Compose+T, M.
Long time ago, I contributed some patches to an Emacs fork for macOS similar to what the OP posted, but I still prefer compose.
Nice! Back in 2015 I too wanted this behaviour, but I didn’t know enough about Emacs to get to where you did. Somebody pointed me toM-x toggle-input-method (or C-\ for short) and who knows – it might be useful to you too.
With input-method set to “latin-postfix” you get “à” by typing “a`”. It works for all sorts of accents, and more. For example I can get the last three letters of the Norwegian alphabet, “æøå”, by typing “e/o/a/”.
I also like the TeX input method; if you’re already familiar with (La)TeX, most common special characters can be entered simply by typing the TeX sequence, for example \'a gives you á and \alpha gives you α.
Sometimes I “need” to enter some emoji; in those situations I just use M-x insert-char and then type in the Unicode name. With swiper’s autocompletion I can type any part of the name without having to know the exact full name and it shortens the list to something manageable.
I’ve never bothered to disable it. But I also use Emacs for almost all text editing, so when I need to repeat a character a bunch of times I’m not doing it by holding down the key – I do it with C-u.
I have Caps lock set to compose key, and then à is Caps lock, a, backtick (`). Need to memorize a bunch of compose short cuts though, but it’s also available everywhere on my Linux desktop, not just emacs.
Yes, compose is much more powerful. I love how it makes very easy to remember to type characters for most Scandinavian and Latin languages. Even typing ™ is just Compose+T, M.
Long time ago, I contributed some patches to an Emacs fork for macOS similar to what the OP posted, but I still prefer compose.
Nice! Back in 2015 I too wanted this behaviour, but I didn’t know enough about Emacs to get to where you did. Somebody pointed me to
M-x toggle-input-method
(orC-\
for short) and who knows – it might be useful to you too.With input-method set to “latin-postfix” you get “à” by typing “a`”. It works for all sorts of accents, and more. For example I can get the last three letters of the Norwegian alphabet, “æøå”, by typing “e/o/a/”.
I also like the
TeX
input method; if you’re already familiar with (La)TeX, most common special characters can be entered simply by typing the TeX sequence, for example\'a
gives you á and\alpha
gives you α.Sometimes I “need” to enter some emoji; in those situations I just use
M-x insert-char
and then type in the Unicode name. With swiper’s autocompletion I can type any part of the name without having to know the exact full name and it shortens the list to something manageable.This looks great! Seems to hang when I undo, though. (Using Doom Emacs.)
Thank you.
Experiment kind of quality for sure =P
ok, threw in a
(not undo-in-progress)
in there and seems to do the job. Patched the post, but may take a few minutes to show up. Here’s the snippet.Nice! That worked. Thanks! :)
On the macOS side, I disabled this a long time ago:
… because I use “hold down key to repeat”, and the accent popup drove me nuts.
I’ve never bothered to disable it. But I also use Emacs for almost all text editing, so when I need to repeat a character a bunch of times I’m not doing it by holding down the key – I do it with
C-u
.