From c4fad02b060efb56d59ca9155f0a99d8716c22c0 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 25 Jan 2012 13:18:28 +0100 Subject: [PATCH] org-e-latex: Fix an infloop with inline images * EXPERIMENTAL/org-e-latex.el (org-e-latex-link--inline-image): Fix an infloop. --- EXPERIMENTAL/org-e-latex.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/EXPERIMENTAL/org-e-latex.el b/EXPERIMENTAL/org-e-latex.el index 5de0595a9..733d34d90 100644 --- a/EXPERIMENTAL/org-e-latex.el +++ b/EXPERIMENTAL/org-e-latex.el @@ -1319,12 +1319,11 @@ INFO is a plist containing export options." (t "")))) ;; Now clear ATTR from any special keyword and set a default ;; value if nothing is left. - (if (not attr) - (setq attr "") - (while (string-match "\\(wrap\\|multicolumn\\|float\\|placement=\\S-+\\)" - attr) - (replace-match "" nil nil attr)) - (setq attr (org-trim attr))) + (setq attr + (if (not attr) "" + (org-trim + (replace-regexp-in-string + "\\(wrap\\|multicolumn\\|float\\|placement=\\S-+\\)" "" attr)))) (setq attr (cond ((not (string= attr "")) attr) ((eq disposition 'float) "width=0.7\\textwidth") ((eq disposition 'wrap) "width=0.48\\textwidth")