Merge branch 'maint'
This commit is contained in:
commit
5a36318511
|
@ -13260,8 +13260,8 @@ string of these options for details.
|
||||||
@vindex org-html-preamble
|
@vindex org-html-preamble
|
||||||
@vindex org-html-postamble
|
@vindex org-html-postamble
|
||||||
@vindex org-html-table-default-attributes
|
@vindex org-html-table-default-attributes
|
||||||
@vindex org-html-style-include-default
|
@vindex org-html-head-include-default-style
|
||||||
@vindex org-html-style-include-scripts
|
@vindex org-html-head-include-scripts
|
||||||
@multitable @columnfractions 0.32 0.68
|
@multitable @columnfractions 0.32 0.68
|
||||||
@item @code{:html-doctype} @tab @code{org-html-doctype}
|
@item @code{:html-doctype} @tab @code{org-html-doctype}
|
||||||
@item @code{:html-xml-declaration} @tab @code{org-html-xml-declaration}
|
@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-preamble} @tab @code{org-html-preamble}
|
||||||
@item @code{:html-postamble} @tab @code{org-html-postamble}
|
@item @code{:html-postamble} @tab @code{org-html-postamble}
|
||||||
@item @code{:html-table-attributes} @tab @code{org-html-table-default-attributes}
|
@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-default-style} @tab @code{org-html-head-include-default-style}
|
||||||
@item @code{:html-head-include-scripts} @tab @code{org-html-style-include-scripts}
|
@item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts}
|
||||||
@end multitable
|
@end multitable
|
||||||
|
|
||||||
Most of the @code{org-export-with-*} variables have the same effect in each
|
Most of the @code{org-export-with-*} variables have the same effect in each
|
||||||
|
|
|
@ -1513,22 +1513,18 @@ names."
|
||||||
(defun org-babel-get-rownames (table)
|
(defun org-babel-get-rownames (table)
|
||||||
"Return the row names of TABLE.
|
"Return the row names of TABLE.
|
||||||
Return a cons cell, the `car' of which contains the TABLE less
|
Return a cons cell, the `car' of which contains the TABLE less
|
||||||
colnames, and the `cdr' of which contains a list of the column
|
rownames, and the `cdr' of which contains a list of the rownames.
|
||||||
names. Note: this function removes any hlines in TABLE."
|
Note: this function removes any hlines in TABLE."
|
||||||
(let* ((trans (lambda (table) (apply #'mapcar* #'list table)))
|
(let* ((table (org-babel-del-hlines table))
|
||||||
(width (apply 'max
|
(rownames (funcall (lambda ()
|
||||||
(mapcar (lambda (el) (if (listp el) (length el) 0)) table)))
|
(let ((tp table))
|
||||||
(table (funcall trans (mapcar (lambda (row)
|
(mapcar
|
||||||
(if (not (equal row 'hline))
|
(lambda (row)
|
||||||
row
|
(prog1
|
||||||
(setq row '())
|
(pop (car tp))
|
||||||
(dotimes (n width)
|
(setq tp (cdr tp))))
|
||||||
(setq row (cons 'hline row)))
|
table))))))
|
||||||
row))
|
(cons table rownames)))
|
||||||
table))))
|
|
||||||
(cons (mapcar (lambda (row) (if (equal (car row) 'hline) 'hline row))
|
|
||||||
(funcall trans (cdr table)))
|
|
||||||
(remove 'hline (car table)))))
|
|
||||||
|
|
||||||
(defun org-babel-put-colnames (table colnames)
|
(defun org-babel-put-colnames (table colnames)
|
||||||
"Add COLNAMES to TABLE if they exist."
|
"Add COLNAMES to TABLE if they exist."
|
||||||
|
|
|
@ -1829,11 +1829,16 @@ will be transposed as
|
||||||
|
|
||||||
Note that horizontal lines disappeared."
|
Note that horizontal lines disappeared."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((contents
|
(let* ((table (delete 'hline (org-table-to-lisp)))
|
||||||
(apply #'mapcar* #'list
|
(contents (mapcar (lambda (p)
|
||||||
;; remove 'hline from list
|
(let ((tp table))
|
||||||
(delq nil (mapcar (lambda (x) (when (listp x) x))
|
(mapcar
|
||||||
(org-table-to-lisp))))))
|
(lambda (rown)
|
||||||
|
(prog1
|
||||||
|
(pop (car tp))
|
||||||
|
(setq tp (cdr tp))))
|
||||||
|
table)))
|
||||||
|
(car table))))
|
||||||
(delete-region (org-table-begin) (org-table-end))
|
(delete-region (org-table-begin) (org-table-end))
|
||||||
(insert (mapconcat (lambda(x) (concat "| " (mapconcat 'identity x " | " ) " |\n" ))
|
(insert (mapconcat (lambda(x) (concat "| " (mapconcat 'identity x " | " ) " |\n" ))
|
||||||
contents ""))
|
contents ""))
|
||||||
|
|
Loading…
Reference in New Issue