[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org ac108a3ac1 2/2: * lisp/ol-docview.el (org-docview-e
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org ac108a3ac1 2/2: * lisp/ol-docview.el (org-docview-export): Update docstring and arglist |
Date: |
Mon, 9 Oct 2023 09:58:55 -0400 (EDT) |
branch: externals/org
commit ac108a3ac1b332bf27ff2984a9cf26af3744185d
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
* lisp/ol-docview.el (org-docview-export): Update docstring and arglist
Document all the arguments. Add fourth argument as require by the
latest :export link property spec. Rename FORMAT to BACKEND for more
clarity.
---
lisp/ol-docview.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/ol-docview.el b/lisp/ol-docview.el
index fcde863aab..bb9b34a17f 100644
--- a/lisp/ol-docview.el
+++ b/lisp/ol-docview.el
@@ -57,17 +57,17 @@
:export #'org-docview-export
:store #'org-docview-store-link)
-(defun org-docview-export (link description format)
- "Export a docview link from Org files."
+(defun org-docview-export (link description backend _info)
+ "Export a docview LINK with DESCRIPTION for BACKEND."
(let ((path (if (string-match "\\(.+\\)::.+" link) (match-string 1 link)
link))
(desc (or description link)))
(when (stringp path)
(setq path (expand-file-name path))
(cond
- ((eq format 'html) (format "<a href=\"%s\">%s</a>" path desc))
- ((eq format 'latex) (format "\\href{%s}{%s}" path desc))
- ((eq format 'ascii) (format "%s (%s)" desc path))
+ ((eq backend 'html) (format "<a href=\"%s\">%s</a>" path desc))
+ ((eq backend 'latex) (format "\\href{%s}{%s}" path desc))
+ ((eq backend 'ascii) (format "%s (%s)" desc path))
(t path)))))
(defun org-docview-open (link _)