-
-
Notifications
You must be signed in to change notification settings - Fork 393
Open
Labels
Description
What happened?
Holding down keys that produce non-ASCII symbols longer than 2 UTF-8 bytes, like € → …
, at some point shows numeric codes instead of the symbol.
Using ./emacs-helm.sh in a recent helm (3e9e33b, from 7th July 2025) with no other patches:
output.mp4
Could it be because garbage collection triggers in while typing?
Apparently it's related, because if I disable GC by setting a high threshold, then the bug doesn't happen:
;; GC never: (setq gc-cons-threshold 100000000000)
;; GC normal: (setq gc-cons-threshold 800000)
How to reproduce?
./emacs-helm.sh
, in a TTY under XM-x
, orC-x C-f
, or any other helm- type a specific non-ASCII letter or symbol like → through a key in your keyboard (I hope you have some symbols like that). It doesn't matter if it's pressed together with Shift or with AltGr. See below about the particular symbol to type
- type it slowly several times, pausing each time. It works
- Now hold the key down. After around 1 second, it will switch to outputting garbage like
\342\206\206\222\206\222\206\222
etc. - And if it doesn't, release the key and try step 5 again
What symbol to use
- Letters like
á ñ ß ŀ ª ĵ
don't trigger this. - Symbols like
→ … ∪ ∴ „ ∃
trigger this (yes, I have those symbols accessible through a keypress. I use setxkbmap and a customized keymap). - And I tried with
明
(which is already a letter, not punctuation) and it also triggers the bug. I mapped it to a key, withsymbols[Group2]= [ U660E ]
So I'm assuming that the problem happens with characters that use more than 2 bytes in UTF-8 (like → … ∪ ∴ „ ∃ 明
). But those that are 1 or 2 bytes (á ñ ß ŀ ª ĵ
) work.
Minor details
- once the numeric codes start appearing, any non-ASCII key will be shown as a code. E.g.
á
will show\241
,ñ
will show\261
etc. It's their Unicode codes in decimal - if I type ASCII letters when the bug is showing, I go back to normal behaviour, and the next
∃
will appear correctly and I can repeat the steps and reproduce the bug again if I want
Where
- Reproduced in urxvt and in Kitty terminals, under X
- It doesn't happen under X, with latest helm, and emacs-gtk from Devuan
- This doesn't happen in the M-x minibuffer in normal TTY emacs without helm
- using Emacs compiled from source, 9f82300bb049c716d59575eaee29262e38c5e8d2, from 10th July 2025
Helm Version
Master branch
Emacs Version
Emacs-30+
OS
GNU/Linux
Relevant backtrace (if possible)
Minimal configuration
- I agree using a minimal configuration