Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706094 - app-emacs/emacs-daemon-0.22 : unlocalized [M-] escape sequence at tty console
Summary: app-emacs/emacs-daemon-0.22 : unlocalized [M-] escape sequence at tty console
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-22 14:56 UTC by CaptainBlood
Modified: 2020-01-22 20:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ouputs for input-decode-map (input-decode-map.out,26.62 KB, text/plain)
2020-01-22 18:28 UTC, CaptainBlood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CaptainBlood 2020-01-22 14:56:44 UTC
When launching emacsclient from console:
Plain text keystrokes are using localized keyboard layout as expected.
Control sequences are using qwerty keyboard layout.

When launching emacsclient from terminal:
 Control sequences are using localized keyboard layout.
-------------------------------------------------------
cat /etc/locale.gen
fr_FR.UTF-8 UTF-8
----------------
eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   C.utf8
  [3]   fr_FR.utf8 *
  [4]   POSIX
  [ ]   (free form)
-------------------
echo $LANG
fr_FR.utf8
----------
cat /etc/conf.d/keymaps
keymap="fr-latin9"
------------------
cat /etc/env.d/02locale
LANG="fr_FR.utf8"
-----------------
euse app-editors/emacs-26.3-r1
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-editors/emacs-26.3-r1:
 U I
 + + X                   : Add support for X11
 - - Xaw3d               : Add support for the 3d athena widget set
 - - acl                 : Add support for Access Control Lists
 - - alsa                : Add support for media-libs/alsa-lib (Advanced
                           Linux Sound Architecture)
 - - athena              : Enable the MIT Athena widget set (x11-libs/libXaw)
 - - dbus                : Enable dbus support for anything that needs it
                           (gpsd, gnomemeeting, etc)
 - - dynamic-loading     : Enable loading of dynamic libraries at runtime
 - - games               : Support shared score files for games
 - - gconf               : Use gnome-base/gconf to read the system font name
 - - gfile               : Use gfile (dev-libs/glib) for file notification
 + + gif                 : Add GIF image support
 + + gpm                 : Add support for sys-libs/gpm (Console-based mouse
                           driver)
 - - gsettings           : Use gsettings (dev-libs/glib) to read the system
                           font name
 - - gtk                 : Add support for x11-libs/gtk+ (The GIMP Toolkit)
 - - gtk2                : Prefer version 2 of the GIMP Toolkit to version 3
                           (x11-libs/gtk+)
 + + gzip-el             : Compress bundled Emacs Lisp source
 + + imagemagick         : Use media-gfx/imagemagick for image processing
 + + inotify             : Enable inotify filesystem monitoring support
 + + jpeg                : Add JPEG image support
 - - kerberos            : Add kerberos support
 - - lcms                : Add lcms support (color management engine)
 + + libxml2             : Use dev-libs/libxml2 to parse XML instead of the
                           internal Lisp implementations
 - - livecd              : !!internal use only!! DO NOT SET THIS FLAG
                           YOURSELF!, used during livecd building
 - - m17n-lib            : Enable m17n-lib support
 - - mailutils           : Retrieve e-mail using net-mail/mailutils instead
                           of the internal movemail substitute
 - - motif               : Add support for the Motif toolkit
 + + png                 : Add support for libpng (PNG images)
 + + sound               : Enable sound support
 - - source              : Install C source files and make them available for
                           find-function
 + + ssl                 : Add support for SSL/TLS connections (Secure Socket
                           Layer / Transport Layer Security)
 + + svg                 : Add support for SVG (Scalable Vector Graphics)
 - - systemd             : Enable use of systemd-specific libraries and
                           features like socket activation or session
                           tracking
 + + threads             : Add elisp threading support
 + + tiff                : Add support for the TIFF image format
 + + toolkit-scroll-bars : Use the selected toolkit's scrollbars in
                           preference to Emacs' own scrollbars
 - - wide-int            : Prefer wide Emacs integers (typically 62-bit).
                           This option has an effect only on architectures
                           where "long" and "long long" types have different
                           size.
 + + xft                 : Build with support for XFT font renderer
                           (x11-libs/libXft)
 + + xpm                 : Add support for XPM graphics format
 - - xwidgets            : Enable use of GTK widgets in Emacs buffers
                           (requires GTK3)
 - - zlib                : Add support for zlib (de)compression

Reproducible: Always
Comment 1 Ulrich Müller gentoo-dev 2020-01-22 16:20:35 UTC
I cannot reproduce this.

Does this also happen if you add "-q" to EMACS_OPTS in /etc/conf.d/emacs?

What is displayed if you type (in console or in terminal):
- "ctrl-v ctrl-a" in bash
- "ctrl-h k ctrl-a" in emacs

What is the value of variable input-decode-map in emacs (in console or in terminal)?
Comment 2 CaptainBlood 2020-01-22 18:04:51 UTC
(In reply to Ulrich Müller from comment #1)
> I cannot reproduce this.
> 
> Does this also happen if you add "-q" to EMACS_OPTS in /etc/conf.d/emacs?
Yes: I removed the # as first character & added -q @eos
> 
> What is displayed if you type (in console or in terminal):
> - "ctrl-v ctrl-a" in bash
echoes:^A
> - "ctrl-h k ctrl-a" in emacs
echo snippet:It is bound to C-a, <home>.
> 
> What is the value of variable input-decode-map in emacs (in console or in
> terminal)?
Plz wait a little while as the two outputs are very different from console to terminal, the former being extensively long & hard to grip with my little knowledge.

I must have been misleading as I meant 'Control' in a generic way, and not the Ctrl key specifically. To be more precise the problem mostly shows at the second step of [Ctrl-space] [M-w] 'copy' sequence where [M-w] is taken as [M-z] (zap-to-char). Striking [M-z] instead DOES bring the expected result, though.

Plz remember z & w keys are inverted on azerty keyboard.

Thks
Comment 3 CaptainBlood 2020-01-22 18:28:55 UTC
Created attachment 604004 [details]
ouputs for input-decode-map
Comment 4 Ulrich Müller gentoo-dev 2020-01-22 19:41:17 UTC
Meanwhile I can reproduce the problem, even when starting the emacs daemon manually, as follows:
# loadkeys fr-latin9
$ emacs -Q --daemon
$ emacsclient -t
C-h k a [that's the key labelled "Q" on my German keyboard] -> a
C-h k C-a -> C-a
C-h k M-a ["Alt" key + "Q" key] -> M-q
C-h k ESC a -> M-a

I see the issue here with the "fr-latin9" keymap, but I don't see it with "fr", nor with "fr-latin1".

Anyway, it looks like it is not an Emacs problem, but a problem (or a feature?) of the keymap:

# loadkeys fr-latin9
# dumpkeys | grep " 16 "
keycode  16 = +a               +A               acircumflex      adiaeresis       Control_a        Control_q        Control_q       
	alt	keycode  16 = Meta_q          
	shift	alt	keycode  16 = Meta_Q          
	control	alt	keycode  16 = Meta_Control_q
Comment 5 CaptainBlood 2020-01-22 20:12:27 UTC
My homework is now to recall why I rather picked fr-latin9 in the first place, and to check for any good reason not to switch to fr-latin1 instead.
Thks 4 investigating, teaching & explanations.
Comment 6 Ulrich Müller gentoo-dev 2020-01-22 20:21:20 UTC
Glad if I could help. :)