From d840b84bbcea08facb3b6731b7b56de681f15394 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 13 Nov 2013 16:31:17 -0700 Subject: [PATCH] Don't skip call lines searching for results This fixes a bug noticed by Rick Frankel in which two subsequent #+call: lines will both update the same results. Before this commit both of the following call lines would update the same result. #+name: call-me #+BEGIN_SRC emacs-lisp :var v="nil" v #+END_SRC #+call: call-me("one") #+call: call-me(v="two") #+RESULTS: : one Now both lines are given their own result. #+name: call-me #+BEGIN_SRC emacs-lisp :var v="nil" v #+END_SRC #+call: call-me("one") #+RESULTS: : one #+call: call-me(v="two") #+RESULTS: : two --- lisp/ob-core.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 2e140d721..85bd27dc0 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1929,7 +1929,10 @@ following the source block." (cond ((looking-at (concat org-babel-result-regexp "\n")) (throw 'non-comment t)) - ((looking-at "^[ \t]*#") (end-of-line 1)) + ((and (looking-at "^[ \t]*#") + (not (looking-at + org-babel-lob-one-liner-regexp))) + (end-of-line 1)) (t (throw 'non-comment nil)))))) (let ((this-hash (match-string 5))) (prog1 (point)