diff options
author | Bastien Guerry <bzg@altern.org> | 2013-06-28 09:13:41 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-06-28 09:13:41 +0200 |
commit | 5a36318511f5696c03b21cba0992b05c1e6d97dd (patch) | |
tree | b2442bb0c4ce5ea31ee6c02cb201c889f6660f0b | |
parent | aa500b1eaaeec071f8eb6ec3c022144d74b6249c (diff) | |
parent | 1aaa934eb25681c5b99856311712cdf8cd52a97b (diff) | |
download | org-mode-5a36318511f5696c03b21cba0992b05c1e6d97dd.tar.gz |
Merge branch 'maint'
-rw-r--r-- | doc/org.texi | 8 | ||||
-rw-r--r-- | lisp/ob-core.el | 28 | ||||
-rw-r--r-- | lisp/org-table.el | 15 |
3 files changed, 26 insertions, 25 deletions
diff --git a/doc/org.texi b/doc/org.texi index 6053bea..9e47a17 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -13260,8 +13260,8 @@ string of these options for details. @vindex org-html-preamble @vindex org-html-postamble @vindex org-html-table-default-attributes -@vindex org-html-style-include-default -@vindex org-html-style-include-scripts +@vindex org-html-head-include-default-style +@vindex org-html-head-include-scripts @multitable @columnfractions 0.32 0.68 @item @code{:html-doctype} @tab @code{org-html-doctype} @item @code{:html-xml-declaration} @tab @code{org-html-xml-declaration} @@ -13275,8 +13275,8 @@ string of these options for details. @item @code{:html-preamble} @tab @code{org-html-preamble} @item @code{:html-postamble} @tab @code{org-html-postamble} @item @code{:html-table-attributes} @tab @code{org-html-table-default-attributes} -@item @code{:html-head-include-default-style} @tab @code{org-html-style-include-default} -@item @code{:html-head-include-scripts} @tab @code{org-html-style-include-scripts} +@item @code{:html-head-include-default-style} @tab @code{org-html-head-include-default-style} +@item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts} @end multitable Most of the @code{org-export-with-*} variables have the same effect in each diff --git a/lisp/ob-core.el b/lisp/ob-core.el index c5ed939..4115912 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1513,22 +1513,18 @@ names." (defun org-babel-get-rownames (table) "Return the row names of TABLE. Return a cons cell, the `car' of which contains the TABLE less -colnames, and the `cdr' of which contains a list of the column -names. Note: this function removes any hlines in TABLE." - (let* ((trans (lambda (table) (apply #'mapcar* #'list table))) - (width (apply 'max - (mapcar (lambda (el) (if (listp el) (length el) 0)) table))) - (table (funcall trans (mapcar (lambda (row) - (if (not (equal row 'hline)) - row - (setq row '()) - (dotimes (n width) - (setq row (cons 'hline row))) - row)) - table)))) - (cons (mapcar (lambda (row) (if (equal (car row) 'hline) 'hline row)) - (funcall trans (cdr table))) - (remove 'hline (car table))))) +rownames, and the `cdr' of which contains a list of the rownames. +Note: this function removes any hlines in TABLE." + (let* ((table (org-babel-del-hlines table)) + (rownames (funcall (lambda () + (let ((tp table)) + (mapcar + (lambda (row) + (prog1 + (pop (car tp)) + (setq tp (cdr tp)))) + table)))))) + (cons table rownames))) (defun org-babel-put-colnames (table colnames) "Add COLNAMES to TABLE if they exist." diff --git a/lisp/org-table.el b/lisp/org-table.el index aec0165..b6d0fbb 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1829,11 +1829,16 @@ will be transposed as Note that horizontal lines disappeared." (interactive) - (let ((contents - (apply #'mapcar* #'list - ;; remove 'hline from list - (delq nil (mapcar (lambda (x) (when (listp x) x)) - (org-table-to-lisp)))))) + (let* ((table (delete 'hline (org-table-to-lisp))) + (contents (mapcar (lambda (p) + (let ((tp table)) + (mapcar + (lambda (rown) + (prog1 + (pop (car tp)) + (setq tp (cdr tp)))) + table))) + (car table)))) (delete-region (org-table-begin) (org-table-end)) (insert (mapconcat (lambda(x) (concat "| " (mapconcat 'identity x " | " ) " |\n" )) contents "")) |