From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: split-window-right doesn't work with wide margins Date: Mon, 18 Jan 2016 11:30:54 +0100 Message-ID: <569CBEDE.1000806@gmx.at> References: <87io2rgrom.fsf@fastmail.fm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1453113115 31675 80.91.229.3 (18 Jan 2016 10:31:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2016 10:31:55 +0000 (UTC) To: Joost Kremers , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 18 11:31:47 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 1aL76B-0006sh-4Z for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2016 11:31:47 +0100 Original-Received: from localhost ([::1]:58697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL76A-00013f-Jq for ged-emacs-devel@m.gmane.org; Mon, 18 Jan 2016 05:31:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL75o-0000or-J8 for emacs-devel@gnu.org; Mon, 18 Jan 2016 05:31:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aL75k-0003tE-JF for emacs-devel@gnu.org; Mon, 18 Jan 2016 05:31:24 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:51524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL75k-0003so-Ba for emacs-devel@gnu.org; Mon, 18 Jan 2016 05:31:20 -0500 Original-Received: from [192.168.1.100] ([212.95.7.12]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LvDpe-1aCl2P2iHa-010P6H; Mon, 18 Jan 2016 11:31:15 +0100 In-Reply-To: <87io2rgrom.fsf@fastmail.fm> X-Provags-ID: V03:K0:Yjfx9gTbTqSpeEz93oG2c5/SfLBrG9VOqRRB24DqHTLFnT6swVB U5SRwFtuoQPdEtxymrk81N7y+VPXus04f6wlDothPYhBSDJIeM6Y1LxM6Yb2AMFK+ulNwQg jNGTVQiLknfVoMLLqm92S8dEXMHJZ8Be+1aHRzpBnDMJ81zT1ph5kQPcNgtDgK++pKQjI35 FNemzNDzp5STOdGJ9zU5w== X-UI-Out-Filterresults: notjunk:1;V01:K0:ZrBmvJvTf0A=:SuEzH8eZm1kbTi2KF3wijS ZJsrwSQQ+9XWyVVI8r+EQqPWW7DIMv1HRo4A5pF6s2PBP6VV1MnCGdVr6XfYt0SfhL8HUJLS4 3SSUWnsi1P0TAkAB4Ii7uRCHH8ABJbZK3xRFJqPy+kisWDnAbP0Fj9CVqbpDCV5mOpEg635WH qI8hKurw+PKkjNbaejwGenO3mLioKcZMLab3b0wibCrpJQvJjWrFO0O4n0vxB6qhrABDKS9pr jSlvCr7V+algLQv0IEBHMe34fqCSzpYFcJNcj+YqrU+KkzzyHj/yEtPLzgDRXz13A/NLOdZBK 3TWPV6QTuOA+ozMKgTKIeX7/f9+FpRLW49Mk1aYECFF6WBBwj6GY/k1C7l6rAPFfbruGOnuDa Di97WXrxkyCnIB4Pll16aoUWMMrde3qHUtOGW5/N6GDXUCHFOwrdewrowr9hGHFMqknuC4xYP DEfZ/9hWeSIO0OG46o8LvUNEXwBgCFg9/qlsXTRxZWGHjGFe9/MJoKC10rM5sCAcWdd4cPsMK FhRc+Xpjq/WTGeYwDoReUXcGbFSYPoXsNoev35BXODGOvpXQIi/0FC/EBV8Ey6Xh16tEfSgnY 6gVwK8s1ji9vHZz547fq06QalA1+8d8cbjRv/00wSqIibLdbIIyLdMWJTHwxgf5Qm2NZG9shH xn8Ex9y58Jf2riucBQHKx0Qumm8hkhJUd4RCziWbsMNXFG2B68wSi5PcOKXiI8+tfO+kYgszJ z30dwGzuR+jmOTeEluVX9ufo4Oh8sZpoJmszZGd3KoqISPOBBeFgrx7eBJB7INqsgZ5b7Cta X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 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:198245 Archived-At: > a recent change on emacs-25 seems to cause problems for > split-window-right when a window has wide margins. To reproduce, simpl= y > create a wide frame with one window, create a wide right margin with > `M-: (set-window-margins nil nil 130)` and then `C-x 3`. This will > produce the following error > > split-window: Window # too small for splitting = (2) > > Does anyone know what change may have caused this? If you're sure that this is a recent change, please try to locate it. Here Emacs 25 behaves right as Emacs 24.5 in this regard. > And is it intentional > behaviour or should this be considered a bug? The window on the right conceptually inherits the margins from the original window. If the margins won't fit, Emacs signals an error. You could try to bind C-x 3 to a function based on =E2=80=98split-window=E2= =80=99 that explicitly sets its SIZE argument to something like half of the width of the selected window. Obviously, this will rely on a suitable function on =E2=80=98window-configuration-change-hook=E2=80=99 that resets margins= appropriately. Or write a =E2=80=98split-window-function=E2=80=99 which, when a window s= hall be split horizontally, first resets the margins of the original window to a small value, calls the orginal =E2=80=98split-window=E2=80=99 and restores the = margins to some suitable value afterwards. martin