joostkremers / writeroom-mode

Writeroom-mode: distraction-free writing for Emacs.
BSD 3-Clause "New" or "Revised" License
610 stars 28 forks source link

Writeroom-mode breaks Helm #26

Closed tmalsburg closed 8 years ago

tmalsburg commented 8 years ago

When I enable writeroom-mode and then helm-M-x, I get the following error message:

 split-window: Window #<window 3 on manuscript.Rnw> too small for splitting (2)

Using a recent development Emacs and up-to-date helm and writeroom-mode from MELPA.

joostkremers commented 8 years ago

Could you provide a backtrace of the error? (Turn on debug-on-error and post the contents of the backtrace buffer after invoking helm-M-x.) I don't use helm so it's not easy to test for me.

tmalsburg commented 8 years ago

Just tried a couple of things. The problem doesn't have much to do with helm specifically. It's just that helm tries to split the window horizontally (to show a list of options) and since the fringes are so wide in writeroom-mode that's not possible. Just do (split-window-right) in writeroom-mode to reproduce the problem.

You could argue that this is a feature not a bug, but if there was a way to let writeroom-mode coexist peacefully with other emacs features that want to open windows that would be fantastic. However, I'm afraid that this may require elastic fringes and that might not be easy to implement.

joostkremers commented 8 years ago

Yes, I brought up that issue on emacs-devel, but fixing it properly requires quite a bit of work and the gains would be small.

Usually, though, if a window cannot be split horizontally, Emacs will revert to splitting the window vertically, so it's never been a real problem for me. I guess you'd have to ask the helm maintainers why helm doesn't seem to do this.

tmalsburg commented 8 years ago

Ok, I'll talk to Thierry. Thanks for the feedback.

joostkremers commented 8 years ago

I got a similar report about visual-fill-column-mode https://github.com/joostkremers/visual-fill-column/issues/13, which suggests that something happened in the emacs-25 branch that causes this. I'll try and find out what's going on.

joostkremers commented 8 years ago

Do you happen to know when you last updated your Emacs sources before this problem appeared?

tmalsburg commented 8 years ago

I can't tell because I wasn't using writeroom-mode in quite a while. Sorry.

joostkremers commented 8 years ago

The error you saw is the result of a change in behaviour when splitting windows, and it's apparently going to be included in the next Emacs release. I'll have to figure out a work-around, but I've been given some suggestions on how to do this, so hopefully I'll be able to fix this soon.

joostkremers commented 8 years ago

I'll close this issue for now. If I make any progress, I'll post about it in the visual-fill-column thread about the same issue:

https://github.com/joostkremers/visual-fill-column/issues/13

tmalsburg commented 8 years ago

I saw the discussion on emacs-devel. Thanks for the update.