Browse Source

org-babel: use %s to format inline result when it is a string.

This avoids returning quote characters with the string.
Dan Davison 15 years ago
parent
commit
2f82ee771a
1 changed files with 4 additions and 2 deletions
  1. 4 2
      contrib/babel/lisp/org-babel-exp.el

+ 4 - 2
contrib/babel/lisp/org-babel-exp.el

@@ -143,8 +143,10 @@ options are taken from `org-babel-default-header-args'."
            ((member "code" result-params)
             (format "src_%s{%s}" lang raw))
            (t
-            (if (and (stringp raw) (= 0 (length raw)))
-                " =(no results)= " (format " =%S= " raw))))))
+            (if (stringp raw)
+		(if (= 0 (length raw)) "=(no results)="
+		  (format "=%s=" raw))
+	      (format "=%S=" raw))))))
       ('block
           (save-excursion ;; org-exp-blocks places us at the end of the block
             (re-search-backward org-babel-src-block-regexp nil t)