diff options
author | Bastien Guerry <bzg@altern.org> | 2012-09-27 23:30:52 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-27 23:30:52 +0200 |
commit | 570083d2ad043dde96d85c84dbfbd81928747141 (patch) | |
tree | 08c4c0d5f293dd3210c4f5513a8ef95c680300b5 | |
parent | 1a1d0625105cdf0a4436bb5623573f1211de35aa (diff) | |
download | org-mode-570083d2ad043dde96d85c84dbfbd81928747141.tar.gz |
org.el (org-display-inline-images): Search for #+ATTR within the current paragraph
* org.el (org-display-inline-images): Search for #+ATTR within
the current paragraph.
-rw-r--r-- | lisp/org.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 1eeb412..d033253 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17961,9 +17961,11 @@ BEG and END default to the buffer boundaries." (null org-image-actual-width)) (save-excursion (save-match-data - (move-beginning-of-line 0) - (if (looking-at "#\\+ATTR.*width=\"\\([^\"]+\\)\"") - (string-to-number (match-string 1)))))) + (when (re-search-backward + "#\\+ATTR.*width=\"\\([^\"]+\\)\"" + (save-excursion + (re-search-backward "^[ \t]*$\\|\\`" nil t)) t) + (string-to-number (match-string 1)))))) width (cond ((eq org-image-actual-width t) nil) ((null org-image-actual-width) attrwidth) ((numberp org-image-actual-width) |