org-lparse.el: Rename table routines
* contrib/lisp/org-lparse.el (org-lparse-insert-org-table): Renamed from `org-lparse-do-format-org-table'. (org-lparse-insert-list-table): Renamed from `org-lparse-do-format-list-table. (org-lparse-insert-table-table): Renamed from `org-lparse-do-format-table-table'. (org-lparse-insert-org-table, org-lparse-format-org-table) (org-lparse-format-list-table, org-lparse-format-table-table): Propagate above renamings. * contrib/lisp/org-odt.el (org-export-odt-do-format-numbered-formula): Propagate above renamings. Maintain a clear distinction between format and insert behaviours.
This commit is contained in:
parent
ab757f9a24
commit
16333d4a53
|
@ -1367,7 +1367,7 @@ form (FIELD1 FIELD2 FIELD3 ...) as appropriate."
|
||||||
(push (org-split-string line "[ \t]*|[ \t]*") lines-1))))))
|
(push (org-split-string line "[ \t]*|[ \t]*") lines-1))))))
|
||||||
(nreverse lines-1)))
|
(nreverse lines-1)))
|
||||||
|
|
||||||
(defun org-lparse-do-format-org-table (lines &optional splice)
|
(defun org-lparse-insert-org-table (lines &optional splice)
|
||||||
"Format a org-type table into backend-specific code.
|
"Format a org-type table into backend-specific code.
|
||||||
LINES is a list of lines. Optional argument SPLICE means, do not
|
LINES is a list of lines. Optional argument SPLICE means, do not
|
||||||
insert header and surrounding <table> tags, just format the lines.
|
insert header and surrounding <table> tags, just format the lines.
|
||||||
|
@ -1394,10 +1394,10 @@ for formatting. This is required for the DocBook exporter."
|
||||||
(lambda (x) (string-match "^[ \t]*|-" x))
|
(lambda (x) (string-match "^[ \t]*|-" x))
|
||||||
(cdr lines))))))
|
(cdr lines))))))
|
||||||
(setq lines (org-lparse-org-table-to-list-table lines splice))
|
(setq lines (org-lparse-org-table-to-list-table lines splice))
|
||||||
(org-lparse-do-format-list-table
|
(org-lparse-insert-list-table
|
||||||
lines splice caption label attributes head org-lparse-table-colalign-info)))
|
lines splice caption label attributes head org-lparse-table-colalign-info)))
|
||||||
|
|
||||||
(defun org-lparse-do-format-list-table (lines &optional splice
|
(defun org-lparse-insert-list-table (lines &optional splice
|
||||||
caption label attributes head
|
caption label attributes head
|
||||||
org-lparse-table-colalign-info)
|
org-lparse-table-colalign-info)
|
||||||
(or (featurep 'org-table) ; required for
|
(or (featurep 'org-table) ; required for
|
||||||
|
@ -1433,15 +1433,15 @@ for formatting. This is required for the DocBook exporter."
|
||||||
|
|
||||||
(defun org-lparse-format-org-table (lines &optional splice)
|
(defun org-lparse-format-org-table (lines &optional splice)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(org-lparse-do-format-org-table lines splice)
|
(org-lparse-insert-org-table lines splice)
|
||||||
(buffer-substring-no-properties (point-min) (point-max))))
|
(buffer-substring-no-properties (point-min) (point-max))))
|
||||||
|
|
||||||
(defun org-lparse-format-list-table (lines &optional splice)
|
(defun org-lparse-format-list-table (lines &optional splice)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(org-lparse-do-format-list-table lines splice)
|
(org-lparse-insert-list-table lines splice)
|
||||||
(buffer-substring-no-properties (point-min) (point-max))))
|
(buffer-substring-no-properties (point-min) (point-max))))
|
||||||
|
|
||||||
(defun org-lparse-do-format-table-table (lines)
|
(defun org-lparse-insert-table-table (lines)
|
||||||
"Format a table generated by table.el into backend-specific code.
|
"Format a table generated by table.el into backend-specific code.
|
||||||
This conversion does *not* use `table-generate-source' from table.el.
|
This conversion does *not* use `table-generate-source' from table.el.
|
||||||
This has the advantage that Org-mode's HTML conversions can be used.
|
This has the advantage that Org-mode's HTML conversions can be used.
|
||||||
|
@ -1481,7 +1481,7 @@ But it has the disadvantage, that no cell- or row-spanning is allowed."
|
||||||
|
|
||||||
(defun org-lparse-format-table-table (lines)
|
(defun org-lparse-format-table-table (lines)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(org-lparse-do-format-table-table lines)
|
(org-lparse-insert-table-table lines)
|
||||||
(buffer-substring-no-properties (point-min) (point-max))))
|
(buffer-substring-no-properties (point-min) (point-max))))
|
||||||
|
|
||||||
(defvar table-source-languages) ; defined in table.el
|
(defvar table-source-languages) ; defined in table.el
|
||||||
|
|
|
@ -1059,7 +1059,7 @@ value of `org-export-odt-use-htmlfontify."
|
||||||
width height href)
|
width height href)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(let ((org-lparse-table-colalign-info '((0 "c" "8") (0 "c" "1"))))
|
(let ((org-lparse-table-colalign-info '((0 "c" "8") (0 "c" "1"))))
|
||||||
(org-lparse-do-format-list-table
|
(org-lparse-insert-list-table
|
||||||
`((,(org-export-odt-do-format-formula ; caption and label
|
`((,(org-export-odt-do-format-formula ; caption and label
|
||||||
; should be nil
|
; should be nil
|
||||||
embed-as nil attr nil width height href)
|
embed-as nil attr nil width height href)
|
||||||
|
|
Loading…
Reference in New Issue