From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Date: Thu, 27 Sep 2018 20:44:23 +0200 Message-ID: <5BAD2507.6040605@gmx.at> References: <87efdnsp2k.fsf@mail.linkov.net> <5BA490EA.4000502@gmx.at> <87bm8pxjcb.fsf@mail.linkov.net> <5BA74E75.8000405@gmx.at> <87zhw8nd8g.fsf@mail.linkov.net> <5BA8A143.9040604@gmx.at> <87sh1ybyo6.fsf@mail.linkov.net> <5BA9E390.8030506@gmx.at> <87pnx1h1op.fsf@mail.linkov.net> <5BAB489E.5090002@gmx.at> <87h8ibvrs2.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1538073787 20585 195.159.176.226 (27 Sep 2018 18:43:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Sep 2018 18:43:07 +0000 (UTC) Cc: 32790@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 27 20:43:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5bFd-0005Da-Sw for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Sep 2018 20:43:02 +0200 Original-Received: from localhost ([::1]:38750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5bHk-00028y-JK for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Sep 2018 14:45:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5bHe-00027m-DZ for bug-gnu-emacs@gnu.org; Thu, 27 Sep 2018 14:45:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5bHb-0005MV-33 for bug-gnu-emacs@gnu.org; Thu, 27 Sep 2018 14:45:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52638) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5bHa-0005MG-V4 for bug-gnu-emacs@gnu.org; Thu, 27 Sep 2018 14:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g5bHa-0008QH-MO for bug-gnu-emacs@gnu.org; Thu, 27 Sep 2018 14:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Sep 2018 18:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32790 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32790-submit@debbugs.gnu.org id=B32790.153807388432304 (code B ref 32790); Thu, 27 Sep 2018 18:45:02 +0000 Original-Received: (at 32790) by debbugs.gnu.org; 27 Sep 2018 18:44:44 +0000 Original-Received: from localhost ([127.0.0.1]:56896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5bHI-0008Oy-I6 for submit@debbugs.gnu.org; Thu, 27 Sep 2018 14:44:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:59039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5bHG-0008Oi-Cc for 32790@debbugs.gnu.org; Thu, 27 Sep 2018 14:44:42 -0400 Original-Received: from [192.168.1.100] ([46.125.249.105]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lh6sJ-1fRINq0Hxf-00oXVw; Thu, 27 Sep 2018 20:44:33 +0200 Original-Received: from [192.168.1.100] ([46.125.249.105]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lh6sJ-1fRINq0Hxf-00oXVw; Thu, 27 Sep 2018 20:44:33 +0200 In-Reply-To: <87h8ibvrs2.fsf@mail.linkov.net> X-Provags-ID: V03:K1:QZ6Kc1BxioInOT/nqaz+3pmtzf1cA+2hTpA69zc5GPOqoW8UQs0 mqbmXcuv+10g+VJ2E/LMaKGI4cEJuUPhtQxybIkK5iO8UvIGhcI8VBGdoz1Eng3EqvpdkQQ MPeWDkPbbiGVYt9wmRYnamz7/turMTBzumCi/LBfsarPXVoM5fu9lzL5LTjY8RZwDsjsW/a 6r3Dvk23vXHci4tOCzmWA== X-UI-Out-Filterresults: notjunk:1;V01:K0:e5tiqZN0lYw=:mmoGa/n3k+7EFFv+G36BJk hc2GyPcdPgDgYWXaO4ffqFtKDnEWEqQZabkhFKVSF1bw0ntcRPQZJLIFF9OuH0WQSOhCy+qyO XdcC1MN/rFGWQKIVZiPy19Wl3X61sMPzOHm9xmVnWYGPYPbbROyKrml3opkKFOdT1XQdhKC2l 7zimatBrYRNzBrxpDyVNtNQ5f7ajsnVq8tGwd4u8iUnVWAcHpU8nnTEh6OYESvSlrt1EbURrG 3BU15XO/OSevMJCu62ZRBPOBv9r5hy5nbBRJYhTt0sMLE3r/k//WQJW5UiUH/oSsgdO8YTHvt 3GBWz1rA2W+zjSJlyXb8G35Aru5fntXU9/J2oWmAthIWsIO5JwfpTEre7j6m1moo28mKK+f/R QFiWs90y036yAgnONfPUKmZaoPyeDx2eMO63bECfTacPC6FPs1/lghf6sC4C0pBc9O64tj0L6 dmo9loLbbny+KEH6cR8b4VIExyqU2VIvJWD8mt6oU8Bc+QQ34k4VsO+6ht+lgYlVs2SXzsGnA NNQPQ6dUQtdzVZmijRaMNiP20dETeFi79rotEHIBbKn7ZhQEMi/8tihvaQIlseoUS5ZXXvo/N iaXBkmU8twyRK072N6ZjlufxdWhDjAHMuBE+NSp00lueU8NcwMfdGIlil8PY3iIflkfk2to44 ze/8YiKN2FBd71dI9/O4Y8YZvGkAPOPgbPTZMEJEI22+LM647oGJ+8ayyvnLT+k4LB/zcRsOO gxe3AXG7tBYtTpuHuxebh6vYJdIAurQkg5jChmN5Syqtq0n5xNhICNXUyozyu+g45rNGeks2 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:150720 Archived-At: > I think we need exactly the same customization as we created for > compare-windows-get-window-function, but instead of finding a window to > compare, we need to find a window to select after deleting the > selected window. > > (defcustom compare-windows-get-window-function > 'compare-windows-get-recent-window > "Function that provides the window to compare with." > :type '(choice > (function-item :tag "Most recently used window" > compare-windows-get-recent-window) > (function-item :tag "Next window" > compare-windows-get-next-window) > (function :tag "Your function")) > :group 'compare-windows > :version "25.1") > > I suppose that for the option "Next window" the window next to the > deleted window is its sibling that will get its space after > deletion, right? Not usually. 'delete-window' prefers the left sibling because that's the classic way to work with windows: The new window appears on the right of or below the window split. Deleting the new window "returns" its space to the window on the left or above, if that exists. The "next window" of any window OTOH is preferably its right sibling, if that exists, or something "further down" in the window tree. So first of all we have to decide which window should get the space when we delete a window and make that customizable, if necessary. Note, however, that when an application or a user has bound the non-option 'window-combination-limit' to t, each window has only one sibling and there is nothing to customize - the space will be always returned to that sibling. OTOH, if 'window-combination-resize' is non-nil, the space is returned proportionally to all windows in the same combination and again there is nothing to customize. When that first issue has been settled, we can easily add to the option we talk about here a value that selects the window that has received the space of the deleted window - with the restrictions noted above. > Regarding the name, what about select-window-after-delete-function? If we make the value a function like compare-w.el does. Note in this context that we probably do not want to select a window on another frame (including iconified or invisible ones) so the functions compare-w provides are probably not very useful here. BTW I didn't even know about compare-w - its name is too obscure to associate it with windows. martin