From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#10875: 24.0.93; `where-is-internal' and command remapping Date: Sat, 21 Jul 2012 14:59:16 -0700 Message-ID: <03BF7C8FBF2747F0BE37715153E239BF@us.oracle.com> References: <500CA4A40EBF4D9E8A9C18A4AD5F0737@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342907982 14034 80.91.229.3 (21 Jul 2012 21:59:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Jul 2012 21:59:42 +0000 (UTC) Cc: 'Chong Yidong' To: <10875@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 21 23:59:42 2012 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 1Sshi9-00007j-J8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jul 2012 23:59:41 +0200 Original-Received: from localhost ([::1]:41408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sshi9-0007mi-14 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Jul 2012 17:59:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sshi6-0007mb-KF for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2012 17:59:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sshi5-0004uK-IK for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2012 17:59:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sshi5-0004uG-Ex for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2012 17:59:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SshoH-00034R-Nq for bug-gnu-emacs@gnu.org; Sat, 21 Jul 2012 18:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jul 2012 22:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10875 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10875-submit@debbugs.gnu.org id=B10875.134290835611793 (code B ref 10875); Sat, 21 Jul 2012 22:06:01 +0000 Original-Received: (at 10875) by debbugs.gnu.org; 21 Jul 2012 22:05:56 +0000 Original-Received: from localhost ([127.0.0.1]:56395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SshoC-00034A-FG for submit@debbugs.gnu.org; Sat, 21 Jul 2012 18:05:56 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:19607) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ssho9-000342-S4 for 10875@debbugs.gnu.org; Sat, 21 Jul 2012 18:05:54 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q6LLxQxe029431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 Jul 2012 21:59:27 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q6LLxQdZ016940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Jul 2012 21:59:26 GMT Original-Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q6LLxQQ0021015; Sat, 21 Jul 2012 16:59:26 -0500 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 Jul 2012 14:59:26 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AczyV1WBbZAJuUpdTbamTgzpUSd4FRckCmUgBigm0vA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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:62258 Archived-At: ping. No one has ever responded to this bug. It was merged with 10872 for some reason, and that bug was supposedly fixed. But that was a DOC bug and this is a product BEHAVIOR bug. I do not see anything fixed for this bug: `where-is-internal' still returns the wrong result. Here is an example of how the `where-is-internal' behavior is incorrect/misleading. I have code that executes a command the user types (i.e., like `M-x' does). It uses this: (where-is-internal COMMAND overriding-local-map t 'NOINDIRECT) to check whether the COMMAND is bound to a key sequence. If so, it reminds the user, showing the key sequence. Suppose command foo is initially bound to C-f, but has been remapped to command bar. It is now bar that can be invoked using the keys, such as C-f, that foo was originally bound to. If the user types `foo' as input, to invoke command `foo', s?he should not be informed that she can invoke `foo' using `C-f' -- because she cannot. I am calling `where-is-internal' with non-nil NOINDIRECT arg. My interpretation of the doc is that non-nil NOINDIRECT means return the current bindings of foo, not including those of bar, i.e., ignoring the remapping to bar. Since foo has been remapped to bar, it has no current bindings (apart from the remap bindings), so `w-i-i' should return nil. "Ignoring its remapping" in the doc cannot mean to return the _original_ bindings of foo, before remapping - that would make no sense (IMHO), since the result would be the same as for nil NOINDIRECT. It can only reasonably mean to return the _current_ bindings of foo, apart from any remap bindings. Isn't that the point of this arg: to let you exclude any indirect remapped bindings? For example, there are no bindings for the command `switch-to-buffer', because it has been remapped to `icicle-buffer'. And yet that call to `where-is-internal' for `switch-to-buffer' returns [24 98], which means `C-x b'. Can someone please explain how this is not a bug, or please fix it if it is? Thx. > Sent: Wednesday, June 20, 2012 6:21 AM > > ping > > > Sent: Thursday, February 23, 2012 10:17 AM > ... > > The doc for `where-is-internal' says: > > > > When command remapping is in effect (*note Remapping Commands::), > > `where-is-internal' figures out when a command will be run due to > > remapping and reports keys accordingly. It also returns `nil' if > > COMMAND won't really be run because it has been remapped to some > > other command. However, if NO-REMAP is non-`nil'. > > `where-is-internal' ignores remappings. > > > > I interpret the next-to-last sentence as implying that, in Foo mode, > > `where-is-internal' should return nil for `forward-char'. > Instead, it > > returns [6], meaning `C-f'. Is this not a bug? If not, what am I > > missing? >