summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-08-30 08:45:50 +0200
committerBastien Guerry <bzg@altern.org>2012-08-30 08:45:50 +0200
commit4b3f64fdccb2ac751d8e4f933b10edb9fa642bfd (patch)
treed03e3f3d6afad4384302fd93a889e29034393b54
parent96cef218f0827355b3dcb9f63f0cd4e90998a913 (diff)
downloadorg-mode-4b3f64fdccb2ac751d8e4f933b10edb9fa642bfd.tar.gz
ob.el: Find a src block head correctly when #+header(s) is before #+name
* ob.el (org-babel-where-is-src-block-head): Find a src block head correctly when #+header(s) is before #+name.
-rw-r--r--lisp/ob.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index af61c8c..84ce489 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1494,7 +1494,8 @@ If the point is not on a source block then return nil."
(looking-at org-babel-multi-line-header-regexp))
(progn
(while (and (forward-line 1)
- (looking-at org-babel-multi-line-header-regexp)))
+ (or (looking-at org-babel-src-name-regexp)
+ (looking-at org-babel-multi-line-header-regexp))))
(looking-at org-babel-src-block-regexp))
(point)))
(save-excursion ;; on a #+begin_src line