Closed hmelman closed 2 years ago
I'm not sure why you're using string-to-vector
, but if I remove those calls and map to the emoji directly it seems to work fine, i.e.,
(let ((map (make-sparse-keymap)))
(define-key map "1" "1️⃣")
(define-key map "2" "2️⃣")
(define-key map "3" "3️⃣")
(define-key map "4" "4️⃣")
(define-key map "5" "5️⃣")
(define-key map "6" "6️⃣")
(define-key map "7" "7️⃣")
(define-key map "8" "8️⃣")
(define-key map "9" "9️⃣")
(define-key map "0" "0️⃣")
(define-key ctl-x-map "8n" (cons "Numbers" map)))
Yes that seems to work fine in Emacs 28. I'm not sure why I thought to use string-to-vector
but since opening this I understand emoji much better. Thanks for looking at it.
I've defined the following so that I can insert these emoji glyphs via
C-x 8 n
and a number. Note that these emoji are composed of three characters: an ascii number, (#xfe0f) VARIATION SELECTOR-16 and (#x20e3) COMBINING ENCLOSING KEYCAPBut when I type
C-x 8 n
and pause sowhich-key
displays help, the characters are not composed as I would like them to be. This screen shot shows this, with the above code shown to verify that these glyphs render in other buffers.I couldn't make much progress debugging this. I could switch to the " *which-key*" buffer but I couldn't inspect anything in it because whenever I typed emacs changed to a different buffer. But in Emacs 28, eval'ing the above and enabling which-key and typing
C-x 8 n
should replicate this. I'm doing this on a macos 11.6.5.FYI, I first asked this in Emacs Bug #54970, if there are underlying emacs issues to resolve, this can be followed up there.