瀏覽代碼

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 14 年之前
父節點
當前提交
eae2dffd67
共有 3 個文件被更改,包括 9 次插入7 次删除
  1. 1 1
      doc/org.texi
  2. 5 5
      lisp/ob-exp.el
  3. 3 1
      lisp/ob.el

+ 1 - 1
doc/org.texi

@@ -11941,7 +11941,7 @@ another by commas, as shown in the following example.
 @subsubheading Emacs Lisp evaluation of variables
 
 Emacs lisp code can be used to initialize variable values.  When a variable
-value starts with @code{(}, @code{'} or @code{`} it will be evaluated as
+value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be evaluated as
 Emacs Lisp and the result of the evaluation will be assigned as the variable
 value.  The following example demonstrates use of this evaluation to reliably
 pass the file-name of the org-mode buffer to a code block---note that

+ 5 - 5
lisp/ob-exp.el

@@ -252,16 +252,16 @@ inhibit insertion of results into the buffer."
 				(org-babel-result-hash)))))
     (let ((lang (nth 0 info))
 	  (body (nth 1 info)))
-      (setf (nth 2 info) (org-babel-exp-in-export-file lang
-			   (org-babel-process-params (nth 2 info))))
       ;; skip code blocks which we can't evaluate
       (when (fboundp (intern (concat "org-babel-execute:" lang)))
 	(org-babel-eval-wipe-error-buffer)
 	(prog1 nil
 	  (setf (nth 2 info)
-		(org-babel-merge-params
-		 (nth 2 info)
-		 `((:results . ,(if silent "silent" "replace")))))
+		(org-babel-exp-in-export-file lang
+		  (org-babel-process-params
+		   (org-babel-merge-params
+		    (nth 2 info)
+		    `((:results . ,(if silent "silent" "replace")))))))
 	  (cond
 	   ((or (equal type 'block) (equal type 'inline))
 	    (org-babel-execute-src-block nil info))

+ 3 - 1
lisp/ob.el

@@ -1924,7 +1924,9 @@ appropriate."
           (if (and (not inhibit-lisp-eval)
 		   (member (substring cell 0 1) '("(" "'" "`" "[")))
               (eval (read cell))
-            (progn (set-text-properties 0 (length cell) nil cell) cell)))
+            (if (string= (substring cell 0 1) "\"")
+		(read cell)
+	      (progn (set-text-properties 0 (length cell) nil cell) cell))))
     cell))
 
 (defun org-babel-number-p (string)