From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#41438: [PATCH] Allow windmove keys to be bound without prefix or modifiers Date: Mon, 31 May 2021 01:11:57 +0300 Organization: LINKOV.NET Message-ID: <87im2zzy82.fsf@mail.linkov.net> References: <87imgpw7k3.fsf@warpmail.net> <87mu36enhl.fsf@posteo.net> <8735uru1py.fsf@gnus.org> <871r9yjyv5.fsf@posteo.net> <87h7irqtvf.fsf@gnus.org> <87im37p2b4.fsf@icterid> <875yz68yoq.fsf@mail.linkov.net> <87r1hucws6.fsf@icterid> <87k0nl420l.fsf@mail.linkov.net> <87zgwg302t.fsf@icterid> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30369"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 41438@debbugs.gnu.org, Lars Ingebrigtsen To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 31 00:39:23 2021 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 1lnU5b-0007dl-1n for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 May 2021 00:39:23 +0200 Original-Received: from localhost ([::1]:51948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnU5Z-0003nw-5N for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 May 2021 18:39:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnU5G-0003ni-SM for bug-gnu-emacs@gnu.org; Sun, 30 May 2021 18:39:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnU5G-0002vZ-Ia for bug-gnu-emacs@gnu.org; Sun, 30 May 2021 18:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnU5G-0007qL-GD for bug-gnu-emacs@gnu.org; Sun, 30 May 2021 18:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 May 2021 22:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41438 X-GNU-PR-Package: emacs Original-Received: via spool by 41438-submit@debbugs.gnu.org id=B41438.162241430530063 (code B ref 41438); Sun, 30 May 2021 22:39:02 +0000 Original-Received: (at 41438) by debbugs.gnu.org; 30 May 2021 22:38:25 +0000 Original-Received: from localhost ([127.0.0.1]:60554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnU4e-0007op-U7 for submit@debbugs.gnu.org; Sun, 30 May 2021 18:38:25 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:4741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnU4b-0007oX-1u for 41438@debbugs.gnu.org; Sun, 30 May 2021 18:38:24 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 42E45240002; Sun, 30 May 2021 22:38:12 +0000 (UTC) In-Reply-To: <87zgwg302t.fsf@icterid> (Philip Kaludercic's message of "Thu, 27 May 2021 11:09:14 +0000") 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:207646 Archived-At: >> Maybe it's possible to add new user options without deprecating the >> existing functions? Then for users an alternative way would be to >> customize these options, and enable windmove-mode in the init file. > > Of course, why not? The patches below should implement that. Thanks, I tried out your patches. The customization saved them in such format: '(windmove-default-keybindings '([ignore] hyper)) '(windmove-delete-default-keybindings '("\30" hyper)) '(windmove-display-default-keybindings '([ignore] meta hyper)) '(windmove-swap-states-default-keybindings '([ignore] shift hyper)) But I guess it's not a problem that it saves nil as [ignore]. The real problem is that after replacing this with a manual configuration: (use-package windmove :custom (windmove-default-keybindings '(nil hyper)) (windmove-delete-default-keybindings `(,(kbd "C-x") hyper)) (windmove-display-default-keybindings '(nil meta hyper)) (windmove-swap-states-default-keybindings '(nil shift hyper))) Then every startup pops up the *Warnings* buffer with: Warning (emacs): Overriding 1 with windmove-delete-left [Disable showing] [Disable logging] But still all keybindings work correctly.