Emojis with quail - but only some
Michael Heerdegen <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
Hello, my goal: I want that hitting : starts the input of an emoji, so that :+1: would insert 👍. Without the need to hit one additional key. This is exactly what the "emoji" input method does - but it does much more! For example, writing "dog" would insert an Emoji of a dog. I don't want that in general. Defining a new, restricted version of the "emoji" input method doesn't seem to be trivial. And I don't want to copy half of the definition of the input method to my config. I then thought: ok, let's bind : to a command that first enables "emoji" as transient input method (`activate-transient-input-method' - I don't want to call this command explicitly btw. although this would be a workaround - I know!), and then simply invokes `self-insert-command'. Well, I don't get it work: either the input method doesn't recognize the : as input, or, when I use `unread-command-events', I get interference effects that make Emacs unresponsive. Weird effects, hitting the cursor keys moves the inserted : around, infloops, such things. Any suggestions? Or other practical ways to get a similar functionality? Bonus points if somebody can suggest a way to make :? (a question mark after the colon) would call `emoji-insert'. Normally I would use a transient map for that but I'm not sure if that would not also interfere with quail which probably uses something similar. TIA, Michael.