18

I set the Alt Gr key on my keyboard as compose key in my system (Ubuntu 14.04) in order to type letters like éóèàùçü and so on. But when I am on Emacs and try to press the Alt Gr key, I have a message saying that:

<Multi_key> is undefines

Ho can I make it work? Thanks.

P.S. as I don't have enough reputation, I couldn't tag this post with more meaningful tags. So, please, if you want to suggest tags, you are welcome.

8
  • I'm having the same issue with Capslock set to be my compose key.
    – Squidly
    Commented Nov 17, 2014 at 13:44
  • 2
    Sounds like a bug, so a minimum would be to provide the version of Emacs you're using. It sounds like debbugs.gnu.org/14044 .
    – Stefan
    Commented Nov 17, 2014 at 14:10
  • 1
    Does it really show “<Multi_key> is undefines” and not “<Multi_key> is undefined”? Always copy-paste error messages. Are you using the Emacs binary that comes with the system? Are you using the default GUI environment, if not which one? How exactly did you configure the keyboard (which layout, which options)? Commented Nov 18, 2014 at 7:21
  • I also have this problem since I updated to Ubuntu 14.04. Reviewed debbug mentioned above and found no help: /usr/share/X11/locale/en_US.UTF-8/XI18N_OBJS already contains _XimRegisterIMINstantiateCallback, requireing iso-transl does not help, killing ibus-daemon neither. Every app I use properly handles compose character (for example firefox: →), only emacs does not. I happily used composing for years...
    – Mekk
    Commented Nov 18, 2014 at 8:06
  • Are you using emacs in console mode (in a terminal) or in a graphical window?
    – T. Verron
    Commented Nov 18, 2014 at 8:08

2 Answers 2

17

Run emacs with XMODIFIERS set to @im=none:

XMODIFIERS=@im=none emacs

I'm surprised this still happens; I found this workaround some time ago, and forgot about it. I would have assumed it would get fixed by now.

There are some bug reports around for this; I can't find the (Debian) one that I originally read to get this workaround, but one relevant to Ubuntu is https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/493766. There's also a discussion on the emacs-devel mailing list here: http://thread.gmane.org/gmane.emacs.devel/170835.

4
  • 1
    Won't this break ibus?
    – Clément
    Commented Jan 25, 2015 at 5:24
  • I use emacs's own input methods within emacs. It disables ibus only within emacs. Commented Jan 26, 2015 at 13:47
  • 1
    for anybody searching info on this: I get this error on emacs 26.1 + uim if the uim-xim dæmon isn’t running. with the dæmon live, XMODIFIERS=@im=uim works and doesn’t break Multi_key (compose). Commented Apr 27, 2020 at 12:20
  • @melissa_boiko Another solution is to unset the XMODIFIERS environment variable when running emacs: env -u XMODIFIERS emacs
    – hackerb9
    Commented Nov 5, 2020 at 17:57
1

This is a bug. It's fixed in Emacs 24.4.

You can update by building it from source; it's pretty straightforward:
http://ftpmirror.gnu.org/emacs/emacs-24.4.tar.gz

10
  • 1
    Have you checked this on a vanilla 24.4 build? It doesn't work for me on a machine with ibus, which is the usual cause of the problem in the first place. There do seem to be fixes in the git repo, so there are patched versions being distributed by e.g. Ubuntu that have backported the fix to 24.4. But I don't think that any of the tarballs you get from gnu.org will work. Commented Apr 9, 2015 at 4:05
  • Works for me on a vanilla build from gnu.org, actually
    – Clément
    Commented Apr 9, 2015 at 4:48
  • 5
    It's not fixed. Using emacs-25.1.50 with XMODIFIERS=@im=fcitx, the problem is present.
    – Hi-Angel
    Commented Oct 23, 2016 at 3:44
  • 1
    I also have this problem on ubuntu with emacs 25.1.2 Commented Jun 14, 2017 at 14:26
  • 1
    having this problem with GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.19) of 2017-09-15
    – rahmu
    Commented Feb 13, 2018 at 12:13

Your Answer

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

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