浏览代码

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

Carsten Dominik 15 年之前
父节点
当前提交
a26640ef26
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      contrib/babel/lisp/langs/org-babel-haskell.el
  2. 1 1
      contrib/babel/lisp/org-babel.el

+ 4 - 0
contrib/babel/lisp/langs/org-babel-haskell.el

@@ -174,6 +174,10 @@ constructs (header arguments, no-web syntax etc...) are ignored."
       (find-file tmp-tex-file)
       (goto-char (point-min)) (forward-line 2)
       (insert "%include polycode.fmt\n")
+      ;; ensure all \begin/end{code} statements start at the first column
+      (while (re-search-forward "^[ \t]+\\\\begin{code}[^\000]+\\\\end{code}" nil t)
+        (replace-match (save-match-data (org-remove-indentation (match-string 0)))
+                       t t))
       (setq contents (buffer-string))
       (save-buffer) (kill-buffer))
     (delete-file tmp-tex-file)

+ 1 - 1
contrib/babel/lisp/org-babel.el

@@ -361,7 +361,7 @@ may be specified in the properties of the current outline entry."
                (when val
                  ;; (message "param-from-property %s=%s" header-arg val) ;; debugging statement
                  (cons (intern (concat ":" header-arg)) val))))
-           '("results" "exports" "tangle" "var")))))
+           '("exports" "results" "session" "tangle" "var")))))
 
 (defun org-babel-parse-src-block-match ()
   (let* ((lang (org-babel-clean-text-properties (match-string 1)))