From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre-Yves Luyten Newsgroups: gmane.emacs.bugs Subject: bug#29141: 25.3; Precise if read-key of prefix key is active Date: Fri, 3 Nov 2017 23:30:36 +0100 Message-ID: <89fdbabe-114f-0509-1993-03c15c9a8170@luyten.fr> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1509748278 32558 195.159.176.226 (3 Nov 2017 22:31:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Nov 2017 22:31:18 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 To: 29141@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 03 23:31:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAkUV-0007n9-Vz for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Nov 2017 23:31:08 +0100 Original-Received: from localhost ([::1]:38664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAkUd-00051Z-An for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Nov 2017 18:31:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAkUU-00050r-7E for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 18:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAkUR-0008Ni-2r for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 18:31:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41242) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAkUQ-0008NU-V0 for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 18:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eAkUQ-0005x7-PR for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 18:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pierre-Yves Luyten Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Nov 2017 22:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29141 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150974826022855 (code B ref -1); Fri, 03 Nov 2017 22:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Nov 2017 22:31:00 +0000 Original-Received: from localhost ([127.0.0.1]:49921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAkUO-0005wZ-6U for submit@debbugs.gnu.org; Fri, 03 Nov 2017 18:31:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAkUM-0005wI-31 for submit@debbugs.gnu.org; Fri, 03 Nov 2017 18:30:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAkUG-00087f-5B for submit@debbugs.gnu.org; Fri, 03 Nov 2017 18:30:53 -0400 Original-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 ) id 1eAkUG-00087H-2p for submit@debbugs.gnu.org; Fri, 03 Nov 2017 18:30:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAkUE-00050e-Rf for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 18:30:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAkUB-0007yZ-NM for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 18:30:50 -0400 Original-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 ) id 1eAkUB-0007rb-Fa for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2017 18:30:47 -0400 Original-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 ; Fri, 3 Nov 2017 23:30:38 +0100 (CET) Original-Received: from [192.168.4.20] (85-170-98-108.rev.numericable.fr [85.170.98.108]) (Authenticated sender: py@luyten.fr) by player774.ha.ovh.net (Postfix) with ESMTPSA id A7E794007F for ; Fri, 3 Nov 2017 23:30:37 +0100 (CET) Content-Language: en-US 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-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" Xref: news.gmane.org gmane.emacs.bugs:139425 Archived-At: 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