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: split-window-right doesn't work with wide margins Date: Tue, 01 Mar 2016 16:48:55 +0100 Message-ID: <87twkqjj14.fsf@fastmail.fm> References: <87io2rgrom.fsf@fastmail.fm> <569CBEDE.1000806@gmx.at> <874me82yr1.fsf@fastmail.fm> <569FE37D.1050406@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1456847799 9883 80.91.229.3 (1 Mar 2016 15:56:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Mar 2016 15:56:39 +0000 (UTC) Cc: emacs-devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 01 16:56:28 2016 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 1aamew-0005FO-44 for ged-emacs-devel@m.gmane.org; Tue, 01 Mar 2016 16:56:26 +0100 Original-Received: from localhost ([::1]:50498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamev-00043W-Od for ged-emacs-devel@m.gmane.org; Tue, 01 Mar 2016 10:56:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamXs-000819-Im for emacs-devel@gnu.org; Tue, 01 Mar 2016 10:49:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aamXo-0003GR-IM for emacs-devel@gnu.org; Tue, 01 Mar 2016 10:49:08 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamXo-0003GG-DP for emacs-devel@gnu.org; Tue, 01 Mar 2016 10:49:04 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0CA5620239 for ; Tue, 1 Mar 2016 10:49:04 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Tue, 01 Mar 2016 10:49:04 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=nt499+rmN9bBNNEt9iXEGYzLY3k=; b=CazVDf Jg/0DxESSOmEG2qKQYFDMCK9ZooA0FvL5ZyeZypzf5KSg1/fsJ/spNM8yR1mnYzD qhaW2qe68Rt6l7Lq1tBxo+KgJ093fH0rTPUaCh8ZKfKgk0ThM/GeCOdrruzRy4PV f96XKceUp/Samhe9CPmqhnPbRnYPBgutmybx4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=nt499+rmN9bBNNE t9iXEGYzLY3k=; b=EBXk85PgJlL9E8v/ANHKsU1Ce1ncMVqa5sbFO8R7LzQOv3z MIZKeG/4PF4bsLFDb9QM8KDemuXb7KkSzH603NC0Potrc1jU7kHbfBQuksWuRT+q 5ZRogX9EwWSzhJ4DGcilDmLtX9gJWl/s7+3d0ayRf6p3q1iIc5RnMesjxImI= X-Sasl-enc: PPlMTUZiTocVVzgXCIQpKQAVjyuhB9pVp+Dcyh1eL5ua 1456847343 Original-Received: from IdeaPad.messagingengine.com (x5f774c38.dyn.telefonica.de [95.119.76.56]) by mail.messagingengine.com (Postfix) with ESMTPA id 32FFDC00016; Tue, 1 Mar 2016 10:49:03 -0500 (EST) User-agent: mu4e 0.9.17; emacs 25.0.91.1 In-reply-to: <569FE37D.1050406@gmx.at> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 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:200846 Archived-At: On Wed, Jan 20 2016, martin rudalics wrote:> [split-window function that first reduces the margins] > No. ‘split-window-preferred-function’ only affects ‘display-buffer’. > It does not affect ‘split-window’. I attached a possible solution which > is far from ideal. I hope you get the idea. I've finally gotten around to implementing this. Yes, I get the idea, but there wasn't much I could improve, so I've basically taken your function and adapted it for use in my package. Works fine for me so far, and I haven't had any serious bug reports (yet). > A similar solution would > be needed for ‘split-window-preferred-function’. Essentially you would > have to rewrite ‘split-window-sensibly’ with a reset/restore mechanism > around the (window-splittable-p window t) and (split-window-right) > forms. Slightly more tricky ... I've taken a slightly different approach. I wrote a function that unsets the margins and then simply calls `split-window'. Since `split-window-preferred-function' is a user option, it's not installed by default. I've left that up to the user to decide. (Though I've set the option and so far, everything works fine.) Thanks for your help -- Joost Kremers Life has its moments