From: martin rudalics <rudalics@gmx.at>
To: Joost Kremers <joostkremers@fastmail.fm>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: split-window-right doesn't work with wide margins
Date: Mon, 18 Jan 2016 11:30:54 +0100 [thread overview]
Message-ID: <569CBEDE.1000806@gmx.at> (raw)
In-Reply-To: <87io2rgrom.fsf@fastmail.fm>
> a recent change on emacs-25 seems to cause problems for
> split-window-right when a window has wide margins. To reproduce, simply
> 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 #<window 3 on *scratch*> 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 ‘split-window’ 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 ‘window-configuration-change-hook’ that resets margins appropriately.
Or write a ‘split-window-function’ which, when a window shall be split
horizontally, first resets the margins of the original window to a small
value, calls the orginal ‘split-window’ and restores the margins to some
suitable value afterwards.
martin
next prev parent reply other threads:[~2016-01-18 10:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 9:31 split-window-right doesn't work with wide margins Joost Kremers
2016-01-18 10:30 ` martin rudalics [this message]
2016-01-20 12:58 ` Joost Kremers
2016-01-20 19:43 ` martin rudalics
2016-01-22 9:31 ` Joost Kremers
2016-01-22 11:05 ` martin rudalics
2016-03-01 15:48 ` Joost Kremers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=569CBEDE.1000806@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=joostkremers@fastmail.fm \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).