dragndrop: insert #+attr_org: :width if specified

This commit is contained in:
Mykhailo Shevchuk 2020-03-23 19:19:55 +01:00
parent 4b20c7206e
commit 0fb1026886

View file

@ -50,6 +50,8 @@ an file icon produced by `+org-attach-icon-for')."
(format "#+attr_html: :width %dpx\n" org-download-image-html-width)) (format "#+attr_html: :width %dpx\n" org-download-image-html-width))
(if (= org-download-image-latex-width 0) "" (if (= org-download-image-latex-width 0) ""
(format "#+attr_latex: :width %dcm\n" org-download-image-latex-width)) (format "#+attr_latex: :width %dcm\n" org-download-image-latex-width))
(if (= org-download-image-org-width 0) ""
(format "#+attr_org: :width %dpx\n" org-download-image-org-width))
(format org-download-link-format (format org-download-link-format
(cond ((file-in-directory-p filename org-attach-directory) (cond ((file-in-directory-p filename org-attach-directory)
(file-relative-name filename org-download-image-dir)) (file-relative-name filename org-download-image-dir))