GNU bug report logs - #29141
25.3; Precise if read-key of prefix key is active

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: wishlist; Reported by: Pierre-Yves Luyten <py@HIDDEN>; Keywords: moreinfo; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug closed, send any further explanations to 29141 <at> debbugs.gnu.org and Pierre-Yves Luyten <py@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 29141) by debbugs.gnu.org; 15 Jun 2022 12:41:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 15 08:41:59 2022
Received: from localhost ([127.0.0.1]:36851 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o1SLP-00022B-Mi
	for submit <at> debbugs.gnu.org; Wed, 15 Jun 2022 08:41:59 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60786)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1o1SLN-00021u-7b
 for 29141 <at> debbugs.gnu.org; Wed, 15 Jun 2022 08:41:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=q7DSL4DWhyKeQFezLxYW6fFSK7K9ad6w/VwR3St6dpw=; b=n1p5n249XN4K1vWlAOg3IhWudr
 Wit1jxDXorQlEpQ5Q/URqyJQxjuLTqRqJKH9CSp0cWjMhfXjn+8S7WAKHaoK60T7IWZ3sjCwRlPfE
 hKyTr9b8u/TGW+Wjc9g0/FSGz2xlxSLszKax/CU9ENjXdJH5uI8s4MKnYYob7AjK842Y=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1o1SLE-0002b3-L3; Wed, 15 Jun 2022 14:41:50 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Pierre-Yves Luyten <py@HIDDEN>
Subject: Re: bug#29141: 25.3; Precise if read-key of prefix key is active
References: <89fdbabe-114f-0509-1993-03c15c9a8170@HIDDEN>
 <878rqzhkqc.fsf@HIDDEN>
X-Now-Playing: Scout Niblett's _It's Time My Beloved_: "My Beloved"
Date: Wed, 15 Jun 2022 14:41:48 +0200
In-Reply-To: <878rqzhkqc.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
 18 May 2022 00:12:27 +0200")
Message-ID: <87y1xygktv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Lars Ingebrigtsen <larsi@HIDDEN> writes: > As for "the name
 of the current keymap" -- I'm not sure I understand > that,
 either. current-local-map
 will return that, but perhaps something > else is means? 
 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: -2.3 (--)
X-Debbugs-Envelope-To: 29141
Cc: 29141 <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 (---)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> As for "the name of the current keymap" -- I'm not sure I understand
> that, either.  current-local-map will return that, but perhaps something
> else is means?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29141; Package emacs. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 29141) by debbugs.gnu.org; 17 May 2022 22:12:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 17 18:12:38 2022
Received: from localhost ([127.0.0.1]:58261 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nr5Qk-0002uL-2s
	for submit <at> debbugs.gnu.org; Tue, 17 May 2022 18:12:38 -0400
Received: from quimby.gnus.org ([95.216.78.240]:58540)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nr5Qi-0002u3-Ix
 for 29141 <at> debbugs.gnu.org; Tue, 17 May 2022 18:12:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=tEymvVjJ84ECpSVadz1GQTwCFAC5hm+8DpLC1cMWRx8=; b=oPRQFrQr1Q4W5s+u106WOE6mKc
 fCmpIXjSNMBAT39sIeneM886kTIoRnZ64ScLfXX8SnFYIVLgtyZpR8DJN46hT8Qmf3GSqwrhi/x0s
 MQgn2tQNSoTfTEpfSIQWPSDqYSL3yGeULAm+MwMmnvo/Mp1oxl/74itaX7uHvbpCT0Zc=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nr5Qa-0008JZ-2I; Wed, 18 May 2022 00:12:30 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Pierre-Yves Luyten <py@HIDDEN>
Subject: Re: bug#29141: 25.3; Precise if read-key of prefix key is active
References: <89fdbabe-114f-0509-1993-03c15c9a8170@HIDDEN>
X-Now-Playing: Fort Romeau's _Beings of Light_: "Untitled IV"
Date: Wed, 18 May 2022 00:12:27 +0200
In-Reply-To: <89fdbabe-114f-0509-1993-03c15c9a8170@HIDDEN> (Pierre-Yves
 Luyten's message of "Fri, 3 Nov 2017 23:30:36 +0100")
Message-ID: <878rqzhkqc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Pierre-Yves Luyten <py@HIDDEN> writes: > Expected behavior
 > Since the user needs to learn the core of Emacs, it is necessary to be
 > able to present to the user, not only available shortuts, but also the >
 name of the current keymap > > B [...] 
 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: -2.3 (--)
X-Debbugs-Envelope-To: 29141
Cc: 29141 <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 (---)

Pierre-Yves Luyten <py@HIDDEN> writes:

> Expected behavior
> Since the user needs to learn the core of Emacs, it is necessary to be
> able to present to the user, not only available shortuts, but also the
> name of the current keymap
>
> Behavior
> As far as i know, there is no way to say if a prefix key is active.
> One could parse which shortcuts are active, then deduce which prefix key
> is active, but this would not be very reliable.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I'm not sure I understand what is being requested here.  For instance:

(key-binding "\C-c")
=> (keymap (keymap (67108896 . erc-track-switch-buffer) (0 . erc-track-switch-buffer)) mode-specific-command-prefix)

If a key sequence is a prefix key, key-binding will return a keymap, so
you can check that.

As for "the name of the current keymap" -- I'm not sure I understand
that, either.  current-local-map will return that, but perhaps something
else is means?

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




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

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


Received: (at submit) by debbugs.gnu.org; 3 Nov 2017 22:31:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 03 18:31:00 2017
Received: from localhost ([127.0.0.1]:49921 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eAkUO-0005wZ-6U
	for submit <at> debbugs.gnu.org; Fri, 03 Nov 2017 18:31:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49891)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <py@HIDDEN>) id 1eAkUM-0005wI-31
 for submit <at> debbugs.gnu.org; Fri, 03 Nov 2017 18:30:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <py@HIDDEN>) id 1eAkUG-00087f-5B
 for submit <at> debbugs.gnu.org; Fri, 03 Nov 2017 18:30:53 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47252)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <py@HIDDEN>) id 1eAkUG-00087H-2p
 for submit <at> debbugs.gnu.org; Fri, 03 Nov 2017 18:30:52 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40849)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <py@HIDDEN>) id 1eAkUE-00050e-Rf
 for bug-gnu-emacs@HIDDEN; Fri, 03 Nov 2017 18:30:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <py@HIDDEN>) id 1eAkUB-0007yZ-NM
 for bug-gnu-emacs@HIDDEN; Fri, 03 Nov 2017 18:30:50 -0400
