GNU bug report logs - #18996
24.4; Pressing Alt-g shows Esc g- when running emacs inside terminal and in GUI mode it shows M-g

Previous Next

Package: emacs;

Reported by: "L. Guruprasad" <lgp171188 <at> gmail.com>

Date: Sat, 8 Nov 2014 17:42:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.4

Done: Marcin Borkowski <mbork <at> mbork.pl>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18996 in the body.
You can then email your comments to 18996 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18996; Package emacs. (Sat, 08 Nov 2014 17:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "L. Guruprasad" <lgp171188 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 08 Nov 2014 17:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "L. Guruprasad" <lgp171188 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4; Pressing Alt-g shows Esc g- when running emacs inside terminal
 and in GUI mode it shows M-g
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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18996; Package emacs. (Sat, 05 Mar 2016 18:15:01 GMT) Full text and rfc822 format available.

Message #8 received at 18996 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Borkowski <mbork <at> mbork.pl>
To: "L. Guruprasad" <lgp171188 <at> gmail.com>
Cc: 18996 <at> debbugs.gnu.org
Subject: Re: bug#18996: 24.4;
 Pressing Alt-g shows Esc g- when running emacs inside terminal and in
 GUI mode it shows M-g
Date: Sat, 05 Mar 2016 19:14:17 +0100
On 2014-11-08, at 14:07, "L. Guruprasad" <lgp171188 <at> gmail.com> wrote:

> 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.

Confirmed on GNU Emacs 25.1.50.6 (commit ac9a931).

> 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.

This is not true: M-x is bound (by default) to
`execute-extended-command', which calls `read-extended-command', which
has at one point the literal string "M-x ", which is fed (via
a `concat', which shows prefix arguments, if any) directly to
`completing-read'.

> 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.

No idea, though I doubt.

All in all, I'll assign this a "wishlist" level - I agree with the OP
that it would be nice to have this solved, but I don't think this would
really confuse anyone.  (IMHO, if someone uses Emacs in a terminal, s?he
probably is advanced enough to know that M-g and Esc g are equivalent.)

-- 
Marcin Borkowski




Severity set to 'wishlist' from 'normal' Request was from Marcin Borkowski <mbork <at> mbork.pl> to control <at> debbugs.gnu.org. (Sat, 05 Mar 2016 18:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18996; Package emacs. (Sat, 05 Mar 2016 18:53:02 GMT) Full text and rfc822 format available.

Message #13 received at 18996 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Marcin Borkowski <mbork <at> mbork.pl>
Cc: 18996 <at> debbugs.gnu.org, lgp171188 <at> gmail.com
Subject: Re: bug#18996: 24.4;
 Pressing Alt-g shows Esc g- when running emacs inside terminal and in
 GUI mode it shows M-g
Date: Sat, 05 Mar 2016 20:52:14 +0200
> From: Marcin Borkowski <mbork <at> mbork.pl>
> Date: Sat, 05 Mar 2016 19:14:17 +0100
> Cc: 18996 <at> debbugs.gnu.org
> 
> > 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.
> 
> Confirmed on GNU Emacs 25.1.50.6 (commit ac9a931).
> 
> > 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.
> 
> This is not true: M-x is bound (by default) to
> `execute-extended-command', which calls `read-extended-command', which
> has at one point the literal string "M-x ", which is fed (via
> a `concat', which shows prefix arguments, if any) directly to
> `completing-read'.
> 
> > 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.
> 
> No idea, though I doubt.
> 
> All in all, I'll assign this a "wishlist" level - I agree with the OP
> that it would be nice to have this solved

To have what solved?

If you type "C-h l" after M-x, what do you see?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18996; Package emacs. (Tue, 08 Mar 2016 16:49:01 GMT) Full text and rfc822 format available.

Message #16 received at 18996 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Borkowski <mbork <at> mbork.pl>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18996 <at> debbugs.gnu.org, lgp171188 <at> gmail.com
Subject: Re: bug#18996: 24.4;
 Pressing Alt-g shows Esc g- when running emacs inside terminal and in
 GUI mode it shows M-g
Date: Tue, 08 Mar 2016 17:47:48 +0100
On 2016-03-05, at 19:52, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Marcin Borkowski <mbork <at> mbork.pl>
>> Date: Sat, 05 Mar 2016 19:14:17 +0100
>> Cc: 18996 <at> debbugs.gnu.org
>> 
>> > 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.
>> 
>> Confirmed on GNU Emacs 25.1.50.6 (commit ac9a931).
>> 
>> > 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.
>> 
>> This is not true: M-x is bound (by default) to
>> `execute-extended-command', which calls `read-extended-command', which
>> has at one point the literal string "M-x ", which is fed (via
>> a `concat', which shows prefix arguments, if any) directly to
>> `completing-read'.
>> 
>> > 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.
>> 
>> No idea, though I doubt.
>> 
>> All in all, I'll assign this a "wishlist" level - I agree with the OP
>> that it would be nice to have this solved
>
> To have what solved?
>
> If you type "C-h l" after M-x, what do you see?

AFAIU, OP wants to see "M-g-" and not "ESC g-" after pressing M-g in an
Emacs session in a terminal.  This looks reasonable to me, though
definitely not a high priority.  If it's not possible/desirable, it
would be better to close this as "wontfix", but I do not know that.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18996; Package emacs. (Tue, 08 Mar 2016 17:11:01 GMT) Full text and rfc822 format available.

Message #19 received at 18996 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Marcin Borkowski <mbork <at> mbork.pl>
Cc: 18996 <at> debbugs.gnu.org, lgp171188 <at> gmail.com
Subject: Re: bug#18996: 24.4;
 Pressing Alt-g shows Esc g- when running emacs inside terminal and in
 GUI mode it shows M-g
Date: Tue, 08 Mar 2016 19:10:51 +0200
> From: Marcin Borkowski <mbork <at> mbork.pl>
> Cc: lgp171188 <at> gmail.com, 18996 <at> debbugs.gnu.org
> Date: Tue, 08 Mar 2016 17:47:48 +0100
> 
> >> > 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.
> >> 
> >> This is not true: M-x is bound (by default) to
> >> `execute-extended-command', which calls `read-extended-command', which
> >> has at one point the literal string "M-x ", which is fed (via
> >> a `concat', which shows prefix arguments, if any) directly to
> >> `completing-read'.
> >> 
> >> > 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.
> >> 
> >> No idea, though I doubt.
> >> 
> >> All in all, I'll assign this a "wishlist" level - I agree with the OP
> >> that it would be nice to have this solved
> >
> > To have what solved?
> >
> > If you type "C-h l" after M-x, what do you see?
> 
> AFAIU, OP wants to see "M-g-" and not "ESC g-" after pressing M-g in an
> Emacs session in a terminal.

My point was that you will see "ESC g" in the "C-h l" output.  Which
means Emacs _doesn't_ know how to differentiate between ESC-x and M-x,
on the level that shows the prefix key prompts, such as M-g-.  What
happens here is that the command bound to "ESC x" deliberately
displays "M-x " in the echo area.  IOW, "M-x" is _not_ the key echo,
it's a message displayed by a command.

In sum, Emacs doesn't have a way to distinguish between M-c and ESC c,
for any character c, on a TTY.  We can only do that on a GUI frame.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18996; Package emacs. (Tue, 08 Mar 2016 17:36:01 GMT) Full text and rfc822 format available.

Message #22 received at 18996 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: mbork <at> mbork.pl
Cc: 18996 <at> debbugs.gnu.org, lgp171188 <at> gmail.com
Subject: Re: bug#18996: 24.4;
 Pressing Alt-g shows Esc g- when running emacs inside terminal and in
 GUI mode it shows M-g
Date: Tue, 08 Mar 2016 19:35:27 +0200
> Date: Tue, 08 Mar 2016 19:10:51 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 18996 <at> debbugs.gnu.org, lgp171188 <at> gmail.com
> 
> My point was that you will see "ESC g" in the "C-h l" output.

Sorry, I meant to say "ESC g" and "ESC x", not just the former.




Added tag(s) wontfix. Request was from Marcin Borkowski <mbork <at> mbork.pl> to control <at> debbugs.gnu.org. (Wed, 09 Mar 2016 06:02:02 GMT) Full text and rfc822 format available.

Reply sent to Marcin Borkowski <mbork <at> mbork.pl>:
You have taken responsibility. (Wed, 09 Mar 2016 06:02:02 GMT) Full text and rfc822 format available.

Notification sent to "L. Guruprasad" <lgp171188 <at> gmail.com>:
bug acknowledged by developer. (Wed, 09 Mar 2016 06:02:02 GMT) Full text and rfc822 format available.

Message #29 received at 18996-done <at> debbugs.gnu.org (full text, mbox):

From: Marcin Borkowski <mbork <at> mbork.pl>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18996-done <at> debbugs.gnu.org, lgp171188 <at> gmail.com
Subject: Re: bug#18996: 24.4;
 Pressing Alt-g shows Esc g- when running emacs inside terminal and in
 GUI mode it shows M-g
Date: Wed, 09 Mar 2016 07:01:26 +0100
On 2016-03-08, at 19:10, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Marcin Borkowski <mbork <at> mbork.pl>
>> Cc: lgp171188 <at> gmail.com, 18996 <at> debbugs.gnu.org
>> Date: Tue, 08 Mar 2016 17:47:48 +0100
>> 
>> >> > 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.
>> >> 
>> >> This is not true: M-x is bound (by default) to
>> >> `execute-extended-command', which calls `read-extended-command', which
>> >> has at one point the literal string "M-x ", which is fed (via
>> >> a `concat', which shows prefix arguments, if any) directly to
>> >> `completing-read'.
>> >> 
>> >> > 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.
>> >> 
>> >> No idea, though I doubt.
>> >> 
>> >> All in all, I'll assign this a "wishlist" level - I agree with the OP
>> >> that it would be nice to have this solved
>> >
>> > To have what solved?
>> >
>> > If you type "C-h l" after M-x, what do you see?
>> 
>> AFAIU, OP wants to see "M-g-" and not "ESC g-" after pressing M-g in an
>> Emacs session in a terminal.
>
> My point was that you will see "ESC g" in the "C-h l" output.  Which
> means Emacs _doesn't_ know how to differentiate between ESC-x and M-x,
> on the level that shows the prefix key prompts, such as M-g-.  What
> happens here is that the command bound to "ESC x" deliberately
> displays "M-x " in the echo area.  IOW, "M-x" is _not_ the key echo,
> it's a message displayed by a command.
>
> In sum, Emacs doesn't have a way to distinguish between M-c and ESC c,
> for any character c, on a TTY.  We can only do that on a GUI frame.

OK, so I'm tagging this "wontfix" and closing it.

Best,

-- 
Marcin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Apr 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.