Browse Source

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
Eric Schulte 11 years ago
parent
commit
d840b84bbc
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lisp/ob-core.el

+ 4 - 1
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)