Modification to the type signature of `org-export-inline-image-p'
EXPERIMENTAL/org-e-latex.el (org-e-latex-link): Apply changes. contrib/lisp/org-export.el (org-export-inline-image-p): Remove description of the link as a required argument, since this function is called with link contents anyway.
This commit is contained in:
parent
69505ed062
commit
c3972265bb
|
@ -1251,7 +1251,7 @@ INFO is a plist holding contextual information. See
|
||||||
;; Ensure DESC really exists, or set it to nil.
|
;; Ensure DESC really exists, or set it to nil.
|
||||||
(desc (and (not (string= desc "")) desc))
|
(desc (and (not (string= desc "")) desc))
|
||||||
(imagep (org-export-inline-image-p
|
(imagep (org-export-inline-image-p
|
||||||
link desc org-e-latex-inline-image-extensions))
|
link org-e-latex-inline-image-extensions))
|
||||||
(path (cond
|
(path (cond
|
||||||
((member type '("http" "https" "ftp" "mailto"))
|
((member type '("http" "https" "ftp" "mailto"))
|
||||||
(concat type ":" raw-path))
|
(concat type ":" raw-path))
|
||||||
|
|
|
@ -2277,15 +2277,13 @@ PATH is the link path. DESC is its description."
|
||||||
((string= desc "") "%s")
|
((string= desc "") "%s")
|
||||||
(t desc))))
|
(t desc))))
|
||||||
|
|
||||||
(defun org-export-inline-image-p (link contents &optional extensions)
|
(defun org-export-inline-image-p (link &optional extensions)
|
||||||
"Non-nil if LINK object points to an inline image.
|
"Non-nil if LINK object points to an inline image.
|
||||||
|
|
||||||
CONTENTS is the link description part, as a string, or nil.
|
|
||||||
|
|
||||||
When non-nil, optional argument EXTENSIONS is a list of valid
|
When non-nil, optional argument EXTENSIONS is a list of valid
|
||||||
extensions for image files, as strings. Otherwise, a default
|
extensions for image files, as strings. Otherwise, a default
|
||||||
list is provided \(cf. `org-image-file-name-regexp'\)."
|
list is provided \(cf. `org-image-file-name-regexp'\)."
|
||||||
(and (or (not contents) (string= contents ""))
|
(and (not (org-element-get-contents link))
|
||||||
(string= (org-element-get-property :type link) "file")
|
(string= (org-element-get-property :type link) "file")
|
||||||
(org-file-image-p
|
(org-file-image-p
|
||||||
(expand-file-name (org-element-get-property :path link))
|
(expand-file-name (org-element-get-property :path link))
|
||||||
|
|
Loading…
Reference in New Issue