GNU bug report logs - #52363
Disallow modes from re-arranging windows if the user specified a window layout

Previous Next

Package: emacs;

Reported by: Brian Mingus <reflection <at> gmail.com>

Date: Tue, 7 Dec 2021 22:18:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 52363 AT debbugs.gnu.org.

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#52363; Package emacs. (Tue, 07 Dec 2021 22:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian Mingus <reflection <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 07 Dec 2021 22:18:02 GMT) Full text and rfc822 format available.

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

From: Brian Mingus <reflection <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Disallow modes from re-arranging windows if the user specified a
 window layout
Date: Tue, 7 Dec 2021 11:56:46 -0700
[Message part 1 (text/plain, inline)]
A variety of modes including python-mode.el will re-arrange the user's
window layout when certain commands are issued.

For example, in python-mode.el, if the user has used Ctrl-x 3 to create a
horizontal split with the code on the left, when the user issues Ctrl-c !
to create a REPL, python-mode.el will re-arrange the windows to have a
vertical split.

Propose to nerf this behavior in the case that the user has manually
re-arranged their windows, unless the mode sets a special flag indicating
they are a special mode that only helps the user manage windows. This
shouldn't break many modes,  as the mode would need to work contingent on
the user's window layout. Nearly all modes would continue to work based on
the existence of their buffers.

Thus, if the user has entered Ctrl-x 1|2|3 at any time, modes would not be
allowed to automatically re-arrange the windows.

This behavior works as expected for most use cases. For example, a user
using Ctrl-x 2|3 to create a window before running M-x shell with the focus
in that window, will only observe expected behavior.

There are special modes for this such as shackle, and several others.
However, providing default behavior that makes sense to the user could
clear up a lot of confusion.

In the case that a mode needs two windows, it is quite difficult for the
user to manage this. For example, you must use use set-window-dedicated-p
on all but two windows, so the new buffers will pop (basically randomly) in
either of the two available slots (if two are available).

In the case that a mode needs two slots and intends to create them if not
available, the special flag indicating that this is a mode that helps the
user manage more complex window layouts could be set for that mode
automatically on recognition of that behavior, as the mode can be
considered as providing an IDE for the user.

As an initial first step for this feature, if the user has either a
horizontal split or a vertical split, no mode without the special flag
should be allowed to switch it the other way around.

Sincerely,

Brian
[Message part 2 (text/html, inline)]

Severity set to 'wishlist' from 'normal' Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 10 Dec 2021 12:19:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 190 days ago.

Previous Next


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