emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lisp/org-table.el: Use booktabs on org-table-export


From: Pride Allman
Subject: Re: [PATCH] lisp/org-table.el: Use booktabs on org-table-export
Date: Wed, 11 May 2022 13:01:21 -0400

So basically, the export function is doing the overwrite for user options but to reduce the number of inconsistency we can't use this patch for only one such option.

Now you explained it I can't think of a way to solve it without rewriting the whole thing. Or maybe I need to read the source code more deeply. 

Would it be too much to hope for it to be integrated on the basis that things like this can be added for other options in other export backend too? Or somehow introduce the global settings there.

And considering the answer is no for the previous question; is there a workaround for this? Something people use? Because having to manually edit the table everytime I export is a bit too much for me.

Thank you.

On Wed, 11 May 2022, 08:19 Ihor Radchenko, <yantar92@gmail.com> wrote:
Pride Allman <allmanpride@gmail.com> writes:

> This is my first patch so hopefully I followed the instructions correctly,

Thanks for the patch! Patches are always welcome, though I do not fully
agree with the approach you used in this particular one.

> While using ~org-table-export~ on a table directly even with
> ~org-latex-tables-booktabs~ set to ~t~, it exports a normal table instead
> of booktabs table. But on the same situation, if you export the whole
> buffer the table will be exported according to booktabs.

I also find this discrepancy awkward.

Normally, Org export options are chosen according to
org-export-options-alist (see the docstring) and the equivalent
variables in specific export backend (see org-export-define-backend
'latex in ox-latex.el).

However, when you look into orgtbl-to-latex, orgtbl-to-html,
orgtbl-to-texinfo, and orgtbl-to-unicode, they all overwrite certain
export settings by force. Sometimes, even not leaving the user an option
to choose. All those (list :option value ...) are force-overwriting the
_global_ export defaults (see orgtbl-to-latex calling orgtbl-to-generic
that calls org-export-get-environment with third argument) , including
:latex-tables-booktabs. This is by design.

While I do not like the current design, your patch will only create even
more inconsistencies; The same problem will remain for other
force-overwritten options.

Best,
Ihor

reply via email to

[Prev in Thread] Current Thread [Next in Thread]