emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* overlap between cite syntax and link activation
@ 2022-04-03 23:44 John Kitchin
  2022-04-04  0:55 ` Bruce D'Arcus
  0 siblings, 1 reply; 6+ messages in thread
From: John Kitchin @ 2022-04-03 23:44 UTC (permalink / raw)
  To: org-mode-email

[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]

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
@johnkitchin
http://kitchingroup.cheme.cmu.edu

[-- Attachment #2: Type: text/html, Size: 1631 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-24  9:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 23:44 overlap between cite syntax and link activation John Kitchin
2022-04-04  0:55 ` Bruce D'Arcus
2022-04-22 12:47   ` Bruce D'Arcus
2022-04-22 17:10     ` Nicolas Goaziou
2022-04-24  7:19       ` Ihor Radchenko
2022-04-24  9:03         ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).