From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.bugs Subject: bug#22009: PATCH: Use `window-total-width' in `window-splittable-p' Date: Fri, 27 Nov 2015 02:16:22 +0100 Message-ID: <87lh9kw8bd.fsf@fastmail.fm> References: <87io4qgrcg.fsf@fastmail.fm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448587042 11134 80.91.229.3 (27 Nov 2015 01:17:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2015 01:17:22 +0000 (UTC) To: 22009@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 27 02:17:09 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 1a27et-0000Ec-CM for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Nov 2015 02:17:07 +0100 Original-Received: from localhost ([::1]:53786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a27ev-00086b-Te for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Nov 2015 20:17:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a27es-00083R-4P for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2015 20:17:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a27eo-0006eK-TY for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2015 20:17:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a27eo-0006eE-Kf for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2015 20:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a27eo-0003yE-4d for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2015 20:17:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87io4qgrcg.fsf@fastmail.fm> Resent-From: Joost Kremers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Nov 2015 01:17:02 +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.144858700915239 (code B ref 22009); Fri, 27 Nov 2015 01:17:02 +0000 Original-Received: (at 22009) by debbugs.gnu.org; 27 Nov 2015 01:16:49 +0000 Original-Received: from localhost ([127.0.0.1]:54810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a27eb-0003xi-BP for submit@debbugs.gnu.org; Thu, 26 Nov 2015 20:16:49 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:36675) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a27eG-0003xH-Vq for 22009@debbugs.gnu.org; Thu, 26 Nov 2015 20:16:47 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 8D53420A68 for <22009@debbugs.gnu.org>; Thu, 26 Nov 2015 20:16:28 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 26 Nov 2015 20:16:28 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=SC23XjNeifq102OFtT5ZZ8btNIg =; b=aYq7L5rKTpXtfaoRX+dTuTVAkIQxMOuVODtffcwpGQl1iNvPdbWTSlKuk13 PdORTJHf/nOLHdgnhDVGrnS5+Y/rN+GLcdVdImfUGiEW/RrYa7D+HMnt9ov5qaim RlDR87PNeHQ1g7mJtPSYWB3j9MXr2VXAVM38IzZAXXeqyTZ8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=SC 23XjNeifq102OFtT5ZZ8btNIg=; b=oZNcZyelDsAhchCqWq+fEw0YNtGJ0d7haV nKNTBXWEOxsP34n1XhlQrT+JscIYCcnsFXs3Z5FFu2wr5WF3nkqsZnEgt/i7qCeW 3ub65JhYpCaJtcWvrQDyx8gKgSYmZEEtG7COcqINjCq+3NPkNGyIXzhPJVKy7UgG fNukOzFFE= X-Sasl-enc: abxw3+bN+KmYNZWGrY0B8WdEeArh+leyyoCgWvX9+CkA 1448586988 Original-Received: from IdeaPad.messagingengine.com (x5f7750b2.dyn.telefonica.de [95.119.80.178]) by mail.messagingengine.com (Postfix) with ESMTPA id E869EC016DB for <22009@debbugs.gnu.org>; Thu, 26 Nov 2015 20:16:27 -0500 (EST) User-agent: mu4e 0.9.13; emacs 24.5.50.1 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:109321 Archived-At: [My apologies if this message messes up threading. I accidentally deleted the thread from my mail archive.] Eli Zaretskii wrote: > Maybe we should step back and recall what problem are we trying to > solve with the proposed patch, then. 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. Right now, `window-splittable-p' does the right thing for case (1), but not for case (2). With the patch I submitted, it would do the right thing for case (2), but no longer for case (1). So I agree it's actually a bad patch. The only way to deal with both (1) and (2) correctly, and also with the case where different modes use the margins for (1) and (2) *at the same time*, would be to store information about the modes that use the margins and for which purpose. Then `window-splittable-p' could tell which part of the margins must be retained and which part is disposable. We were discussing just such a proposal on emacs-devel, so perhaps it would be best to continue the discussion there? -- Joost Kremers Life has its moments