diff options
author | Joe Corneli <holtzermann17@gmail.com> | 2014-08-07 13:42:54 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2014-08-07 15:02:42 +0200 |
commit | 3ea1ce2e859db0e5b815364d0596eef7c92ade55 (patch) | |
tree | d5940d93b7ec49e985bf57b2f93aa2a6e3b4f57f | |
parent | 879010160e60eb881d0b226913567fbdf688548d (diff) | |
download | org-mode-3ea1ce2e859db0e5b815364d0596eef7c92ade55.tar.gz |
Fix bug associated with setting image size via ATTR.
* lisp/org.el (org-display-inline-images): This change is necessary to
make ATTR work. Removed unnecessary save-match-data forms.
-rw-r--r-- | lisp/org.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/org.el b/lisp/org.el index 3926890..35b9fc7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19177,13 +19177,13 @@ boundaries." (when paragraph (save-excursion (goto-char (org-element-property :begin paragraph)) - (when (save-match-data - (re-search-forward - "^[ \t]*#\\+attr_.*?: +.*?:width +\\(\\S-+\\)" - (org-element-property - :post-affiliated paragraph) - t)) - (string-to-number (match-string 1)))))) + (when + (re-search-forward + "^[ \t]*#\\+attr_.*?: +.*?:width +\\(\\S-+\\)" + (org-element-property + :post-affiliated paragraph) + t) + (string-to-number (match-string 1)))))) ;; Otherwise, fall-back to provided number. (car org-image-actual-width))) ((numberp org-image-actual-width) @@ -19193,11 +19193,10 @@ boundaries." 'org-image-overlay))) (if (and (car-safe old) refresh) (image-refresh (overlay-get (cdr old) 'display)) - (let ((image (save-match-data - (create-image file + (let ((image (create-image file (and width 'imagemagick) nil - :width width)))) + :width width))) (when image (let* ((link ;; If inline image is the description |