GNU bug report logs - #66792
30.0.50; describe-keymap shows unreachable parent map bindings

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; Reported by: Phil Sainty <psainty@HIDDEN>; Keywords: confirmed; dated Sat, 28 Oct 2023 13:36:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) confirmed. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 66792) by debbugs.gnu.org; 28 Oct 2023 13:56:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 28 09:56:53 2023
Received: from localhost ([127.0.0.1]:39279 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qwjo5-0001J4-Bp
	for submit <at> debbugs.gnu.org; Sat, 28 Oct 2023 09:56:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45608)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qwjo2-0001Iu-Vs
 for 66792 <at> debbugs.gnu.org; Sat, 28 Oct 2023 09:56:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qwjnQ-0006hj-Fa; Sat, 28 Oct 2023 09:56:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=tpoG718RS5G/dyI7MChngaJqoxdV9qcB62JAoA4Andk=; b=gVC3uA51OuKm
 wn7RUhWQKSn/Jr4F2OR2jAYfQl8Ca08kMh4QrTkdKu9jCCzitrLkrTqwapKvdl+2ReIcSC1ahw1eA
 iQPpC2Lbb58CuTRLSXDVySnulvclLkXzaBn6dQC6Wuq2Rbzma9sG9ube4ke45btOhRYsq4q1hoT0B
 sl9Yf/fuItt9to9FU+8h6A4sT0dxX0IPyPmiWwedOCRWiB6D+c0v5u126CnPpfll/wakwItftrEP+
 XYhbwcNQEo1OEe/05AGsb7jqI/bIKD0bmfzOnikavx5GVQusmVXgKznxXTU+Yo2ozWtegNHjbm82+
 WK5Bo6BPTc2/P6UzgxGrcg==;
Date: Sat, 28 Oct 2023 16:56:04 +0300
Message-Id: <83cywydf63.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <0111173e2d0bd5b8b2e5d72b4927aed7@HIDDEN> (message
 from Phil Sainty on Sun, 29 Oct 2023 02:34:41 +1300)
Subject: Re: bug#66792: 30.0.50;
 describe-keymap shows unreachable parent map bindings
References: <0111173e2d0bd5b8b2e5d72b4927aed7@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 66792
Cc: 66792 <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: -3.3 (---)

