roman / golden-ratio.el

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

Golden-ratio keeps resizing sr-speedbar, and don't listening to ignore. #44

Closed ReneFroger closed 9 years ago

ReneFroger commented 9 years ago

Hi there. Thanks for sharing the plugin. I use sr-speedbar, to get a view of the structure of files/directories.

When I open the speedbar with sr-speedbar-toggle. Instead getting as a small file browser, it's resizing to more than half of my window. Golden-ratio triggers this behaviour.

After looking around, I found this command (setq golden-ratio-exclude-buffer-names '("*helm M-x*" "*helm for files*"))

When I do C-x C-b in speedbar window, I see the name of the buffer is *SPEEDBAR*.

So I modified it in: (setq golden-ratio-exclude-buffer-names '("\\*SPEEDBAR*"))

But golden-ratio still resizing the speedbar window, instead just ignoring it. I found no another solution or answers here.

Any suggestion?

roman commented 9 years ago

Can you check the mode of the *SPEEDBAR* buffer, and use the exclude-modes variable?

ReneFroger commented 9 years ago

I solved it as:

    (setq sr-speedbar-right-side nil)  
    (setq sr-speedbar-max-width 10)   
    (setq sr-speedbar-default-width 20)
    (setq speedbar-show-unknown-files t)