Make `org-pdfview-store-link' comply with the new upstream API

This commit is contained in:
Gerard Vermeulen 2024-05-09 20:07:32 +02:00
parent 8b839dac11
commit 8d9b13abb9

View File

@ -3418,15 +3418,15 @@ facilate moving single directories or whole directory trees."
(org-open-file path 1)
(when page (pdf-view-goto-page page))))
(defun org-pdfview-store-link ()
(defun org-pdfview-store-link (&optional _interactive?)
"Store a \"pdfview\" type link."
(when (eq major-mode 'pdf-view-mode)
(let* ((path buffer-file-name)
(page (pdf-view-current-page))
(link (concat "pdfview:" path "::" (number-to-string page))))
(text (concat "pdfview:" path "::" (number-to-string page))))
(org-link-store-props
:type "pdfview"
:link link
:link text
:description path))))
(with-eval-after-load 'ol