From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#47300: delete-window to select window with same position Date: Wed, 19 May 2021 19:07:18 +0300 Organization: LINKOV.NET Message-ID: <87h7iyzvh5.fsf@mail.linkov.net> References: <87a6qw43gg.fsf@mail.linkov.net> <87pmxodrmq.fsf@gnus.org> <7f870f9b-95ad-6b5d-82aa-1bcfe5cc880a@gmx.at> <87fsyk0w92.fsf@mail.linkov.net> <2ec3b911-4fb1-4b13-a5b8-28278a5c43ba@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6649"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , 47300@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 19 18:50:35 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 1ljPP0-0001d6-Oa for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 May 2021 18:50:34 +0200 Original-Received: from localhost ([::1]:42918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljPOz-0000bo-Pg for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 May 2021 12:50:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljP78-0006IZ-1c for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 12:32:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49022) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ljP75-00063m-1S for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 12:32:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ljP74-0000Cr-T4 for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 12:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 May 2021 16:32: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.1621441917758 (code B ref 47300); Wed, 19 May 2021 16:32:02 +0000 Original-Received: (at 47300) by debbugs.gnu.org; 19 May 2021 16:31:57 +0000 Original-Received: from localhost ([127.0.0.1]:60563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljP6y-0000C9-NP for submit@debbugs.gnu.org; Wed, 19 May 2021 12:31:56 -0400 Original-Received: from relay10.mail.gandi.net ([217.70.178.230]:48163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljP6w-0000Bn-Hc for 47300@debbugs.gnu.org; Wed, 19 May 2021 12:31:55 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id E88C624000D; Wed, 19 May 2021 16:31:46 +0000 (UTC) In-Reply-To: <2ec3b911-4fb1-4b13-a5b8-28278a5c43ba@gmx.at> (martin rudalics's message of "Wed, 19 May 2021 09:42:49 +0200") 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:206901 Archived-At: >> I can't find where `get-mru-window' is called during window deletion. > > It's here in `delete-window-internal' > > /* Now look whether `get-mru-window' gets us something. */ > mru_window = call1 (Qget_mru_window, frame); Thanks, I missed it because I searched with 'C-x p g get-mru-window' instead of 'C-x p g get.mru.window'. >> Maybe a new option e.g. `delete-window-select' with type not boolean, >> but a predicate with the default value `get-mru-window', and another >> choice `delete-window-select-underlying' to select the "merged" window. > > `get-mru-window' is not a predicate. You probably mean a function so > that someone could also use `get-lru-window' as value of that option? Yes, a function to get a window to select after window deletion. > The problem with such a function is that it has to be called with some > predefined sort of FRAME or ALL-FRAMES argument so some explanatory > footwork would be required. It's fine to call it with a FRAME argument. The problem is how to write such a function that will find the window that gets the screen space previously owned by the deleted window. Could you recommend the right direction? Maybe this window that gets the screen space is just the parent of the deleted window?