Subject: bug#42483: 26.1: thing-at-point doesn't recognize org-link urls

From: "Jose A. Ortega Ruiz" <[email-masked]>
Date: Fri, 22 Jan 2021 21:24:56 +0000

On Fri, Jan 22 2021, Lars Ingebrigtsen wrote:

[...]

> This sounds like something that belongs in org, though, and not in
> thingatpt.el, though.  Unfortunately, thing-at-point doesn't have a
> mode-based model for working...  but it could grow one?  That is, there
> could be a buffer-local thing-at-point-local-things, and Org could set
> that to
>
> ((url . org--org-url-at-point))
>
> or something like that.
>
> Any opinions?

Another context in which something like this could be useful is
emacs-w3m buffers, which are naturally full of links stored in text
properties (or eww, i am guessing).

A strategy i've seen elsewhere (in the embark package) for something
similar is to keep a list of "target finders" that are applied in turn,
until one succeeds returning, say, '(url . "http://foo/bar").  That's
essentially what you're suggesting above, except that one can write
global detectors (the list is not (necessarily) buffer local)

Just an idea,
jao
-- 
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare. - Blair Houghton.