瀏覽代碼

org-babel is better at evaluating indented code blocks

Eric Schulte 15 年之前
父節點
當前提交
63b0f3878e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      contrib/babel/lisp/org-babel.el

+ 2 - 1
contrib/babel/lisp/org-babel.el

@@ -412,7 +412,8 @@ If the point is not on a source block then return nil."
         (re-search-backward "#\\+begin_src" nil t) (setq top (point))
         (re-search-forward "#\\+end_src" nil t) (setq bottom (point))
         (< top initial) (< initial bottom)
-        (goto-char top) (looking-at org-babel-src-block-regexp)
+        (goto-char top) (move-beginning-of-line 1)
+        (looking-at org-babel-src-block-regexp)
         (point))))))
 
 (defun org-babel-goto-named-source-block (&optional name)