From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.devel Subject: Re: Window splitting issues with margins Date: Sat, 14 Nov 2015 21:34:09 +0100 Message-ID: <87mvugs4la.fsf@fastmail.fm> References: <874mgrwerb.fsf@fastmail.fm> <5644A2AC.3080703@gmx.at> <871tbux3vb.fsf@fastmail.fm> <564599A6.6060306@gmx.at> <838u62guhm.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447655559 23143 80.91.229.3 (16 Nov 2015 06:32:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Nov 2015 06:32:39 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 16 07:32:28 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZyDL0-0004lX-Ud for ged-emacs-devel@m.gmane.org; Mon, 16 Nov 2015 07:32:27 +0100 Original-Received: from localhost ([::1]:45781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyDKz-000862-Tt for ged-emacs-devel@m.gmane.org; Mon, 16 Nov 2015 01:32:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxhWf-0004iS-Af for emacs-devel@gnu.org; Sat, 14 Nov 2015 15:34:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxhWc-0006HI-3j for emacs-devel@gnu.org; Sat, 14 Nov 2015 15:34:21 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:57139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxhWb-0006Gt-VO for emacs-devel@gnu.org; Sat, 14 Nov 2015 15:34:18 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 862B12012A for ; Sat, 14 Nov 2015 15:34:16 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 14 Nov 2015 15:34:16 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=T2GbV uoWH8yO/4gid2K0/001FPM=; b=VBicR+wuussl3F4Tt/Coq76m0bruBYeG9ErsE 5M5MTsnqWHgUdoKqs5gq4bUMBGuPx3VECyO7eWrYhKyW1u3U/nuEWn+5QUG+fh8k 9t0MfdZMjR0mJMzX4ecL0erRRnQilQzvGNTPbAKEa+Dylo9cEbiJ+Fomk7DLRtHZ zuaiJ4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=T2GbVuoWH8yO/4gid2K0/001FPM=; b=E968b BVIhu+mEgdXrokC6moM0HPM0n21gYiYEe2KbnEb31EH4UqNEh64UnLzhnHtyBO5s gQ/5VoC0MzdBmtBqiDWU35U2WNrAPQYv0MNsg4KJ0udwF198z/NlWKKEo8FLNYi9 UNwH93cEWkQyV4Kj6FCXZ4Y3kT9DLNvdaS9O+0= X-Sasl-enc: tAdc8pX7SjKrPS+FM0PkzkB0hjDJGTfU+I89aH6m5Y2n 1447533255 Original-Received: from IdeaPad.messagingengine.com (x4d0ad6fa.dyn.telefonica.de [77.10.214.250]) by mail.messagingengine.com (Postfix) with ESMTPA id 9ADB2C018F1; Sat, 14 Nov 2015 15:34:15 -0500 (EST) User-agent: mu4e 0.9.13; emacs 24.5.50.1 In-reply-to: <838u62guhm.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.29 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194497 Archived-At: On Fr, Nov 13 2015, Eli Zaretskii wrote: >> Date: Fri, 13 Nov 2015 09:04:54 +0100 >> From: martin rudalics >> Cc: emacs-devel@gnu.org >> >> > Except that I don't know if any other package is also using the margin >> > and should perhaps assume a minimum width larger than 0. Right now, >> > visual-fill-column will happily set the margin to 0 if the window width >> > is smaller than the requested text width. >> >> The question is whether it makes any sense for two packages to ever >> share one and the same margin. I doubt that. Well, linum-mode uses the margins to display line numbers and both writeroom-mode and darkroom-mode use them to center the text in a wide window. Personally, I don't use both modes at the same time (I use writeroom-mode when writing text, linum-mode to me only seems useful in programming), but there are apparently users who would like to use both at the same time. Which currently is not possible. > I agree. Making the display margins shareable is a tough nut, it will > most probably require introduction of quite a few new functions that > every user of the margins will have to consult. If the only use case > that needs that is these two modes, For the moment, it seems so, yes, but who knows what uses for the margins future packages come up with? > and if their problem is only with > splitting the window, let's instead try to solve that on the > window-splittable-p level. Actually, that's not the only problem. Just activating both linum-mode and writeroom-mode in a single buffer is already problematic, because linum-mode doesn't take the possibility into consideration that some other package might have set the left margin to a value > 0. writeroom-mode will do the same, BTW. The window-splittable issue has nothing to do with linum-mode, it's just a writeroom-mode issue. It's just that I think both issues could be solved by the same mechanism: allowing a (minor) mode to lock the margins to a certain minimum width. window-splittable-p could then assume that those parts of the margins that are not locked can be reduced along with the text area, unlike now, where the underlying assumption seems to be that if the margins are > 0, there's probably a reason for it and they shouldn't be reduced. At the same time, it would allow linum-mode and writeroom-mode to play nice together: instead of setting the margin to the size it requires for line numbers, linum-mode could set a minimum size, allowing other packages to make them wider. writeroom-mode then would not be allowed to set margins to less than the minimum size. I'm not familiar with Emacs internals, so I can't say how difficult something like this would be to implement or if it's really the best method. It's also more of a "would be nice to have" rather than a "must have" and it might be more trouble than it's worth. But still, it would be nice to have. ;-) -- Joost Kremers Life has its moments