1

im running emacs 26.1 on debian with xfce, and have no alternative input methods installed.

my compose key recently stopped working in emacs. i get the dreaded <Multi_key> is undefined error.

i'm aware of:

https://stackoverflow.com/questions/10120590/how-do-i-get-compose-key-work-in-emacs and

Compose key in Emacs: <Multi_key> is undefined.

but for me the solutions suggested there do not work. my XMODIFIERS is empty by default. and setting it to =@im=none or ="" doesn't work. setting include "%L" in .Xcompose does not work. running GTK_IM_MODULE=xim emacs -Q doesn't work.

i recently changed a bunch of custom set faces in my emacs init.el which i thought could have caused the issue, but it is also present if i load emacs with no init file.

my compose key is set with setxkb in .xsessionrc. i recently moved it there from another dot file. i thought the move could also have interfered somehow but compose works fine in all contexts except emacs. and i guess the multi_key error means the key is actually mapped in emacs, just not working.

i'm a little confused as to how this cd be a bug it it was working for ages then suddenly stopped. to me that suggests user ruining something, which is usually the case with me! but in this case it is present without my init.el file.

i just found out about C-x 8 but the whole benefit of having a compose key is session-wide compose sequences. i don't want to have to learn two sets.

3
  • Do you see the problem also if you start Emacs with emacs -Q (no init file)? If not, bisect your init file to find the problem. If yes, consider filing a bug report: M-x report-emacs-bug.
    – Drew
    May 22, 2020 at 15:43
  • yes: "but it is also present if i load emacs with no init file." i wasn't filing a report straight away because normally when i do so it is an issue due to my own incompetence. :) but perhaps it is time.
    – user27075
    May 22, 2020 at 19:39
  • Sounds like a bug, to me. But if you file a report then someone familiar with character composition etc. will take a look and let you know.
    – Drew
    May 23, 2020 at 3:50

2 Answers 2

2

I experienced the same problem, this is what helped me make it work (although I could not find out why):

  1. Generate zh_TW.UTF-8 locale (uncomment in /etc/locale.gen and run locale-gen)
  2. Run emacs with LC_CTYPE set to this locale (env LC_CTYPE=zh_TW.UTF-8 emacs)
1
  • did you try locales in alphabetical order and make it that far? :) / but seriously, do you know why that one works and did you try others? / it works for me too. i tried running emacs specifying a number of my installed locales, which did not work.
    – user27075
    Jul 17, 2020 at 10:36
0

ok so the issue for me was likely one of those good old user-added "bugs". i suspect it came from bleachbitting my locales but i'm not sure.

if i set LC_CTYPE=C emacs has a compose key again.

EDIT: the above breaks stuff, eg typo mode.

i worked out the actual fix:

make sure you have the file /usr/share/X11/locale/$yr_chosen_lang_code/Compose. eg /usr/share/X11/locale/en_US.UTF-8/Compose.

if you don't, (re-)install the package libx11-data.

in my case bleachbit over-zealously vacuumed it up, thanks to the user using it wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.