From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#47300: delete-window to select window with same position Date: Tue, 18 May 2021 18:00:40 +0200 Message-ID: <7f870f9b-95ad-6b5d-82aa-1bcfe5cc880a@gmx.at> References: <87a6qw43gg.fsf@mail.linkov.net> <87pmxodrmq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2017"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47300@debbugs.gnu.org To: Lars Ingebrigtsen , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 18 18:12:05 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lj2KC-0000LF-Kl for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 18:12:04 +0200 Original-Received: from localhost ([::1]:50378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj2KB-0003lc-4y for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 May 2021 12:12:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj29Z-0006oF-Aj for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 12:01:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lj29W-00082h-8J for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 12:01:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lj29W-0006r1-5l for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 12:01: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: Tue, 18 May 2021 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47300 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 47300-submit@debbugs.gnu.org id=B47300.162135365125711 (code B ref 47300); Tue, 18 May 2021 16:01:02 +0000 Original-Received: (at 47300) by debbugs.gnu.org; 18 May 2021 16:00:51 +0000 Original-Received: from localhost ([127.0.0.1]:57029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj29K-0006gH-TT for submit@debbugs.gnu.org; Tue, 18 May 2021 12:00:51 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:49851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj29I-0006Yc-13 for 47300@debbugs.gnu.org; Tue, 18 May 2021 12:00:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621353641; bh=V4uRezhRwnD3bv7B/V8W72JvtWfFEOhLx3H1vPBpuco=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=bYcZrjcARjHHL+xCyD+IpEuaMwi4umI+JTocc87IvBYnDqIC2Alf9xeFBKqzaoVLF AHBZvyxBa/TLmP3QjxlL0PlrWmNqzuGWjXOHoG/IsBmE1KlIgxZ98M3Iz/daC7L4Ae eRu2za0979WS4W4yhKCikdpgRSGfOc7KBh2W6D1I= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([213.142.96.212]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M4Jqb-1lilAH39Sj-000Nbq; Tue, 18 May 2021 18:00:40 +0200 In-Reply-To: <87pmxodrmq.fsf@gnus.org> Content-Language: en-US X-Provags-ID: V03:K1:B3uEDuxLi6nJiPusAxtJ3kFmSBqVY6fY85+x7mDy1DFPFXECeOW Pjm8e7s38byaH0vVkOETD9OV8uTnt6JZHoLFYFgZKtB7yFRKVSbFCBo5TPd6gYyq0n4DeL8 JKahW6UMHdnBG4Z5x8/eiGdpkkmS5OefNBP4h7OaiSqJQwmFoL7MK3STXeRcpj/FKTfVmWy EBcE/sJP0xq3LJ/vHDJFw== X-UI-Out-Filterresults: notjunk:1;V03:K0:uNRIm8knMbA=:H470OybVsdu863PJRANqum RijXaYlOk2Yu3sxtVIQYlg7JoD1RoemGDIf37lGgx56gRR8C/BPvKZfeO5Lxm/ATzNPlE9xTu JZeT25oz3kgQOMZhJuBafeo+I8YEAiMG/TumYJksRbQiGDQvS4RVQwa7IeIOIToUrvEHSXK0k 05Jvd/EZGmcbrwwpTYiS33jI1OEk4O3MJp7YKTw43SIAqsZAUsRmuzyHj42zhzs6TNUBUkan9 VO2mZKoBLB4qhDxbI4ClCpEQ7KzVw/GzPlARIhN9t4VJKOVBZLCOHwQm40nEmt6G/3jXKJzj1 POuYaCL44qZFZ7Pymw0GHUFDhQBZ1g+3WIAywdJetTp+B+0YGLJXn/K8GMwjAXF8Zqh9FDbZn u6a4F+/xk4S/L38vUr6tvwpbSH2YaXh6x8L2YzjTy+PXsVb5fYrzF/GkyTR3jLXoxhTK1YFY9 TNiSWCT6DDTnYTWN/8PGW/zihqCYeqSBJg2kU+ChrlvnXDqagxoJoslRoZ+R6jHVecnbKDDEE tH5jES6wPR0EWrVz3QTmIyRuYJaj1Aik7D4hrrwoNO5hxE68u6j1CDZKmwrvPUrPpxB3uWB0N iLbgA0gd2XkP9IKGTJfWS6wlR/1gnllIGYtFQIKVjGCiqiTjzR+UgAKPWVjXk8/Nfqy28id1O 9BT/kMmwZ845wBrUVhET6XGeElwr5GIk1Poiai3TigciZsLqQhfqLD+Iz2zJ/Mmr9tsZSdBbJ 2lGcN5mxnhOup7zZtIVtCB7TVG9DAG1cawj3DIQUIJmc6Gg4KDrXLgtTN5OTcVaSbIkalmQo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206808 Archived-At: >> People still have trouble with unpredictable behavior of 'C-x 0' >> that selects an unexpected window after the current window is deleted. >> >> This is a recent example: >> https://old.reddit.com/r/emacs/comments/m8omt0/how_can_deletewindow_cx_0_be_configured_to_stay/ >> >> The previous failed attempt to fix this was in bug#32790. >> >> I still don't understand the current logic what window is selected >> after deleting the selected window with 'C-x 0'. By design it's the most recently used window (`get-mru-window') on the same frame after the deleted window has been removed from its window tree. > `C-x 0' isn't a command I use much, so I don't really have much > intuition about how it's supposed to work. But, indeed, playing around > with it, it seems unexpected that `C-x 0' selects a different window > (instead of remaining in the "merged" window). > >> Maybe something like this could be adapted to delete-window >> by adding an optional interactive argument keep-pos: > > If I'm reading that patch correctly (I haven't actually tested), that > seems more DWIM to me. Perhaps Martin has some comments here; added to > the CCs. (And if anybody else has an opinion here, please do chime in.) Personally I don't care but people used to the current behavior might get confused. So an option should be the provided and could be "ON" by default. martin