GNU bug report logs - #32790
27.0.50; point jumps unexpectedly after delete-window

Previous Next

Package: emacs;

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

Date: Thu, 20 Sep 2018 23:57:01 UTC

Severity: minor

Found in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 32790 <at> debbugs.gnu.org
Subject: bug#32790: 27.0.50; point jumps unexpectedly after delete-window
Date: Tue, 25 Sep 2018 22:28:06 +0300
>> The problem is that the cursor jumps to the distant part of the frame
>> too far from the current focus.  It takes additional efforts to bring
>> it back where the input focus was.  It's more about visual perception.
>
> But then we have to care about the position of each window's point as
> well.  Consider the case of a vertical combination of three windows
> with all windows' points at their top.  Deleting the middle window
> should then probably select the lower window.  With all points at
> their windows' bottoms we probably should select the upper window.

A good analogy is what other tabbed UI like web browsers do
on tab closing.  For example, Firefox add-on Tab Mix Plus

http://www.tabmixplus.org/support/viewtopic.php?t=3

provides an option with such values

  When closing the current tab, focus (select one):

  - First tab
  - Left tab
  - Right tab
  - Last tab
  - Last selected tab
  - Opener/Right tab (the tab containing the link that opened this tab or the tab to the right)
  - Last opened tab

The current Emacs behavior that selects the most recently used window
corresponds to "Last selected tab".  "Last opened tab" could correspond
to the most recently displayed window.  And "Left tab" could mean to
select the left sibling.

>> It seems the logic of deciding to which sibling to give the space back
>> is fine now.  The need is to select the same window that got the space
>> after C-x 0.
>
> We can add an option for that.  How should we call it?

The name depends on possible values.

If the values are 'sibling, 'mru, and possibly a user-defined function,
then a suitable name could be say, after-delete-window-select, or if this
name looks like a hook name, then simply delete-window-select.




This bug report was last modified 5 years and 234 days ago.

Previous Next


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