diff options
author | Eric Schulte <eric.schulte@gmx.com> | 2012-01-20 11:32:49 -0700 |
---|---|---|
committer | Eric Schulte <eric.schulte@gmx.com> | 2012-01-20 11:32:49 -0700 |
commit | 5a0bf5e7d18449ccf0e49b015bc0de48ace7074c (patch) | |
tree | 6734b009508daff2ff82f336ff4a2ff7960b93e8 | |
parent | 041c68f58621c3576cce6abd8b4a5b6caa74bbb8 (diff) | |
download | org-mode-5a0bf5e7d18449ccf0e49b015bc0de48ace7074c.tar.gz |
Ensure markers are used during lob export
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Ensure `end' is a
marker so it is updated as required during export.
-rw-r--r-- | lisp/ob-exp.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index de3a4c8..6f93600 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -166,7 +166,11 @@ options are taken from `org-babel-default-header-args'." (interactive) (save-excursion (goto-char start) - (while (and (< (point) end) + (unless (markerp end) + (let ((m (make-marker))) + (set-marker m end (current-buffer)) + (setq end m))) + (while (and (< (point) (marker-position end)) (re-search-forward org-babel-lob-one-liner-regexp end t)) (unless (org-babel-in-example-or-verbatim) (let* ((lob-info (org-babel-lob-get-info)) @@ -188,9 +192,6 @@ options are taken from `org-babel-default-header-args'." (butlast lob-info) " "))))) "" nil (car (last lob-info))) 'lob))))) - (setq end (+ end (- (length rep) - (- (length (match-string 0)) - (length (or (match-string 11) "")))))) (if inlinep (save-excursion (goto-char inline-start) |