GNU bug report logs - #56767
New commands to split frame

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Mon, 25 Jul 2022 19:52:02 UTC

Severity: wishlist

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56767 in the body.
You can then email your comments to 56767 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56767; Package emacs. (Mon, 25 Jul 2022 19:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 25 Jul 2022 19:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: New commands to split frame
Date: Mon, 25 Jul 2022 22:32:27 +0300
Since we already have the commands to split the current window,
shouldn't we also have the commands to split the current frame:

```
diff --git a/lisp/window.el b/lisp/window.el
index 4d88ffa903..86dec25cdf 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5754,6 +5754,17 @@ split-window-right
     new-window))
 
 (defalias 'split-window-horizontally 'split-window-right)
+
+(defun split-frame-vertically (&optional size)
+  "Like `split-window-vertically' but splits frame instead of window."
+  (interactive "P")
+  (split-window (frame-root-window) size))
+
+(defun split-frame-horizontally (&optional size)
+  "Like `split-window-horizontally' but splits frame instead of window."
+  (interactive "P")
+  (split-window (frame-root-window) size t))
+
 
 ;;; Balancing windows.
 
```




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56767; Package emacs. (Tue, 26 Jul 2022 12:42:02 GMT) Full text and rfc822 format available.

Message #8 received at 56767 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 56767 <at> debbugs.gnu.org
Subject: Re: bug#56767: New commands to split frame
Date: Tue, 26 Jul 2022 14:41:48 +0200
Juri Linkov <juri <at> linkov.net> writes:

> Since we already have the commands to split the current window,
> shouldn't we also have the commands to split the current frame:
>
> ```
> diff --git a/lisp/window.el b/lisp/window.el
> index 4d88ffa903..86dec25cdf 100644
> --- a/lisp/window.el
> +++ b/lisp/window.el
> @@ -5754,6 +5754,17 @@ split-window-right
>      new-window))
>
>  (defalias 'split-window-horizontally 'split-window-right)
> +
> +(defun split-frame-vertically (&optional size)
> +  "Like `split-window-vertically' but splits frame instead of window."
> +  (interactive "P")
> +  (split-window (frame-root-window) size))
> +
> +(defun split-frame-horizontally (&optional size)
> +  "Like `split-window-horizontally' but splits frame instead of window."
> +  (interactive "P")
> +  (split-window (frame-root-window) size t))

I don't think I understand what this is supposed to do.  When testing
it, it just splits the topmost window (no matter what window is
selected), and I don't undertand why anybody would want that in
particular.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56767; Package emacs. (Tue, 26 Jul 2022 12:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 56767 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56767 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#56767: New commands to split frame
Date: Tue, 26 Jul 2022 18:21:24 +0530
[செவ்வாய் ஜூலை 26, 2022] Lars Ingebrigtsen wrote:

> I don't think I understand what this is supposed to do.  When testing
> it, it just splits the topmost window (no matter what window is
> selected), and I don't undertand why anybody would want that in
> particular.

If the window configuration is like the following,

+-----------------------------------------------------------------+
|                                                                 |
|                          A                                      |
|                                                                 |
|                                                                 |
|                                                                 |
|                                                                 |
+-----------------------------------------------------------------+
|                                                                 |
|                                                                 |
|                           B                                     |
|                                                                 |
|                                                                 |
|                                                                 |
+-----------------------------------------------------------------+

and you say M-x split-frame-horizontally, then you get

+--------------------------------+--------------------------------+
|                                |                                |
|                                |                                |
|                A               |                                |
|                                |                                |
|                                |                                |
+--------------------------------+                                |
|                                |               C                |
|                                |                                |
|                                |                                |
|                B               |                                |
|                                |                                |
|                                |                                |
|                                |                                |
+--------------------------------+--------------------------------+




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56767; Package emacs. (Tue, 26 Jul 2022 17:02:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pankaj Jangid <pankaj <at> codeisgreat.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#56767: New commands to split frame
Date: Tue, 26 Jul 2022 22:30:53 +0530
Juri Linkov <juri <at> linkov.net> writes:

> Since we already have the commands to split the current window,
> shouldn't we also have the commands to split the current frame:
>
and may be you would like to add aliases, just like

split-window-horizontally -> split-window-right,
split-window-vertically -> split-window-below





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56767; Package emacs. (Wed, 27 Jul 2022 07:50:02 GMT) Full text and rfc822 format available.

Message #17 received at 56767 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Pankaj Jangid <pankaj <at> codeisgreat.org>
Cc: 56767 <at> debbugs.gnu.org
Subject: Re: bug#56767: New commands to split frame
Date: Wed, 27 Jul 2022 10:42:37 +0300
>> Since we already have the commands to split the current window,
>> shouldn't we also have the commands to split the current frame:
>
> and may be you would like to add aliases, just like
>
> split-window-horizontally -> split-window-right,
> split-window-vertically -> split-window-below

The word "below" is not quite correct because
display-buffer-below-selected uses positioning
relative to the current window.  Whereas the
corresponding function the uses the absolute
positioning contains the word "bottom" in its name:
display-buffer-at-bottom.

So the right alias would be split-frame-at-bottom.

Also display-buffer-in-direction supports the word
"rightmost", so its counterpart alias would be
split-frame-at-rightmost.

Then why not add also split-frame-at-leftmost
and split-frame-at-top?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56767; Package emacs. (Wed, 27 Jul 2022 09:54:02 GMT) Full text and rfc822 format available.

Message #20 received at 56767 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: 56767 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#56767: New commands to split frame
Date: Wed, 27 Jul 2022 11:53:03 +0200
Visuwesh <visuweshm <at> gmail.com> writes:

> and you say M-x split-frame-horizontally, then you get
>
> +--------------------------------+--------------------------------+
> |                                |                                |
> |                                |                                |
> |                A               |                                |
> |                                |                                |
> |                                |                                |
> +--------------------------------+                                |
> |                                |               C                |
> |                                |                                |
> |                                |                                |
> |                B               |                                |
> |                                |                                |
> |                                |                                |
> |                                |                                |
> +--------------------------------+--------------------------------+

Oh, I see.  Yes, then I think Juri's new commands look useful.





Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 04 Aug 2022 13:59:08 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56767; Package emacs. (Mon, 05 Sep 2022 18:57:01 GMT) Full text and rfc822 format available.

Message #25 received at 56767 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: 56767 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#56767: New commands to split frame
Date: Mon, 05 Sep 2022 20:56:43 +0200
I applied the patch series from bug#56791 instead, since they do the
same.




bug marked as fixed in version 29.1, send any further explanations to 56767 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 05 Sep 2022 18:57:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Oct 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 203 days ago.

Previous Next


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