From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44483: 27.1.50; Window parameter `min-margins' doesn't split window in half Date: Fri, 06 Nov 2020 16:41:05 +0200 Message-ID: <83ft5m8s5a.fsf@gnu.org> References: <87tuu2inkv.fsf@fastmail.fm> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44483@debbugs.gnu.org To: Joost Kremers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 06 15:42:41 2020 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 1kb2wq-0002rO-Sq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 15:42:40 +0100 Original-Received: from localhost ([::1]:51778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kb2wp-0006rv-Vq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 09:42:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kb2wE-0006KF-1l for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 09:42:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43933) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kb2wD-0001E5-NZ for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 09:42:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kb2wD-0007Zv-Ll for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 09:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2020 14:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44483 X-GNU-PR-Package: emacs Original-Received: via spool by 44483-submit@debbugs.gnu.org id=B44483.160467367529078 (code B ref 44483); Fri, 06 Nov 2020 14:42:01 +0000 Original-Received: (at 44483) by debbugs.gnu.org; 6 Nov 2020 14:41:15 +0000 Original-Received: from localhost ([127.0.0.1]:55479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb2vT-0007Yv-1w for submit@debbugs.gnu.org; Fri, 06 Nov 2020 09:41:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb2vR-0007Yj-Gi for 44483@debbugs.gnu.org; Fri, 06 Nov 2020 09:41:13 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38044) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kb2vM-0000xY-6e; Fri, 06 Nov 2020 09:41:08 -0500 Original-Received: from [176.228.60.248] (port=3528 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kb2vJ-0003aa-Vg; Fri, 06 Nov 2020 09:41:08 -0500 In-Reply-To: <87tuu2inkv.fsf@fastmail.fm> (message from Joost Kremers on Fri, 06 Nov 2020 15:09:36 +0100) 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:192782 Archived-At: > From: Joost Kremers > Date: Fri, 06 Nov 2020 15:09:36 +0100 > > > 1. Open any text file, preferably with long lines (to better see the effect). > > 2. `M-x visual-line-mode RET` > > 3. `M-: (set-window-margins (selected-window) 0 150) RET` > > The number 150 is arbitrary. It's appropriate for my case (with a frame width of > about 238 characters). > > 4. `M-: (set-window-parameter (selected-window) 'min-margins '(0 . 0)) RET` > > 5. `C-x 3` > > At this point, I expect the window to be split into two equally-sized > side-by-side windows, but the split is at about one third of the original window > width. That expectation is incorrect by default. To have the windows equally-sized, you need to set window-combination-resize to t, AFAIU, otherwise Emacs makes no promise that your expectation will be heeded. > Note that in this recipe, the margins of the two windows aren't adjusted after > the split, so in the left window the text is not visible at all and in the right > window, the text area is two characters wide. (In my case, YMMV.) You expected Emacs to adjust the margins? The min-margins parameters is consulted only when determining whether the window can be split, it has no effect whatsoever on the window dimensions after the split. And the manual specifically says that it is up to the application to adjust the margins after the split.