From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Proposal: new default bindings for winner and windmove Date: Wed, 3 Jul 2024 01:28:00 +0300 Message-ID: <5c713f91-b00f-4abf-aaaa-a9ed288f7996@gutov.dev> References: <875xto7lbn.fsf@dancol.org> <86tth8c7h4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24694"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: dancol@dancol.org, stefankangas@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii , Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 03 00:28:24 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sOlz6-00069C-9T for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jul 2024 00:28:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOlyr-0004us-Gh; Tue, 02 Jul 2024 18:28:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOlyp-0004uV-GU for emacs-devel@gnu.org; Tue, 02 Jul 2024 18:28:07 -0400 Original-Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOlyn-0000iQ-98; Tue, 02 Jul 2024 18:28:07 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 048721140230; Tue, 2 Jul 2024 18:28:04 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 02 Jul 2024 18:28:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1719959284; x=1720045684; bh=G1ykTFyl38exIPl2u3l6sNVBUijuGTfa5A4e0m+hEqY=; b= zu+jKP/8Zc0cmMiar3SN3G+3bBkyoHD5cO8ECjSaPgpptRro0E9tCIeNG/kZY0wh wsfodeEZeo132UNs1czYFJa7X1qJ7s8MbNb8QoTHeEykpU1wO6jHCH8rjCVNdIOB czkF/M4YMfmVUOOff1Gj/cTndwhHtFcKJtDFQaUEl3jngCbgHo93iaDHoBxxFVZR LxcOhqP1cUobsd0gpYDpP8GRWAnZ9wAZMpCrvIMoYlA4HBpWchUhMwlOxBG3yBsl 5gXrPLoN2jO3NTzjapsmMreh7d1/UDxQsQFiTOiy4Hy3vBag8BUIkEQ18ikhCvrW CpChVYMTbavXpRrqhpxZjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719959284; x= 1720045684; bh=G1ykTFyl38exIPl2u3l6sNVBUijuGTfa5A4e0m+hEqY=; b=Q Zg8AUgw9Z7UvXT3mARh6T9d+yefnH/LenO2nqx/HbX3lP3KVhKBGnbKNBRXNRye1 F60/TNCiLO+fvfXvRm4zn3WtC0ZSiumGsq5svQh7XBejyk4sZz83DvrL+zXeVTOg FARqehIoJhjO//pybr9FN47+TYrflsN1c5AzLA+8b5HK5eRwZ6cmXzlyMCMYwABq ciMgWd6aFaW2GYGBWppBRjfYPaFCRUcqq4izwuvH3J8wBrkHmgTDulg3XlyHSBi6 ITvBeE8RjXooCsV2JVSYvqbMGoLi50zkNAEIgLHHAFEyz7Zqt1G4nvRtlhGPo+1i XKc1E9U+KRkKQirYFX2ew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeigddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Jul 2024 18:28:01 -0400 (EDT) Content-Language: en-US In-Reply-To: <86tth8c7h4.fsf@gnu.org> Received-SPF: pass client-ip=103.168.172.154; envelope-from=dmitry@gutov.dev; helo=fhigh3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321211 Archived-At: On 02/07/2024 15:18, Eli Zaretskii wrote: >> Cc: Stefan Kangas , Stefan Monnier >> , emacs-devel@gnu.org >> Date: Tue, 02 Jul 2024 09:02:12 +0800 >> From: Po Lu via "Emacs development discussions." >> >> Daniel Colascione writes: >> >>> +;;;###autoload >>> +(define-key ctl-x-4-map [left] 'windmove-left) >>> +;;;###autoload >>> +(define-key ctl-x-4-map [right] 'windmove-right) >>> +;;;###autoload >>> +(define-key ctl-x-4-map [up] 'windmove-up) >>> +;;;###autoload >>> +(define-key ctl-x-4-map [down] 'windmove-down) >>> +;;;###autoload >>> +(define-key ctl-x-4-map [(shift left)] 'windmove-swap-states-left) >>> +;;;###autoload >>> +(define-key ctl-x-4-map [(shift right)] 'windmove-swap-states-right) >>> +;;;###autoload >>> +(define-key ctl-x-4-map [(shift up)] 'windmove-swap-states-up) >>> +;;;###autoload >>> +(define-key ctl-x-4-map [(shift down)] 'windmove-swap-states-down) >>> + >>> >>> (provide 'windmove) >>> >> >> Disabling windmove-mode must disable these bindings as well. > > I tend to agree. The most straightforward path toward this might be: - Set the option windmove-default-keybindings to the new set (like above) by default. - Actually enable windmove-mode by default, which will load the package. But also set up the keymap filled by the previous item. - We might also change the function windmove-default-keybindings so that is clears up the previous bindings (saved to the value of the option with the same name). I think that also was one of your concerns. The apparent downside is that the package will have to be loaded before any of the commands are used for the first time.