noctuid / link-hint.el

Pentadactyl-like Link Hinting in Emacs with Avy
GNU General Public License v3.0
160 stars 22 forks source link

Check invisible property of overlays for faster scanning of links #207

Closed akirak closed 2 years ago

akirak commented 2 years ago

Fixes #206.

This PR extends link-hint--find-property-with-value function to check invisible property of overlays. Now link-hint is fast even in the situation in the referred issue. The downside is an added complexity of the function.

Please feel free to merge the PR or edit it.

noctuid commented 2 years ago

I will have to take another look at how the invisibility handling currently works and invisible overlays. Is the problem just that link-hint currently only considers the invisible text property and not invisible overlays? If possible, I'd rather modify link-hint--find-visible-regions directly instead of the search helpers.

akirak commented 2 years ago

Is the problem just that link-hint currently only considers the invisible text property and not invisible overlays? If possible, I'd rather modify link-hint--find-visible-regions directly instead of the search helpers.

I think so, and your solution will probably be better.

noctuid commented 2 years ago

I switched away from avy--find-visible-regions a while ago because of another issue, but I'm wondering how avy gets away with not looking at invisible overlays. Ideally this change will be made in avy at some point, and we can just use their function. For now, I will try to improve link-hint's version once I have some time.

akirak commented 2 years ago

I see, thanks.