Hi, Pavo,

PavoDive <[email protected]> writes:

> The behavior described by the OP was reproduced in Org mode version
> 9.7.11 (release_9.7.11 @ /usr/local/share/emacs/30.1/lisp/org/ and
> can be solved with the following patch to =org-activate-links= :
>
> -     (when (and (memq style org-highlight-links)
> -                ;; Do not span over paragraph boundaries.
> -                (not (string-match-p org-element-paragraph-separate
>
> +     (when (and (memq style org-highlight-links)
> +                   ;; Do not activate links inside Org comments.
> +                (not (save-excursion (goto-char start) (org-at-comment-p)))
> +                ;; Do not span over paragraph boundaries.
> +                (not (string-match-p org-element-paragraph-separate

Note that patches should be made against the current main branch (for
which you need to clone the Org-mode git repository). Here, for example,
the code has changed slightly in Org 9.8 (it's now an if clause, not a
when clause), so the patch would not apply.

See: https://orgmode.org/worg/org-contribute.html#first-patch

Turning off activation of links inside Org comments makes those links
visible but unclickable. I for one often find it helpful to keep links
as notes to myself but hide them from export with comments, so I don't
think that's a good thing. I also don't think it's what the OP (Max)
wanted; he asked for *active* elements to be distinguishable.

I agree with Max; it would be nice to give them a text property so they
stand out from other comment text. Maybe you could look into that?

Regards,
Christian




Reply via email to