GNU bug report logs - #49277
28.0.50; [PATCH] Fix ediff3 with window-combinaison-resize

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Trust me I am a Doctor <pillule@HIDDEN>; Keywords: patch; dated Tue, 29 Jun 2021 17:32:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 49277 <at> debbugs.gnu.org:


Received: (at 49277) by debbugs.gnu.org; 21 Jul 2021 11:19:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 21 07:19:10 2021
Received: from localhost ([127.0.0.1]:36254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m6AFp-000572-LQ
	for submit <at> debbugs.gnu.org; Wed, 21 Jul 2021 07:19:09 -0400
Received: from mx1.riseup.net ([198.252.153.129]:36260)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pillule@HIDDEN>) id 1m6AFo-00056o-Ag
 for 49277 <at> debbugs.gnu.org; Wed, 21 Jul 2021 07:19:09 -0400
Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified))
 by mx1.riseup.net (Postfix) with ESMTPS id 4GVClB39FxzF4R1;
 Wed, 21 Jul 2021 04:19:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1626866342; bh=7V5jHyzwJasVpLpWXyXaIa/7O9N64GbVWmivz2jXe1w=;
 h=References:From:To:Cc:Subject:Date:In-reply-to:From;
 b=b9+ZOLhKeY7R32GpVqhnS1tIsegmaQz7AB6G6tJt6/imOvRZxvPZCu7rnd54o6ncD
 dSRvESE164vRfsZqaMX8umieiisKDt2y64YMFstdxNa1+FlhOP5a1plU5nEhPyO/b2
 v6ufLS37TQVnKh+O2WdS5L74RIWLjOkGjyMBycY4=
X-Riseup-User-ID: 2809318D850A1FCAD1B1231B45F2EA165E40C9CFC0483F8A05940CD3887926AD
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by fews2.riseup.net (Postfix) with ESMTPSA id 4GVCl92pLPz1yS7;
 Wed, 21 Jul 2021 04:19:01 -0700 (PDT)
References: <87im1wy3va.fsf@HIDDEN>
 <3b5f00bf-0572-8ca8-462b-d87f01bfe17e@HIDDEN> <87pmvs6f46.fsf@HIDDEN>
 <87eebujnia.fsf@HIDDEN> <f9bca625-7dcb-9194-4a5c-658c10b77dab@HIDDEN>
From: Trust me I am a Doctor <pillule@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#49277: 28.0.50; [PATCH] Fix ediff3 with
 window-combinaison-resize
Date: Wed, 21 Jul 2021 13:12:57 +0200
In-reply-to: <f9bca625-7dcb-9194-4a5c-658c10b77dab@HIDDEN>
Message-ID: <878s1zewyn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49277
Cc: 49277 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain


please try this one. I swear it is not again the same buggy patch.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Fix-ediff3-with-window-combinaison-resize.patch
Content-Description: corrected

From 96b03d92ea2c46d5cb9716383ad2248a3d701c72 Mon Sep 17 00:00:00 2001
From: Trust me I am a doctor <pillule@HIDDEN>
Date: Tue, 29 Jun 2021 19:22:04 +0200
Subject: [PATCH] Fix ediff3 with window-combinaison-resize

* lisp/vc/ediff-wind.el (ediff-setup-windows-plain-compare): When
'window-combination-resize' is set to t and 'even-window-sizes'
is set to nil, the 3 window layout as in ediff3 does not produce
a balanced layout. Getting rid of the manual resizing and relying
rather on window.el to automatically resize the windows with
'window-combination-resize', solve that issue.
(ediff-setup-windows-multiframe-compare): Tiddo.
---
 lisp/vc/ediff-wind.el | 34 ++++++++++------------------------
 1 file changed, 10 insertions(+), 24 deletions(-)

diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index fc6ea944ae..7c90348b5d 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -400,7 +400,8 @@ ediff-setup-windows-plain-compare
   ;; skip dedicated and unsplittable frames
   (ediff-destroy-control-frame control-buffer)
   (let ((window-min-height 1)
-	split-window-function wind-width-or-height
+        (window-combination-resize t)
+	split-window-function
 	three-way-comparison
 	wind-A-start wind-B-start wind-A wind-B wind-C)
     (with-current-buffer control-buffer
@@ -419,22 +420,12 @@ ediff-setup-windows-plain-compare
 	(select-window (next-window nil 'ignore-minibuf)))
     (delete-other-windows)
     (set-window-dedicated-p (selected-window) nil)
-    (split-window-vertically)
-    (ediff-select-lowest-window)
-    (ediff-setup-control-buffer control-buffer)
 
     ;; go to the upper window and split it betw A, B, and possibly C
     (other-window 1)
     (switch-to-buffer buf-A)
     (setq wind-A (selected-window))
-    (if three-way-comparison
-	(setq wind-width-or-height
-	      (/ (if (eq split-window-function #'split-window-vertically)
-		     (window-height wind-A)
-		   (window-width wind-A))
-		 3)))
-
-    (funcall split-window-function wind-width-or-height)
+    (funcall split-window-function)
 
     (if (eq (selected-window) wind-A)
 	(other-window 1))
@@ -443,7 +434,7 @@ ediff-setup-windows-plain-compare
 
     (if three-way-comparison
 	(progn
-	  (funcall split-window-function) ; equally
+	  (funcall split-window-function)
 	  (if (eq (selected-window) wind-B)
 	      (other-window 1))
 	  (switch-to-buffer buf-C)
@@ -461,7 +452,9 @@ ediff-setup-windows-plain-compare
 	  (set-window-start wind-A wind-A-start)
 	  (set-window-start wind-B wind-B-start)))
 
-    (ediff-select-lowest-window)
+    (select-window (display-buffer-in-direction
+                    control-buffer
+                    '((direction . bottom))))
     (ediff-setup-control-buffer control-buffer)
     ))
 
@@ -746,6 +739,7 @@ ediff-setup-windows-multiframe-compare
 			     (and (not (frame-live-p frame-A))
 				  (or ctl-frame-exists-p
 				      (eq frame-B (selected-frame))))))
+         (window-combination-resize t)
 	 wind-A-start wind-B-start
 	 designated-minibuffer-frame)
 
@@ -758,7 +752,7 @@ ediff-setup-windows-multiframe-compare
 			   'B ediff-narrow-bounds))))
 
     (if use-same-frame
-	(let (wind-width-or-height) ; this affects 3way setups only
+        (progn
 	  (if (and (eq frame-A frame-B) (frame-live-p frame-A))
 	      (select-frame frame-A)
 	    ;; avoid dedicated and non-splittable windows
@@ -767,15 +761,7 @@ ediff-setup-windows-multiframe-compare
 	  (switch-to-buffer buf-A)
 	  (setq wind-A (selected-window))
 
-	  (if three-way-comparison
-	      (setq wind-width-or-height
-		    (/
-		     (if (eq split-window-function #'split-window-vertically)
-			 (window-height wind-A)
-		       (window-width wind-A))
-		     3)))
-
-	  (funcall split-window-function wind-width-or-height)
+          (funcall split-window-function)
 	  (if (eq (selected-window) wind-A)
 	      (other-window 1))
 	  (switch-to-buffer buf-B)
-- 
2.20.1


--=-=-=
Content-Type: text/plain



--

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49277; Package emacs. Full text available.

Message received at 49277 <at> debbugs.gnu.org:


Received: (at 49277) by debbugs.gnu.org; 20 Jul 2021 07:21:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 20 03:21:10 2021
Received: from localhost ([127.0.0.1]:60898 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5k3y-0007hO-8o
	for submit <at> debbugs.gnu.org; Tue, 20 Jul 2021 03:21:10 -0400
Received: from mout.gmx.net ([212.227.17.22]:43087)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1m5k3w-0007gr-9f
 for 49277 <at> debbugs.gnu.org; Tue, 20 Jul 2021 03:21:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1626765658;
 bh=fuhV2kWWYQkmcqYSYuQsI+FackUfSJd4bMN96hiGunw=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=UHUSDDWPHZFj9gL2RVSmHpFIp7UxeyzL5g5lydBOBgup5tYXtZeLX/LuIjtSyAddY
 YmNaXME0glKHCSheD6OaKZpVqPlPKCOLGiuJVxq/ECd8EAZBbLe1ri3LtqH/ext0y6
 /Q/0Vtur/j5lGJyVEqf4A68OSBYrcfvMcOEw31hY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([213.142.97.207]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M7K3Y-1m2Q8U20PU-007ief; Tue, 20
 Jul 2021 09:20:58 +0200
Subject: Re: bug#49277: 28.0.50; [PATCH] Fix ediff3 with
 window-combinaison-resize
To: Lars Ingebrigtsen <larsi@HIDDEN>, marmote-te <marmot-te@HIDDEN>
References: <87im1wy3va.fsf@HIDDEN>
 <3b5f00bf-0572-8ca8-462b-d87f01bfe17e@HIDDEN> <87pmvs6f46.fsf@HIDDEN>
 <87eebujnia.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <f9bca625-7dcb-9194-4a5c-658c10b77dab@HIDDEN>
Date: Tue, 20 Jul 2021 09:20:56 +0200
MIME-Version: 1.0
In-Reply-To: <87eebujnia.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:+ZnePc7Kaliyz4A1QHvNJJNAnkHpgnVnRiVwxwIrvqecDi3ws/K
 umAlduVp6531CMLo3tKWQtmA3huwS89qvEnQyGsZsbvqEVVlmlsHLv4ybyHIDxNKHKqrDzS
 PHYD5ueNyqKQb5/TJtx5HYRw8EwgdDsF+AzNXNEaBBY0+mTLgveSMjAOsFqTvcgH05Eq2Gi
 vTpqZdLqsiQ5N036u5A1w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:s3Dvv9YamDQ=:PSQiLmnWSlSO93MPEaYEvw
 MLjYKgTlpFw9UQDINN4IsI6LMKaxrDtPQg0q8xGqyb64RRVq3O+jqS9pvXC9CywvIFub1kvba
 KUUnHpBG3aXLTPSrVFMi8fONIkR0/292dbwWntvhY2cYk4kWYijEbAf17tVIfxsLCalKDUkrc
 oPFjZTZhbBveOst0LtiNnaW8zEhXLDWvwMqYhXhAI/LyAhJ84KkOETvPfzP6bzRS41yIFPbcH
 WVN3fuoiewo1Y+MNM/a6yrv3eEV2MShSF75XbZ0998EEw18w6IfBkapB9fWFbQS0fAB1JBsap
 yV+h2+ok4FPjv7bEeF6cPGGG2vaj6T1wxFndKZTws99or5kOlVS2ViSYjejjmH3qdbbrBtwem
 4R4L5/TU63jqE/bVt8JVBxrh5m2Nf/+tZoiJixWUVS9d30SIsZOPgHYz616v/rO89k7mwnxVG
 YYh2yBOe9u6r/gpvztfUuKmebR8PAcnfgSrOhvhXaNMN7bNrCrhg/uti0R4FTGUazASQi7bjr
 7tD7jjsf39jXyIIvBOFVLJK76hW1G4SXnMLAAXLWO4Po6d+0iLubc48OxcTtK/qxC6YfO1aTa
 QVLJEjnrBPNJKIOB1Igy19qPP1py5FDW2bvhJ18iGqmt+CoGDwX6vECob1RnXDIQGRhkTY836
 73+9bNpdFI0eP8FbMWfzA0Mf3xtOhHKrdE7VmkZkuWqCnPJGUmOLdTkvJPyBDuA0/Go6uLWZ/
 iYWHVR0zoRZp1G3IoCAYSZSzBcONPm4Q+HKc2Vu26TjFdlhkmsIXEBME8MSkgXC3SQNXpQ0HZ
 Ge0PD7YMoQsJ0E41+pbeI8BIS7revEvplVnL02tX6bq6lQQKv8zb8yVB2+uQhMHZU30SR9xMn
 oTs7+YzZGaL9RF4txhWL92HNGL8ELUTIV4iNqXtaUQZYGCOhqAhLprYQJS+cWS5+ETyCWMdHt
 89B3VDh5zxl0dT86OIcKWCo/tf+jtnbV2XlJmos+zBOwu+u7VHoYqvdEjg9cQnOUp5S6+5foC
 ZGQMyg527hfU7umLCZT/Tb4+/ZGEZS6N/KPsKocxQc9Xz4vaIujc8z9S2MPRQMSkLOUoRb/9S
 zctvGlmsA7/jNI956WKb5rFrcWdqiPwx1dz
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 49277
Cc: 49277 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

 > Martin, did this version of the patch look OK to you?

So far it's OK here with

(custom-set-variables
  '(ediff-split-window-function 'split-window-horizontally)
  '(ediff-window-setup-function 'ediff-setup-windows-plain))

but with plain

(custom-set-variables
  '(ediff-window-setup-function 'ediff-setup-windows-plain))

`ediff3' makes the topmost window occupy half of the frame which is not
TRT.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49277; Package emacs. Full text available.

Message received at 49277 <at> debbugs.gnu.org:


Received: (at 49277) by debbugs.gnu.org; 19 Jul 2021 16:07:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 19 12:07:36 2021
Received: from localhost ([127.0.0.1]:60075 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m5Vnr-0002FM-Md
	for submit <at> debbugs.gnu.org; Mon, 19 Jul 2021 12:07:35 -0400
Received: from quimby.gnus.org ([95.216.78.240]:47108)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1m5Vnq-0002F6-D9
 for 49277 <at> debbugs.gnu.org; Mon, 19 Jul 2021 12:07:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=Sdz4KL8HG4A4NDNCp76OTJrBi8A+vvj6kAzBhSXT2xw=; b=FVs/UC/N1pSJzr4qijSORZDGzn
 qPYcHB3DyA96HCEBxEifr7djTMghIrg86ZeI2qApwWdeEpwgrIIr7/EfhRKBhyFcXfFbGZYBIRahb
 lEXGOYz8sVYfb5vXRTQKXj4wJoOQEiudYdcpKgktNCdhre51AkK1xB4dHFV7gP/b3J0k=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1m5Vni-0000Bt-3l; Mon, 19 Jul 2021 18:07:28 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: marmote-te <marmot-te@HIDDEN>
Subject: Re: bug#49277: 28.0.50; [PATCH] Fix ediff3 with
 window-combinaison-resize
References: <87im1wy3va.fsf@HIDDEN>
 <3b5f00bf-0572-8ca8-462b-d87f01bfe17e@HIDDEN>
 <87pmvs6f46.fsf@HIDDEN>
X-Now-Playing: Chuck Person's _Chuck Person's Eccojams Vol. 1_: "B4"
Date: Mon, 19 Jul 2021 18:07:25 +0200
In-Reply-To: <87pmvs6f46.fsf@HIDDEN> (marmote-te's message of "Thu, 08 Jul
 2021 15:33:50 +0200")
Message-ID: <87eebujnia.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  marmote-te <marmot-te@HIDDEN> writes: > So in this one, 
 for the plain window setup, I only create the control > window at the end
 of the layout. > It does not seemed necessary to setup the control buffer
 twice. Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49277
Cc: 49277 <at> debbugs.gnu.org, martin rudalics <rudalics@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

marmote-te <marmot-te@HIDDEN> writes:

> So in this one, for the plain window setup, I only create the control
> window at the end of the layout.
> It does not seemed necessary to setup the control buffer twice.

Martin, did this version of the patch look OK to you?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49277; Package emacs. Full text available.

Message received at 49277 <at> debbugs.gnu.org:


Received: (at 49277) by debbugs.gnu.org; 8 Jul 2021 14:43:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 08 10:43:22 2021
Received: from localhost ([127.0.0.1]:57227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m1VFJ-0005mD-N4
	for submit <at> debbugs.gnu.org; Thu, 08 Jul 2021 10:43:22 -0400
Received: from mx1.riseup.net ([198.252.153.129]:58904)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <marmot-te@HIDDEN>) id 1m1VFH-0005ly-Go
 for 49277 <at> debbugs.gnu.org; Thu, 08 Jul 2021 10:43:20 -0400
Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified))
 by mx1.riseup.net (Postfix) with ESMTPS id 4GLJtn6C3DzDqr4;
 Thu,  8 Jul 2021 07:43:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1625755393; bh=zVOhKGP9JW1121WpxCVtnePpaeNWQWwGcr2aQGer934=;
 h=References:From:To:Cc:Subject:Date:In-reply-to:From;
 b=LrsktDl0UY1BrFRnKk6FNnS5wE+TUO8RCxYlUP38DluRc4ZE9pDucBkV66f2+QeD5
 WaN+OUgBErM9TdDV1Upx8Y48875fvV0UQkZM6ZUPjamFfiiG77QTpqhk5Ww7ne/ZOa
 /G2ztIcq33jzwogVzC1EOEnjMFO/IOo/5sN87EHc=
X-Riseup-User-ID: 503C831F778D0A13F575F15031A17D5A1FF1124D5423CF99CD9F12BE0C4E4417
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by fews1.riseup.net (Postfix) with ESMTPSA id 4GLJtm3DM2z5vYh;
 Thu,  8 Jul 2021 07:43:11 -0700 (PDT)
References: <87im1wy3va.fsf@HIDDEN>
 <3b5f00bf-0572-8ca8-462b-d87f01bfe17e@HIDDEN>
From: marmote-te <marmot-te@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#49277: 28.0.50; [PATCH] Fix ediff3 with
 window-combinaison-resize
Date: Thu, 08 Jul 2021 15:33:50 +0200
In-reply-to: <3b5f00bf-0572-8ca8-462b-d87f01bfe17e@HIDDEN>
Message-ID: <87pmvs6f46.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 49277
Cc: 49277 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain


martin rudalics <rudalics@HIDDEN> writes:

>> I have a bug when calling ediff3, the layout is not a balanced.
>>
>> Ultimately I found that combining this settings were the culprit :
>>
>> (setq window-combination-resize t
>>        even-window-sizes nil)
>>
>> ;; you can test it with eg :
>> (setq default-directory "/home/user")
>> (ediff3 ".bashrc"
>>          ".bash_history"
>>          ".bash_logout")
>>
>> Removing the manual resizing when splitting windows and relying rather
>> on 'window-combinaison-resize' to balance the layout, solve the issue.
>
> I think we can easily do that but it does not handle the
>
> (setq window-combination-resize t
>       even-window-sizes nil
>       ediff-window-setup-function 'ediff-setup-windows-plain)
>
> case here.  Shouldn't we fix that too?
>
> Thanks, martin

Yes, I missed that one ; it worked only in plain window with
(setq ediff-split-window-function #'split-window-horizontally)

I guess that is the control buffer that is interfering somehow
with the resizing ?

I tried to apply on it a 'window-preserve parameter on its window,
without much success.

So in this one, for the plain window setup, I only create the control
window at the end of the layout.
It does not seemed necessary to setup the control buffer twice.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0002-Fix-ediff3-with-window-combinaison-resize.patch
Content-Description: Fix ediff3 with window-combinaison-resize 2

From 96b03d92ea2c46d5cb9716383ad2248a3d701c72 Mon Sep 17 00:00:00 2001
From: Trust me I am a doctor <pillule@HIDDEN>
Date: Tue, 29 Jun 2021 19:22:04 +0200
Subject: [PATCH] Fix ediff3 with window-combinaison-resize

* lisp/vc/ediff-wind.el (ediff-setup-windows-plain-compare): When
'window-combination-resize' is set to t and 'even-window-sizes'
is set to nil, the 3 window layout as in ediff3 does not produce
a balanced layout. Getting rid of the manual resizing and relying
rather on window.el to automatically resize the windows with
'window-combination-resize', solve that issue.
(ediff-setup-windows-multiframe-compare): Tiddo.
---
 lisp/vc/ediff-wind.el | 34 ++++++++++------------------------
 1 file changed, 10 insertions(+), 24 deletions(-)

diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index fc6ea944ae..7c90348b5d 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -400,7 +400,8 @@ ediff-setup-windows-plain-compare
   ;; skip dedicated and unsplittable frames
   (ediff-destroy-control-frame control-buffer)
   (let ((window-min-height 1)
-	split-window-function wind-width-or-height
+        (window-combination-resize t)
+	split-window-function
 	three-way-comparison
 	wind-A-start wind-B-start wind-A wind-B wind-C)
     (with-current-buffer control-buffer
@@ -419,22 +420,12 @@ ediff-setup-windows-plain-compare
 	(select-window (next-window nil 'ignore-minibuf)))
     (delete-other-windows)
     (set-window-dedicated-p (selected-window) nil)
-    (split-window-vertically)
-    (ediff-select-lowest-window)
-    (ediff-setup-control-buffer control-buffer)
 
     ;; go to the upper window and split it betw A, B, and possibly C
     (other-window 1)
     (switch-to-buffer buf-A)
     (setq wind-A (selected-window))
-    (if three-way-comparison
-	(setq wind-width-or-height
-	      (/ (if (eq split-window-function #'split-window-vertically)
-		     (window-height wind-A)
-		   (window-width wind-A))
-		 3)))
-
-    (funcall split-window-function wind-width-or-height)
+    (funcall split-window-function)
 
     (if (eq (selected-window) wind-A)
 	(other-window 1))
@@ -443,7 +434,7 @@ ediff-setup-windows-plain-compare
 
     (if three-way-comparison
 	(progn
-	  (funcall split-window-function) ; equally
+	  (funcall split-window-function)
 	  (if (eq (selected-window) wind-B)
 	      (other-window 1))
 	  (switch-to-buffer buf-C)
@@ -461,7 +452,9 @@ ediff-setup-windows-plain-compare
 	  (set-window-start wind-A wind-A-start)
 	  (set-window-start wind-B wind-B-start)))
 
-    (ediff-select-lowest-window)
+    (select-window (display-buffer-in-direction
+                    control-buffer
+                    '((direction . bottom))))
     (ediff-setup-control-buffer control-buffer)
     ))
 
@@ -746,6 +739,7 @@ ediff-setup-windows-multiframe-compare
 			     (and (not (frame-live-p frame-A))
 				  (or ctl-frame-exists-p
 				      (eq frame-B (selected-frame))))))
+         (window-combination-resize t)
 	 wind-A-start wind-B-start
 	 designated-minibuffer-frame)
 
@@ -758,7 +752,7 @@ ediff-setup-windows-multiframe-compare
 			   'B ediff-narrow-bounds))))
 
     (if use-same-frame
-	(let (wind-width-or-height) ; this affects 3way setups only
+        (progn
 	  (if (and (eq frame-A frame-B) (frame-live-p frame-A))
 	      (select-frame frame-A)
 	    ;; avoid dedicated and non-splittable windows
@@ -767,15 +761,7 @@ ediff-setup-windows-multiframe-compare
 	  (switch-to-buffer buf-A)
 	  (setq wind-A (selected-window))
 
-	  (if three-way-comparison
-	      (setq wind-width-or-height
-		    (/
-		     (if (eq split-window-function #'split-window-vertically)
-			 (window-height wind-A)
-		       (window-width wind-A))
-		     3)))
-
-	  (funcall split-window-function wind-width-or-height)
+          (funcall split-window-function)
 	  (if (eq (selected-window) wind-A)
 	      (other-window 1))
 	  (switch-to-buffer buf-B)
-- 
2.20.1


--=-=-=
Content-Type: text/plain



There is also the merge job layouts, that are a little bit different,
but as far I understand them, they are not affected by this issue. If it
feels cleaner, I could however apply the same modification to the setup
of the control buffer.

--

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49277; Package emacs. Full text available.

Message received at 49277 <at> debbugs.gnu.org:


Received: (at 49277) by debbugs.gnu.org; 30 Jun 2021 07:37:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 30 03:37:57 2021
Received: from localhost ([127.0.0.1]:56362 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lyUnF-00058q-Ie
	for submit <at> debbugs.gnu.org; Wed, 30 Jun 2021 03:37:57 -0400
Received: from mout.gmx.net ([212.227.17.21]:50187)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1lyUnE-00058d-4h
 for 49277 <at> debbugs.gnu.org; Wed, 30 Jun 2021 03:37:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1625038667;
 bh=il5blwk1Xsc4IDBTEcXNrqjM6ZYdOr+QbdgNk4AZshc=;
 h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To;
 b=YEoOOY0erVIPKQaUqf5WZ51darRuTlM73W9n6eNAhxBFFuMgHDw7ZpJV/SNN4sMIZ
 aOAKijxc32a4pcqKpA7esqup6KnK7QyOs6BGkuFaKfgOYVfGuCa7rU6OPuR6VYTxtG
 B7pxfo+kmgQNwAiBME4US1KUz+OgQpVCmgf9DfSo=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.102] ([46.125.249.76]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MOiDX-1la3ca0uZ5-00QCmo; Wed, 30
 Jun 2021 09:37:47 +0200
Subject: Re: bug#49277: 28.0.50; [PATCH] Fix ediff3 with
 window-combinaison-resize
To: Trust me I am a Doctor <pillule@HIDDEN>, 49277 <at> debbugs.gnu.org
References: <87im1wy3va.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <3b5f00bf-0572-8ca8-462b-d87f01bfe17e@HIDDEN>
Date: Wed, 30 Jun 2021 09:37:46 +0200
MIME-Version: 1.0
In-Reply-To: <87im1wy3va.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:Czlu5kG2TH2yKacga4/R38QS3kxM+2tSllW1f4G+DySAeCv+zOp
 1eEAelKQDfvBRiCN7HPFyOqiDGulexN7mBgyrc80w6RNDnxg783Xx9Oeg7I0NXxVOfnmDTo
 dIh4LuNtzSbUsj0aARvRgf2U+P3y2IwPGNNEHPq0p0uyN1MtICzvawkUh7/HIEbj1zfAn+z
 1UHGQFMrr+a7vrkoQ1s6g==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Fe8qBW/mxH0=:NhHeVoIP4ITup7ht2gDVz3
 h12R/ucEfhEwrRfn4pXhQH2KEkRSVhDXiFWnOYmho161J6LkXJcS5XoemVTF+r7O0VEpGXgtb
 bFPfPXA1sHdr/HxRiluqm9i42MAHo7rODQr1hl1UqKewFzCeKmeIloSHhV0WTRuDoOL35RThb
 FtsYFQrWaOqA5tTPEuLftP8waCIziuKSWy1TWJXovO/s96DqhelpZ2mdF7yJY6ictpPSPRbCZ
 zoN9iCYzia6ZARQ4fmQVmUyCSnohFAb0LOHjBHCOeEQyOV6Mw9JE5N6qI+QVu0H+ZtmL//7DG
 X7eyXhBdQssKMwTIa2t4UUmQXdUiU5r+/Q7NfTdGjpkegGTe/lwpcCNfiUkd/ksgmJZHnXqKd
 E7774u1m5BA+v9JTq46uuW+1HKHsjkx6p7SSBkkrqSP2umns247MqwN1BZ8GLUTW0uLx7jrMT
 OKT3FA9wM/wf4G8RTcIWMMi4qlmevjgjndZdWeP/GgW6ky5ApLSLUYd4K8+WfCOnBzB1hvtWk
 paOee6VQ6a4ukxwOQ0lOp9X0OX73JdFV7jClkggKU016emmpMZTyg29gIlhGV/Df/nHCjx8wY
 jS+Kc5qb3wJJmgwAdlHympwZZiXHtHjGkf/pT17q+WRpIEkbpjSgXUlWipBRjtF+dl8nW79WH
 ejB9VV3mMTm14OEyFQQEKTr4xiiH7sprzHp0lqFPY6Ky5QG2dQ5niTzyKi7zDtM9iUUqotBxo
 IfScsbIztcq2/S3DM8odjM50iOhk3e5HcMb1YyJGklkljehGxUqs0ATnXDYoVkwDoh0PUsGhE
 pbnTlTZNcz8fhRjpNDqwdINBU9quH2THDolOuF8qiQN2sW5qwYofO1mg6szEFoxOwVPOSzmWA
 UIl+So+YVoQ5hZZ7kXyShyRjKnS0sUc0mb0154j6I/tXs0WnqPGal8VwB6wlIqNifOKasW+bZ
 x1F5YyHUXaV4Jjo2lwD8s2UuikhM2NnsUSGeAmJphE+YEccrKldstMqu7bEunZvqACoFZvxTj
 fcFFhpI9jMyBFVWqTLwzhNRERvxnJU0I0Z3gb+fNbUDtrgsmniEf22OUM6A/e766kkPfuPt8u
 YKLxduwNBdPTFjxznZYOulof6Z8jZ78KOXl
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49277
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

 > I have a bug when calling ediff3, the layout is not a balanced.
 >
 > Ultimately I found that combining this settings were the culprit :
 >
 > (setq window-combination-resize t
 >        even-window-sizes nil)
 >
 > ;; you can test it with eg :
 > (setq default-directory "/home/user")
 > (ediff3 ".bashrc"
 >          ".bash_history"
 >          ".bash_logout")
 >
 > Removing the manual resizing when splitting windows and relying rather
 > on 'window-combinaison-resize' to balance the layout, solve the issue.

I think we can easily do that but it does not handle the

(setq window-combination-resize t
       even-window-sizes nil
       ediff-window-setup-function 'ediff-setup-windows-plain)

case here.  Shouldn't we fix that too?

Thanks, martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#49277; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Jun 2021 17:31:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 29 13:31:39 2021
Received: from localhost ([127.0.0.1]:55252 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lyHaF-00037X-FN
	for submit <at> debbugs.gnu.org; Tue, 29 Jun 2021 13:31:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:42280)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pillule@HIDDEN>) id 1lyHaD-00037O-8g
 for submit <at> debbugs.gnu.org; Tue, 29 Jun 2021 13:31:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43458)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pillule@HIDDEN>)
 id 1lyHaD-0008EH-08
 for bug-gnu-emacs@HIDDEN; Tue, 29 Jun 2021 13:31:37 -0400
Received: from mx1.riseup.net ([198.252.153.129]:44454)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <pillule@HIDDEN>)
 id 1lyHaA-0004n0-KG
 for bug-gnu-emacs@HIDDEN; Tue, 29 Jun 2021 13:31:36 -0400
Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified))
 by mx1.riseup.net (Postfix) with ESMTPS id 4GDs390cWhzDqCQ
 for <bug-gnu-emacs@HIDDEN>; Tue, 29 Jun 2021 10:31:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1624987893; bh=MxMUjoQnFeVJu3wp91Hm1fW1z7bvlC4hbg1oq2D4gcw=;
 h=From:To:Subject:Date:From;
 b=cftCwRV6m/HxBiilZfbuX9VEtEZqZjEq9ed8Slh3H/M+o7Pkfqs3PMKzOfhBrPgYQ
 +q+/DVRjgDnpoVOM9pcu0y3yUuTNe0lRIGNOpPWjEsAMzpbB9lzJYCf/qey1VrCoeM
 LYpBlv/bwdQTLcE9pz/fI2T6ooyqifMDA46LJd98=
X-Riseup-User-ID: FE9313F684C334F8254AE09A084391BDD9A504FED6D926E7E42E371C80E1E104
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by fews1.riseup.net (Postfix) with ESMTPSA id 4GDs375hBQz5w7M
 for <bug-gnu-emacs@HIDDEN>; Tue, 29 Jun 2021 10:31:31 -0700 (PDT)
From: Trust me I am a Doctor <pillule@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; [PATCH] Fix ediff3 with window-combinaison-resize
Date: Tue, 29 Jun 2021 18:24:34 +0200
Message-ID: <87im1wy3va.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=198.252.153.129; envelope-from=pillule@HIDDEN;
 helo=mx1.riseup.net
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--=-=-=
Content-Type: text/plain


I have a bug when calling ediff3, the layout is not a balanced.

Ultimately I found that combining this settings were the culprit :

(setq window-combination-resize t
      even-window-sizes nil)

;; you can test it with eg :
(setq default-directory "/home/user")
(ediff3 ".bashrc"
        ".bash_history"
        ".bash_logout")

Removing the manual resizing when splitting windows and relying rather
on 'window-combinaison-resize' to balance the layout, solve the issue.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Fix-ediff3-with-window-combinaison-resize.patch
Content-Description: Fix ediff3 with window-combinaison-resize

From ddb8cda5b0c21807c884b9e5a72b0da7ee9605a2 Mon Sep 17 00:00:00 2001
From: Trust me I am a doctor <pillule@HIDDEN>
Date: Tue, 29 Jun 2021 19:22:04 +0200
Subject: [PATCH] Fix ediff3 with window-combinaison-resize

* lisp/vc/ediff-wind.el (ediff-setup-windows-plain-compare): When
'window-combination-resize' is set to t and 'even-window-sizes'
is set to nil, the 3 window layout as in ediff3 does not produce
a balanced layout. Getting rid of the manual resizing and relying
rather on window.el to automatically resize the windows with
'window-combination-resize', solve that issue.
(ediff-setup-windows-multiframe-compare): Tiddo.
---
 lisp/vc/ediff-wind.el | 27 +++++++--------------------
 1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index fc6ea944ae..361eecd01e 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -400,7 +400,8 @@ ediff-setup-windows-plain-compare
   ;; skip dedicated and unsplittable frames
   (ediff-destroy-control-frame control-buffer)
   (let ((window-min-height 1)
-	split-window-function wind-width-or-height
+        (window-combination-resize t)
+	split-window-function
 	three-way-comparison
 	wind-A-start wind-B-start wind-A wind-B wind-C)
     (with-current-buffer control-buffer
@@ -427,14 +428,7 @@ ediff-setup-windows-plain-compare
     (other-window 1)
     (switch-to-buffer buf-A)
     (setq wind-A (selected-window))
-    (if three-way-comparison
-	(setq wind-width-or-height
-	      (/ (if (eq split-window-function #'split-window-vertically)
-		     (window-height wind-A)
-		   (window-width wind-A))
-		 3)))
-
-    (funcall split-window-function wind-width-or-height)
+    (funcall split-window-function)
 
     (if (eq (selected-window) wind-A)
 	(other-window 1))
@@ -443,7 +437,7 @@ ediff-setup-windows-plain-compare
 
     (if three-way-comparison
 	(progn
-	  (funcall split-window-function) ; equally
+	  (funcall split-window-function)
 	  (if (eq (selected-window) wind-B)
 	      (other-window 1))
 	  (switch-to-buffer buf-C)
@@ -746,6 +740,7 @@ ediff-setup-windows-multiframe-compare
 			     (and (not (frame-live-p frame-A))
 				  (or ctl-frame-exists-p
 				      (eq frame-B (selected-frame))))))
+         (window-combination-resize t)
 	 wind-A-start wind-B-start
 	 designated-minibuffer-frame)
 
@@ -758,7 +753,7 @@ ediff-setup-windows-multiframe-compare
 			   'B ediff-narrow-bounds))))
 
     (if use-same-frame
-	(let (wind-width-or-height) ; this affects 3way setups only
+        (progn
 	  (if (and (eq frame-A frame-B) (frame-live-p frame-A))
 	      (select-frame frame-A)
 	    ;; avoid dedicated and non-splittable windows
@@ -767,15 +762,7 @@ ediff-setup-windows-multiframe-compare
 	  (switch-to-buffer buf-A)
 	  (setq wind-A (selected-window))
 
-	  (if three-way-comparison
-	      (setq wind-width-or-height
-		    (/
-		     (if (eq split-window-function #'split-window-vertically)
-			 (window-height wind-A)
-		       (window-width wind-A))
-		     3)))
-
-	  (funcall split-window-function wind-width-or-height)
+          (funcall split-window-function)
 	  (if (eq (selected-window) wind-A)
 	      (other-window 1))
 	  (switch-to-buffer buf-B)
-- 
2.20.1


--=-=-=--




Acknowledgement sent to Trust me I am a Doctor <pillule@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#49277; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 21 Jul 2021 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.