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#60886: 29.0.60; split-root-window-below broken for split-window-keep-point Date: Fri, 20 Jan 2023 10:17:39 +0100 Message-ID: <3a9c38d8-ebf5-67d4-63de-a2d2acb127e6@gmx.at> References: <86k01la7gn.fsf@mail.linkov.net> <83r0vs0z44.fsf@gnu.org> <61dc9888-cb02-5323-f86f-23bdb19c5893@gmx.at> <865yd33dkf.fsf@mail.linkov.net> <952857f0-ceca-9677-992b-9a1659130a0f@gmx.at> <83zgafyqvj.fsf@gnu.org> <0bc1444b-cb79-43e1-d363-5e40ad317fa0@gmx.at> <83pmbazvnn.fsf@gnu.org> <9703eeaf-42bf-aeb1-c03b-c3c8700aab48@gmx.at> <83a62epxo6.fsf@gnu.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="3770"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60886@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 20 10:18:34 2023 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 1pInXe-0000mP-49 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Jan 2023 10:18:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pInXI-0005vk-W1; Fri, 20 Jan 2023 04:18:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pInX8-0005sV-8M for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 04:18:11 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pInX7-0006ja-V6 for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 04:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pInX7-0007h5-Hs for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 04:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Jan 2023 09:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60886 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60886-submit@debbugs.gnu.org id=B60886.167420627129556 (code B ref 60886); Fri, 20 Jan 2023 09:18:01 +0000 Original-Received: (at 60886) by debbugs.gnu.org; 20 Jan 2023 09:17:51 +0000 Original-Received: from localhost ([127.0.0.1]:45581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pInWw-0007gd-TP for submit@debbugs.gnu.org; Fri, 20 Jan 2023 04:17:51 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:49053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pInWu-0007gQ-0N for 60886@debbugs.gnu.org; Fri, 20 Jan 2023 04:17:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1674206261; bh=y1xSXCwW9fzveme0CfkK5t2MKqvKJJCykPIwJEVm3es=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=rg2cMm15901JG9l1LCvO/a2ss4otcIlgJRFsaelNQTbTAKy+y3OxSZ1gAUfUi4qgO WJZbXA9OCOnJUVG9bO64nMxX+MlSXdWFL4VWIqf3gdHQc8+Gi7ZPJgq3xjSH6PX7sT 7WWiWcAWXOq43QH2mbPsy4Pjx1K5gtSM6go4nPlKfWr3wPDgJ14PckRHWcF/epryAN AQj6KOqOLq2Nl7fnJTcKvADt6JUDbS1B5dz4GsNZZFiDvDmG2g7Efl7mjPxZ+EnWGa KD64s0dM5oMSMmfOKWt/kEIYBN8sUc93xkg0HgvsBV9VoBBGy2KOjn7XL+6Hy4HlLK TQVYBJ6YiBO9w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.1.100] ([212.95.5.110]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MVeI2-1pB3lh26Ds-00RVVF; Fri, 20 Jan 2023 10:17:41 +0100 Content-Language: en-US In-Reply-To: <83a62epxo6.fsf@gnu.org> X-Provags-ID: V03:K1:EEng6/p2trpc6pbZnxzUwjPr6W2lV3msRiYOR8lXTTz77W3J5jL k0xmnKrEujsgM8An6L0tHE4caGYH/CRj2k0kUGDaU46jCgm8kM4GwwXnCUcrjTTYXIUsWGF EfxWuwXqzjTEAX9NqdzejlY5FI7V7iNVJCo/fZaDG3MasPOalqa5TyMDhfJcFW2vZnQ0UYR ZjaL/j3rTFMDn8zX9DWLg== UI-OutboundReport: notjunk:1;M01:P0:mAMugjP6erY=;NI8hf29FRd55yohh7D/mEyg8KdC kiazg4RoDev5mgNi/rD31hvygmIjjOx0IgW9yB5mf7f01ZRTIIKFnpqbHiCcOGz7GNPkexm5I DcLFyAuAwc91fukZgpA4iJhZnOrFgXulBkSmiUjSi/2jmYBWFBFL7WvbEWZ2OP0OOAG2c5hOG xNptYtNYlZp4gBoKjq9sVhrPdWdHujg6wbFKP/sB1pT+VrpwHBkLAaMdZSQV21JmU5QNElcdY JlEtUBwbTI+TdYmoYlRIP/J3gdztwe3fwWem8q9mN1TWQlOoC7J1NfRAVXQP8jmfH5txGAdMW l3HnPTmLwAGHfwb4xhlBts5UxyBhSslhwj6chmNUSMECZ8jtA6qrKM/lBZHYs/1vf/IBMawUY 4H4yTBIzXC0p8LVGIYeTOa1O6jAbKYPlpoW2XDl8E7qRe21qCuZlj9NUzEd7vioiXaY16d1aM VOeqDFQyi/PkBwqU8VNBdgNXokB4dqGead5jKcNR7bdYYrWibSnFOdcC7GUzP9gu5eOY4+VbY mFnivjxC+tdq5lOlclqPJwdTw4YKyBNGUWuBqT7wW/khuEvdZ0xb9n+furE6QNsDnIdIE1fgT mgOMgCv77uEFKDWB8hu+zbXUAUhTEfh8kL2KfJke3HhqjebrLSCzQt1l52NRkKIJV5jlQJRHJ xdFbjZZEQF90JTFdSw5hrQUenSOpHX+Tnbz/WVnCMfyBuW31sxPpJghBdOdeRRYOV3kOsTkDM m7k8IC4Q45TmjrQZRPRqGByp30MePTXzn3uyBcVb9dJqYYZ5dBX7wxEzS41hbf+Slc25FRUc 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253759 Archived-At: >> M-: (pop-to-buffer "*Messages*") >> C-x w 3 > > This shows *Messages* in the new window, so I think something like > > ...the same buffer as the window which was selected when the > function was invoked" > > should be good. This would miss the case where WINDOW-TO-SPLIT is live and not selected. And also the case where the root window of a non-selected frame should be split. >> The Elisp manual said about them >> >> For interactive use, Emacs provides two commands which always split >> the selected window. >> >> which apparently is no longer true. > > That doesn't say "only for interactive use", and it would make no > sense to say that for such a basic function, IMO. I meant the "always split the selected window" part. Just think of how much easier it would have been, had these new functions been coded as (defun split-root-window-below (&optional size) "Split root window of selected frame in two. The current window configuration is retained in the top window, the lower window takes up the whole width of the frame. SIZE is handled as in `split-window-below'. The buffer of the new window is taken from the selected window." (interactive "P") (when (and size (< size 0) (< (- size) window-min-height)) ;; `split-window' would not signal an error here. (error "Size of new window too small")) (split-window (frame-root-window) size 'below)) (defun split-root-window-right (&optional size) "Split root window of selected frame into two side-by-side windows. The current window configuration is retained within the left window, and a new window is created on the right, taking up the whole height of the frame. SIZE is treated as by `split-window-right'. The buffer of the new window is taken from the selected window." (interactive "P") (when (and size (< size 0) (< (- size) window-min-width)) ;; `split-window' would not signal an error here. (error "Size of new window too small")) (split-window (frame-root-window) size 'right)) martin