From d45b5a788410a26a62c9f9a204bf4a0def3a0d3d Mon Sep 17 00:00:00 2001 From: Aaron Ecay Date: Thu, 22 Jan 2015 00:44:42 -0500 Subject: [PATCH] babel: Fix bug in org-babel-get-inline-src-block-matches. * lisp/ob-core.el (org-babel-get-inline-src-block-matches): Use `org-looking-at-p' instead of `thing-at-point'. The latter could give odd results depending on the syntax table. In particular, for me (thing-at-point 'word) was returning src_foo in this context. --- lisp/ob-core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 892c3e3ba..24b83d6e4 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -230,7 +230,7 @@ not match KEY should be returned." Returns non-nil if match-data set" (let ((src-at-0-p (save-excursion (beginning-of-line 1) - (string= "src" (thing-at-point 'word)))) + (org-looking-at-p "src"))) (first-line-p (= (line-beginning-position) (point-min))) (orig (point))) (let ((search-for (cond ((and src-at-0-p first-line-p "src_"))