Bläddra i källkod

Merge branch 'origin-maint'

Eric Schulte 13 år sedan
förälder
incheckning
10f26fb805
4 ändrade filer med 17 tillägg och 6 borttagningar
  1. 5 4
      lisp/ob-exp.el
  2. 5 1
      lisp/ob.el
  3. 2 1
      lisp/org-src.el
  4. 5 0
      testing/examples/ob-screen-test.org

+ 5 - 4
lisp/ob-exp.el

@@ -164,7 +164,11 @@ options are taken from `org-babel-default-header-args'."
   (interactive)
   (save-excursion
     (goto-char start)
-    (while (and (< (point) end)
+    (unless (markerp end)
+      (let ((m (make-marker)))
+	(set-marker m end (current-buffer))
+	(setq end m)))
+    (while (and (< (point) (marker-position end))
 		(re-search-forward org-babel-lob-one-liner-regexp end t))
       (unless (org-babel-in-example-or-verbatim)
 	(let* ((lob-info (org-babel-lob-get-info))
@@ -186,9 +190,6 @@ options are taken from `org-babel-default-header-args'."
 						     (butlast lob-info) " ")))))
 			       "" nil (car (last lob-info)))
 			 'lob)))))
-	  (setq end (+ end (- (length rep)
-			      (- (length (match-string 0))
-				 (length (or (match-string 11) ""))))))
 	  (if inlinep
 	      (save-excursion
 		(goto-char inline-start)

+ 5 - 1
lisp/ob.el

@@ -477,7 +477,10 @@ the header arguments specified at the front of the source code
 block."
   (interactive)
   (let ((info (or info (org-babel-get-src-block-info))))
-    (when (org-babel-confirm-evaluate info)
+    (when (org-babel-confirm-evaluate
+	   (let ((i info))
+	     (setf (nth 2 i) (org-babel-merge-params (nth 2 info) params))
+	     i))
       (let* ((lang (nth 0 info))
 	     (params (if params
 			 (org-babel-process-params
@@ -905,6 +908,7 @@ buffer."
 	 (goto-char (point-min))
 	 (while (re-search-forward ,rx nil t)
 	   (goto-char (match-beginning 1))
+	   (when (looking-at org-babel-inline-src-block-regexp)(forward-char 1))
 	   (save-match-data ,@body)
 	   (goto-char (match-end 0))))
        (unless visited-p (kill-buffer to-be-removed))

+ 2 - 1
lisp/org-src.el

@@ -153,7 +153,8 @@ but which mess up the display of a snippet in Org exported files.")
 (defcustom org-src-lang-modes
   '(("ocaml" . tuareg) ("elisp" . emacs-lisp) ("ditaa" . artist)
     ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql)
-    ("calc" . fundamental) ("C" . c) ("cpp" . c++))
+    ("calc" . fundamental) ("C" . c) ("cpp" . c++)
+    ("screen" . shell-script))
   "Alist mapping languages to their major mode.
 The key is the language name, the value is the string that should
 be inserted as the name of the major mode.  For many languages this is

+ 5 - 0
testing/examples/ob-screen-test.org

@@ -0,0 +1,5 @@
+#+Title: a collection of examples for ob-screen tests
+#+begin_src screen :session create-tmpdir
+  mkdir -p $TMPDIR
+  cd $TMPDIR
+#+end_src