From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#55301: 27.2; RFE: Auto-create defcustom for declared minor mode keymap Date: Wed, 18 May 2022 13:29:11 +0200 Message-ID: <87ee0rdqpk.fsf@gnus.org> References: <8735hlnypl.fsf@gnus.org> <87pmkojlg7.fsf@gnus.org> <87pmkncank.fsf@gnus.org> <87ilqfav4z.fsf@gnus.org> <87ee123jwq.fsf@gmail.com> <87pmkc16j3.fsf@gmail.com> <87o7zwkr2l.fsf@gnus.org> <87leuz1fft.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33972"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 55301@debbugs.gnu.org, Phil Hudson To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 13:33:43 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrHvy-0008ZI-46 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 13:33:42 +0200 Original-Received: from localhost ([::1]:41860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrHvw-0001L2-Up for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 07:33:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrHsQ-0007hy-VT for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 07:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrHsQ-0003E5-L7 for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 07:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrHsQ-0002h5-Ck for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 07:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2022 11:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55301 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55301-submit@debbugs.gnu.org id=B55301.165287336310280 (code B ref 55301); Wed, 18 May 2022 11:30:02 +0000 Original-Received: (at 55301) by debbugs.gnu.org; 18 May 2022 11:29:23 +0000 Original-Received: from localhost ([127.0.0.1]:59172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrHrm-0002fk-P4 for submit@debbugs.gnu.org; Wed, 18 May 2022 07:29:22 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:37816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrHrk-0002fV-6t for 55301@debbugs.gnu.org; Wed, 18 May 2022 07:29:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=sZhxsu7yPLkbE27KJ2KA3BO+nswfpmeRXyMyQCKro40=; b=DgAMWIEMqmuJL/OErxps5v5WsL sRUWLKtoecPVi2ZY+Qw8Z77EzUiYMd+YYPH2lMe6Lh2a4y4eCSgjT0yQH/vsqCNmTals5UWWtGZTt WtOim6jru2NbqHCfXo1IekOkvDuAisaXmjcwsLA9WQtsaczCQdPWKHt5Y10su57t2hVU=; Original-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 ) id 1nrHrb-0006cs-OE; Wed, 18 May 2022 13:29:13 +0200 X-Now-Playing: William Basinski's _The Disintegration Loops_: "DLP 2.1" In-Reply-To: <87leuz1fft.fsf@gmail.com> (Robert Pluim's message of "Wed, 18 May 2022 09:13:26 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232545 Archived-At: Robert Pluim writes: > Lars> But it'd be nice if a defcustom interface for keymaps existed. > > Something like this? > > (defcustom keymap-additions nil > "Alist of bindings to add to keymaps at startup. > Keys are keymap symbols, values are lists of conses, format > (key-binding . command) > > Where KEY-BINDING is a kbd format key specification, and COMMAND is an > Emacs command.") > > So you could have that be > > '((fundamental-mode-map . (("C-a" . mark-whole-buffer) > ("C-b" . backward-word))) > (elisp-mode-map . (("C-a" . mark-defun)))) Yes, something like that. But the major work would be to create a sensible widget that allows people to customise the keymap in question. It'd be nice if it displayed a graphical keyboard in a buffer, and you could click on keys to specify what they should output. =F0=9F=98=80 Or something simpler, for instance a widget where you ask the user to enter a chord/key stroke, and then prompt what command to bind that to. Or... something else. Many possibilities here. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no