Subject: 24.4; Pressing Alt-g shows Esc g- when running emacs inside terminal and in GUI mode it shows M-g

From: "L. Guruprasad" <[email-masked]>
Date: Sat, 08 Nov 2014 14:07:03 +0530

Hi,

When I press Alt-g as part of executing the shortcut M-g g, when running
emacs within the terminal using the -nw flag, it shows up in the
minibuffer as "Esc g-". But when I run the same in the GUI Emacs, it
shows up as "M-g". This can be misleading and confusing to users who do
not know Esc and Meta keys are equivalent.

Further, when I press Alt-x, it shows up as M-x in both the
scenarios. So it doesn't look like Emacs cannot differentiate between
the two when running inside the terminal without a GUI.

I vaguely remember seeing M-g in the terminal on pressing Alt-g some
time back, maybe in an older emacs version. But not sure.

In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.3)
 of 2014-10-26 on trouble, modified by Debian
System Description:	Debian GNU/Linux unstable (sid)

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LANG: en_IN.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  ido-everywhere: t
  yas-global-mode: t
  yas-minor-mode: t
  global-linum-mode: t
  linum-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ > 1 ; 3 8 0 1 ; 0 c ESC x r e p o r t - e RET
C-g C-g ESC x g DEL DEL ESC x C-g ESC x r e RET C-g
ESC g C-g ESC x r e p RET

Recent messages:
[yas] Loading for `emacs-lisp-mode', just-in-time: (lambda nil
(yas--load-directory-1 (quote
/home/guruprasad/.emacs.d/elpa/yasnippet-20140729.1240/snippets/emacs-lisp-mode)
(quote emacs-lisp-mode)))!
[yas] Loading compiled snippets from
/home/guruprasad/.emacs.d/elpa/yasnippet-20140729.1240/snippets/emacs-lisp-mode
[yas] Loading for `prog-mode', just-in-time: (lambda nil
(yas--load-directory-1 (quote
/home/guruprasad/.emacs.d/elpa/yasnippet-20140729.1240/snippets/prog-mode)
(quote prog-mode)))!
[yas] Loading compiled snippets from
/home/guruprasad/.emacs.d/elpa/yasnippet-20140729.1240/snippets/prog-mode
Loading
/home/guruprasad/.emacs.d/elpa/yasnippet-20140729.1240/snippets/prog-mode/.yas-setup...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit [2 times]
delete-backward-char: Text is read-only
Quit [3 times]
M-g C-g is undefined

Load-path shadows:
/usr/share/emacs/site-lisp/golang-mode/go-mode hides
/usr/share/emacs/24.4/site-lisp/golang-mode/go-mode
/usr/share/emacs/site-lisp/golang-mode/go-mode-load hides
/usr/share/emacs/24.4/site-lisp/golang-mode/go-mode-load
/usr/share/emacs/24.4/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/24.4/lisp/textmodes/ispell
/usr/share/emacs/site-lisp/rst hides
/usr/share/emacs/24.4/lisp/textmodes/rst
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/24.4/lisp/textmodes/flyspell

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils smex xterm time-date info magit-autoloads
git-rebase-mode-autoloads git-commit-mode-autoloads cl-macs
pkg-info-autoloads epl-autoloads pungi-autoloads jedi-autoloads
auto-complete-autoloads popup-autoloads epc-autoloads ctable-autoloads
concurrent-autoloads python-environment-autoloads deferred-autoloads
smex-autoloads yasnippet-autoloads edmacro kmacro ido yasnippet
help-mode easymenu cl gv cl-loaddefs cl-lib package epg-config linum
go-mode-load tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 144727 5953)
 (symbols 48 22691 0)
 (miscs 40 44 90)
 (strings 32 28993 4270)
 (string-bytes 1 746905)
 (vectors 16 14075)
 (vector-slots 8 459565 1712)
 (floats 8 403 291)
 (intervals 56 252 1)
 (buffers 960 12)
 (heap 1024 24304 809))