GNU bug report logs - #41438
[PATCH] Allow windmove keys to be bound without prefix or modifiers

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "Philip K." <philip@HIDDEN>; Keywords: patch; dated Thu, 21 May 2020 16:57:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 7 Aug 2020 10:53:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 07 06:53:25 2020
Received: from localhost ([127.0.0.1]:55882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k4004-0008KU-HD
	for submit <at> debbugs.gnu.org; Fri, 07 Aug 2020 06:53:25 -0400
Received: from mout02.posteo.de ([185.67.36.66]:50443)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1k3zzy-0008K4-LM
 for 41438 <at> debbugs.gnu.org; Fri, 07 Aug 2020 06:53:22 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 105782400FB
 for <41438 <at> debbugs.gnu.org>; Fri,  7 Aug 2020 12:53:11 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1596797592; bh=ce/HR1cXx8WrxL93uN11xXEMWNrJSe2fHh6O9YiCHfg=;
 h=From:To:Cc:Subject:Date:From;
 b=W7nFdzTlM80XPA9GgeGNeVkw+c6Pl/NyGKAd4McBskk0gljn8J4Ffbrqj+6Wvn2jz
 2Nwocfs5e+PbMp/UG3qGUEgDXsV9FtBC1R1e01vo3mOy0cBMT7yjGeQ1R7CSRRBdJB
 ZxoU8MxAnzixm8MeN6PikpUsGZ4DbSAq2eEGEtxtZPKkK2oarPMjm42GrFRo1dXTAx
 5+h3raRRGNjDThA5jMOgszcUhgfkeLpRq+1K7shT2Lpi23gJtidoYRpOpk0rWae3O1
 sme+A1I9Do2M7IAEPy3lh44I5SF7rKOiYQKwPN3q8IQ4Sui35fbdDZqTflUKkzpXdU
 tvIy9snvet9xw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4BNMdz1c4Sz9rxX;
 Fri,  7 Aug 2020 12:53:11 +0200 (CEST)
From: "Philip K." <philipk@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
In-Reply-To: <87a6z78gqw.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 07 Aug 2020 02:43:03 +0300)
Date: Fri, 07 Aug 2020 12:53:10 +0200
Message-ID: <87mu36enhl.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Juri Linkov <juri@HIDDEN> writes:

>>> (I see there were some unfinished parts in your previous patch).
>>
>> It's been a while since I submitted it, so I had to re-read the thread,
>> but I'm not quite sure what the "unfinished" parts were, aside from the
>> missing autoload cookies. Sorry if I missed something :/
>
> I don't know, my impression seems to suggest the first version was not
> completely tested, for example, windmove-modifiers defcustom called
> windmove-swap-states-default-keybindings, not windmove-default-keybindings.
> But maybe you already fixed this.

You're right, I still had a few local changes. A noteworthy addition is
that the user options unbind their previous bindings, before binding the
new ones. This should lead to more consistent behaviour when updating
the option a few times in the same session.

>> Also, the second patch (the one with the user options) depended on the
>> previous one in this thread[0], that introduced the "none" prefix. Is
>> that fine, or should I just merge both patches into one.
>
> This is perfectly fine - better to commit two separate patches.

Ok. I added both below.

But there are a few general issues I noticed:

1. windmove-display-{same-window,new-{frame,tab}} can disturb regular
   input when the modifier is set to shift or none. Possible solutions
   could be to prohibit using these modifiers or to add a prefix key and
   generate a warning when eg. "S-t" or "t" would be rebound.
