ox-org: Export special table rows by default
* lisp/ox.el (org-export-options-alist): New internal plist option - :with-special-rows. Defaults to nil. (org-export--skip-p): Do not skip special table rows when :with-special-rows is non-nil. * lisp/ox-org.el (org-org-with-special-rows): New custom option controlling whether to export special table rows. t by default. (org): Use `org-org-with-special-rows' as the value of :with-special-rows option. * etc/ORG-NEWS (=ox-org= now exports special table rows by default): (New option ~org-org-with-special-rows~): Announce the change.
This commit is contained in:
parent
f4f0fc8bda
commit
6ff0de5c3e
12
etc/ORG-NEWS
12
etc/ORG-NEWS
|
@ -13,6 +13,13 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
|
||||||
|
|
||||||
* Version 9.7 (not released yet)
|
* Version 9.7 (not released yet)
|
||||||
** Important announcements and breaking changes
|
** Important announcements and breaking changes
|
||||||
|
*** =ox-org= now exports special table rows by default
|
||||||
|
|
||||||
|
Previously, when exporting to Org, special table rows (for example,
|
||||||
|
width cookies) were not exported. Now, they are exported by default.
|
||||||
|
|
||||||
|
You can customize new option ~org-org-with-special-rows~ to fall back to previous behavior.
|
||||||
|
|
||||||
*** Org babel backends are now expected to define an additional API function ~org-babel-session-buffer:<lang>~
|
*** Org babel backends are now expected to define an additional API function ~org-babel-session-buffer:<lang>~
|
||||||
|
|
||||||
Org babel now uses session buffer (if it exists) to retrieve
|
Org babel now uses session buffer (if it exists) to retrieve
|
||||||
|
@ -501,6 +508,11 @@ The change is breaking when ~org-use-property-inheritance~ is set to ~t~.
|
||||||
|
|
||||||
The =TEST= parameter is better served by Emacs debugging tools.
|
The =TEST= parameter is better served by Emacs debugging tools.
|
||||||
** New and changed options
|
** New and changed options
|
||||||
|
*** New option ~org-org-with-special-rows~
|
||||||
|
|
||||||
|
The new options controls whether to export special table rows in
|
||||||
|
Org-Org (=ox-org=) export. The default value is ~t~.
|
||||||
|
|
||||||
*** New option ~org-babel-comint-fallback-regexp-threshold~
|
*** New option ~org-babel-comint-fallback-regexp-threshold~
|
||||||
|
|
||||||
Org babel is often using Emacs' interactive REPL feature to implement
|
Org babel is often using Emacs' interactive REPL feature to implement
|
||||||
|
|
|
@ -54,6 +54,11 @@ setting of `org-html-htmlize-output-type' is `css'."
|
||||||
(const :tag "Don't include external stylesheet link" nil)
|
(const :tag "Don't include external stylesheet link" nil)
|
||||||
(string :tag "URL or local href")))
|
(string :tag "URL or local href")))
|
||||||
|
|
||||||
|
(defcustom org-org-with-special-rows t
|
||||||
|
"Non-nil means export special table rows.
|
||||||
|
Special rows are the rows containing special marking characters, as
|
||||||
|
described in the Info node `(org)Advanced features'.")
|
||||||
|
|
||||||
(org-export-define-backend 'org
|
(org-export-define-backend 'org
|
||||||
'((babel-call . org-org-identity)
|
'((babel-call . org-org-identity)
|
||||||
(bold . org-org-identity)
|
(bold . org-org-identity)
|
||||||
|
@ -112,7 +117,10 @@ setting of `org-html-htmlize-output-type' is `css'."
|
||||||
(lambda (a s v b)
|
(lambda (a s v b)
|
||||||
(if a (org-org-export-to-org t s v b)
|
(if a (org-org-export-to-org t s v b)
|
||||||
(org-open-file (org-org-export-to-org nil s v b)))))))
|
(org-open-file (org-org-export-to-org nil s v b)))))))
|
||||||
:filters-alist '((:filter-parse-tree . org-org--add-missing-sections)))
|
:filters-alist '((:filter-parse-tree . org-org--add-missing-sections))
|
||||||
|
:options-alist
|
||||||
|
;; Export special table rows.
|
||||||
|
'((:with-special-rows nil nil org-org-with-special-rows)))
|
||||||
|
|
||||||
(defun org-org--add-missing-sections (tree _backend _info)
|
(defun org-org--add-missing-sections (tree _backend _info)
|
||||||
"Ensure each headline has an associated section.
|
"Ensure each headline has an associated section.
|
||||||
|
|
|
@ -140,6 +140,7 @@
|
||||||
(:with-properties nil "prop" org-export-with-properties)
|
(:with-properties nil "prop" org-export-with-properties)
|
||||||
(:with-smart-quotes nil "'" org-export-with-smart-quotes)
|
(:with-smart-quotes nil "'" org-export-with-smart-quotes)
|
||||||
(:with-special-strings nil "-" org-export-with-special-strings)
|
(:with-special-strings nil "-" org-export-with-special-strings)
|
||||||
|
(:with-special-rows nil nil nil)
|
||||||
(:with-statistics-cookies nil "stat" org-export-with-statistics-cookies)
|
(:with-statistics-cookies nil "stat" org-export-with-statistics-cookies)
|
||||||
(:with-sub-superscript nil "^" org-export-with-sub-superscripts)
|
(:with-sub-superscript nil "^" org-export-with-sub-superscripts)
|
||||||
(:with-toc nil "toc" org-export-with-toc)
|
(:with-toc nil "toc" org-export-with-toc)
|
||||||
|
@ -1838,7 +1839,9 @@ not exported."
|
||||||
(and (org-export-table-has-special-column-p
|
(and (org-export-table-has-special-column-p
|
||||||
(org-element-lineage datum 'table))
|
(org-element-lineage datum 'table))
|
||||||
(org-export-first-sibling-p datum options)))
|
(org-export-first-sibling-p datum options)))
|
||||||
(table-row (org-export-table-row-is-special-p datum options))
|
(table-row
|
||||||
|
(unless (plist-get options :with-special-rows)
|
||||||
|
(org-export-table-row-is-special-p datum options)))
|
||||||
(timestamp
|
(timestamp
|
||||||
;; `:with-timestamps' only applies to isolated timestamps
|
;; `:with-timestamps' only applies to isolated timestamps
|
||||||
;; objects, i.e. timestamp objects in a paragraph containing only
|
;; objects, i.e. timestamp objects in a paragraph containing only
|
||||||
|
|
Loading…
Reference in New Issue