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

infinite recursing when using balance-windows #75

Open
zenspider opened this issue Feb 3, 2017 · 1 comment
Open

infinite recursing when using balance-windows #75

zenspider opened this issue Feb 3, 2017 · 1 comment
Labels

Comments

@zenspider
Copy link

(defun rwd-golden-ratio-inhibitor ()
  (and (<= (length (window-list)) 2)
       (or (one-window-p) (balance-windows) t))) ; rebalance if we drop to 1-2

in certain situations, like when using elscreen, I'm hitting infinite recursion between balance-windows and the invocation of my hook via golden-ratio. A guard could prevent this from triggering while already triggering.

@wictory wictory added the bug label Dec 14, 2019
@wictory
Copy link
Collaborator

wictory commented Dec 14, 2019

The golden-ratio function calls balance-windows and avoids infinite recursion by disabling golden-ratio-mode before the call. golden-ratio is calls the members of golden-ratio-inhibit-functions before inhibiting itself.

The interface of golden-ratio-inhibit-functions does not specify what side-effects are allowed, so it's fair to call this a bug. There are two solutions: 1) redefine the interface to allow calls balance-windows, or 2) disable golden-ratio-mode before calling golden-ratio-inhibit-functions.

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

2 participants