소스 검색

ob-exp: on export resolve hashes in the current (not original) file buffer

* lisp/ob-exp.el (org-babel-exp-results): Resolve hashes in the
  current (not original) file buffer.
* lisp/ob.el (org-babel-current-result-hash): More informative name,
  and remove useless optional argument.
Eric Schulte 14 년 전
부모
커밋
8854497c35
2개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 3
      lisp/ob-exp.el
  2. 2 2
      lisp/ob.el

+ 1 - 3
lisp/ob-exp.el

@@ -243,9 +243,7 @@ This function is called by `org-babel-exp-do-export'.  The code
 block will be evaluated.  Optional argument SILENT can be used to
 block will be evaluated.  Optional argument SILENT can be used to
 inhibit insertion of results into the buffer."
 inhibit insertion of results into the buffer."
   (when (and org-export-babel-evaluate
   (when (and org-export-babel-evaluate
-	     (not (and hash
-		       (equal hash (org-babel-exp-in-export-file (nth 0 info)
-				     (org-babel-result-hash info))))))
+	     (not (and hash (equal hash (org-babel-current-result-hash)))))
     (let ((lang (nth 0 info))
     (let ((lang (nth 0 info))
 	  (body (nth 1 info)))
 	  (body (nth 1 info)))
       ;; skip code blocks which we can't evaluate
       ;; skip code blocks which we can't evaluate

+ 2 - 2
lisp/ob.el

@@ -782,9 +782,9 @@ the current subtree."
 			 (nth 1 info))))
 			 (nth 1 info))))
 	 (sha1 it))))))
 	 (sha1 it))))))
 
 
-(defun org-babel-result-hash (&optional info)
+(defun org-babel-current-result-hash ()
   "Return the in-buffer hash associated with INFO."
   "Return the in-buffer hash associated with INFO."
-  (org-babel-where-is-src-block-result nil info)
+  (org-babel-where-is-src-block-result)
   (org-babel-clean-text-properties (match-string 3)))
   (org-babel-clean-text-properties (match-string 3)))
 
 
 (defun org-babel-hide-hash ()
 (defun org-babel-hide-hash ()