0

With emacs 28 everything worked fine. After installing emacs-29 I see the following: for example typing "Meta + w" creates "H-M-w" which is undefined. With emacs-28 I got "M-w runs the command kill-ring-save" when I invoke describe key via "C-h c".

There is no mention of hyper-key anywhere in my emacs setup. Also "xmodmap -pm" shows that I have no hyper-key modifier defined. Also xev shows that keyboard generates a Meta_L event, no mention of hyper either.

I run emacs in GNU/Linux (opensuse 15.4).

What happens here?

I had a very similar problem when going from emacs-27 to emacs-28. I had to add some keymap translations for some Alt combinations like "A-Y". These were bound to some special symbols by emacs-28. For example I added

(define-key key-translation-map (kbd "A-Y") (kbd "A-Y"))

which reads a bit silly but binds A-Y to what you expect it should bind to (without that I get the Yuan currency symbol).

Similary adding

(define-key key-translation-map (kbd "H-M-w") (kbd "M-w"))

restores the expected behaviour for the kill-ring-save binding.

Edit: After some fiddling with xmodmap I have an idea that emacs might get confused by my xmodmap setup during startup.

I added "add Mod3 = Hyper_L" to my Xmodmap (and put Hyper_L on some unused key on my keyboard), and now "M-w" is just "M-w". Here is the output from "xmodmap -pm":

shift       Shift_L (0x32),  Shift_R (0x3e)
lock      
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c)
mod2        Super_L (0x42),  Super_L (0xce)
mod3        Hyper_L (0x7f),  Hyper_L (0xcf)
mod4        Meta_L (0x85),  Meta_R (0x86)
mod5        Mode_switch (0x87)

Without mod3 (i.e. no Hyper_L) as it was originally, emacs translates "M-w" to "H-M-w" and similar. To further test the emacs behaviour I removed the mod1 definition (mod1 empty, no Alt_L and Alt_R, but I left the keycode definitions for those two keysyms), and with that emacs translates "A-y" to "A-s-y", smuggling in a Super key, wherever this comes from. Emacs seems to mix actual keycodes with the modifier bits?

Any idea what magic emacs is pulling here? My xmodmap modifier definitions looks about right, considering the many examples for how to remap/add modifiers like caps lock, super, meta, windows keys etc.

I still do not understand why emacs (since version 28) translates "A-Y" to the Yuan currency symbol (and many other similar mappings).

mscfd
  • 1
  • 1
  • 1
    What kind of emacs build? Specifically, is this a '--with-pgtk' build? `system-configuration-features` will tell you. – rpluim Jul 24 '23 at 13:25
  • system-configuration-features is "CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB" – mscfd Jul 25 '23 at 04:10
  • emacs is self build of emacs-29.1-rc1 tag. Configure command was "./configure --prefix=/home/.../local --with-sound=no --with-gnutls=yes" – mscfd Jul 25 '23 at 04:11
  • This sounds like the effect of some changes made in emacs-29 for modifier keys that sometimes interact badly with Gnome. Can you report it as a bug with `M-x report-emacs-bug`? – rpluim Jul 25 '23 at 09:00
  • I guess this is in answer to my edit in the main post (add hyper as key and modifier), right? I will try to report it, but I was somewhat discouraged by not finding any bugzilla or public issue tracker, just some obscure mailing lists. Thanks! – mscfd Jul 25 '23 at 09:37
  • PS: Found the bugtracker with searchable issues... – mscfd Jul 25 '23 at 09:41

0 Answers0