From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!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: Fri, 22 May 2020 01:18:18 +0300 Organization: LINKOV.NET Message-ID: <874ks9rkyd.fsf@mail.linkov.net> References: <87imgpw7k3.fsf@warpmail.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="38043"; 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 To: "Philip K." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 22 00:34:13 2020 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 1jbtlV-0009nw-3f for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 May 2020 00:34:13 +0200 Original-Received: from localhost ([::1]:37722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbtlU-0003Z2-54 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 May 2020 18:34:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbtlK-0003XW-JG for bug-gnu-emacs@gnu.org; Thu, 21 May 2020 18:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbtlK-0003i2-A3 for bug-gnu-emacs@gnu.org; Thu, 21 May 2020 18:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jbtlK-0000rj-6I for bug-gnu-emacs@gnu.org; Thu, 21 May 2020 18:34: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: Thu, 21 May 2020 22:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41438 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41438-submit@debbugs.gnu.org id=B41438.15901004243296 (code B ref 41438); Thu, 21 May 2020 22:34:02 +0000 Original-Received: (at 41438) by debbugs.gnu.org; 21 May 2020 22:33:44 +0000 Original-Received: from localhost ([127.0.0.1]:57491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbtl2-0000r6-2n for submit@debbugs.gnu.org; Thu, 21 May 2020 18:33:44 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:59629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbtkw-0000qp-LZ for 41438@debbugs.gnu.org; Thu, 21 May 2020 18:33:43 -0400 Original-Received: from mail.gandi.net (m91-129-97-200.cust.tele2.ee [91.129.97.200]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 7EC1810000B; Thu, 21 May 2020 22:33:30 +0000 (UTC) In-Reply-To: <87imgpw7k3.fsf@warpmail.net> (Philip K.'s message of "Thu, 21 May 2020 18:56:28 +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:180723 Archived-At: > I'm probably not the only one who tends to use C-{f,b,n,p} over the > arrow keys, but also sometimes gets annoyed by navigating windows. I > recently realised that the reason I didn't use windmove as much as I > would want to, was that I coudln't find a satisfying modifier-key. My > idea was then to try windmove without any modifier, and I quite like > it. The only "annoying" thing is that I have to bind all keys > manually, instead of using a function like > `windmove-default-keybindings', because `nil' is interpreted as a > default binding. > > This patch adds a pseudo-modifier (`none') to allow bindings the > windmove functions without any real modifier or prefix key, depending on > the function. Thanks, since `nil' means a default binding it seems there is no other way than using a pseudo-modifier `none'. > Another question I'd like to ask before trying it out: Would there be > any interest in adding user options for the "default" modifiers that > windmove should use? If yes, one could add a :set function that > automatically calls the apropriate bindings function, when it's value > is non-nil. I have a very customize-centric configuration, where something > this would fit in very well. I think that adding defcustoms (including a new const `none') would be the most natural way to customize windmove modifiers (provided that the existing functions should remain).