summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-12-03 07:11:09 -0700
committerEric Schulte <schulte.eric@gmail.com>2010-12-03 07:11:09 -0700
commit201eb8ce23b21f5c39d82dffdef23616ad8994e8 (patch)
treebadc0844cd974243733895ab5449ca3cc3a00d41
parent6e450915a70317ac36b825734a249c755ac464b4 (diff)
downloadorg-mode-201eb8ce23b21f5c39d82dffdef23616ad8994e8.tar.gz
ob: examplization of inserted results is smarter about markers
* lisp/ob.el (org-babel-examplize-region): Check if `end' is a marker or a point and handle appropriately.
-rw-r--r--lisp/ob.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index 3d097b4..dd285db 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1562,7 +1562,7 @@ file's directory then expand relative links."
(insert (if results-switches
(format "#+begin_example%s\n" results-switches)
"#+begin_example\n"))
- (forward-char (- end beg))
+ (if (markerp end) (goto-char end) (forward-char (- end beg)))
(insert "#+end_example\n"))))))
(defun org-babel-update-block-body (new-body)