From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eGKRKhfse2J/7gAAbAwnHQ (envelope-from ) for ; Wed, 11 May 2022 19:02:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SGZoKhfse2JDHQAAauVa8A (envelope-from ) for ; Wed, 11 May 2022 19:02:15 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4B2CD17C77 for ; Wed, 11 May 2022 19:02:15 +0200 (CEST) Received: from localhost ([::1]:44896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nopj4-0006BV-DO for larch@yhetil.org; Wed, 11 May 2022 13:02:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nopiV-0006BD-W5 for emacs-orgmode@gnu.org; Wed, 11 May 2022 13:01:40 -0400 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]:37396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nopiU-0005VV-6c for emacs-orgmode@gnu.org; Wed, 11 May 2022 13:01:39 -0400 Received: by mail-vs1-xe2f.google.com with SMTP id t85so2648846vst.4 for ; Wed, 11 May 2022 10:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fRBhcr+rwx91i3QGGt6ZYTjGJ3cmqR2c5+N8/yOS9AQ=; b=jZ4oQW8IAZJk6JzB+X76mDy63dazv/gOweD6VtVYCW3fUEJJ8X4/Y8fgaJql1HTose U75rAmWFnIkw7v6g2Q7+71eM6nB+Jin9Z0rhIwqoX7/J9xk1lijn/+SkU5VicJzQlJ87 eYGorUPeo8uMZ+lujGsvsb2cj6LZxsrtxpmQg60Qk1dVm2oQiukE5jEopj+vZSF4TMWI tQZigAQ00AdcW7DJUVYEVuwYQcORrJDSrbkM48gf8DWZBLEt2gbjoDlupYDxnPov9Z49 JBX5tvvpub6acLhIdw9o7A7wJtpTo6Wge60gKcQkva55M14hOZ16GosbF3nSsQuqBwea y4wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fRBhcr+rwx91i3QGGt6ZYTjGJ3cmqR2c5+N8/yOS9AQ=; b=qasVHxvpTc2KJYwbrgH76lOLrnlkX973gq4dHudSA0Sd69Nkp4V1V10cc1T9o4AIcF Q3GBPDwxq1TH7Q87UPbiio1OAESS6OerkLnLo9PQj8vq0dyCHFqk5DzmjMsdlgS/8p6/ 07HnypH5TNT8OpXrsSyaehNR3oengowoWje6R8wdMSsTaMHsMT+kFdkx1U7myBkJwP6E JDLzehV99bsXCC+eXVVvQkb0jEoEqOvoDuALjalkSVX3QMRsZVG7nr/rDEKfME1TcOnZ 3hMxyCIx5OipHEdZX48cz8p38T98CkThJm9muDsazFOqv3SXMRy3wzDwAu+OAW0CbUCi 3Osg== X-Gm-Message-State: AOAM531nIhtArVwt9H11rzypDvAKpe7aPzvD8p027HAxaic4XAS5R736 93hBbOxTn1JohIWBn48lx5Fq0q5aInEtIc6x4qAusYZr X-Google-Smtp-Source: ABdhPJzyEbLuLnWWEZUVU7p/9NcmGsRmOy0EfMprroI61eKGtJSyI1d2tg8KmOAVcQzOvHetdQGlUfOTCja5U0WEP58= X-Received: by 2002:a67:b445:0:b0:32c:e27c:b690 with SMTP id c5-20020a67b445000000b0032ce27cb690mr14380573vsm.43.1652288493853; Wed, 11 May 2022 10:01:33 -0700 (PDT) MIME-Version: 1.0 References: <87a6bojm73.fsf@localhost> In-Reply-To: <87a6bojm73.fsf@localhost> From: Pride Allman Date: Wed, 11 May 2022 13:01:21 -0400 Message-ID: Subject: Re: [PATCH] lisp/org-table.el: Use booktabs on org-table-export To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000be244105debf6424" Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=allmanpride@gmail.com; helo=mail-vs1-xe2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652288535; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fRBhcr+rwx91i3QGGt6ZYTjGJ3cmqR2c5+N8/yOS9AQ=; b=I7pr0nFe4nPMpWHIe8ivbqb5WleeFkjvGfNAZLOSq7XD+qctaOCgnIZ25oFn0wRWfeiZng zEoAuNHClQr3/ED/QmbOTgOqnW3I1hFUx7D9p9nINlmNfMAnkJ9cpeT9IFV7b2Cqnx2fAi i17cZi8qzVU8FzXAoME7dS8ErmBZqGzHlaK81RbO+Ya1UC4EYHljKYTLRzkpDpCAvRuhDA 0sMccZUQ+QJBQGOhpcq+qzQcCgA4NLfeCq19SVQ749BUVA/1WiW9hbZlxbeGaXJcTWgYel VS9Gy+hakdTI7SJXeI3M/x227eD+yDD1GNB8/cpycDXKonHaCc26ZHjcoQpUSQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652288535; a=rsa-sha256; cv=none; b=DoW9HhlVrdKxdNbWvJg5j1zQZRZih1bXX31yP8LvBjTS+oFEEhNy2e4QlmmM8n4RN6J7nv rbeDBq5uf+vhJinQJIov9oHjYUmCHZFMwJZETaJ4zzpNmdybfdIo//5PzmGTd17WyT2sCW xyDG0m+l/FnxxuNSETqot12hkRw+bRx7qkVtWZkefC+FyHTA1CaYUrtI9pwJvgWrV8CqNC 203TBjvbYgKhB99GLmDFlSbUsbbzuZoenN0o/Yb6f8VSFDsdQMOFsFl62AlyNt46Hs/zWh hHLv/81oW7rNeIiusk/xHv3mNgqwdwQhFvR8ZFJCCXspr5kyNEgY4qp9XoupFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jZ4oQW8I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jZ4oQW8I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4B2CD17C77 X-Spam-Score: -4.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: Vm5EsY9HRSN1 --000000000000be244105debf6424 Content-Type: text/plain; charset="UTF-8" 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, wrote: > Pride Allman 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 > --000000000000be244105debf6424 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 witho= ut rewriting the whole=C2=A0thing. Or maybe I need to read the source code = more deeply.=C2=A0

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

<= div dir=3D"auto">And considering the answer is no for the previous question= ; is there a workaround for this? Something people use? Because having to m= anually 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@g= mail.com> writes:

> This is my first patch so hopefully I followed the instructions correc= tly,

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 inst= ead
> of booktabs table. But on the same situation, if you export the whole<= br> > 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
--000000000000be244105debf6424--