Received: from 14.mo6.mail-out.ovh.net ([46.105.56.113]:36340)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <py@HIDDEN>) id 1eAkUB-0007rb-Fa
 for bug-gnu-emacs@HIDDEN; Fri, 03 Nov 2017 18:30:47 -0400
Received: from player774.ha.ovh.net (b6.ovh.net [213.186.33.56])
 by mo6.mail-out.ovh.net (Postfix) with ESMTP id 934C7119959
 for <bug-gnu-emacs@HIDDEN>; Fri,  3 Nov 2017 23:30:38 +0100 (CET)
Received: from [192.168.4.20] (85-170-98-108.rev.numericable.fr
 [85.170.98.108]) (Authenticated sender: py@HIDDEN)
 by player774.ha.ovh.net (Postfix) with ESMTPSA id A7E794007F
 for <bug-gnu-emacs@HIDDEN>; Fri,  3 Nov 2017 23:30:37 +0100 (CET)
To: bug-gnu-emacs@HIDDEN
From: Pierre-Yves Luyten <py@HIDDEN>
Subject: 25.3; Precise if read-key of prefix key is active
Message-ID: <89fdbabe-114f-0509-1993-03c15c9a8170@HIDDEN>
Date: Fri, 3 Nov 2017 23:30:36 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.3.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Ovh-Tracer-Id: 17153366558074777611
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 50
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedttddrgeekgdduhedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucgoteefjeefqddtgeculdehtddm
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.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: -5.0 (-----)

Hello

Context
i am working on convenience packages to help the user with available 
shortcuts. One thing i am using is "which-key". This package allows
to display visualy the existing shortcuts for a given prefix key.
Actually it might work for any keymap, so it is an efficient way
for the user to discover a keymap.

Expected behavior
Since the user needs to learn the core of Emacs, it is necessary to be 
able to present to the user, not only available shortuts, but also the 
name of the current keymap

Behavior
As far as i know, there is no way to say if a prefix key is active.
One could parse which shortcuts are active, then deduce which prefix key
is active, but this would not be very reliable.

Enhancement Request
So, is it possible to add a func to tell if there is a prefix key?
obviously i think the func might be more general, for example checking 
if there is a read-key active, else a terminal keymap, else a minor mode 
overriding map, and so on from highest to lowest priority, and checking 
if a prefix key is active -> leading to another keymap being active.
I confess i have no clue about "virtual" keymaps like "C-c".
This is a prefix key but i think different shortcuts in different keymaps.

The opened bug against which-key is : 
https://github.com/justbur/emacs-which-key/issues/176

Please tell me if this enhancement seems fair to you, in which case
do you have a clue so i can evenutally contribute.

Regards
Pierre-Yves




Acknowledgement sent to Pierre-Yves Luyten <py@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#29141; 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, 15 Jun 2022 12:45:01 UTC

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