Browse Source

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

Carsten Dominik 15 years ago
parent
commit
a2cf93f5d6
2 changed files with 15 additions and 13 deletions
  1. 1 1
      README
  2. 14 12
      contrib/babel/lisp/org-babel-exp.el

+ 1 - 1
README

@@ -48,4 +48,4 @@ request-assign-future.txt
     have copyright assigned to the FSF.
 
 EXPERIMENTAL
-    Experimental code, not necessarily FSF copyright.
+    Experimental code, not necessarily FSF copyright.

+ 14 - 12
contrib/babel/lisp/org-babel-exp.el

@@ -73,18 +73,20 @@ results - just like none only the block is run on export ensuring
 none ----- do not display either code or results upon export"
   (interactive)
   (message "org-babel-exp processing...")
-  (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))
-      (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))
-      (error "Unmatched block [bug in `org-babel-exp-src-blocks'].")))
+  (flet ((cond-progress-marker () (when (and progress-marker (< progress-marker (point)))
+                                   progress-marker)))
+    (or (and (re-search-backward org-babel-src-block-regexp (cond-progress-marker) t)
+             (setq progress-marker (match-end 0))
+             (org-babel-exp-do-export (org-babel-get-src-block-info) 'block))
+        (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 (cond-progress-marker) t)
+             (setq progress-marker (match-end 0))
+             (match-string 0))
+        (error "Unmatched block [bug in `org-babel-exp-src-blocks']."))))
 
 (defun org-babel-exp-inline-src-blocks (start end)
   "Process inline src blocks between START and END for export.