2. The new function windmove--unbind works with the global-map, so when
   someone sets a prefix to none, and then changes it to something else,
   the arrow keys are left undefined. I could either see this being
   fixed by using a separate map or by somehow memorising what the
   previous key was (eg. by using the property list of the windmove
   command's symbol).

These are the only edge-cases I found, but I didn't fix them yet, as I'm
not sure what would be preferred. So the patches should not be applies yet.

-- 
	Philip K.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Allow-windmove-keys-to-be-bound-without-prefix-or-mo.patch

From f87d057b72f0cc374c132100664c5b8553bd58e2 Mon Sep 17 00:00:00 2001
From: Philip K <philip@HIDDEN>
Date: Thu, 21 May 2020 18:44:10 +0200
Subject: [PATCH] Allow windmove keys to be bound without prefix or modifiers

---
 lisp/windmove.el | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/lisp/windmove.el b/lisp/windmove.el
index 6557960064..613727f8ed 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -431,9 +431,12 @@ windmove-default-keybindings
   "Set up keybindings for `windmove'.
 Keybindings are of the form MODIFIERS-{left,right,up,down},
 where MODIFIERS is either a list of modifiers or a single modifier.
+If MODIFIERS is `none', the keybindings will be directly bound to
+the arrow keys.
 Default value of MODIFIERS is `shift'."
   (interactive)
   (unless modifiers (setq modifiers 'shift))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-left)
   (global-set-key (vector (append modifiers '(right))) 'windmove-right)
@@ -546,9 +549,12 @@ windmove-display-default-keybindings
 Keys are bound to commands that display the next buffer in the specified
 direction.  Keybindings are of the form MODIFIERS-{left,right,up,down},
 where MODIFIERS is either a list of modifiers or a single modifier.
+If MODIFIERS is `none', the keybindings will be directly bound to
+the arrow keys.
 Default value of MODIFIERS is `shift-meta'."
   (interactive)
   (unless modifiers (setq modifiers '(shift meta)))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-display-left)
   (global-set-key (vector (append modifiers '(right))) 'windmove-display-right)
@@ -618,11 +624,16 @@ windmove-delete-default-keybindings
 Keys are bound to commands that delete windows in the specified
 direction.  Keybindings are of the form PREFIX MODIFIERS-{left,right,up,down},
 where PREFIX is a prefix key and MODIFIERS is either a list of modifiers or
-a single modifier.  Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
+a single modifier.
+If PREFIX is `none', no prefix is used. If MODIFIERS is `none', the keybindings
+are directly bound to the arrow keys.
+Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
   (interactive)
   (unless prefix (setq prefix '(?\C-x)))
+  (when (eq prefix 'none) (setq prefix nil))
   (unless (listp prefix) (setq prefix (list prefix)))
   (unless modifiers (setq modifiers '(shift)))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector prefix (append modifiers '(left)))  'windmove-delete-left)
   (global-set-key (vector prefix (append modifiers '(right))) 'windmove-delete-right)
@@ -673,9 +684,13 @@ windmove-swap-states-default-keybindings
 Keys are bound to commands that swap the states of the selected window
 with the window in the specified direction.  Keybindings are of the form
 MODIFIERS-{left,right,up,down}, where MODIFIERS is either a list of modifiers
-or a single modifier.  Default value of MODIFIERS is `shift-super'."
+or a single modifier.
+If MODIFIERS is `none', the keybindings will be directly bound to the
+arrow keys.
+Default value of MODIFIERS is `shift-super'."
   (interactive)
   (unless modifiers (setq modifiers '(shift super)))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-swap-states-left)
   (global-set-key (vector (append modifiers '(right))) 'windmove-swap-states-right)
-- 
2.20.1


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Add-user-options-to-bind-windmove-commands.patch

From c009311887372e1e822739edc050a802bfa4d1d8 Mon Sep 17 00:00:00 2001
From: Philip K <philipk@HIDDEN>
Date: Fri, 7 Aug 2020 12:35:49 +0200
Subject: [PATCH] Add user options to bind windmove commands

* windmove.el (windmove-modifier-type): Create
(windmove--unbind): New constant
(windmove-modifiers): New user option
(windmove-default-keybindings): Use windmove-modifiers
(windmove-display-modifiers): New user option
(windmove-display-default-keybindings): Use windmove-display-modifiers
(windmove-delete-prefix): New user option
(windmove-delete-modifiers): New user option
(windmove-delete-default-keybindings): Use windmove-delete-prefix and
windmove-delete-modifiers
(windmove-swap-states-modifiers): New user option
(windmove-swap-states-default-keybindings): Use windmove-swap-states-modifiers
---
 lisp/windmove.el | 154 ++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 145 insertions(+), 9 deletions(-)

diff --git a/lisp/windmove.el b/lisp/windmove.el
index 613727f8ed..9b68f9a5b9 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -162,6 +162,40 @@ windmove-window-distance-delta
 (make-obsolete-variable 'windmove-window-distance-delta
                         "no longer used." "27.1")
 
+(defconst windmove-modifier-type
+  '(choice (set :tag "Modifier Symbols"
+                :greedy t
+                ;; See `(elisp) Keyboard Events'
+                (const :tag "Meta" meta)
+                (const :tag "Control" control)
+                (const :tag "Shift" shift)
+                (const :tag "Hyper" hyper)
+                (const :tag "Super" super)
+                (const :tag "Alt" alt))
+           (const :tag "No modifier" none)
+           (const :tag "Not bound" nil))
+  "Customisation type for windmove modifiers")
+
+(defun windmove--unbind (prefix modifiers fns &optional extra)
+  "Unbind windmove commands, bound by PREFIX and MODIFIER.
+To ensure that only windmove functions are unbound, the command
+must be member of the list FNS.
+By default only the left, right, up and down keys are unbound,
+but further keys can be added via EXTRA."
+  (setq prefix
+        (cond ((eq prefix 'none) nil)
+              ((not (listp prefix)) (list prefix))
+              (t prefix)))
+  (setq modifiers
+        (cond ((eq modifiers 'none) nil)
+              ((not (listp modifiers)) (list modifiers))
+              (t modifiers)))
+  (dolist (dir (append '(left right up down) extra))
+    (let* ((key (append modifiers (list dir)))
+           (key (vconcat prefix (list key))))
+      (when (memq (lookup-key global-map key) fns)
+        (global-set-key key nil)))))
+
 
 ;; Note:
 ;;
@@ -419,6 +453,7 @@ windmove-down
   (interactive "P")
   (windmove-do-window-select 'down (and arg (prefix-numeric-value arg))))
 
+(defvar windmove-modifiers)
 
 ;;; set up keybindings
 ;; Idea for this function is from iswitchb.el, by Stephen Eglen
@@ -433,16 +468,41 @@ windmove-default-keybindings
 where MODIFIERS is either a list of modifiers or a single modifier.
 If MODIFIERS is `none', the keybindings will be directly bound to
 the arrow keys.
-Default value of MODIFIERS is `shift'."
+Default value of MODIFIERS is stored in `windmove-modifiers'."
   (interactive)
-  (unless modifiers (setq modifiers 'shift))
   (when (eq modifiers 'none) (setq modifiers nil))
+  (unless modifiers
+    (setq modifiers windmove-modifiers))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-left)
   (global-set-key (vector (append modifiers '(right))) 'windmove-right)
   (global-set-key (vector (append modifiers '(up)))    'windmove-up)
   (global-set-key (vector (append modifiers '(down)))  'windmove-down))
 
+;; has to be declared AFTER windmove-default-keybindings, or else
+;; windmove is recursivly loaded
+;;;###autoload
+(defcustom windmove-modifiers '(shift super)
+  "Modifiers for `windmove-default-keybindings'.
+Can either be a symbol or list of modifier symbols,
+i.e. `meta',`control', `shift', `hyper', `super', or `alt'
+representing modifier keys to use with the arrow keys.
+
+If the value is just `none', the arrow keys will be directly
+bound to the windmove functions."
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (windmove--unbind nil (default-value sym)
+                           '(windmove-left
+                             windmove-right
+                             windmove-up
+                             windmove-down))
+         (when val
+           (windmove-default-keybindings val))
+         (set-default sym val)))
+
 
 ;;; Directional window display and selection
 
@@ -543,6 +603,8 @@ windmove-display-new-tab
   (interactive "P")
   (windmove-display-in-direction 'new-tab arg))
 
+(defvar windmove-display-modifiers)
+
 ;;;###autoload
 (defun windmove-display-default-keybindings (&optional modifiers)
   "Set up keybindings for directional buffer display.
@@ -551,9 +613,10 @@ windmove-display-default-keybindings
 where MODIFIERS is either a list of modifiers or a single modifier.
 If MODIFIERS is `none', the keybindings will be directly bound to
 the arrow keys.
-Default value of MODIFIERS is `shift-meta'."
+Default value of MODIFIERS is stored in `windmove-display-modifiers'."
   (interactive)
-  (unless modifiers (setq modifiers '(shift meta)))
+  (unless modifiers
+    (setq modifiers windmove-display-modifiers))
   (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-display-left)
@@ -564,6 +627,27 @@ windmove-display-default-keybindings
   (global-set-key (vector (append modifiers '(?f)))    'windmove-display-new-frame)
   (global-set-key (vector (append modifiers '(?t)))    'windmove-display-new-tab))
 
+;;;###autoload
+(defcustom windmove-display-modifiers '(shift meta)
+  "Modifiers for `windmove-display-default-keybindings'.
+Analogous to `windmove-modifiers'."
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (windmove--unbind nil (default-value sym)
+                           '(windmove-display-left
+                             windmove-display-right
+                             windmove-display-up
+                             windmove-display-down
+                             windmove-display-same-window
+                             windmove-display-new-frame
+                             windmove-display-new-tab)
+                           '(?0 ?f ?t))
+         (when val
+           (windmove-display-default-keybindings val))
+         (set-default sym val)))
+
 
 ;;; Directional window deletion
 
@@ -618,6 +702,9 @@ windmove-delete-down
   (interactive "P")
   (windmove-delete-in-direction 'down arg))
 
+(defvar windmove-delete-prefix)
+(defvar windmove-delete-modifiers)
+
 ;;;###autoload
 (defun windmove-delete-default-keybindings (&optional prefix modifiers)
   "Set up keybindings for directional window deletion.
@@ -627,12 +714,15 @@ windmove-delete-default-keybindings
 a single modifier.
 If PREFIX is `none', no prefix is used. If MODIFIERS is `none', the keybindings
 are directly bound to the arrow keys.
-Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
+The default values for PREFIX and MODIFIERS are stored in `windmove-delete-prefix'
+and `windmove-delete-modifiers' respectively."
   (interactive)
-  (unless prefix (setq prefix '(?\C-x)))
+  (unless prefix
+    (setq prefix (list windmove-delete-prefix)))
   (when (eq prefix 'none) (setq prefix nil))
   (unless (listp prefix) (setq prefix (list prefix)))
-  (unless modifiers (setq modifiers '(shift)))
+  (unless modifiers
+    (setq modifiers windmove-delete-modifiers))
   (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector prefix (append modifiers '(left)))  'windmove-delete-left)
@@ -640,6 +730,32 @@ windmove-delete-default-keybindings
   (global-set-key (vector prefix (append modifiers '(up)))    'windmove-delete-up)
   (global-set-key (vector prefix (append modifiers '(down)))  'windmove-delete-down))
 
+(defcustom windmove-delete-prefix (kbd "C-x")
+  "Prefix for `windmove-delete-default-keybindings'."
+  :type 'key-sequence
+  :require 'windmove
+  :initialize #'custom-initialize-changed)
+
+;;;###autoload
+(defcustom windmove-delete-modifiers '(shift)
+  "Modifiers for `windmove-delete-default-keybindings'.
+See `windmove-modifiers' for more details"
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set-after '(windmove-delete-prefix)
+  :set (lambda (sym val)
+         (windmove--unbind windmove-delete-prefix
+                           (default-value sym)
+                           '(windmove-delete-left
+                             windmove-delete-right
+                             windmove-delete-up
+                             windmove-delete-down))
+         (when val
+           (windmove-delete-default-keybindings
+            windmove-delete-prefix val))
+         (set-default sym val)))
+
 
 ;;; Directional window swap states
 
@@ -678,6 +794,8 @@ windmove-swap-states-right
   (interactive)
   (windmove-swap-states-in-direction 'right))
 
+(defvar windmove-swap-states-modifiers)
+
 ;;;###autoload
 (defun windmove-swap-states-default-keybindings (&optional modifiers)
   "Set up keybindings for directional window swap states.
@@ -687,9 +805,10 @@ windmove-swap-states-default-keybindings
 or a single modifier.
 If MODIFIERS is `none', the keybindings will be directly bound to the
 arrow keys.
-Default value of MODIFIERS is `shift-super'."
+Default value of MODIFIERS is stored in `windmove-swap-states-modifiers'."
   (interactive)
-  (unless modifiers (setq modifiers '(shift super)))
+  (unless modifiers
+    (setq modifiers windmove-swap-states-modifiers))
   (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-swap-states-left)
@@ -697,6 +816,23 @@ windmove-swap-states-default-keybindings
   (global-set-key (vector (append modifiers '(up)))    'windmove-swap-states-up)
   (global-set-key (vector (append modifiers '(down)))  'windmove-swap-states-down))
 
+;;;###autoload
+(defcustom windmove-swap-states-modifiers '(shift super)
+  "Modifiers for `windmove-swap-states-default-keybindings'.
+Analogous to `windmove-modifiers'."
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (windmove--unbind nil (default-value sym)
+                           '(windmove-swap-states-left
+                             windmove-swap-states-right
+                             windmove-swap-states-up
+                             windmove-swap-states-downp))
+         (when val
+           (windmove-swap-states-default-keybindings val))
+         (set-default sym val)))
+
 
 (provide 'windmove)
 
-- 
2.20.1


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 7 Aug 2020 00:52:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 06 20:52:57 2020
Received: from localhost ([127.0.0.1]:55172 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k3qcz-0000dY-78
	for submit <at> debbugs.gnu.org; Thu, 06 Aug 2020 20:52:57 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:57983)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1k3qcw-0000d5-7q
 for 41438 <at> debbugs.gnu.org; Thu, 06 Aug 2020 20:52:56 -0400
X-Originating-IP: 91.129.102.47
Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47])
 (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 923291C0002;
 Fri,  7 Aug 2020 00:52:46 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: "Philip K." <philipk@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
Organization: LINKOV.NET
References: <87pn84p1hj.fsf@HIDDEN>
Date: Fri, 07 Aug 2020 02:43:03 +0300
In-Reply-To: <87pn84p1hj.fsf@HIDDEN> (Philip K.'s message of "Thu, 06 Aug
 2020 11:28:24 +0200")
Message-ID: <87a6z78gqw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> (I see there were some unfinished parts in your previous patch).
>
> It's been a while since I submitted it, so I had to re-read the thread,
> but I'm not quite sure what the "unfinished" parts were, aside from the
> missing autoload cookies. Sorry if I missed something :/

I don't know, my impression seems to suggest the first version was not
completely tested, for example, windmove-modifiers defcustom called
windmove-swap-states-default-keybindings, not windmove-default-keybindings.
But maybe you already fixed this.

> Also, the second patch (the one with the user options) depended on the
> previous one in this thread[0], that introduced the "none" prefix. Is
> that fine, or should I just merge both patches into one.

This is perfectly fine - better to commit two separate patches.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 6 Aug 2020 09:28:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 06 05:28:36 2020
Received: from localhost ([127.0.0.1]:53133 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k3cCS-0002MJ-2P
	for submit <at> debbugs.gnu.org; Thu, 06 Aug 2020 05:28:36 -0400
Received: from mout02.posteo.de ([185.67.36.66]:37579)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philipk@HIDDEN>) id 1k3cCP-0002M1-AU
 for 41438 <at> debbugs.gnu.org; Thu, 06 Aug 2020 05:28:34 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id DA7F22400FC
 for <41438 <at> debbugs.gnu.org>; Thu,  6 Aug 2020 11:28:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1596706106; bh=3zeyTyAmnzLQwqJErrm4maNuFHSa+Aq8YhUkSL717Cw=;
 h=From:To:Cc:Subject:Date:From;
 b=SpuSDyt74PXjuJxTnR2uAvYqt1jqz98/0YAPIkFyuR245YAbQB7cn0rdvqtvgnE6i
 CP0KuG3NbTMIinaxD+ik8bNhPgu04L1XwZFYtQ5dEetGjrauq9Wl4CerOTTTou1l+t
 EvsjlVsr1fOlRQuzxJlyhAykA2YZFMscxrcglMMght51sAZAClXKBT/MbGSiiwfbm+
 pNqpowmzQAsgkacrJTtJh2UC753Xe1VohD9GMKxD4YgRnXK7MhupLS8x80vHaKN+H9
 1D4OUcvXBaLh2REgmPQ2NK85VlLNE7zJUbQYEHh3x7Obt9iIalJcLO9SUZVRPS7fib
 Kks2ePUNYbngw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4BMjpd4StSz6tmD;
 Thu,  6 Aug 2020 11:28:25 +0200 (CEST)
From: "Philip K." <philipk@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
In-Reply-To: <87y2mssltt.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 06 Aug 2020 02:40:46 +0300)
Date: Thu, 06 Aug 2020 11:28:24 +0200
Message-ID: <87pn84p1hj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

> Philip, could you please prepare the final version of your patch

Sure, I'll try to finish it today.

> (I see there were some unfinished parts in your previous patch).

It's been a while since I submitted it, so I had to re-read the thread,
but I'm not quite sure what the "unfinished" parts were, aside from the
missing autoload cookies. Sorry if I missed something :/

Also, the second patch (the one with the user options) depended on the
previous one in this thread[0], that introduced the "none" prefix. Is
that fine, or should I just merge both patches into one.

[0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41438#5

-- 
	Philip K.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 6 Aug 2020 00:15:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 20:15:19 2020
Received: from localhost ([127.0.0.1]:52438 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k3TZ0-0007Cs-QS
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2020 20:15:19 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46905)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1k3TYy-0007CW-1m
 for 41438 <at> debbugs.gnu.org; Wed, 05 Aug 2020 20:15:17 -0400
X-Originating-IP: 91.129.102.47
Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47])
 (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 347B01C0002;
 Thu,  6 Aug 2020 00:15:07 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
Organization: LINKOV.NET
References: <87imgpw7k3.fsf@HIDDEN> <87366ftww6.fsf@HIDDEN>
 <87pn9ibv6x.fsf@HIDDEN> <87imdxhssv.fsf@HIDDEN>
Date: Thu, 06 Aug 2020 02:40:46 +0300
In-Reply-To: <87imdxhssv.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
 05 Aug 2020 20:05:36 +0200")
Message-ID: <87y2mssltt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, "Philip K." <philip@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> I get what you were saying, but it seems the issue with windmove is the
>>> opposite. Just loading windmove shouldn't create any new keybindings,
>>> but customising the new user options should, *even if* windmove hasn't
>>> been loaded yet (ideally).
>>
>> Then it seems explicitly requiring windmove and autoloading variables
>> is unavoidable, so your previous patch was the right thing to do.
>
> The patch wasn't applied, though?  I know nothing about windmove, so I'm
> not really qualified to have an opinion, but if you think it's the right
> thing to do, then you should apply it?

Philip, could you please prepare the final version of your patch
(I see there were some unfinished parts in your previous patch).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 5 Aug 2020 18:05:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 05 14:05:49 2020
Received: from localhost ([127.0.0.1]:52207 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k3NnR-00057j-GU
	for submit <at> debbugs.gnu.org; Wed, 05 Aug 2020 14:05:49 -0400
Received: from quimby.gnus.org ([95.216.78.240]:44304)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1k3NnP-00057V-S7
 for 41438 <at> debbugs.gnu.org; Wed, 05 Aug 2020 14:05:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 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=hsPPVNbjDu0rDbYxNuUm9iKL8XU43wkFQjzU6YcrHI4=; b=eD43h7d1d1RHXiJrVeqtYDIp7Q
 HsNbmzx1XQk3lVzmbgM1oJnM9aw/bj7CFfHKzAaxUxT7zeryFMakR+o+mhrdcaKu/nLH68pa/V4IE
 q5tuNIvpICWpfJAjWZ4Su/Y7rz8eCej6Y6WN2CWxiCtFK5i002AjzorrgXZyP1l7I6Yc=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1k3NnF-0007WR-Md; Wed, 05 Aug 2020 20:05:41 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
References: <87imgpw7k3.fsf@HIDDEN> <87366ftww6.fsf@HIDDEN>
 <87pn9ibv6x.fsf@HIDDEN>
Date: Wed, 05 Aug 2020 20:05:36 +0200
In-Reply-To: <87pn9ibv6x.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 29 Jun 2020 02:37:10 +0300")
Message-ID: <87imdxhssv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: >> I get what you were
 saying, but it seems the issue with windmove is the >> opposite. Just loading
 windmove shouldn't create any new keybindings, >> but customising the new
 user options should, *eve [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, "Philip K." <philip@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Juri Linkov <juri@HIDDEN> writes:

>> I get what you were saying, but it seems the issue with windmove is the
>> opposite. Just loading windmove shouldn't create any new keybindings,
>> but customising the new user options should, *even if* windmove hasn't
>> been loaded yet (ideally).
>
> Then it seems explicitly requiring windmove and autoloading variables
> is unavoidable, so your previous patch was the right thing to do.

The patch wasn't applied, though?  I know nothing about windmove, so I'm
not really qualified to have an opinion, but if you think it's the right
thing to do, then you should apply it?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 28 Jun 2020 23:58:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 28 19:58:11 2020
Received: from localhost ([127.0.0.1]:47219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jphBb-0006qS-8V
	for submit <at> debbugs.gnu.org; Sun, 28 Jun 2020 19:58:11 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:44807)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jphBZ-0006qD-VA
 for 41438 <at> debbugs.gnu.org; Sun, 28 Jun 2020 19:58:10 -0400
X-Originating-IP: 91.129.96.187
Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187])
 (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 524461C0002;
 Sun, 28 Jun 2020 23:58:00 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: "Philip K." <philip@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
References: <87imgpw7k3.fsf@HIDDEN> <87366ftww6.fsf@HIDDEN>
Date: Mon, 29 Jun 2020 02:37:10 +0300
In-Reply-To: <87366ftww6.fsf@HIDDEN> (Philip K.'s message of "Sun, 28
 Jun 2020 10:30:49 +0200")
Message-ID: <87pn9ibv6x.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> I get what you were saying, but it seems the issue with windmove is the
> opposite. Just loading windmove shouldn't create any new keybindings,
> but customising the new user options should, *even if* windmove hasn't
> been loaded yet (ideally).

Then it seems explicitly requiring windmove and autoloading variables
is unavoidable, so your previous patch was the right thing to do.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 28 Jun 2020 08:31:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 28 04:31:01 2020
Received: from localhost ([127.0.0.1]:45167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jpSiL-00088Z-8v
	for submit <at> debbugs.gnu.org; Sun, 28 Jun 2020 04:31:01 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42833)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jpSiJ-00088F-C0
 for 41438 <at> debbugs.gnu.org; Sun, 28 Jun 2020 04:31:00 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id E6B435C00E4;
 Sun, 28 Jun 2020 04:30:53 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Sun, 28 Jun 2020 04:30:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 from:to:cc:subject:in-reply-to:date:message-id:mime-version
 :content-type; s=fm3; bh=X1KLDSGRzjTSVkSCWeKMhlN0CcTM7s9HBeJyuNU
 QfKc=; b=kfOMTKy5tpngeFH1G1SV1BkeebV8kJcwV7BV+L2iK4GajwL5g9Apkl/
 TdM06knMxIZN2Dl7Tt+HXYCALwepjaEt4exXQnNT9YhhIk8NSdfaVB3UXFree9j2
 vQ/g4Lg/ww3xAwvm6jo+7jZJD0HWOuEAOZaRiUWzC02GhiNKvhFn0G9SIgKvFWO5
 9Yk9n0dXH6AM+AnYNtPlwBKgPCHc18LfCW/J5aFa9AeY8VMcWf/fCHQa80Gx1Ugz
 ZSko47muCPM0aJFyqCfnKMf4pqrkljTj74AUR+9chFjFy/5HZrgkZU9dvfOov/G0
 QNyLr950sw0XJR8GSfjofLP7nzcrlcA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=X1KLDSGRzjTSVkSCW
 eKMhlN0CcTM7s9HBeJyuNUQfKc=; b=bjaxluligNochNazPK2a03z4tRALJUOYv
 0U6erVpbLsciA47oEsrVK9CyDqMQHz/Hfc7dkDSTe2WjUVSRO7KV4SvYQiO+8TTw
 M4alw205lGcZlvcTZutVIEN3iRY5oIbbIrmqF6/Wzc88Q1Ko4oTpQeYxZttgKrzu
 cb8EcIKmBPQBxnBjlBlJ0rs27WFYzINhI5Tm4iJRdr+hkWfnbQ7dZ2C5aum8HxdZ
 VsK69AxG/7gLiHUT0AMJYlhe5k0dZjI43kxFVxowtaoBVChVm+4sXG/62ICmV/I6
 va2yNEaiSiEbf4Mx4sCEqnrN5nNeaIZNzHAGjRYUflc3Iodr9RYXA==
X-ME-Sender: <xms:PVX4XpKPW_hIQ8-ixLdNsjM2ivIlCiWFqASjifGmIr6WTNL67KI0Iw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeliedgtdeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufgjfffkgggtsehttdertddttddtnecuhfhrohhmpedfrfhhihhlihhp
 ucfmrddfuceophhhihhlihhpseifrghrphhmrghilhdrnhgvtheqnecuggftrfgrthhtvg
 hrnhepheeuieffveevkeetffeufeekfeejkeekkeefjeelueeftdduffdugfeuieegfffh
 necukfhppeekjedrudeghedrudehrdeludenucevlhhushhtvghrufhiiigvpedtnecurf
 grrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesfigrrhhpmhgrihhlrdhnvght
X-ME-Proxy: <xmx:PVX4XlJph0BCCs7iHncKyJeDhcJ-KPaHSsJLwhw-lTHohozv3_cD0Q>
 <xmx:PVX4XhvcP02c01w2z7I-Y-nUmSWe-WWU2Q3LriSNf8uQPaZXV8Ob8Q>
 <xmx:PVX4XqZluNsBUEjcIbL_SMB_b_kbghF12x1QBezP1JXTFswb7OWg0A>
 <xmx:PVX4XpmaY9x3dD-ZPiQIB4GwwxYs3v2edYxRk_D2Ddar5Yy1SnfHtw>
Received: from localhost (p57910f5b.dip0.t-ipconnect.de [87.145.15.91])
 by mail.messagingengine.com (Postfix) with ESMTPA id 1B3423280063;
 Sun, 28 Jun 2020 04:30:52 -0400 (EDT)
From: "Philip K." <philip@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
In-Reply-To: <87o8p4avy5.fsf@HIDDEN> (message from Juri Linkov on
 Sun, 28 Jun 2020 02:53:54 +0300)
Date: Sun, 28 Jun 2020 10:30:49 +0200
Message-ID: <87366ftww6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Juri Linkov <juri@HIDDEN> writes:

> Actually, I meant not so much the defconst form (that is an unimportant
> detail), but more the :set function, and also I forgot to mention
> :initialize.  Their combination in char-fold.el looks like:
>
>   :initialize #'custom-initialize-default
>   :set (lambda (sym val)
>          (custom-set-default sym val)
>          (char-fold-update-table))
>
> Then after loading char-fold.el, this function is executed at the top level:
>
> (char-fold-update-table)
>
> Maybe something like this could help to initialize default keybindings
> after loading windmove.el.

I get what you were saying, but it seems the issue with windmove is the
opposite. Just loading windmove shouldn't create any new keybindings,
but customising the new user options should, *even if* windmove hasn't
been loaded yet (ideally).

-- 
	Philip K.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 28 Jun 2020 00:18:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 27 20:18:49 2020
Received: from localhost ([127.0.0.1]:44796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jpL21-0004Bx-8Z
	for submit <at> debbugs.gnu.org; Sat, 27 Jun 2020 20:18:49 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:52979)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jpL1v-0004BH-8Z
 for 41438 <at> debbugs.gnu.org; Sat, 27 Jun 2020 20:18:43 -0400
Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id BBB49200003;
 Sun, 28 Jun 2020 00:18:35 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: "Philip K." <philip@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
References: <87imgpw7k3.fsf@HIDDEN> <87k0zttxti.fsf@HIDDEN>
Date: Sun, 28 Jun 2020 02:53:54 +0300
In-Reply-To: <87k0zttxti.fsf@HIDDEN> (Philip K.'s message of "Fri, 26
 Jun 2020 21:46:17 +0200")
Message-ID: <87o8p4avy5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, 41438@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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.
>
> I've been trying to understand what was changed there (I presume you're
> referring to 376f5df), but I don't think I can quite follow. What
> difference does adding the defconst forms to the eval-and-compile block
> do?

Actually, I meant not so much the defconst form (that is an unimportant
detail), but more the :set function, and also I forgot to mention
:initialize.  Their combination in char-fold.el looks like:

  :initialize #'custom-initialize-default
  :set (lambda (sym val)
         (custom-set-default sym val)
         (char-fold-update-table))

Then after loading char-fold.el, this function is executed at the top level:

(char-fold-update-table)

Maybe something like this could help to initialize default keybindings
after loading windmove.el.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 26 Jun 2020 19:51:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 26 15:51:19 2020
Received: from localhost ([127.0.0.1]:43109 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jouNb-0004mP-P0
	for submit <at> debbugs.gnu.org; Fri, 26 Jun 2020 15:51:19 -0400
Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:41385)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jouNX-0004m7-Az
 for 41438 <at> debbugs.gnu.org; Fri, 26 Jun 2020 15:51:18 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id 924DA413
 for <41438 <at> debbugs.gnu.org>; Fri, 26 Jun 2020 15:51:09 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Fri, 26 Jun 2020 15:51:09 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 resent-from:resent-date:resent-to:from:to:cc:subject:in-reply-to
 :date:message-id:mime-version:content-type:resent-message-id; s=
 fm3; bh=NATBS4WouEuaBFjo/TDrcgUiAXbz2hhtC9XBRgu3YiU=; b=gdZ49o57
 OtVOs0pMbJc0PBJjHDfYLlpGNjmJtFCXXVj4c+klQtGJqo8NAsyKs/X79DcZitjG
 z4Qw+wyB02SBmBQpEJaQAT1zwndaMu8S1OnNHxCiQY0n2915Id1JyH0QVm7KtcKO
 vX+YiFJvLKPVQ4w2CPXWB8ZYZmScnBe7FsQI3Bte80cC63XhiWeLiinCWYCU+bhz
 5VqrAa0sAb+yLH5wfTGNXNXlWX4knqRjfrqiTNgnKvI+xfsOU42RHVRmvFcqyqVu
 o3Jqam/jUGBmGAZ9pv1THPaw8S9bDcg32o4+t14eiqSeKmnjwfTLaJFccv4AmVlv
 cxFYTRoIml4DiQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:resent-date:resent-from
 :resent-message-id:resent-to:subject:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=NATBS4WouEuaBFjo/
 TDrcgUiAXbz2hhtC9XBRgu3YiU=; b=DaPb3CQQ7YNgkGyhhzxjBBkfGDbkmAJkG
 ataqhcUnYUJY0ejvPxlmRVGKLY172MLwTrsu+BDpf2nnUD+YZ+dbMT9jSEn56qAX
 EMRkdy+Gh6gOPKi9wl9VFnM9lAep2ZmQA26wo1vFzYWLeuEvT6TgOpAvTvQ5KURM
 A5osH3a6aBtzRQYKX8lzuDFBtNtYoIrY+988akmbgznYdpHLO7QvykyMigziyIPs
 cO/Y8kisfQWOkSwuB1/facJP3fWIwSefuHXbS/J+umc11g0X2Fyt9skeulnVWN2x
 YymKWD1xtJHEU+dtJPmYnm0+Wu3ZzBAMddUjh8yYDStLqL8Tme9Gg==
X-ME-Sender: <xms:rFH2XrzPUkY1Y08nvKymXD4uKm0BllfPqxJf3GCTCMoQOe8jzmvjTQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeluddgudeggecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfffkgggtsehttdertd
 dttddtnecuhfhrohhmpedfrfhhihhlihhpucfmrddfuceophhhihhlihhpseifrghrphhm
 rghilhdrnhgvtheqnecuggftrfgrthhtvghrnhepheeuieffveevkeetffeufeekfeejke
 ekkeefjeelueeftdduffdugfeuieegfffhnecukfhppeekjedrudeghedrudehrdeluden
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilh
 hiphesfigrrhhpmhgrihhlrdhnvght
X-ME-Proxy: <xmx:rFH2XjR3Kyn8JOGWpJyLkA9-psrdp-xX7y2_4-h9aL-DB9EaHXvOXw>
 <xmx:rFH2XlXR6odxzkFFgvm5F4q83t2BERRULptEytxQtH7IeQ75ekM9yw>
 <xmx:rFH2XljrTMxFBnvmZsy1j3eQZ91fIaFxTYDixM9Q2YEgyzwmC2qXIQ>
 <xmx:rVH2XpzzvYJreK5qh30uC22ST4d-I-ewMgMKAXA0r_cDD5Hw_eJYjQ>
Received: from localhost (p57910f5b.dip0.t-ipconnect.de [87.145.15.91])
 by mail.messagingengine.com (Postfix) with ESMTPA id 85D4A3280065
 for <41438 <at> debbugs.gnu.org>; Fri, 26 Jun 2020 15:51:08 -0400 (EDT)
Resent-From: philip@HIDDEN
Resent-Date: 26 Jun 2020 21:51:06 +0200
Resent-To: 41438 <at> debbugs.gnu.org
From: "Philip K." <philip@HIDDEN>
To: juri@HIDDEN
Subject: bug#41438: [PATCH] Allow windmove keys to be bound without prefix
 or modifiers 
In-Reply-To: 87blmewc7p.fsf@HIDDEN
Date: Fri, 26 Jun 2020 21:46:17 +0200
Message-ID: <87k0zttxti.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-RMAIL-ATTRIBUTES: --------
Resent-Message-Id: <20200626195108.85D4A3280065@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


> 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.

I've been trying to understand what was changed there (I presume you're
referring to 376f5df), but I don't think I can quite follow. What
difference does adding the defconst forms to the eval-and-compile block
do?

-- 
	Philip K.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Jun 2020 19:51:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 26 15:51:25 2020
Received: from localhost ([127.0.0.1]:43114 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jouNg-0004mh-VF
	for submit <at> debbugs.gnu.org; Fri, 26 Jun 2020 15:51:25 -0400
Received: from lists.gnu.org ([209.51.188.17]:36400)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jouNe-0004mZ-AF
 for submit <at> debbugs.gnu.org; Fri, 26 Jun 2020 15:51:23 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50396)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philip@HIDDEN>)
 id 1jouNe-00015j-18
 for bug-gnu-emacs@HIDDEN; Fri, 26 Jun 2020 15:51:22 -0400
Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:54233)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philip@HIDDEN>)
 id 1jouNc-0004vH-DB
 for bug-gnu-emacs@HIDDEN; Fri, 26 Jun 2020 15:51:21 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id 30001413
 for <bug-gnu-emacs@HIDDEN>; Fri, 26 Jun 2020 15:51:19 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Fri, 26 Jun 2020 15:51:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 resent-from:resent-date:resent-to:from:to:cc:subject:in-reply-to
 :date:message-id:mime-version:content-type:resent-message-id; s=
 fm3; bh=NATBS4WouEuaBFjo/TDrcgUiAXbz2hhtC9XBRgu3YiU=; b=qVR8UEJ8
 0JZi17zDq64lwue+Hyv4ogwKRk7eKrckgiEPCm5DyRUgWS5D0K/zblzhOCHOxquW
 xgg+K9cUyToNoxEgS9gqJ2KG5+xv3sCSYmcZPfrQwFo6tG0x4bsIDQC3dbRZeEel
 dGwqX5v6uz5bZ2+wsp+sKTnGucxonW9F8bhGVzpprEQtS7R1TKUKotEcS7NnIqV5
 hlG3CPYhrTLy8d0Qq2zceDrZkcfA7YFD8Ne4cXhCMoa7axaZ+4dKRZHv9fQj9vbE
 v7eBo6414UbG68nNUwIMZhohxumTCw8sCH8Ts1A2I7FOPcm+vI4BgVoww7YPqnKW
 zbDH49OosVAceA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:resent-date:resent-from
 :resent-message-id:resent-to:subject:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=NATBS4WouEuaBFjo/
 TDrcgUiAXbz2hhtC9XBRgu3YiU=; b=kphT5X61JZZA4ZkLidZ4eoCiN5E3koG+G
 GYpm+Qm4eKmax3iV96MqGQqvQFB8PjF0XOCv97uWdprI7iLLSRV6CjzsuNez9oWg
 watEvNRYkmQggJne7nytGVJlCRVTr4DAHTZyUywgwnrcWXieaMt68SPoPZ1cdbmX
 zA5xOhduJWsne3PUaTqlVvFcVLzUa7h7WKnM29Hfeyu1GlP9M+B6NnX3ugf+5SU/
 u5wtwArS+/vP+mvcjn9+sOtA3hYw43Yi0wEaEnGRmj8XL7baR9Oq8bSqPbafnHOk
 GJ+3lfIln/K9fyXzuetKLHKMabubPN9OBzJ/Q6nuaUlRcm9sHiotg==
X-ME-Sender: <xms:tlH2XuMyLAhyJ6VqmruwdpRrMHJQQmwr1mErPBu3F0T6xImTgc3epw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeluddgudeggecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfffkgggtsehttdertd
 dttddtnecuhfhrohhmpedfrfhhihhlihhpucfmrddfuceophhhihhlihhpseifrghrphhm
 rghilhdrnhgvtheqnecuggftrfgrthhtvghrnhepheeuieffveevkeetffeufeekfeejke
 ekkeefjeelueeftdduffdugfeuieegfffhnecukfhppeekjedrudeghedrudehrdeluden
 ucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilh
 hiphesfigrrhhpmhgrihhlrdhnvght
X-ME-Proxy: <xmx:tlH2Xs-4wztjkaJCBztsRJQh0uc_a-OCL91eOoTyAQTQfws9i0ORhQ>
 <xmx:tlH2XlQClCLZMExSgtOQi_foGEMK-XZ3vl49PiDYlUY4TAMoN1TRLg>
 <xmx:tlH2Xuvhb_Uj_d2QXoGuHtgvPg8AXx9UlFEndX44xmyO9lg2LQhTKw>
 <xmx:tlH2Xl_g1O0dt0Gb0GeTwJYkT1jB-vQ4W_q1rNXShAB6RHoIztBVDg>
Received: from localhost (p57910f5b.dip0.t-ipconnect.de [87.145.15.91])
 by mail.messagingengine.com (Postfix) with ESMTPA id 32E8F3067954
 for <bug-gnu-emacs@HIDDEN>; Fri, 26 Jun 2020 15:51:18 -0400 (EDT)
Resent-From: philip@HIDDEN
Resent-Date: 26 Jun 2020 21:51:16 +0200
Resent-To: bug-gnu-emacs@HIDDEN
From: "Philip K." <philip@HIDDEN>
To: juri@HIDDEN
Subject: bug#41438: [PATCH] Allow windmove keys to be bound without prefix
 or modifiers 
In-Reply-To: 87blmewc7p.fsf@HIDDEN
Date: Fri, 26 Jun 2020 21:46:17 +0200
Message-ID: <87k0zttxti.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-RMAIL-ATTRIBUTES: -------r
Resent-Message-Id: <20200626195118.32E8F3067954@HIDDEN>
Received-SPF: pass client-ip=64.147.123.19; envelope-from=philip@HIDDEN;
 helo=wout3-smtp.messagingengine.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/26 14:44:59
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: submit
Cc: 41438@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)


> 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.

I've been trying to understand what was changed there (I presume you're
referring to 376f5df), but I don't think I can quite follow. What
difference does adding the defconst forms to the eval-and-compile block
do?

-- 
	Philip K.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 23 May 2020 22:56:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 18:56:28 2020
Received: from localhost ([127.0.0.1]:35997 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcd48-000884-2i
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 18:56:28 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:41923)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jcd47-00087q-8T
 for 41438 <at> debbugs.gnu.org; Sat, 23 May 2020 18:56:27 -0400
Received: from mail.gandi.net (m91-129-97-200.cust.tele2.ee [91.129.97.200])
 (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 0CF13200003;
 Sat, 23 May 2020 22:56:19 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: philip@HIDDEN (Philip K.)
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
Organization: LINKOV.NET
References: <87v9kn7rnk.fsf@bulbul>
Date: Sun, 24 May 2020 01:12:42 +0300
In-Reply-To: <87v9kn7rnk.fsf@bulbul> (Philip K.'s message of "Fri, 22 May 2020
 20:26:07 +0200")
Message-ID: <87blmewc7p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 22 May 2020 19:16:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 15:16:00 2020
Received: from localhost ([127.0.0.1]:60424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcD9E-0004Xz-2z
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 15:16:00 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:38402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1jcD9C-0004Xm-Q6
 for 41438 <at> debbugs.gnu.org; Fri, 22 May 2020 15:15:59 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04MJ7Wuf107701;
 Fri, 22 May 2020 19:15:52 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29;
 bh=P8ZP6K4/xt3ylvCMp8MZHgFiq7rDxmnUFrsxyF24niw=;
 b=q5bDJTLO3bvOlJpbFLzYiY+zFGvOCtW4abhd3IoqqZSYMvbHgqt/gkAQjGlMLFjJRrI8
 i5yscQLI9YVIG2y7CiL5M5Snxv6dwK8hz7kAmeJyjw5DCJBInlOWzo4ybfX7rNS3ukXO
 izU8S8TFUn1f2yDpSkCML+eyXgOGuajahv/LiAWEaSMT5ph/D4j5GOAp71rA0Jd8Wpm4
 w36PICB1uT7UbqCPtqsj7qAmN41dyTEh9JYVMfXZzmJbrgYoq1qh7gwveig8c8/1ou2i
 RXKzw96TiR7TOd02nHDrLu9xd0uL+GkQYXsLIJm4S7WMJnQJqHzrBjnZpKa6nMbOC+aD fg== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by userp2120.oracle.com with ESMTP id 31501rnwmt-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
 Fri, 22 May 2020 19:15:52 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04MJ8aQw106657;
 Fri, 22 May 2020 19:15:52 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userp3030.oracle.com with ESMTP id 314gmbnqqb-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 22 May 2020 19:15:52 +0000
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 04MJFoLF006352;
 Fri, 22 May 2020 19:15:51 GMT
MIME-Version: 1.0
Message-ID: <efe30ee3-5b65-40e5-bb45-b527879bb089@default>
Date: Fri, 22 May 2020 12:15:50 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: philip@HIDDEN, Juri Linkov <juri@HIDDEN>
Subject: RE: bug#41438: [PATCH] Allow windmove keys to be bound without prefix
 or modifiers
References: <874ks9rkyd.fsf@HIDDEN> <(message> <from> <Juri> <Linkov>
 <on> <Fri> <22> <May> <2020> <01:18:18> <+0300)>
 <87v9kn7rnk.fsf@bulbul>
In-Reply-To: <87v9kn7rnk.fsf@bulbul>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.5005.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9629
 signatures=668686
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0
 mlxlogscore=886
 adultscore=0 phishscore=0 mlxscore=0 spamscore=0 suspectscore=0
 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2004280000 definitions=main-2005220150
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9629
 signatures=668686
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 lowpriorityscore=0 spamscore=0
 mlxlogscore=920 clxscore=1011 priorityscore=1501 cotscore=-2147483648
 impostorscore=0 bulkscore=0 adultscore=0 malwarescore=0 phishscore=0
 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2004280000 definitions=main-2005220150
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, emacs-devel@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Please don't send the same mail to both the bug list and emacs-devel.  Thx.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 22 May 2020 18:26:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 22 14:26:19 2020
Received: from localhost ([127.0.0.1]:60360 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcCN9-0003I1-Be
	for submit <at> debbugs.gnu.org; Fri, 22 May 2020 14:26:19 -0400
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:42001)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jcCN7-0003Hn-9l
 for 41438 <at> debbugs.gnu.org; Fri, 22 May 2020 14:26:17 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id 2D220A21;
 Fri, 22 May 2020 14:26:11 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Fri, 22 May 2020 14:26:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 from:to:cc:subject:in-reply-to:date:message-id:mime-version
 :content-type; s=fm3; bh=7s5KkJhH9MWW4tyxcvGWmRtv4GpogGS7Fs9OmIH
 PGAA=; b=eZ3jkOHW0Y+bq7CzF5QxT/D3Rne1t3ZaJ5gG7MTu5AkHAEL2UHW4+pS
 tr5i5CkftH36gMe9a+u86XF9fE4K0FMFIE8yCLiLmimV1qGMXx10578vHtJMEXHf
 C0YktMqUgWgShMhOV6akzE1PSMM/j8ct9F7L9j+CihzRTQ+bnXAJf6Yepj5c7tfp
 PXxZZAYYHO7J5CN2d6v7aQ3rgdlsnMbjmvgO04iuIszMqunOJxd9e0mlhTwNgt6O
 +bWL+m539CKzvBprXRNyuM0dXCJQZsW0v4LscMKv98ZXjNNkSclsXUgiLWGJz3yX
 /okfXueKhGXuvQxCCKqYLRyAzcNfAYQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=7s5KkJhH9MWW4tyxc
 vGWmRtv4GpogGS7Fs9OmIHPGAA=; b=d7ZkM5IDZfACzPIXN3rpWcPiCR3qvhER9
 qcguhBnGVSj3q3Q+eDT+Zd67ryeWa5YflImK1t05o5SyzpA9tE2KIuxrjLYj4Ony
 txVCxNzxSeLAoWBmeWTirPkcsjj0nG5LjqZKwoN6rjEWApwsNeGKfJD5xqitfFJ2
 sWb8eMA4Fs/YuS5H/SrMsexxLVnScxU7kwgc7DXgtjJu0xmZN1mKVZADU/c0T/FV
 R4y5SqxLrT1yHVJQX1mNZDjCFs4EWDQMqy3w7mDPn8POJ2GQOLIlZcBaROYjH3ie
 HjdGVRsyx8ks7LkAocinw+C1xuYeOTk3+MNil9J1gqAgkPcBF41cA==
X-ME-Sender: <xms:QhnIXu2VuHpThejTFcEDbxUCLieO9UclFr8GKREhn2uVoou68Zg2Gg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddufedguddvfecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffujgffkfggtgesmhdtreertddttdenucfhrhhomhepphhhihhlihhp
 seifrghrphhmrghilhdrnhgvthculdfrhhhilhhiphcumfdrmdenucggtffrrghtthgvrh
 hnpeegfeffieeljedujeekudduffehhefhhfejvdefvdffgfejtddtvdeuffeutdetteen
 ucfkphepjeelrddvudelrdduleelrdegjeenucevlhhushhtvghrufhiiigvpedtnecurf
 grrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesfigrrhhpmhgrihhlrdhnvght
X-ME-Proxy: <xmx:QhnIXhHgvBuRxpnV_w0mpSciY5hEtbAA080sOhtox7DTXul8Dha4yg>
 <xmx:QhnIXm4Fx8XgvTD6UdVoLRjicB9EeHJGT_gaUb_Yn60wsddzHfCJDA>
 <xmx:QhnIXv2P6a5OxulgczApNgZSKTGcuEmFashtSfaSBF-qcdUcf-aP2g>
 <xmx:QhnIXgykvEMgKBSJAaKRhkAcs5QntBXvxinrVqepNx87D26eoDrkvg>
Received: from localhost (p4fdbc72f.dip0.t-ipconnect.de [79.219.199.47])
 by mail.messagingengine.com (Postfix) with ESMTPA id 4DB653280059;
 Fri, 22 May 2020 14:26:10 -0400 (EDT)
From: philip@HIDDEN (Philip K.)
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
In-Reply-To: <874ks9rkyd.fsf@HIDDEN> (message from Juri Linkov on Fri,
 22 May 2020 01:18:18 +0300)
Date: Fri, 22 May 2020 20:26:07 +0200
Message-ID: <87v9kn7rnk.fsf@bulbul>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org, emacs-devel@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Juri Linkov <juri@HIDDEN> writes:

>> 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?

-- 
	Philip K.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Implement-user-options-for-windmove-modifiers-and-pr.patch

From b35173936e681e170172eb3d4548a2f91f70dad3 Mon Sep 17 00:00:00 2001
From: Philip K <philip@HIDDEN>
Date: Fri, 22 May 2020 20:21:59 +0200
Subject: [PATCH] Implement user options for windmove modifiers and prefixes

---
 lisp/windmove.el | 103 +++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 95 insertions(+), 8 deletions(-)

diff --git a/lisp/windmove.el b/lisp/windmove.el
index 3d7f86b9af..95f74bfb81 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -162,6 +162,19 @@ windmove-window-distance-delta
 (make-obsolete-variable 'windmove-window-distance-delta
                         "no longer used." "27.1")
 
+(defconst windmove-modifier-type
+  '(choice (set :tag "Modifier Symbols"
+                :greedy t
+                ;; See `(elisp) Keyboard Events'
+                (const :tag "Meta" meta)
+                (const :tag "Control" control)
+                (const :tag "Shift" shift)
+                (const :tag "Hyper" hyper)
+                (const :tag "Super" super)
+                (const :tag "Alt" alt))
+           (const :tag "No modifier" none))
+  "Customisation type for windmove modifiers")
+
 
 ;; Note:
 ;;
@@ -419,6 +432,7 @@ windmove-down
   (interactive "P")
   (windmove-do-window-select 'down (and arg (prefix-numeric-value arg))))
 
+(defvar windmove-modifiers)
 
 ;;; set up keybindings
 ;; Idea for this function is from iswitchb.el, by Stephen Eglen
@@ -433,9 +447,10 @@ windmove-default-keybindings
 where MODIFIERS is either a list of modifiers or a single modifier.
 If MODIFIERS is `none', the keybindings will be directly bound to
 the arrow keys.
-Default value of MODIFIERS is `shift'."
+Default value of MODIFIERS is stored in `windmove-modifiers'."
   (interactive)
-  (unless modifiers (setq modifiers 'shift))
+  (unless modifiers
+    (setq modifiers windmove-modifiers))
   (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-left)
@@ -443,6 +458,25 @@ windmove-default-keybindings
   (global-set-key (vector (append modifiers '(up)))    'windmove-up)
   (global-set-key (vector (append modifiers '(down)))  'windmove-down))
 
+;; has to be declared AFTER windmove-default-keybindings, or else
+;; windmove is recursivly loaded
+;;;###autoload
+(defcustom windmove-modifiers '(shift super)
+  "Modifiers for `windmove-default-keybindings'.
+Can either be a symbol or list of modifier symbols,
+i.e. `meta',`control', `shift', `hyper', `super', or `alt'
+representing modifier keys to use with the arrow keys.
+
+If the value is just `none', the arrow keys will be directly
+bound to the windmove functions."
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (when val
+           (windmove-swap-states-default-keybindings val))
+         (set-default sym val)))
+
 
 ;;; Directional window display and selection
 
@@ -565,6 +599,8 @@ windmove-display-new-tab
   (interactive "P")
   (windmove-display-in-direction 'new-tab arg))
 
+(defvar windmove-display-modifiers)
+
 ;;;###autoload
 (defun windmove-display-default-keybindings (&optional modifiers)
   "Set up keybindings for directional buffer display.
@@ -573,7 +609,7 @@ windmove-display-default-keybindings
 where MODIFIERS is either a list of modifiers or a single modifier.
 If MODIFIERS is `none', the keybindings will be directly bound to
 the arrow keys.
-Default value of MODIFIERS is `shift-meta'."
+Default value of MODIFIERS is stored in `windmove-display-modifiers'."
   (interactive)
   (unless modifiers (setq modifiers '(shift meta)))
   (when (eq modifiers 'none) (setq modifiers nil))
@@ -586,6 +622,17 @@ windmove-display-default-keybindings
   (global-set-key (vector (append modifiers '(?f)))    'windmove-display-new-frame)
   (global-set-key (vector (append modifiers '(?t)))    'windmove-display-new-tab))
 
+(defcustom windmove-display-modifiers '(shift meta)
+  "Modifiers for `windmove-display-default-keybindings'.
+Analogous to `windmove-modifiers'."
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (when val
+           (windmove-display-default-keybindings val))
+         (set-default sym val)))
+
 
 ;;; Directional window deletion
 
@@ -640,6 +687,9 @@ windmove-delete-down
   (interactive "P")
   (windmove-delete-in-direction 'down arg))
 
+(defvar windmove-delete-prefix)
+(defvar windmove-delete-modifiers)
+
 ;;;###autoload
 (defun windmove-delete-default-keybindings (&optional prefix modifiers)
   "Set up keybindings for directional window deletion.
@@ -649,12 +699,13 @@ windmove-delete-default-keybindings
 a single modifier.
 If PREFIX is `none', no prefix is used. If MODIFIERS is `none', the keybindings
 are directly bound to the arrow keys.
-Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
+The default values for PREFIX and MODIFIERS are stored in `windmove-delete-prefix'
+and `windmove-delete-modifiers' respectively."
   (interactive)
-  (unless prefix (setq prefix '(?\C-x)))
+  (unless prefix (setq prefix (list windmove-delete-prefix)))
   (when (eq prefix 'none) (setq prefix nil))
   (unless (listp prefix) (setq prefix (list prefix)))
-  (unless modifiers (setq modifiers '(shift)))
+  (unless modifiers (setq modifiers windmove-delete-modifiers))
   (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector prefix (append modifiers '(left)))  'windmove-delete-left)
@@ -662,6 +713,28 @@ windmove-delete-default-keybindings
   (global-set-key (vector prefix (append modifiers '(up)))    'windmove-delete-up)
   (global-set-key (vector prefix (append modifiers '(down)))  'windmove-delete-down))
 
+(defcustom windmove-delete-prefix (kbd "C-x")
+  "Prefix for `windmove-delete-default-keybindings'."
+  :type 'key-sequence
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (windmove-delete-default-keybindings
+          val windmove-delete-modifiers)
+         (set-default sym val)))
+
+(defcustom windmove-delete-modifiers '(shift)
+  "Modifiers for `windmove-delete-default-keybindings'.
+See `windmove-modifiers' for more details"
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (when val
+           (windmove-delete-default-keybindings
+            windmove-delete-prefix val))
+         (set-default sym val)))
+
 
 ;;; Directional window swap states
 
@@ -700,6 +773,8 @@ windmove-swap-states-right
   (interactive)
   (windmove-swap-states-in-direction 'right))
 
+(defvar windmove-swap-states-modifiers)
+
 ;;;###autoload
 (defun windmove-swap-states-default-keybindings (&optional modifiers)
   "Set up keybindings for directional window swap states.
@@ -709,9 +784,10 @@ windmove-swap-states-default-keybindings
 or a single modifier.
 If MODIFIERS is `none', the keybindings will be directly bound to the
 arrow keys.
-Default value of MODIFIERS is `shift-super'."
+Default value of MODIFIERS is stored in `windmove-swap-states-modifiers'."
   (interactive)
-  (unless modifiers (setq modifiers '(shift super)))
+  (unless modifiers
+    (setq modifiers windmove-swap-states-modifiers))
   (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-swap-states-left)
@@ -719,6 +795,17 @@ windmove-swap-states-default-keybindings
   (global-set-key (vector (append modifiers '(up)))    'windmove-swap-states-up)
   (global-set-key (vector (append modifiers '(down)))  'windmove-swap-states-down))
 
+(defcustom windmove-swap-states-modifiers
+  '(shift super)
+  "Modifiers for `windmove-swap-states-default-keybindings'.
+Analogous to `windmove-modifiers'."
+  :type windmove-modifier-type
+  :require 'windmove
+  :initialize #'custom-initialize-changed
+  :set (lambda (sym val)
+         (windmove-swap-states-default-keybindings val)
+         (set-default sym val)))
+
 
 (provide 'windmove)
 
-- 
2.20.1


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at 41438 <at> debbugs.gnu.org:


Received: (at 41438) by debbugs.gnu.org; 21 May 2020 22:33:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 21 18:33:44 2020
Received: from localhost ([127.0.0.1]:57491 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jbtl2-0000r6-2n
	for submit <at> debbugs.gnu.org; Thu, 21 May 2020 18:33:44 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:59629)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1jbtkw-0000qp-LZ
 for 41438 <at> debbugs.gnu.org; Thu, 21 May 2020 18:33:43 -0400
Received: from mail.gandi.net (m91-129-97-200.cust.tele2.ee [91.129.97.200])
 (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 7EC1810000B;
 Thu, 21 May 2020 22:33:30 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: "Philip K." <philip@HIDDEN>
Subject: Re: bug#41438: [PATCH] Allow windmove keys to be bound without
 prefix or modifiers
Organization: LINKOV.NET
References: <87imgpw7k3.fsf@HIDDEN>
Date: Fri, 22 May 2020 01:18:18 +0300
In-Reply-To: <87imgpw7k3.fsf@HIDDEN> (Philip K.'s message of "Thu, 21
 May 2020 18:56:28 +0200")
Message-ID: <874ks9rkyd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41438
Cc: 41438 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> 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).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 May 2020 16:56:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 21 12:56:39 2020
Received: from localhost ([127.0.0.1]:57197 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jboUo-0001Jg-Qz
	for submit <at> debbugs.gnu.org; Thu, 21 May 2020 12:56:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:55240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1jboUm-0001JW-8j
 for submit <at> debbugs.gnu.org; Thu, 21 May 2020 12:56:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51372)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philip@HIDDEN>)
 id 1jboUl-0004JG-V7
 for bug-gnu-emacs@HIDDEN; Thu, 21 May 2020 12:56:35 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56563)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <philip@HIDDEN>)
 id 1jboUk-0000fp-Ge
 for bug-gnu-emacs@HIDDEN; Thu, 21 May 2020 12:56:35 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 751DD5C00CF
 for <bug-gnu-emacs@HIDDEN>; Thu, 21 May 2020 12:56:31 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Thu, 21 May 2020 12:56:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h=
 from:to:subject:date:message-id:mime-version:content-type; s=
 fm3; bh=PVLf6bMw+JHyYWBTf+i+v1QmcSjq0lCCx42Sv/+4+AI=; b=DpjJBDV7
 /IIJYC1cjJdReeMeLl7ndd2n06vZ8wTCufcHZnDTRqh+kM+zJYPyyFNxlsk1z/NB
 4ckyzmGtJuqyXaEXhss8+JfKfVBQcNvwfWUU+yglaNWqazK6VDT1ahqfiJ2WwsH1
 y4UTYDgzWe+YgRK29EerptjIsb+0FERiM1fTc/tij2QUkbtEhjzU3E5SZ7yzs4gO
 rRkKJ0Mhy3pYnl+upNfRTS9iLPi2VKFbu5PTJrsnTHD9nhSotzeuiPDXqD/4Djnt
 EnXuAEcEFdw8HfysWHC9XQx5iOq0/qlvevHo4bmy8i0fNjnyhHmpefFmVaqQa3tW
 lVkCdYlkpZoGig==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=PVLf6bMw+JHyYWBTf+i+v1QmcSjq0
 lCCx42Sv/+4+AI=; b=SUApJhwDsVu6VNKK3unP6dqT107M4QGKPU7JXTCeHNrLU
 qhZPuVLk6Z36HY9DQyllhgCDXBuLTtNI6R/yd+ArjTkCmPM3bW4I3lm04Ugl8Dp1
 TFNNBoDpot/AsLzIDToYegs5+gWwM9O/b4r2BzpsBkZuobcC0hScg1J+l/zceKEz
 7tXfKKoV2yWp0sTINV2q5J33A83ACe9q3/249I0WlAuy2PNxKLUBVuZj3SwBJosW
 4uEg/nlIAinfwVJGrKLHbmjfy7lzZ8IUrx1PzcNN7+I+rgft5jHOhcdRooPmrdjU
 ZvG7yBVKLBqCMYueWk1weo9P45V7keHHNhBVmLIpQ==
X-ME-Sender: <xms:v7LGXvVFK-QsBQ7MNiJqYMnwzeeFoWKXlvQXULidQhan-6Va7TTVVg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduuddguddtudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesmhdtreertd
 dttdenucfhrhhomhepfdfrhhhilhhiphcumfdrfdcuoehphhhilhhiphesfigrrhhpmhgr
 ihhlrdhnvghtqeenucggtffrrghtthgvrhhnpefgtdduhfdtleetjeeihedtkeejgfejgf
 fftdetkeeftddvtefghfejvdeltdejfeenucfkphepjeelrddvudelrdduleelrdegjeen
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilh
 hiphesfigrrhhpmhgrihhlrdhnvght
X-ME-Proxy: <xmx:v7LGXnkDGUNZOwfTLCIbqaFCtvkSxGzKKasVJ_UD7D1rJ3Mx23eWoQ>
 <xmx:v7LGXraIsSO9Jbr0QdF5rvOfPbbtTwOOvM3FDeF0pQVriBVPr9YOTQ>
 <xmx:v7LGXqUlFtQEW7DQm9AnLQyTL6ZnuEmvfUreumHwLm_rKcoNP6XjPA>
 <xmx:v7LGXrll-YMqzxBFB8nRMVSyJa_OiMRIB30rQBSVEwzIjopCIcptGQ>
Received: from localhost (p4fdbc72f.dip0.t-ipconnect.de [79.219.199.47])
 by mail.messagingengine.com (Postfix) with ESMTPA id DC4E73066491
 for <bug-gnu-emacs@HIDDEN>; Thu, 21 May 2020 12:56:30 -0400 (EDT)
From: "Philip K." <philip@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Allow windmove keys to be bound without prefix or modifiers
Date: Thu, 21 May 2020 18:56:28 +0200
Message-ID: <87imgpw7k3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=66.111.4.25; envelope-from=philip@HIDDEN;
 helo=out1-smtp.messagingengine.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/21 12:56:31
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--=-=-=
Content-Type: text/plain


Hi,

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.

--

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.

-- 
	Philip K.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Allow-windmove-keys-to-be-bound-without-prefix-or-mo.patch

From 0fb951817fc11983498052f2a4fdb8815bc89b92 Mon Sep 17 00:00:00 2001
From: Philip K <philip@HIDDEN>
Date: Thu, 21 May 2020 18:44:10 +0200
Subject: [PATCH] Allow windmove keys to be bound without prefix or modifiers

---
 lisp/windmove.el | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/lisp/windmove.el b/lisp/windmove.el
index f96383197b..3d7f86b9af 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -431,9 +431,12 @@ windmove-default-keybindings
   "Set up keybindings for `windmove'.
 Keybindings are of the form MODIFIERS-{left,right,up,down},
 where MODIFIERS is either a list of modifiers or a single modifier.
+If MODIFIERS is `none', the keybindings will be directly bound to
+the arrow keys.
 Default value of MODIFIERS is `shift'."
   (interactive)
   (unless modifiers (setq modifiers 'shift))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-left)
   (global-set-key (vector (append modifiers '(right))) 'windmove-right)
@@ -568,9 +571,12 @@ windmove-display-default-keybindings
 Keys are bound to commands that display the next buffer in the specified
 direction.  Keybindings are of the form MODIFIERS-{left,right,up,down},
 where MODIFIERS is either a list of modifiers or a single modifier.
+If MODIFIERS is `none', the keybindings will be directly bound to
+the arrow keys.
 Default value of MODIFIERS is `shift-meta'."
   (interactive)
   (unless modifiers (setq modifiers '(shift meta)))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-display-left)
   (global-set-key (vector (append modifiers '(right))) 'windmove-display-right)
@@ -640,11 +646,16 @@ windmove-delete-default-keybindings
 Keys are bound to commands that delete windows in the specified
 direction.  Keybindings are of the form PREFIX MODIFIERS-{left,right,up,down},
 where PREFIX is a prefix key and MODIFIERS is either a list of modifiers or
-a single modifier.  Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
+a single modifier.
+If PREFIX is `none', no prefix is used. If MODIFIERS is `none', the keybindings
+are directly bound to the arrow keys.
+Default value of PREFIX is `C-x' and MODIFIERS is `shift'."
   (interactive)
   (unless prefix (setq prefix '(?\C-x)))
+  (when (eq prefix 'none) (setq prefix nil))
   (unless (listp prefix) (setq prefix (list prefix)))
   (unless modifiers (setq modifiers '(shift)))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector prefix (append modifiers '(left)))  'windmove-delete-left)
   (global-set-key (vector prefix (append modifiers '(right))) 'windmove-delete-right)
@@ -695,9 +706,13 @@ windmove-swap-states-default-keybindings
 Keys are bound to commands that swap the states of the selected window
 with the window in the specified direction.  Keybindings are of the form
 MODIFIERS-{left,right,up,down}, where MODIFIERS is either a list of modifiers
-or a single modifier.  Default value of MODIFIERS is `shift-super'."
+or a single modifier.
+If MODIFIERS is `none', the keybindings will be directly bound to the
+arrow keys.
+Default value of MODIFIERS is `shift-super'."
   (interactive)
   (unless modifiers (setq modifiers '(shift super)))
+  (when (eq modifiers 'none) (setq modifiers nil))
   (unless (listp modifiers) (setq modifiers (list modifiers)))
   (global-set-key (vector (append modifiers '(left)))  'windmove-swap-states-left)
   (global-set-key (vector (append modifiers '(right))) 'windmove-swap-states-right)
-- 
2.20.1


--=-=-=--




Acknowledgement sent to "Philip K." <philip@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#41438; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 7 Aug 2020 11:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.