bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56791: [PATCH] Add window arg to splitting commands, new commands to


From: Hugo Heagren
Subject: bug#56791: [PATCH] Add window arg to splitting commands, new commands to split root window
Date: Wed, 27 Jul 2022 08:58:53 +0100

Some proposed new commands and relevant bindings.

Motivation: sometimes, I have a complex window setup, and I want a
large new window to work in for a while, taking up a high proportion
of the frame. The currently-available interactive commands for
splitting windows only operate on the the selected window. For
example, I might have a frame with windows like this:

,----
| +---------------------+
| |                     |
| |         a           |
| |                     |
| +---------------------+
| |                     |
| |         b           |
| |                     |
| +---------------------+
`----

And want to have this:

#+END_EXAMPLE
+---------+-----------+
|         |           |
|   a     |           |
|         |           |
+---------+     c     |
|         |           |
|   b     |           |
|         |           |
+---------+-----------+
#+END_EXAMPLE

So, I have implemented:
- a new optional argument on `split-window-right' and
  `split-window-below' specifying /which/ window is to be split. This
  defaults to the selected window. It also has no effect on the
  interactive use of these functions, since the prefix argument is
  still used for the SIZE arg.
- new commands (implemented using this arg) which split the root window.
- bound these commands to `C-x 7' and `C-x 9'. This seemed
  appropriate, considering that these numbers were free, but the other
  window-splitting commands are bound to numbers in that map.
- (hopefully?) appropriate documentation changes

Patches are attached. I don't know if Emacs has conventions for how
large commits should be---mine are very atomic. Hope that works, but I
could squash them down further and combine the messages if necessary.

I haven't edited the NEWS file yet. I wanted to see what the devs
think of this and make any necessary changes before doing that.

I haven't contributed to the Emacs core before, but I have assigned
copyright to the FSF. Certificate attached as well. 

Thanks

Hugo

Attachment: FSF-assignment.pdf
Description: Adobe PDF document

Attachment: 0003-split-window-right-Add-WINDOW-TO-SPLIT-argument.patch
Description: Text Data

Attachment: 0001-split-window-below-Add-WINDOW-TO-SPLIT-argument.patch
Description: Text Data

Attachment: 0006-Bind-split-root-window-right-to-C-x-9.patch
Description: Text Data

Attachment: 0005-Bind-split-root-window-below-to-C-x-7.patch
Description: Text Data

Attachment: 0004-split-root-window-right-New-function.patch
Description: Text Data

Attachment: 0002-split-root-window-below-New-function.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]