emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding custom providers for thingatpt.el (was: [PATCH] Add support f


From: Jim Porter
Subject: Re: Adding custom providers for thingatpt.el (was: [PATCH] Add support for 'thing-at-point' to get URL at point)
Date: Tue, 30 Apr 2024 11:27:04 -0700

On 4/30/2024 4:39 AM, Ihor Radchenko wrote:
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.

That's probably reasonable. I was just keeping things the way they were historically here, but we might as well fix this now.

It would make sense to add tests for "first wins" behaviour.

Done.

I've also fixed a bug in EWW and bug-reference-mode where it would return nil for (thing-at-point 'url) if point was at the *end* of a URL. It's now consistent with how 'thing-at-point' works by default. (If you have two consecutive URLs and point is between them - only possible with the custom provider function, I think - it'll prefer the second one.)

Attachment: 0001-Allow-defining-custom-providers-for-more-thingatpt-f.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]