From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <83pov4rj38.fsf@gnu.org> References: <545DD62F.3000106@gmail.com> <87vb50ztae.fsf@mbork.pl> <83y49wwye9.fsf@gnu.org> <87mvq8ykzv.fsf@mbork.pl> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1457457088 29454 80.91.229.3 (8 Mar 2016 17:11:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2016 17:11:28 +0000 (UTC) Cc: 18996@debbugs.gnu.org, lgp171188@gmail.com To: Marcin Borkowski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 08 18:11:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1adLAB-000448-1V for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Mar 2016 18:11:15 +0100 Original-Received: from localhost ([::1]:36169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adLAA-0007fM-DW for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Mar 2016 12:11:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adLA2-0007eG-1F for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 12:11:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adL9y-0005uN-1g for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 12:11:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adL9x-0005uJ-U7 for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 12:11:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1adL9x-0003cq-R1 for bug-gnu-emacs@gnu.org; Tue, 08 Mar 2016 12:11:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Mar 2016 17:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18996 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18996-submit@debbugs.gnu.org id=B18996.145745705513921 (code B ref 18996); Tue, 08 Mar 2016 17:11:01 +0000 Original-Received: (at 18996) by debbugs.gnu.org; 8 Mar 2016 17:10:55 +0000 Original-Received: from localhost ([127.0.0.1]:39940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adL9r-0003cR-EM for submit@debbugs.gnu.org; Tue, 08 Mar 2016 12:10:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41002) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1adL9p-0003cF-Jk for 18996@debbugs.gnu.org; Tue, 08 Mar 2016 12:10:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adL9f-0005sR-Nu for 18996@debbugs.gnu.org; Tue, 08 Mar 2016 12:10:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adL9f-0005sL-DQ; Tue, 08 Mar 2016 12:10:43 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2920 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1adL9e-0003kH-Mx; Tue, 08 Mar 2016 12:10:43 -0500 In-reply-to: <87mvq8ykzv.fsf@mbork.pl> (message from Marcin Borkowski on Tue, 08 Mar 2016 17:47:48 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114584 Archived-At: > From: Marcin Borkowski > Cc: lgp171188@gmail.com, 18996@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.