abo-abo / ace-window

Quickly switch windows in Emacs
977 stars 87 forks source link

Feature Change Request: Fixed window identifier to mean create a new frame #110

Closed rswgnu closed 6 years ago

rswgnu commented 6 years ago

I would like to have a fixed window candidate identifier, e.g. z, which would not be assigned to a live window but would tell ace-window to create a new single window frame and display whatever it was going to display in that window.

It looks to me like the way to do this is to change the aw-dispatch-default function to (funcall avy-handler-function) rather than calling avy-handler-default directly. Then the avy-handler-function could be changed so that when no window identifier candidate match is found, the new frame could be created. But how then would one dispatch again to perform the desired ace-window operation specified by the key sequence given?

For example, if ace-window is bound to M-o, then M-o z should create the new frame and select it.

abo-abo commented 6 years ago

Thanks, your request is more clear now. I'll try to get to it when/if I get some time.

A PR would speed things up tremendously. For your implementation question, see aw-show-dispatch-help which just calls ace-window again.

rswgnu commented 6 years ago

On Nov 24, 2017, at 10:22 AM, Oleh Krehel notifications@github.com wrote:

Thanks, your request is more clear now. I'll try to get to it when/if I get some time.

Great. A PR would speed things up tremendously. For your implementation question, see aw-show-dispatch-help which just calls ace-window again.

I will try to make one this coming week.

Bob

rswgnu commented 6 years ago

Implemented in pull request #114.

rswgnu commented 6 years ago

The newest commit works. Thanks.

I did notice, however, that if ace-window-display-mode is active (showing window selection ids in the modeline). The id for the window in the frame newly created by the 'z' target is not shown until a split window or other major frame change command is done. It would be great to fix that.

rswgnu commented 6 years ago

When synching our branches, you missed or omitted the commit that fixes the above issue. It is this commit.

abo-abo commented 6 years ago

I wasn't sure which problem the code was fixing. Can you please open a new PR with this commit and some scenario that explains how it works.

rswgnu commented 6 years ago

On Tue, Dec 12, 2017 at 4:21 PM, Oleh Krehel notifications@github.com wrote:

I wasn't sure which problem the code was fixing. Can you please open a new PR with this commit and some scenario that explains how it works.

​I will do that soon, with a few more minor changes and then we should be set.

rswgnu commented 6 years ago

This issue is now resolved.