From: Daniel Colascione <dancol@dancol.org>
To: Philip Kaludercic <philipk@posteo.net>
Cc: Stefan Kangas <stefankangas@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: Proposal: new default bindings for winner and windmove
Date: Tue, 02 Jul 2024 07:46:41 -0400 [thread overview]
Message-ID: <FD4D4CF9-80CC-43FF-ACA0-545D2FE42B7B@dancol.org> (raw)
In-Reply-To: <87wmm45l03.fsf@posteo.net>
On July 2, 2024 3:08:28 AM EDT, Philip Kaludercic <philipk@posteo.net> wrote:
>Daniel Colascione <dancol@dancol.org> writes:
>
>> Stefan Kangas <stefankangas@gmail.com> writes:
>>> Thus, I don't think I see any compelling reason not to go ahead with
>>> this change. I would propose that we now start discussing the specifics
>>> of how to go about doing that (patches, proposed alternative solutions).
>>
>> How's this?
>>
>> commit 0af9a3225fe0d8771772ee510abd122d2881b211
>> Author: Daniel Colascione <dancol@dancol.org>
>> Date: Mon Jul 1 19:17:10 2024 -0400
>>
>> Directional bindings for windmove
>>
>> * doc/emacs/windows.texi (Other Window): Describe new
>> directional bindings.
>>
>> * etc/tutorials/TUTORIAL: Describe new directional bindings.
>>
>> * lisp/windmove.el: Bind C-x 4 followed by an arrow key to the
>> corresponding windmove commands.
>>
>> diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
>> index 5ad6850fed9..581f74833d3 100644
>> --- a/doc/emacs/windows.texi
>> +++ b/doc/emacs/windows.texi
>> @@ -185,6 +185,27 @@ Other Window
>> back and finish supplying the minibuffer argument that is requested.
>> @xref{Minibuffer Edit}.
>>
>> +@kindex C-x 4 LEFT
>> +@kindex C-x 4 RIGHT
>> +@kindex C-x 4 UP
>> +@kindex C-x 4 DOWN
>> +
>> +Using the keyboard, you can switch windows directionally by typing
>> +@kbd{C-x 4} followed by an arrow key. Emacs determines the direction of
>> +movement using the geometry of windows on the screen rather than history
>> +of recently-selected windows, so these commands may often by less
>> +surprising than @kbd{C-x o} above.
>> +
>> +@kindex C-x 4 S-LEFT
>> +@kindex C-x 4 S-RIGHT
>> +@kindex C-x 4 S-UP
>> +@kindex C-x 4 S-DOWN
>> +
>> +These commands are like the other directional movement commands, except
>> +that Emacs, instead of moving point to the window in the desired
>> +direction, moves the whole buffer state, as if taking the current buffer
>> +and moving it to the desired window.
>> +
>> @findex next-window-any-frame
>> The @code{other-window} command will normally only switch to the next
>> window in the current frame (unless otherwise configured). If you
>> diff --git a/etc/tutorials/TUTORIAL b/etc/tutorials/TUTORIAL
>> index 4718e0d9430..daba3e4615f 100644
>> --- a/etc/tutorials/TUTORIAL
>> +++ b/etc/tutorials/TUTORIAL
>> @@ -907,6 +907,11 @@ cursor which blinks when you are not typing. The other windows have
>> their own cursor positions; if you are running Emacs in a graphical
>> display, those cursors are drawn as unblinking hollow boxes.
>>
>> +You can also use arrow keys prefixed by C-x 4 to move
>> +between windows directionally.
>> +
>> +>> Type C-x 4 <up> to move to the window above the current one.
>> +
>> The command C-M-v is very useful when you are editing text in one
>> window and using the other window just for reference. Without leaving
>> the selected window, you can scroll the text in the other window with
>> diff --git a/lisp/windmove.el b/lisp/windmove.el
>> index b4e77102abd..db3b52393bf 100644
>> --- a/lisp/windmove.el
>> +++ b/lisp/windmove.el
>> @@ -854,6 +854,23 @@ windmove-swap-states-default-keybindings
>> :type windmove--default-keybindings-type
>> :version "28.1")
>>
>> +;;;###autoload
>> +(define-key ctl-x-4-map [left] 'windmove-left)
>> +;;;###autoload
>> +(define-key ctl-x-4-map [right] 'windmove-right)
>> +;;;###autoload
>> +(define-key ctl-x-4-map [up] 'windmove-up)
>> +;;;###autoload
>> +(define-key ctl-x-4-map [down] 'windmove-down)
>
>You could use
>
> (setopt windmove-default-keybindings (list (kbd "C-x 4"))),
>
>which would allow for the bindings to be disabled more easily.
They're global keybindings. If you don't want these keys bound to these commands, bind them to something else. There's no case for "disabling" them.
>
>> +;;;###autoload
>> +(define-key ctl-x-4-map [(shift left)] 'windmove-swap-states-left)
>> +;;;###autoload
>> +(define-key ctl-x-4-map [(shift right)] 'windmove-swap-states-right)
>> +;;;###autoload
>> +(define-key ctl-x-4-map [(shift up)] 'windmove-swap-states-up)
>> +;;;###autoload
>> +(define-key ctl-x-4-map [(shift down)] 'windmove-swap-states-down)
>> +
>> \f>
>> (provide 'windmove)
>>
>>
>>
>
next prev parent reply other threads:[~2024-07-02 11:46 UTC|newest]
Thread overview: 249+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-21 19:10 Proposal: new default bindings for winner and windmove Daniel Colascione
2021-08-21 19:23 ` Eli Zaretskii
2021-08-21 19:27 ` Daniel Colascione
2021-08-21 19:36 ` Eli Zaretskii
2021-08-22 8:35 ` Juri Linkov
2021-08-21 19:42 ` Clément Pit-Claudel
2021-08-25 13:12 ` Kaushal Modi
2021-08-21 20:20 ` Arthur Miller
2021-08-22 6:02 ` Eli Zaretskii
2021-08-22 8:32 ` Arthur Miller
2021-08-22 13:43 ` [External] : " Drew Adams
2021-08-22 0:43 ` Phil Sainty
2021-08-22 5:13 ` Teemu Likonen
2021-08-22 9:22 ` Teemu Likonen
2021-08-21 19:26 ` Arthur Miller
2021-08-22 8:37 ` Juri Linkov
2021-08-22 14:05 ` Arthur Miller
2021-08-22 19:16 ` Daniel Colascione
2021-08-22 17:52 ` Stefan Monnier
2021-08-22 22:01 ` Lars Ingebrigtsen
2021-08-23 5:16 ` Bozhidar Batsov
2021-08-24 21:33 ` Stefan Monnier
2021-08-25 3:42 ` Richard Stallman
2024-06-21 19:03 ` Stefan Monnier
2024-06-21 20:39 ` Stefan Kangas
2024-06-23 10:05 ` Alan Mackenzie
2024-06-23 11:14 ` Daniel Colascione
2024-06-23 12:05 ` Alan Mackenzie
2024-06-23 12:30 ` Stefan Kangas
2024-06-23 13:29 ` Alan Mackenzie
2024-06-23 13:34 ` Daniel Colascione
2024-06-23 13:45 ` Eli Zaretskii
2024-06-23 20:55 ` chad
2024-06-23 16:32 ` [External] : " Drew Adams
2024-06-23 12:57 ` Daniel Colascione
2024-06-23 13:40 ` Po Lu
2024-06-23 13:45 ` Daniel Colascione
2024-06-23 14:15 ` Po Lu
2024-06-23 14:22 ` Eli Zaretskii
2024-06-24 7:41 ` Gregor Zattler
2024-06-24 12:13 ` Daniel Colascione
2024-06-24 12:41 ` Eli Zaretskii
2024-06-24 15:09 ` Gregor Zattler
2024-06-24 15:36 ` Eli Zaretskii
2024-06-25 1:41 ` Joel Reicher
2024-06-24 15:57 ` Petteri Hintsanen
2024-06-25 21:26 ` Jeremy Bryant
2024-06-26 11:23 ` Eli Zaretskii
2024-06-26 11:44 ` Daniel Colascione
2024-06-26 13:19 ` Eli Zaretskii
2024-06-26 13:57 ` Daniel Colascione
2024-06-26 15:38 ` Eli Zaretskii
2024-06-26 15:49 ` Daniel Colascione
2024-06-28 19:47 ` Hovav Shacham
2024-06-28 20:45 ` [External] : " Drew Adams
2024-06-29 7:02 ` Eli Zaretskii
2024-07-01 1:58 ` Stefan Kangas
2024-06-26 13:22 ` Alan Mackenzie
2024-06-26 13:51 ` Daniel Colascione
2024-06-26 14:13 ` Po Lu
2024-06-26 14:21 ` Daniel Colascione
2024-06-26 15:15 ` Po Lu
2024-06-26 15:27 ` Alan Mackenzie
2024-06-26 15:42 ` Colin Baxter
2024-06-26 16:00 ` Eli Zaretskii
2024-06-26 14:41 ` Joel Reicher
2024-06-26 15:43 ` Eli Zaretskii
2024-06-26 14:49 ` Alan Mackenzie
2024-06-26 17:02 ` [External] : " Drew Adams
2024-06-26 14:27 ` Stefan Monnier
2024-06-26 15:14 ` Alan Mackenzie
2024-06-26 13:53 ` Po Lu
2024-06-26 14:18 ` Daniel Colascione
2024-06-26 14:48 ` Po Lu
2024-06-26 14:27 ` Stefan Monnier
2024-06-26 14:51 ` Po Lu
2024-06-26 15:01 ` Alan Mackenzie
2024-06-27 15:35 ` Augusto Stoffel
2024-06-26 17:02 ` [External] : " Drew Adams
2024-07-02 6:28 ` Visuwesh
2024-06-23 14:28 ` Daniel Colascione
2024-06-23 14:37 ` Po Lu
2024-06-23 14:45 ` Daniel Colascione
2024-06-24 10:35 ` Joel Reicher
2024-06-23 16:32 ` [External] : " Drew Adams
2024-06-23 13:48 ` Daniel Colascione
2024-06-23 14:14 ` Telemetry, opt-in,opt-out [was: Proposal: new default bindings for winner and windmove] tomas
2024-06-23 14:18 ` Daniel Colascione
2024-06-23 15:23 ` Stefan Kangas
2024-06-23 15:34 ` tomas
2024-06-23 19:46 ` Stefan Monnier
2024-06-23 21:12 ` [External] : " Drew Adams
2024-06-25 14:28 ` [External] : Re: Telemetry, opt-in, opt-out " Madhu
2024-06-25 17:19 ` Drew Adams
2024-06-25 23:03 ` Dr. Arne Babenhauserheide via Emacs development discussions.
2024-06-28 4:02 ` Richard Stallman
2024-06-28 5:28 ` Telemetry, opt-in,opt-out " Ihor Radchenko
2024-06-28 6:33 ` tomas
2024-06-23 14:25 ` Proposal: new default bindings for winner and windmove Po Lu
2024-06-23 14:38 ` Daniel Colascione
2024-06-23 15:24 ` Stefan Kangas
2024-06-23 15:36 ` Eli Zaretskii
2024-06-23 16:32 ` [External] : " Drew Adams
2024-06-23 19:10 ` Gregor Zattler
2024-06-23 13:59 ` Alan Mackenzie
2024-06-23 14:06 ` Daniel Colascione
2024-06-23 16:32 ` [External] : " Drew Adams
2024-06-23 18:44 ` Eli Zaretskii
2024-06-23 18:51 ` Daniel Colascione
2024-06-23 19:26 ` Eli Zaretskii
2024-06-23 19:34 ` Eli Zaretskii
2024-06-23 19:55 ` Stefan Monnier
2024-06-23 21:12 ` [External] : " Drew Adams
2024-06-23 20:07 ` Dmitry Gutov
2024-06-23 21:12 ` [External] : " Drew Adams
2024-06-23 21:09 ` Drew Adams
2024-06-23 19:52 ` Stefan Monnier
2024-06-23 20:07 ` Dmitry Gutov
2024-06-23 20:23 ` Stefan Kangas
2024-06-23 21:12 ` [External] : " Drew Adams
2024-06-24 2:28 ` Eli Zaretskii
2024-06-24 10:41 ` Dmitry Gutov
2024-06-24 11:45 ` Po Lu
2024-06-25 2:26 ` Eli Zaretskii
2024-06-24 3:29 ` Philip Kaludercic
2024-06-24 4:23 ` [External] : " Drew Adams
2024-06-24 7:18 ` Philip Kaludercic
2024-06-24 14:46 ` Drew Adams
2024-06-24 6:32 ` Juri Linkov
2024-06-26 15:48 ` Stefan Monnier
2024-06-26 20:38 ` Alan Mackenzie
2024-06-27 5:16 ` Attitude (was: Proposal: new default bindings for winner and windmove) Eli Zaretskii
2024-06-27 12:19 ` Alan Mackenzie
2024-07-01 1:29 ` Proposal: new default bindings for winner and windmove Stefan Kangas
2024-07-01 10:07 ` Alan Mackenzie
2024-07-01 10:47 ` Po Lu
2024-07-01 11:12 ` Dmitry Gutov
2024-07-01 13:20 ` Po Lu
2024-07-01 18:21 ` Dmitry Gutov
2024-07-02 0:52 ` Po Lu
2024-07-01 11:25 ` Dmitry Gutov
2024-07-01 13:28 ` Po Lu
2024-07-01 13:34 ` Eli Zaretskii
2024-07-01 19:05 ` Dmitry Gutov
2024-07-01 21:24 ` Alan Mackenzie
2024-07-01 22:07 ` Daniel Colascione
2024-07-02 1:00 ` Po Lu
2024-07-02 3:26 ` C-o (was: Proposal: new default bindings for winner and windmove) Stefan Monnier
2024-07-02 4:34 ` C-o Po Lu
2024-07-02 5:59 ` C-o Gerd Möllmann
2024-07-02 6:23 ` C-o Visuwesh
2024-07-02 12:51 ` C-o Dmitry Gutov
2024-07-02 13:06 ` C-o Po Lu
2024-07-02 13:39 ` C-o Eli Zaretskii
2024-07-02 14:02 ` C-o Alfred M. Szmidt
2024-07-03 9:24 ` C-o Po Lu
2024-07-03 11:33 ` C-o Eli Zaretskii
2024-07-03 12:15 ` C-o Po Lu
2024-07-02 14:02 ` C-o T.V Raman
2024-07-02 15:36 ` C-o Alfred M. Szmidt
2024-07-02 22:27 ` C-o Michael Heerdegen via Emacs development discussions.
2024-07-02 22:31 ` C-o (was: Proposal: new default bindings for winner and windmove) Stefan Kangas
2024-07-02 22:44 ` C-o Jeremy Bryant
2024-07-03 10:07 ` C-o (was: Proposal: new default bindings for winner and windmove) Per Starbäck
2024-07-03 12:48 ` C-o Howard Melman
2024-07-03 16:24 ` C-o Yuri Khan
2024-07-03 16:32 ` C-o Howard Melman
2024-07-05 4:14 ` C-o Richard Stallman
2024-07-05 4:28 ` C-o Howard Melman
2024-07-03 19:13 ` C-o Bob Rogers
2024-07-02 7:28 ` Proposal: new default bindings for winner and windmove Philip Kaludercic
2024-07-02 11:41 ` Eli Zaretskii
2024-07-02 1:01 ` Dmitry Gutov
2024-07-02 1:51 ` [External] : " Drew Adams
2024-07-02 2:20 ` Dmitry Gutov
2024-07-02 3:47 ` Drew Adams
2024-07-02 22:41 ` Stefan Kangas
2024-07-02 1:47 ` [External] : " Drew Adams
[not found] ` <87h6d87op5.fsf@dancol.org>
2024-07-02 13:08 ` Alan Mackenzie
2024-07-01 14:43 ` [External] : " Drew Adams
2024-07-01 18:12 ` [External] : Re: Proposal: new default bindings for windmove. [Working minor mode] Alan Mackenzie
2024-07-01 18:18 ` Eli Zaretskii
2024-07-04 2:26 ` Proposal: new default bindings for winner and windmove Richard Stallman
2024-07-01 23:18 ` Daniel Colascione
2024-07-02 1:02 ` Po Lu via Emacs development discussions.
2024-07-02 2:03 ` Howard Melman
2024-07-02 12:21 ` Eli Zaretskii
2024-07-02 3:29 ` Stefan Monnier
2024-07-02 4:14 ` Po Lu
2024-07-02 13:04 ` Stefan Monnier
2024-07-02 13:36 ` Eli Zaretskii
2024-07-02 14:20 ` Stefan Monnier
2024-07-02 14:43 ` Eli Zaretskii
2024-07-02 12:18 ` Eli Zaretskii
2024-07-02 12:52 ` Daniel Colascione
2024-07-02 13:34 ` Eli Zaretskii
2024-07-02 13:53 ` Daniel Colascione
2024-07-02 14:15 ` Eli Zaretskii
2024-07-02 14:41 ` Daniel Colascione
2024-07-02 15:00 ` Eli Zaretskii
2024-07-02 22:28 ` Dmitry Gutov
2024-07-03 3:14 ` Hovav Shacham
2024-07-02 6:50 ` Juri Linkov
2024-07-02 8:07 ` Yuri Khan
2024-07-02 16:27 ` Juri Linkov
2024-07-02 11:50 ` Daniel Colascione
2024-07-02 16:32 ` Juri Linkov
2024-07-02 16:47 ` Daniel Colascione
2024-07-02 12:46 ` Eli Zaretskii
2024-07-02 13:31 ` Alfred M. Szmidt
2024-07-02 18:03 ` Dmitry Gutov
2024-07-02 18:07 ` Alfred M. Szmidt
2024-07-02 18:29 ` Eli Zaretskii
2024-07-02 18:30 ` Yuri Khan
2024-07-02 20:00 ` Dmitry Gutov
2024-07-02 21:15 ` [External] : " Drew Adams
2024-07-02 22:30 ` Drew Adams
2024-07-03 11:56 ` Yuri Khan
2024-07-03 13:53 ` Stefan Monnier
2024-07-03 14:14 ` Dmitry Gutov
2024-07-03 16:15 ` Yuri Khan
2024-07-03 16:26 ` Daniel Colascione
2024-07-03 22:12 ` John ff
2024-07-02 18:34 ` Alan Mackenzie
2024-07-02 19:08 ` [External] : " Drew Adams
2024-07-02 19:53 ` Dmitry Gutov
2024-07-02 20:12 ` Alan Mackenzie
2024-07-02 21:13 ` Daniel Colascione
2024-07-03 6:21 ` Juri Linkov
2024-07-02 21:54 ` Dmitry Gutov
2024-07-02 18:37 ` Juri Linkov
2024-07-02 20:03 ` Dmitry Gutov
2024-07-03 6:24 ` Juri Linkov
2024-07-03 13:48 ` Stefan Monnier
2024-07-03 6:56 ` Visuwesh
2024-07-02 7:08 ` Philip Kaludercic
2024-07-02 11:46 ` Daniel Colascione [this message]
2024-07-02 13:31 ` Alan Mackenzie
2024-07-02 13:52 ` Dmitry Gutov
2024-07-02 13:55 ` Daniel Colascione
2024-07-02 14:42 ` Alan Mackenzie
2024-07-02 15:36 ` Alfred M. Szmidt
2024-07-02 11:57 ` Eli Zaretskii
2024-07-02 23:20 ` Stefan Kangas
2024-07-03 1:19 ` Liu Hui
2024-06-23 6:59 ` Juri Linkov
2021-08-22 18:58 ` Dmitry Gutov
-- strict thread matches above, loose matches on Subject: below --
2021-08-22 7:37 Boruch Baum
2024-07-02 16:36 Pedro Andres Aranda Gutierrez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FD4D4CF9-80CC-43FF-ACA0-545D2FE42B7B@dancol.org \
--to=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=philipk@posteo.net \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).