소스 검색

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)