Function: treemacs-store-org-link
treemacs-store-org-link is a byte-compiled function defined in
treemacs-compatibility.el.
Signature
(treemacs-store-org-link)
Documentation
Store an org-mode link for the node at point.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-compatibility.el
(with-eval-after-load 'org
(defun treemacs-store-org-link ()
"Store an `org-mode' link for the node at point."
(when (eq major-mode 'treemacs-mode)
(-when-let* ((btn (treemacs-current-button))
(file (treemacs--nearest-path btn)))
(-let [link (format "file:%s" (abbreviate-file-name file))]
(with-no-warnings
(org-add-link-props
:link link
:description (treemacs--filename file)))
link))))
(with-no-warnings
(if (fboundp 'org-link-set-parameters)
(org-link-set-parameters "treemacs" :store #'treemacs-store-org-link)
(add-hook 'org-store-link-functions #'treemacs-store-org-link))))