abo-abo / avy

Jump to things in Emacs tree-style
1.72k stars 110 forks source link

Sync our two branches #227

Closed rswgnu closed 6 years ago

rswgnu commented 6 years ago

I redid my changes to match the way you made them, leaving just this.

This PR is mainly to sync our two branches with any remaining differences. Each change is needed in some context, typically to support the new ace-window features. So if you think something is not necessary, please ask about it before choosing to not make the change. There are only a few changes here. Thanks.

abo-abo commented 6 years ago

I don't want to use avy-mouse-event-window in avy-read. This should be done in avy-handler-function instead.

Please rebase PRs to origin/master. I don't use merge commits in any of my repositories.

rswgnu commented 6 years ago

Two issues with your above comment:

  1. If you don't exit in avy-read when char is a window, then right afterwards in my new code to properly set avy-current-path is this call which will fail: (string (avy--key-to-char char))

so we'd have to move that logic to avy-handler-function as well even though it should be done in every call of avy-read. Then the avy-read branch logic when true would not have avy-current-path set right.

  1. avy-handler-function can be overridden by every package that uses avy, so they'll all have to have the same logic for processing chosen windows rather than just receiving the window and doing anything they want with it.

Performance-wise, I don't think such a change would be much better and I don't see how to make the logic work right otherwise. Given that, could you test it as is (once I rebase the PR) and see if it works for you? If you find a specific issue, I would be happy to deal with it.

rswgnu commented 6 years ago

I have rebased the commits so they are ready for application.

abo-abo commented 6 years ago

Thanks.