Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window too small for splitting #12

Closed
incandescentman opened this issue Aug 4, 2016 · 14 comments
Closed

window too small for splitting #12

incandescentman opened this issue Aug 4, 2016 · 14 comments
Labels

Comments

@incandescentman
Copy link

Since upgrading to Emacs 25, I'm no longer able to split windows horizontally, even when I set split-width-threshold to a low value (e.g. 5). When I run split-window-horizontally or split-window-right, I get this:

Debugger entered--Lisp error: (error "Window #<window 7 on warm.org> too small for splitting (2)")
  signal(error ("Window #<window 7 on warm.org> too small for splitting (2)"))
  error("Window %s too small for splitting (2)" #<window 7 on warm.org>)
  split-window(nil nil t)
  split-window-horizontally(nil)
  funcall-interactively(split-window-horizontally nil)
  call-interactively(split-window-horizontally nil nil)
  command-execute(split-window-horizontally)

When I disable olivetti-mode for the current buffer, I am then able to do split-window-horizontally. Any suggestions?

@rnkn
Copy link
Owner

rnkn commented Aug 4, 2016

Sounds nasty. Sorry I'm away from the computer for a few days, so I'll need to take a look on Monday.

@rnkn
Copy link
Owner

rnkn commented Aug 9, 2016

This is a bug in Emacs. Someone seems to have made a very poor design decision in changing the way window-min-size works. I've reported here http://debbugs.gnu.org/24193

@incandescentman
Copy link
Author

@rnkn Thank you!

@rnkn rnkn added the bug label Aug 10, 2016
@rnkn
Copy link
Owner

rnkn commented Aug 14, 2016

I'm going to keep pushing for the Emacs maintainers to fix window-min-size but in the interim you can use Martin Rudalics' workaround and put this in your init:

(defun split-window-right-ignore (&optional size)
  (if (car size) size (list (/ (window-total-width) 2))))

(advice-add 'split-window-right :filter-args
            'split-window-right-ignore)

which will feed split-window-right (C-x 3) either the prefix argument or half of the window width.

@rnkn
Copy link
Owner

rnkn commented Aug 14, 2016

Don't bother with the above, I've pushed a new stable release 1.5.1 with this fix and an option olivetti-patch-emacs-bugs which defaults to true.

@rnkn rnkn closed this as completed Aug 14, 2016
@incandescentman
Copy link
Author

Thanks!!

On Sun, Aug 14, 2016 at 6:23 AM, Paul Rankin notifications@github.com
wrote:

Don't bother with the above, I've pushed a new stable release 1.5.1 with
this fix and an option olivetti-patch-emacs-bugs which defaults to true.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#12 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB7EcmaQKfVspQ_bX32oP2HRl_T4DI4Lks5qfuyRgaJpZM4JcXrJ
.

@rnkn
Copy link
Owner

rnkn commented Sep 2, 2016

Latest version 1.5.3 will behave well with 25.1 without patching existing functions.

@incandescentman
Copy link
Author

Amazing thank you!

@rnkn
Copy link
Owner

rnkn commented Sep 6, 2016

Correction, version 1.5.5 (as I messed up the tagging). If you're on regular MELPA it won't make a difference.

@dchrzanowski
Copy link

dchrzanowski commented Feb 9, 2017

This issue still seems to be around on Emacs 25.1-4. However not on normal splits, but only when I use the Sunrise Commander. Everything is ok on full-screen. Any solutions for this?

@rnkn
Copy link
Owner

rnkn commented Feb 9, 2017

Sorry what it Sunrise Commander?

@dchrzanowski
Copy link

Apologies I didn't realise that my post is irrelevant here.

@rnkn
Copy link
Owner

rnkn commented Feb 9, 2017

😎 Everything working okay?

@dchrzanowski
Copy link

Yes everything is absolutely fine. I had an issue with a different package, and a Google search led me here. My mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants