From 201eb8ce23b21f5c39d82dffdef23616ad8994e8 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 3 Dec 2010 07:11:09 -0700 Subject: [PATCH] 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. --- lisp/ob.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob.el b/lisp/ob.el index 3d097b46f..dd285dbea 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)