Jim Porter <jporterb...@gmail.com> writes: > + (setq-local bounds-of-thing-at-point-provider-alist > + (append bounds-of-thing-at-point-provider-alist > + '((url . eww--bounds-of-url-at-point)))) > + (setq-local forward-thing-provider-alist > + (append forward-thing-provider-alist > + '((url . eww--forward-url)))) > ...
What happens if you have multiple providers for an URL? You add the provider to the end, so it will have the lower priority in this scenario. I guess that you want the opposite - EWW provider to take precedence. Same for other changes. > +(ert-deftest thing-at-point-providers () > ... > +(ert-deftest forward-thing-providers () > ... > +(ert-deftest bounds-of-thing-at-point-providers () > + (with-temp-buffer > + (setq-local bounds-of-thing-at-point-provider-alist > + `((url . ,(lambda () > + (bounds-of-thing-at-point-for-text-property > + 'my-url))))) It would make sense to add tests for "first wins" behaviour. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>