diff --git a/EXPERIMENTAL/org-e-latex.el b/EXPERIMENTAL/org-e-latex.el index a4d270935..74e9a3918 100644 --- a/EXPERIMENTAL/org-e-latex.el +++ b/EXPERIMENTAL/org-e-latex.el @@ -1251,7 +1251,7 @@ INFO is a plist holding contextual information. See ;; Ensure DESC really exists, or set it to nil. (desc (and (not (string= desc "")) desc)) (imagep (org-export-inline-image-p - link desc org-e-latex-inline-image-extensions)) + link org-e-latex-inline-image-extensions)) (path (cond ((member type '("http" "https" "ftp" "mailto")) (concat type ":" raw-path)) diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index c6388828a..2e12aa097 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -2277,15 +2277,13 @@ PATH is the link path. DESC is its description." ((string= desc "") "%s") (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. -CONTENTS is the link description part, as a string, or nil. - When non-nil, optional argument EXTENSIONS is a list of valid extensions for image files, as strings. Otherwise, a default 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") (org-file-image-p (expand-file-name (org-element-get-property :path link))