> Date: Sun, 29 Oct 2023 02:34:41 +1300
> From: Phil Sainty <psainty@HIDDEN>
> 
> The following code demonstrates this bug involving parent keymaps:
> 
> ;; The parent keymap binds key sequence "a b"
> ;; (making "a" a prefix key with a submap).
> 
> (defvar my-keymap-parent
>    (let ((map (make-sparse-keymap)))
>      (define-key map (kbd "a b") 'foo)
>      map))
> 
> ;; The child keymap binds a command directly to "a" meaning
> ;; that the parent's submap is not accessible from the child.
> 
> (defvar my-keymap-child
>    (let ((map (make-sparse-keymap)))
>      (set-keymap-parent map my-keymap-parent)
>      (define-key map (kbd "a") 'bar)
>      map))
> 
> ;; However (describe-keymap 'my-keymap-child) displays the "a b"
> ;; binding as if it were a useable key sequence:
> 
> Key             Binding
> ------------------------
> a               bar
> 
> a b             foo
> 
> 
> I think that this output should only show the "a" binding.

Adding Stefan.




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

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


Received: (at submit) by debbugs.gnu.org; 28 Oct 2023 13:35:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 28 09:35:47 2023
Received: from localhost ([127.0.0.1]:37935 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qwjTe-0000MI-Ty
	for submit <at> debbugs.gnu.org; Sat, 28 Oct 2023 09:35:47 -0400
Received: from lists.gnu.org ([2001:470:142::17]:42832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1qwjTS-0000Lo-D1
 for submit <at> debbugs.gnu.org; Sat, 28 Oct 2023 09:35:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <psainty@HIDDEN>)
 id 1qwjSq-0002q8-Pq
 for bug-gnu-emacs@HIDDEN; Sat, 28 Oct 2023 09:34:56 -0400
Received: from smtp-1.orcon.net.nz ([60.234.4.34])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <psainty@HIDDEN>)
 id 1qwjSn-0002Or-RY
 for bug-gnu-emacs@HIDDEN; Sat, 28 Oct 2023 09:34:56 -0400
Received: from [10.253.37.70] (port=33216 helo=webmail.orcon.net.nz)
 by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1)
 (envelope-from <psainty@HIDDEN>) id 1qwjSb-0005j3-QN
 for bug-gnu-emacs@HIDDEN; Sun, 29 Oct 2023 02:34:44 +1300
Received: from ip-139-180-124-59.kinect.net.nz ([139.180.124.59])
 via [10.253.37.253] by webmail.orcon.net.nz
 with HTTP (HTTP/1.1 POST); Sun, 29 Oct 2023 02:34:41 +1300
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Sun, 29 Oct 2023 02:34:41 +1300
From: Phil Sainty <psainty@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; describe-keymap shows unreachable parent map bindings
Message-ID: <0111173e2d0bd5b8b2e5d72b4927aed7@HIDDEN>
X-Sender: psainty@HIDDEN
User-Agent: Orcon Webmail
X-GeoIP: --
Received-SPF: pass client-ip=60.234.4.34; envelope-from=psainty@HIDDEN;
 helo=smtp-1.orcon.net.nz
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 2.7 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
 the administrator of that system for details.
 Content preview:  The following code demonstrates this bug involving parent
 keymaps: ; ; The parent keymap binds key sequence "a b" ; ;
 (making "a" a prefix
 key with a submap). (defvar my-keymap-parent (let ((map (make-sparse-keymap)))
 (define-key map (kbd "a b") 'foo) map)) 
 Content analysis details:   (2.7 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (psainty[at]orcon.net.nz)
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 T_SPF_HELO_TEMPERROR   SPF: test of HELO record failed (temperror)
 2.0 SPOOFED_FREEMAIL       No description available.
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: -0.3 (/)

The following code demonstrates this bug involving parent keymaps:

;; The parent keymap binds key sequence "a b"
;; (making "a" a prefix key with a submap).

(defvar my-keymap-parent
   (let ((map (make-sparse-keymap)))
     (define-key map (kbd "a b") 'foo)
     map))

;; The child keymap binds a command directly to "a" meaning
;; that the parent's submap is not accessible from the child.

(defvar my-keymap-child
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map my-keymap-parent)
     (define-key map (kbd "a") 'bar)
     map))

;; However (describe-keymap 'my-keymap-child) displays the "a b"
;; binding as if it were a useable key sequence:

Key             Binding
------------------------
a               bar

a b             foo


I think that this output should only show the "a" binding.


-Phil




In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
  version 1.16.0, Xaw scroll bars) of 2023-09-21 built on phil-lp
Repository revision: 01b80a6f0e40a4390717a79a73c61899e2ec2968
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101004
System Description: Ubuntu 22.04.3 LTS

Configured using:
  'configure --prefix=/home/phil/emacs/trunk/usr/local
  --with-x-toolkit=lucid --without-sound
  '--program-transform-name=s/^ctags$/ctags_emacs/''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
XPM LUCID ZLIB

Important settings:
   value of $LC_MONETARY: en_NZ.UTF-8
   value of $LC_NUMERIC: en_NZ.UTF-8
   value of $LC_TIME: en_NZ.UTF-8
   value of $LANG: en_GB.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   eldoc-mode: t
   show-paren-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
   blink-cursor-mode: t
   line-number-mode: t
   indent-tabs-mode: t
   transient-mark-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
misearch multi-isearch tabify rect help-fns radix-tree help-mode
cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
x multi-tty move-toolbar make-network-process emacs)

Memory information:
((conses 16 41433 20881) (symbols 48 5493 0) (strings 32 15472 1361)
  (string-bytes 1 424814) (vectors 16 10000)
  (vector-slots 8 155720 17242) (floats 8 28 19) (intervals 56 411 0)
  (buffers 984 11))





Acknowledgement sent to Phil Sainty <psainty@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#66792; 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: Sun, 29 Oct 2023 18:15:01 UTC

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