On 5/20/2024 3:41 AM, Ihor Radchenko wrote:
Jim Porter <jporterb...@gmail.com> writes:

+  (when (boundp 'forward-thing-provider-alist)
+    (setq-local forward-thing-provider-alist
+                (cons '(url . org-next-link)
+                      forward-thing-provider-alist)))

According to the docstring, functions in `forward-thing-provider-alist'
should accept a single argument - the number of "things" to skip
forward/backward. But it is not what `org-next-link' expects.

In a twist, it turns out *this* patch for Org-mode was correct, and my prior patch for thingatpt.el was wrong. In short, 'forward-thing' now calls the functions in 'forward-thing-provider-alist' with a BACKWARD flag, rather than an integer N. That's because 'forward-thing' needs to account for the case where you have multiple providers for the same "thing", and so it needs to go one at a time checking all the providers for the best match (read: the one that moves point by the smallest non-zero amount).

I've now pushed the thingatpt fix to the Emacs master branch.

Reply via email to