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: Sun, 24 May 2020 01:12:42 +0300 Organization: LINKOV.NET Message-ID: <87blmewc7p.fsf@mail.linkov.net> References: <87v9kn7rnk.fsf@bulbul> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="107048"; 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@warpmail.net (Philip K.) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 24 01:00:52 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 1jcd8O-000RnD-0H for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 May 2020 01:00:52 +0200 Original-Received: from localhost ([::1]:42708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcd8N-0003Rd-22 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 May 2020 19:00:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcd4h-0001Xr-QM for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 18:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcd4h-000566-GU for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 18:57:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcd4h-0008A1-GF for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 18:57:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 May 2020 22:57:03 +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.159027458831257 (code B ref 41438); Sat, 23 May 2020 22:57:03 +0000 Original-Received: (at 41438) by debbugs.gnu.org; 23 May 2020 22:56:28 +0000 Original-Received: from localhost ([127.0.0.1]:35997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcd48-000884-2i for submit@debbugs.gnu.org; Sat, 23 May 2020 18:56:28 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:41923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcd47-00087q-8T for 41438@debbugs.gnu.org; Sat, 23 May 2020 18:56:27 -0400 Original-Received: from mail.gandi.net (m91-129-97-200.cust.tele2.ee [91.129.97.200]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 0CF13200003; Sat, 23 May 2020 22:56:19 +0000 (UTC) In-Reply-To: <87v9kn7rnk.fsf@bulbul> (Philip K.'s message of "Fri, 22 May 2020 20:26:07 +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:180864 Archived-At: >>> 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). > > I made a first concept, but it doesn't work unless windmove is explicity > required (see below). As far as I know, autoloading variables isn't good > style, so is there any other way to invoke the :set property of a user > option? Recently we had a similar problem in char-fold.el that was solved using defconst for the default value and a :set function, this might help here.