emacs-orgmode
[Top][All Lists]
Advanced

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

overlap between cite syntax and link activation


From: John Kitchin
Subject: overlap between cite syntax and link activation
Date: Sun, 3 Apr 2022 19:44:54 -0400

I think there is some overlap between the org-cite syntax and org-link activation.

Consider this org-cite:

[cite/noauthor/bare:@key]   

Now define this link:

#+BEGIN_SRC emacs-lisp
(org-link-set-parameters "bare"
:help-echo "BARE LINK"
:activate-func (lambda (start end path _bracketp)
 (message-box "%S activating bare" (list start end path))
 (put-text-property start
    end
    'face '(:foreground "OrangeRed1"))))

#+END_SRC

When I put my cursor on the org-cite line and press spc, I see a message box pop up, and the @key has a tooltip of "BARE LINK".

I guess this means the activate-func is being used too aggressively. It looks like it is called after (re-search-forward org-link-any-re limit t). This does seem to match the cite syntax above.

Does anyone else see this?

John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803

reply via email to

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