GNU bug report logs - #23543
25.1.50; Incorrect key binding echoed by `M-x'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Drew Adams <drew.adams@HIDDEN>; Keywords: confirmed; merged with #42207; dated Sun, 15 May 2016 21:33:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 23543 42207. Request was from Stefan Kangas <stefan@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 23543 <at> debbugs.gnu.org:


Received: (at 23543) by debbugs.gnu.org; 28 Jul 2019 12:39:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 28 08:39:42 2019
Received: from localhost ([127.0.0.1]:45898 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hriSk-000335-5I
	for submit <at> debbugs.gnu.org; Sun, 28 Jul 2019 08:39:42 -0400
Received: from quimby.gnus.org ([80.91.231.51]:55288)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1hriSh-00032s-EM
 for 23543 <at> debbugs.gnu.org; Sun, 28 Jul 2019 08:39:40 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1hriSc-0003z2-VA; Sun, 28 Jul 2019 14:39:37 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#23543: 25.1.50; Incorrect key binding echoed by `M-x'
References: <eaacb625-2b13-4527-8847-9246c2e21038@default>
Date: Sun, 28 Jul 2019 14:39:34 +0200
In-Reply-To: <eaacb625-2b13-4527-8847-9246c2e21038@default> (Drew Adams's
 message of "Sun, 15 May 2016 14:32:30 -0700 (PDT)")
Message-ID: <87r26abaex.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Drew Adams <drew.adams@HIDDEN> writes: > emacs -Q > >
 (define-key global-map [remap eval-last-sexp] 'pp-eval-last-sexp) > > Put
 point after a Lisp sexp somewhere, and do `M-x eval-last-sexp'. > > You see
 this echoed: > > You can run the co [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 23543
Cc: 23543 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Drew Adams <drew.adams@HIDDEN> writes:

> emacs -Q
>
> (define-key global-map [remap eval-last-sexp] 'pp-eval-last-sexp)
>
> Put point after a Lisp sexp somewhere, and do `M-x eval-last-sexp'.
>
> You see this echoed:
>
>   You can run the command 'eval-last-sexp' with C-x C-e
>
> But that is incorrect.  You cannot run `eval-last-sexp'
> using `C-x C-e', since it has been remapped to command
> `pp-eval-last-sexp'.  If you use `C-x C-e' you invoke
> the latter, not `eval-last-sexp'.

I can confirm that this is still present in Emacs 27.

> The code that causes this bugged behavior is the call
> to `where-is-internal' in `execute-extended-command'.
> It does, in effect:
>
> (where-is-internal 'eval-last-sexp overriding-local-map t)
>
> And that returns [24 5].  I'm no expert on `overriding-local-map',
> but should it really be used here?  Seems like this is the cause,
> but whatever the cause, the message is incorrect.

When I trace this, `overriding-local-map' is nil, and indeed:

(where-is-internal 'eval-last-sexp)
=> ([24 5])

So that doesn't seem to have anything to do with this bug, and it's just
a bug in `where-is-internal'.  The doc string does talk about remapping,
but I'm not sure whether this is the same kind of remapping we have
here?  In any case, it doesn't make a difference:

The optional 5th arg NO-REMAP alters how command remapping is handled:

- If another command OTHER-COMMAND is remapped to DEFINITION, normally
  search for the bindings of OTHER-COMMAND and include them in the
  returned list.  But if NO-REMAP is non-nil, include the vector
  [remap OTHER-COMMAND] in the returned list instead, without
  searching for those other bindings.

- If DEFINITION is remapped to OTHER-COMMAND, normally return the
  bindings for OTHER-COMMAND.  But if NO-REMAP is non-nil, return the
  bindings for DEFINITION instead, ignoring its remapping.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23543; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 May 2016 21:32:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 15 17:32:51 2016
Received: from localhost ([127.0.0.1]:53037 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b23ed-0001UZ-9P
	for submit <at> debbugs.gnu.org; Sun, 15 May 2016 17:32:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44394)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1b23ea-0001UJ-M0
 for submit <at> debbugs.gnu.org; Sun, 15 May 2016 17:32:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1b23eU-0004sp-Dg
 for submit <at> debbugs.gnu.org; Sun, 15 May 2016 17:32:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=2.0 required=5.0 tests=BAYES_20,XPRIO
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:41146)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1b23eU-0004sl-Ac
 for submit <at> debbugs.gnu.org; Sun, 15 May 2016 17:32:42 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35355)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1b23eS-00072i-3p
 for bug-gnu-emacs@HIDDEN; Sun, 15 May 2016 17:32:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1b23eN-0004rX-QR
 for bug-gnu-emacs@HIDDEN; Sun, 15 May 2016 17:32:38 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:31216)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1b23eN-0004rH-Ih
 for bug-gnu-emacs@HIDDEN; Sun, 15 May 2016 17:32:35 -0400
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 u4FLWW2S018298
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Sun, 15 May 2016 21:32:32 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u4FLWWmO018536
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Sun, 15 May 2016 21:32:32 GMT
Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u4FLWVVA012169
 for <bug-gnu-emacs@HIDDEN>; Sun, 15 May 2016 21:32:32 GMT
MIME-Version: 1.0
Message-ID: <eaacb625-2b13-4527-8847-9246c2e21038@default>
Date: Sun, 15 May 2016 14:32:30 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.1.50; Incorrect key binding echoed by `M-x'
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6744.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0022.oracle.com [156.151.31.74]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -2.0 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

emacs -Q

(define-key global-map [remap eval-last-sexp] 'pp-eval-last-sexp)

Put point after a Lisp sexp somewhere, and do `M-x eval-last-sexp'.

You see this echoed:

  You can run the command 'eval-last-sexp' with C-x C-e

But that is incorrect.  You cannot run `eval-last-sexp'
using `C-x C-e', since it has been remapped to command
`pp-eval-last-sexp'.  If you use `C-x C-e' you invoke
the latter, not `eval-last-sexp'.

The code that causes this bugged behavior is the call
to `where-is-internal' in `execute-extended-command'.
It does, in effect:

(where-is-internal 'eval-last-sexp overriding-local-map t)

And that returns [24 5].  I'm no expert on `overriding-local-map',
but should it really be used here?  Seems like this is the cause,
but whatever the cause, the message is incorrect.

In GNU Emacs 25.1.50.1 (i686-pc-mingw32)
 of 2015-12-10
Repository revision: 6148555ee5a3d0139ae517803718b3e0357933c7
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dye=
s
 --enable-check-lisp-object-type --without-compress-install 'CFLAGS=3D-Og
 -ggdb3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1
 -Ic:/Devel/emacs/include''




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#23543; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 20 Oct 2021 00:15:02 UTC

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