diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2010-10-22 10:52:46 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2010-10-22 10:52:46 +0200 |
commit | e85eee06249ed1466b4a8b01cea4dc9a4842bd91 (patch) | |
tree | f1b61da0e4b1ee3cdd13fc2707252799662b827d | |
parent | a84186785645652a8daff9e09d81db3d2bb3c5ce (diff) | |
download | org-mode-e85eee06249ed1466b4a8b01cea4dc9a4842bd91.tar.gz |
Fix some issues in inline image display
* lisp/org.el (org-display-inline-images): Allow
non-ASCII characters in image file names. Save match data.
Patch by Taichi Kawabata
-rw-r--r-- | lisp/org.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index 10e3cc9..269cea0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16234,7 +16234,8 @@ BEG and END default to the buffer boundaries." (widen) (setq beg (or beg (point-min)) end (or end (point-max))) (goto-char (point-min)) - (let ((re (concat "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([-+~.:/\\_0-9a-zA-Z ]+" + ;; (let ((re (concat "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([-+~.:/\\_0-9a-zA-Z ]+" + (let ((re (concat "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([-+~.:/\\_0-9a-zA-Z \x00080-\xfffff]+" (substring (org-image-file-name-regexp) 0 -2) "\\)\\]" (if include-linked "" "\\]"))) old file ov img) @@ -16246,7 +16247,7 @@ BEG and END default to the buffer boundaries." (when (file-exists-p file) (if (and (car-safe old) refresh) (image-refresh (overlay-get (cdr old) 'display)) - (setq img (create-image file)) + (setq img (save-match-data (create-image file))) (when img (setq ov (make-overlay (match-beginning 0) (match-end 0))) (overlay-put ov 'display img) |