Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #1147] Add an extra keybinding for ace-window that's Windows
friendly
- Loading branch information
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I updated Prelude, I found the new behavior of
C-x o
surprising. Couldace-window
be bound to something else without overridingother-window
?d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbatsov @awkspace It seems that the authors of ace-window recommend M-o
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which Prelude uses for something else. :-) I don't see the point in having a dedicated keybinding for something that replaces other-windows in pretty much all cases. Probably the real problem is setting
ace-window
to be contained to just one frame, right?d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbatsov As it is now, I am unable to change that default setting in any way. I've tried all three suggested solutions in my personal.el none has any effect. I agree that this setting may be better for most people, but for my case it really is not :)
Suggested solutions were:
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to add, now when I think about restricting ace-window to one frame wouldn't be better at all, since then I'll have to type numbers and deal with display grey-out each time (annoyance) and would still not get ace-windows benefits (being able to quickly jump to window 13 in other workspace)...
In my case (3 monitors managed by xmonad, 2-3 windows per emacsclient's frame) other-window is just the right function...
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior of
other-window
is different thanace-window
in the case where more than two windows are present, so I don't view it as a replacement. This seems like something that should be opt-in rather than opt-out.Emacs and/or Prelude being as wildly customizable as they are, I've of course since updated my own personal configuration to go back to my preferred behavior. I only left a note here because, as a Prelude user, it was quite surprising to find an extra step added to window-switching (something I do a lot) after a routine
git pull
. (And yes, having windows numbered that weren't even open in the frame I was operating in was plenty annoying, too!)d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awkspace Can you please share how you updated that personal configuration, since I wasn't able to do this?
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blueberry Sure.
(global-set-key [remap other-window] 'other-window)
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@awkspace That works for me, too! Thanks a lot!
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised by this change also. Haven't we done this before? Should we reopen #656?
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this, please?
Having to read window numbers and reach for the number keys every time I want to switch windows is a significant hassle.
s-w
is fine if I want to use ace-window, but in most cases; I don't.d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codabrink Why would we remove this when you can set it to normal behavior with
(global-set-key [remap other-window] 'other-window)
?(I would also prefer the old behavior to be the default, but since bbatsov prefers the new, and he is the one doing the work, I think it's a bit annoying if we nag him about that when there is a one-liner setting that makes emacs work exactly as we like).
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just feels like a weird decision to overwrite such a fundamental key-combination with something inherently more complicated and mentally tasking.
With
other-window
I don't have to think while switching windows. Withace-window
, I have to stop thinking about the code I'm writing, read the window numbers, match that to a number key, press it, and refocus my thought process back to the track it was on. It just seems like it gets in the way.Idk, maybe I need to give it a couple weeks for it to become second nature. I might give it a second chance.
It feels like this should be opt-in.
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, but, again, I think we should respect the preference of the author of the package, especially when one line makes things work exactly as we like?
d6786e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about anyone else, but I regularly use Prelude (or sometimes Spacemacs) as my go-to "kickstart your Emacs configuration" repository when helping new users get into Emacs. Maybe that's not what this repository is for, but it's certainly how I was introduced to Emacs myself. Viewed through the perspective of this use case,
ace-window
makes Prelude significantly more confusing for new users.Not to mention it's actually buggy as all get-out if you're using Emacs as a server. For whatever reason,
ace-window
will enumerate windows you can't even see, let alone switch to, in use on other desktops or backgroundedtmux
panes.