Allow an explicitly nil :tstart and :tend to suppress the strings.
Passing explicit nils to leave out start and end strings feels natural. Also, transforming org-mode tables into other org-mode tables can use :tstart and :tend to specify directives, so I don't want to change the default splice setting for those. Signed-off-by: Jason Riedy <jason@acm.org> Conflicts: ChangeLog
This commit is contained in:
parent
54188f8618
commit
5316cbbf05
|
@ -22,6 +22,7 @@
|
|||
when there is no other fmt available.
|
||||
(orgtbl-to-generic): Allow an explicitly nil :tstart or
|
||||
:tend to suppress the appropriate string.
|
||||
|
||||
(orgtbl-to-orgtbl): New function for translating to another orgtbl
|
||||
table.
|
||||
|
||||
|
|
|
@ -3770,8 +3770,10 @@ directly by `orgtbl-send-table'. See manual."
|
|||
|
||||
;; Put header
|
||||
(unless splicep
|
||||
(push (or (orgtbl-eval-str (plist-get params :tstart))
|
||||
"ERROR: no :tstart") *orgtbl-rtn*))
|
||||
(if (not (plist-member params :tstart))
|
||||
(push "ERROR: no :tstart" *orgtbl-rtn*)
|
||||
(let ((tstart (orgtbl-eval-str (plist-get params :tstart))))
|
||||
(if tstart (push tstart *orgtbl-rtn*)))))
|
||||
|
||||
;; Do we have a heading section? If so, format it and handle the
|
||||
;; trailing hline.
|
||||
|
@ -3798,8 +3800,10 @@ directly by `orgtbl-send-table'. See manual."
|
|||
(orgtbl-format-section nil)
|
||||
|
||||
(unless splicep
|
||||
(push (or (orgtbl-eval-str (plist-get params :tend))
|
||||
"ERROR: no :tend") *orgtbl-rtn*))
|
||||
(if (not (plist-member params :tend))
|
||||
(push "ERROR: no :tend" *orgtbl-rtn*)
|
||||
(let ((tend (orgtbl-eval-str (plist-get params :tend))))
|
||||
(if tend (push tend *orgtbl-rtn*)))))
|
||||
|
||||
(mapconcat 'identity (nreverse (if remove-nil-linesp
|
||||
(remq nil *orgtbl-rtn*)
|
||||
|
|
Loading…
Reference in New Issue