Ver código fonte

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Carsten Dominik 16 anos atrás
pai
commit
254068504b
2 arquivos alterados com 12 adições e 3 exclusões
  1. 11 2
      contrib/babel/lisp/org-babel-exp.el
  2. 1 1
      lisp/org-exp-blocks.el

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

@@ -56,6 +56,8 @@ will be indented by this many characters. See
 `org-babel-function-def-export-name' for the definition of a
 `org-babel-function-def-export-name' for the definition of a
 source block function.")
 source block function.")
 
 
+(defvar obe-marker nil)
+
 (defun org-babel-exp-src-blocks (body &rest headers)
 (defun org-babel-exp-src-blocks (body &rest headers)
   "Process src block for export.  Depending on the 'export'
   "Process src block for export.  Depending on the 'export'
 headers argument in replace the source code block with...
 headers argument in replace the source code block with...
@@ -71,9 +73,16 @@ results - just like none only the block is run on export ensuring
 none ----- do not display either code or results upon export"
 none ----- do not display either code or results upon export"
   (interactive)
   (interactive)
   (message "org-babel-exp processing...")
   (message "org-babel-exp processing...")
-  (or (and (re-search-backward org-babel-src-block-regexp nil t)
+  (or (and (re-search-backward org-babel-src-block-regexp progress-marker t)
+           (setq progress-marker (match-end 0))
            (org-babel-exp-do-export (org-babel-get-src-block-info) 'block))
            (org-babel-exp-do-export (org-babel-get-src-block-info) 'block))
-      (and (re-search-backward org-block-regexp nil t)
+      (save-excursion
+        (forward-line 0)
+        (and (org-babel-where-is-src-block-head)
+             (goto-char (org-babel-where-is-src-block-head))
+             (org-babel-exp-do-export (org-babel-get-src-block-info) 'block)))
+      (and (re-search-backward org-block-regexp progress-marker t)
+           (setq progress-marker (match-end 0))
            (match-string 0))
            (match-string 0))
       (error "Unmatched block [bug in `org-babel-exp-src-blocks'].")))
       (error "Unmatched block [bug in `org-babel-exp-src-blocks'].")))
 
 

+ 1 - 1
lisp/org-exp-blocks.el

@@ -166,7 +166,7 @@ specified in BLOCKS which default to the value of
   (save-window-excursion
   (save-window-excursion
     (let ((case-fold-search t)
     (let ((case-fold-search t)
 	  (types '())
 	  (types '())
-	  indentation type func start body headers preserve-indent)
+	  indentation type func start body headers preserve-indent progress-marker)
       (flet ((interblock (start end)
       (flet ((interblock (start end)
 			 (mapcar (lambda (pair) (funcall (second pair) start end))
 			 (mapcar (lambda (pair) (funcall (second pair) start end))
 				 org-export-interblocks)))
 				 org-export-interblocks)))