From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22009: PATCH: Use `window-total-width' in `window-splittable-p' Date: Fri, 27 Nov 2015 22:56:30 +0200 Message-ID: <83mvtzqhz5.fsf@gnu.org> References: <87io4qgrcg.fsf@fastmail.fm> <87lh9kw8bd.fsf@fastmail.fm> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448657839 10042 80.91.229.3 (27 Nov 2015 20:57:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2015 20:57:19 +0000 (UTC) Cc: 22009@debbugs.gnu.org To: Joost Kremers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 27 21:57:08 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a2Q4n-0007QO-NS for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Nov 2015 21:57:05 +0100 Original-Received: from localhost ([::1]:58492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2Q4q-0001SC-Hv for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Nov 2015 15:57:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2Q4n-0001Rx-AV for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2015 15:57:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2Q4k-00045k-2d for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2015 15:57:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2Q4j-00045g-Vh for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2015 15:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a2Q4j-0004rw-So for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2015 15:57: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, 27 Nov 2015 20:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22009 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22009-submit@debbugs.gnu.org id=B22009.144865780618687 (code B ref 22009); Fri, 27 Nov 2015 20:57:01 +0000 Original-Received: (at 22009) by debbugs.gnu.org; 27 Nov 2015 20:56:46 +0000 Original-Received: from localhost ([127.0.0.1]:56502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a2Q4U-0004rL-95 for submit@debbugs.gnu.org; Fri, 27 Nov 2015 15:56:46 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:50692) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a2Q4S-0004rA-EV for 22009@debbugs.gnu.org; Fri, 27 Nov 2015 15:56:45 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NYH00I00R4XC500@a-mtaout23.012.net.il> for 22009@debbugs.gnu.org; Fri, 27 Nov 2015 22:56:43 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYH00ITORIIAY20@a-mtaout23.012.net.il>; Fri, 27 Nov 2015 22:56:43 +0200 (IST) In-reply-to: <87lh9kw8bd.fsf@fastmail.fm> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:109344 Archived-At: > From: Joost Kremers > Date: Fri, 27 Nov 2015 02:16:22 +0100 > > The problem I'd like to solve (and the reason I submitted the patch) is > that if a window has wide margins that are used to center the text, > `window-splittable-p' will say that the window cannot be split > horizontally, even though it can, because the margins are disposable. > > But actually, that's not the real problem. The real problem is that > `window-splittable-p' simply has too little information to make an > informed decision. > > The point is that the margins may be used for two different kinds of > purposes: > > (1) The margins can be used to display useful information, in which case > they should be retained when the window is split. > > (2) The margins can be used to reduce the width of the text area. In > this case, the margins are disposable. There's one more factor here: whether the margins will remain at their width after splitting. The mode which you presented and where the current behavior was a problem changed the margins width as result of the split (AFAIU), which is something the split decision cannot possibly know. So I don't see how we could solve the problem even in principle if we want to handle such modes correctly. The only way is to ask the modes themselves, or provide a hook for them to override the decision. > We were discussing just such a proposal on emacs-devel, so perhaps it > would be best to continue the discussion there? Probably. And I still think such changes are not for the release branch. Thanks.