From 27df66d8da19cce7a475a18756ed0c75a94095e6 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 7 Oct 2009 12:46:23 -0600 Subject: [PATCH 1/2] org-babel: added :session to the header-arguments allowed in headline properties --- contrib/babel/lisp/org-babel.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/babel/lisp/org-babel.el b/contrib/babel/lisp/org-babel.el index 574c98cd2..db09231e9 100644 --- a/contrib/babel/lisp/org-babel.el +++ b/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))) From c0d54a9a6b6573e89f0e433d618b224defb5f797 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 7 Oct 2009 16:01:24 -0600 Subject: [PATCH 2/2] org-babel: Haskell lhs export: ensure all \[begin|end]{code} statements start at the first column --- contrib/babel/lisp/langs/org-babel-haskell.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/babel/lisp/langs/org-babel-haskell.el b/contrib/babel/lisp/langs/org-babel-haskell.el index d41c05877..25e297fa0 100644 --- a/contrib/babel/lisp/langs/org-babel-haskell.el +++ b/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)