After a rebuild of emacs with xorg-x11-6.8.0-r1 installed, the AltGr key on my (German) keyboard showed the following behavior: - Entering special characters as plain text, like the Euro sign with AltGr-E, or the @ sign with AltGr-Q, works ok; - Entering command sequences involving those special characters is impossible; the command input is aborted when pressing the AltGr key, and the (to-be-modified) key pressed thereafter is evaluated unmodified. This is particularly annoying since incremental search for, e.g., TeX command sequences becomes impossible on some Non-US keyboards (where the backslash can only be reached via AltGr-<somekey>, but pressing AltGr instantly quits incremental search mode); this cannot be worked around by remapping command shortcuts (as might be done otherwise, e.g., for the command shortcut C-~ [for TeX-math-mode], which must be entered as C-AltGr-+ on German keyboards). Reproducible: Always Steps to Reproduce: 1. emerge -k =xorg-x11-6.8.0-r1 && etc-update && env-update && source /etc/profile 2. emerge =emacs-21.3-r4 => AltGr key in emacs is not working properly 3. emerge -k =xorg-x11-6.7.0-r2 && etc-update && env-update && source /etc/profile 4. emerge =emacs-21.3-r4 => AltGr key in emacs works properly now You can even do 5. emerge =xorg-x11-6.8.0-r1 && etc-update && env-update && source /etc/profile and it will still work ok, as long as you don't re-emerge emacs as well. Actual Results: (After step 2:) - Start emacs - Hit AltGr-Q -> a '@' character will be inserted (that's ok) - Hit C-h c AltGr-Q -> The "describe-key-briefly" macro will tell you that "<key-3> is undefined", and a 'q' character will be inserted (not ok) Expected Results: (After step 4 or 5:) - Start emacs - Hit AltGr-Q -> a '@' character will be inserted (that's still ok) - Hit C-h c AltGr-Q -> The "describe-key-briefly" macro will tell you that "@ runs the command self-insert-command" (as expected) emerge info says: --------------------------------------------------------------------------- Portage 2.0.50-r11 (default-x86-1.4, gcc-3.3.4, glibc-2.3.3.20040420-r1, 2.6.7-gentoo-r14) ================================================================= System uname: 2.6.7-gentoo-r14 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.5.3 distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-tbird -Os -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/fax /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control /var/spool/fax/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-tbird -Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache fixpackages sandbox" GENTOO_MIRRORS="http://extensa/gentoo ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.tiscali.nl/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="3dnow 3dnowex X aalib acpi acpi4linux alsa apache2 arts atlas auctex audiofile avi berkdb bitmap-fonts blender-game bonobo bzlib calendar cddb cdparanoia cdr clamav codecs cpdflib crypt cups curl dba dga directfb divx4linux doc dv dvd dvdread edl emacs encode esd evo exif exiscan exiscan-acl f77 fam fbcon foomaticdb freetype fs gb gcj gcl gd gdbm gif gimp gimpprint ginac glut gmp gphoto2 gpm gs gsl gstreamer gtk gtk2 gtkhtml guile hbci hdf hdf5 ieee1394 imagemagick imap imlib innodb ipv6 java jbig jikes joystick jpeg kde lcms ldap leim libg++ libwww linguas_de lmtp mad maildir mailwrapper memlimit mikmod mime mmx mng motif moznocompose moznoirc moznomail mozsvg mpeg mpi mule music mysql nas ncurses nls nptl nvidia oav odbc oggvorbis openal opengl oss pam pdflib perl pg-hier pg-intdatetime pg-vacuumdelay pic plotutils png postgres ppds prebuilt python qt quicktime readline rtc ruby samba sasl scanner sdl session shared sharedmem slang smime soap speex spell ssl svg svga tcltk tcpd tetex tidy tiff transcode truetype type1 usb videos wmf wxwin wxwindows x86 xine xml2 xmms xprint xv xvid zlib" --------------------------------------------------------------------------- The (possibly) relevant part of /etc/X11/xorg.conf: Section "InputDevice" Identifier "Keyboard1" Driver "kbd" # for xorg-x11-6.7.0-r2 this changes to: # Driver "Keyboard" --------------------------------------------------------------------------- I'll be happy to provide more info if required. Thanks for your time! Option "AutoRepeat" "500 30" Option "XkbOptions" "compose:rwin" Option "XkbModel" "pc105" Option "XkbLayout" "de" Option "XkbVariant" "nodeadkeys" EndSection
Sorry, the last part should of course read --------------------------------------------------------------------------- The (possibly) relevant part of /etc/X11/xorg.conf: Section "InputDevice" Identifier "Keyboard1" Driver "kbd" # for xorg-x11-6.7.0-r2 this changes to: # Driver "Keyboard" Option "AutoRepeat" "500 30" Option "XkbOptions" "compose:rwin" Option "XkbModel" "pc105" Option "XkbLayout" "de" Option "XkbVariant" "nodeadkeys" EndSection --------------------------------------------------------------------------- (I pasted this to the wrong place... :-/) I'll be happy to provide more info if required. Thanks for your time!
The AltGr key on my italian keyboard showed the following behavior: - entering special characters, like the @ sign with AltGr-
The AltGr key on my italian keyboard showed the following behavior: - entering special characters, like the @ sign with AltGr-ò, works ok but beeps; - hitting C-h c AltGr-ò ("describe-key-briefly" macro) will tell you that "<key-3> is undefined". It looks like a known xorg bug. See for example: http://lists.gnu.org/archive/html/bug-gnu-emacs/2004-10/msg00151.html http://freedesktop.org/bugzilla/show_bug.cgi?id=1625 I added the patch suggested by lists.gnu.org to /usr/portage/app-editors/emacs/files: ----- begin file emacs-21.3-xorg.patch ----- diff -Naur emacs-21.3-old/src/xterm.h emacs-21.3/src/xterm.h --- emacs-21.3-old/src/xterm.h 2002-02-22 11:41:44.000000000 +0100 +++ emacs-21.3/src/xterm.h 2004-10-30 12:33:12.000000000 +0200 @@ -21,8 +21,8 @@ #include <X11/Xlib.h> #include <X11/cursorfont.h> -#include <X11/Xutil.h> #include <X11/keysym.h> +#include <X11/Xutil.h> #include <X11/Xatom.h> #include <X11/Xresource.h> ----- end file emacs-21.3-xorg.patch ----- and I've edited emacs-21.3-r3.ebuild: --- emacs-21.3-r3.ebuild.orig 2004-10-19 11:37:39.000000000 +0200 +++ emacs-21.3-r3.ebuild 2004-11-20 09:05:20.000000000 +0100 @@ -50,6 +50,7 @@ epatch ${FILESDIR}/${P}-amd64.patch epatch ${FILESDIR}/${P}-hppa.patch + epatch ${FILESDIR}/${P}-xorg.patch export WANT_AUTOCONF=2.1 autoconf The AltGr key works fine now.
Thanks for the pointer to the patch. I added it to CVS as emacs-21.3-r5.ebuild. Please run `emerge --sync` and test if it works or not.
Yes, that solved it for me. The AltGr key works as expected now, i.e., with xorg-x11-6.8.0-r3 and emacs-21.3-r5. Thank you very much, Sergio, for tracking down the problem, and Mamoru, for providing the revised ebuild!
Yes, xorg-x11-6.8.0-r3 and emacs-21.3-r5 work for me too. Thanks ;-)
*** Bug 80266 has been marked as a duplicate of this bug. ***