From c3972265bbfcd5f894d4723670affb9b631846d2 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 20 Dec 2011 18:50:59 +0100 Subject: [PATCH] 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. --- EXPERIMENTAL/org-e-latex.el | 2 +- contrib/lisp/org-export.el | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) 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))