From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#32790: 27.0.50; point jumps unexpectedly after delete-window Date: Tue, 25 Sep 2018 22:28:06 +0300 Organization: LINKOV.NET Message-ID: <87pnx1h1op.fsf@mail.linkov.net> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537904201 20140 195.159.176.226 (25 Sep 2018 19:36:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2018 19:36:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 32790@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 25 21:36:37 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 1g4t8P-00059r-BS for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 21:36:37 +0200 Original-Received: from localhost ([::1]:54973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4tAW-0007yJ-2Y for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2018 15:38:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4t9u-0007fi-UI for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4t9r-0006Qz-HL for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49785) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g4t9n-0006Mq-SI for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g4t9n-0000sA-PA for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2018 15:38:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Sep 2018 19:38:03 +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.15379042343250 (code B ref 32790); Tue, 25 Sep 2018 19:38:03 +0000 Original-Received: (at 32790) by debbugs.gnu.org; 25 Sep 2018 19:37:14 +0000 Original-Received: from localhost ([127.0.0.1]:54036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4t90-0000qK-BR for submit@debbugs.gnu.org; Tue, 25 Sep 2018 15:37:14 -0400 Original-Received: from pop.dreamhost.com ([64.90.62.162]:36684 helo=pdx1-sub0-mail-a31.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4t8x-0000q4-2G for 32790@debbugs.gnu.org; Tue, 25 Sep 2018 15:37:11 -0400 Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 476F77F6F6; Tue, 25 Sep 2018 12:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=8iFMTz7ZGbEQDZpIVZThZxeM5Og=; b= SsfSz/wzOcCD5CvmgcQqdznE/z9++gHY9GQvY/smGrIu7ePt9p8NpMdX5SvpJJmw V9K+Pgx0JVHeEHb1d0pikZhCYYTEkI0Ui0T1hKTCKwHDVOBizQNZNVZz+ejKIixD y38V5V1LcosFfyGG7JlSTCbaba0MGcn6O+G6x3eelWI= Original-Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee [91.129.111.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id 52C047F37D; Tue, 25 Sep 2018 12:37:09 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 X-DH-BACKEND: pdx1-sub0-mail-a31 In-Reply-To: <5BA9E390.8030506@gmx.at> (martin rudalics's message of "Tue, 25 Sep 2018 09:28:16 +0200") 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:150660 Archived-At: >> 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.