roman / golden-ratio.el

Automatic resizing of Emacs windows to the golden ratio
MIT License
589 stars 38 forks source link

Moving to a complex workspace using eyebrowse while using golden-ratio-mode results in error #72

Open topher200 opened 7 years ago

topher200 commented 7 years ago

Description :octocat:

Creating or moving to a eyebrowse workspace with a complex window arrangement while in golden-ratio-mode results in error.

Turning off golden-ratio-mode removes the error.

Observed on Spacemacs' master and develop. Observed on base Emacs install with no Spacemacs or other libraries pre-loaded.

Reproduction guide :beetle:

  1. Clear out your emacs configuration by deleting or moving your .emacs.d/
  2. Start Emacs
  3. Enable Marmalade repo (https://marmalade-repo.org/#download)
  4. Install eyebrowse using install-package
  5. Install el-get (https://github.com/dimitri/el-get)
  6. Install golden-ratio-mode using el-get-install golden-ratio-mode
  7. M-x eyebrowse-mode Turn on eyebrowse mode
  8. M-x golden-ratio-mode Turn on golden-ratio mode
    • Step 8B: Close all windows but one, using C-x 0. Load your *scratch* buffer the one remaining window
  9. C-x 3 Split window on the right
  10. C-x 2 Split window on the bottom
  11. C-x 3 Split window on the right
  12. :white_check_mark: There should be four windows
  13. M-x eyebrowse-create-window-config Create a new workspace using eyebrowse

Observed behaviour: :eyes: :broken_heart: The new workspace is created!

However, we stay in our original workspace. One of the windows has disappeared from our original workspace; we now have three windows.

This error appears in the status bar:

window--state-put-1: Cannot resize window #<window 56 on  *temp*>

Expected behaviour: :heart: :smile: The new workspace is created. We move to the new workspace. Our original workspace is unmodified.


I originally reported this to the Spacemacs repo here: https://github.com/syl20bnr/spacemacs/issues/7779

They said to file a bug upstream, so I filed one with eyebrowse-mode here: https://github.com/wasamasa/eyebrowse/issues/56

The eyebrowse-mode developer took a look at the issue. He reproduced the issue and made some fixes to eyebrowse-mode (releasing version 0.7.2). However, he and I both agree that his fixes do not solve the issue - it's still able to be reproduced. He thinks underlying issue should be solved inside of golden-ratio-mode and has closed the issue in eyebrowse; see his comment here: https://github.com/wasamasa/eyebrowse/issues/56#issuecomment-261711687

chu- commented 7 years ago

Same problem.

ChrisSalisbury commented 6 years ago

I haven't thoroughly tested it, but PR #66 seems to solve this problem for me in case anyone else is looking for an easy solution. If that PR could be properly tested and merged it could very well solve this issue.

azzamsa commented 5 years ago

Same problem here.

@ChrisSalisbury no. if you open more than 2 windows the problem still occurred.

Steps: 1) open eyebrowse workspace 1, 2 and 3 2) open 1 window in w1, 3 windows in w2 and 3 windows in w3. 3) try to switch workspace. The order of buffer will messed up and the error occurred again. (the error doesn't happen in w1 because it's only contain 1 window)

window--state-put-1: Cannot resize window #<window 69 on  *temp*>
window--state-put-1: Cannot resize window #<window 78 on  *temp*>
llcc commented 5 years ago

I also tested PR #66, it doesn't work well. @ChrisSalisbury

Hope this issue can be solved.