summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2011-01-31 15:37:10 +0000
committerDan Davison <dandavison7@gmail.com>2011-01-31 15:38:49 +0000
commit9511f9e153c4e4d654e6c2c6ee28a21d84fa2770 (patch)
treecc2ef5d2b2f862284633b3b7b9f31dd5942fc378
parent4a2ed86f6df5b2b890136628be3784e6d924d9c9 (diff)
downloadorg-mode-9511f9e153c4e4d654e6c2c6ee28a21d84fa2770.tar.gz
ob: Allow src block to be executed with point on #+header line
* lisp/ob.el (org-babel-where-is-src-block-head): Detect src block if point is on a #+header line.
-rw-r--r--lisp/ob.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index a3a806f..a10c8fb 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1098,9 +1098,10 @@ block. Specifically at the beginning of the #+BEGIN_SRC line.
If the point is not on a source block then return nil."
(let ((initial (point)) top bottom)
(or
- (save-excursion ;; on a source name line
+ (save-excursion ;; on a source name line or a #+header line
(beginning-of-line 1)
- (and (looking-at org-babel-src-name-regexp)
+ (and (or (looking-at org-babel-src-name-regexp)
+ (looking-at org-babel-multi-line-header-regexp))
(progn
(while (and (forward-line 1)
(looking-at org-babel-multi-line-header-regexp)))