Function: embark-org-define-link-copier
embark-org-define-link-copier is a macro defined in embark-org.el.
Signature
(embark-org-define-link-copier NAME FORMULA DESCRIPTION)
Documentation
Define a command that copies the Org link at point according to FORMULA.
The command's name is formed by appending NAME to embark-org-copy-link. The docstring includes the DESCRIPTION of what part or in what format the link is copied.
Source Code
;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark-org.el
(defmacro embark-org-define-link-copier (name formula description)
"Define a command that copies the Org link at point according to FORMULA.
The command's name is formed by appending NAME to
embark-org-copy-link. The docstring includes the DESCRIPTION of
what part or in what format the link is copied."
`(defun ,(intern (format "embark-org-copy-link-%s" name)) ()
,(format "Copy to the kill-ring the Org link at point%s." description)
(interactive)
(when (org-in-regexp org-link-any-re)
(let* ((full (match-string-no-properties 0))
(target (or (match-string-no-properties 2)
(match-string-no-properties 0)))
(description (match-string-no-properties 3))
(kill ,formula))
(ignore full target description)
(when kill
(message "Saved '%s'" kill)
(kill-new kill))))))