roman / golden-ratio.el

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

Inhibit functions don't seem sufficient to prevent resizing windows #60

Closed justbur closed 8 years ago

justbur commented 8 years ago

There's a conflict between which-key and golden-ratio (Ref https://github.com/justbur/emacs-which-key/issues/67) where golden-ratio seems to nudge the which-key buffer down. See the pictures in the referenced issue.

I tried this, but it doesn't seem to help

(defun which-key-showing? ()
  (and which-key--buffer (window-live-p (get-buffer-window which-key--buffer))))
(setq golden-ratio-inhibit-functions '(which-key-showing?))

I confirmed that this function works and therefore should prevent golden-ratio from doing anything. There's just something that golden-ratio is doing that I can't prevent. Any ideas would be appreciated.

justbur commented 8 years ago

As suggested by @syl20bnr, let binding golden-ratio-mode while showing the which-key buffer solved the problem. I don't understand why that should be different than using the inhibit functions variable but it is.

If you don't want to do anything about this, I'm ok with you closing the issue, since I'm just going to work around it for now.

justbur commented 8 years ago

I think I found an alternative way to use the inhibit functions variable that works for me, so I'll close this