Open deb0ch opened 7 years ago
Cc-ing @bmag just in case.
Below is what I get when I invoke ranger
(via SPC a r
). Isn't this how it's supposed to be?
Anyway, if it's indeed an integration issue between window-purpose and ranger, this sort of problem is usually solved by configuring window-purpose (and sometimes fixing the window-creation process of the other package).
Well that's strange, I just tried again and I actually don't reproduce 100% of the time (but still often enough) 🤔
It just happend sometimes, more often when switching from a directory preview to a regular file preview or the other way around.
Strange.
I actually don't reproduce 100% of the time
It could depend on what buffers are visible when you call ranger and also depend on how you invoke ranger, so details about window layout before invoking ranger (including window purposes, can be obtained via M-: (purpose-window-purpose)
if not visible in the mode-line), how you invoke ranger, and window layout afterwards (including purposes) is needed. (if it's a window-purpose issue)
Ranger does not work properly when emacs-purpose is activated: the preview does not appear on the right where it is supposed to, but on the parent directory's window instead.
This is somewhat linked to another conflict between Ranger and golden-ratio (I actually discovered the
emacs-purpose
conflict while debugging this one):when
golden-ratio
is activated, it messes up Ranger's windows badly. Happily, this is fixed by addingranger-mode
to thegolden-ratio-exclude-modes
list. The only thing is, ifpurpose-mode
is activated as well, the windows are messed up again. I think it is because purpose makes a non-ranger-mode
preview window active for a brief instant andgolden-ratio
resizes it.One solution that I could imagine would be having two hooks: one when activating Ranger and one when leaving it, that would temporarily disable any window-managing minor-mode during a Ranger session and restore the previous state afterward. I think you already have the first hook but didn't see the second one in the code.
This way we could also easily deal with any other window-managing minor-mode that would conflict with Ranger in the future.
As you may know,
emacs-purpose
is currently integrated to Spacemacs'develop
branch.Don't hesitate to request screenshots if I wasn't clear enough ! :smile_cat: