浏览代码

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.
Eric Schulte 14 年之前
父节点
当前提交
201eb8ce23
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/ob.el

+ 1 - 1
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)