From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akater Subject: Re: Trivial bug in ox-latex Date: Thu, 01 Feb 2018 14:50:22 +0000 Message-ID: <874ln0ahn5.fsf@gmail.com> References: <87mv0tu79y.fsf@gmail.com> <87o9l9ye01.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehGFO-00027H-U2 for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 09:53:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehGFJ-0001um-Ou for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 09:53:54 -0500 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:52102) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehGFJ-0001sK-HJ for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 09:53:49 -0500 Received: by mail-wm0-x229.google.com with SMTP id r71so6502417wmd.1 for ; Thu, 01 Feb 2018 06:53:49 -0800 (PST) In-Reply-To: <87o9l9ye01.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Nicolas Goaziou writes: >> When depth is -1, wholenump form evaluates to nil, and setcounter >> command is not exported at all. > > I don't think it's a bug. Org doesn't pretend to support every LaTeX > feature. Setting `org-export-with-toc', which is where DEPTH comes from, > to -1 doesn't make much sense in an Org context, does it? I can't answer this as I do not deal with org-export-with-toc directly. I was setting tocdepth via org-export-filter-options-functions, specialized explicitly to latex backend: #+begin_src emacs-lisp (defun my-consistent-toc (plist backend) (cond=20=20=20=20=20 ((equal backend 'latex)=20 (plist-put plist :with-toc -1)) ;; other backend-specific settings ) plist) (add-to-list 'org-export-filter-options-functions 'my-consistent-toc) #+end_src I was able to achieve the desired outcome with #+LATEX_HEADER: \setcounter{tocdepth}{-1} If this is not considered a bug, fine then. However, this is confusing behaviour at best, and given the rich functionality of filter-options and friends, I don't see why it should silently fail here. Lots of possible settings don't make sense. In my most humble opinion, this sort of ad hoc type-checking=E2=80=94preventing valid document to be produced without any notice=E2=80=94doesn't feel like it fits a dynamic Lis= p, or Org-mode. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJacyk0AAoJELK+sWGx7H9ED1gQAMw+DA9AvNpQC/WCO9/8UN2k a4Dc/RauIzbeIpqVOBk/Jb+YzrrINNslx2tAtFGVs+Ivsx1MyXACpVOgDhz83Ou2 o+y/4v9Gk+0v60v/CACY40XzhLTIi8jhniFNO9punsUPCMnNuuXac1mxxujksdU2 QoDodAZmkNAiGvH3lPoMzO/VQqAXsqrLP5Dxe2vFM8KRfysUJGSPiHT5GTglcfDz 0BLBW6aRf7tyxTYLDASuVL9eWh9Dpeo2cxHJQadngAyQa+2dvpjiCOtE4U2gKOgN 5G5KP/MUmdztaHB05jGmtjW6Mpn0DSa+gJI0NVGgjfjH0QYvdCcxJj382mgT8u5D NSg3wQGSL/sc8ZQ5d2ro9ZSAzCI9tMO0FrcHcT18lf0IA5GeFNpE3WFJLEJOHlsf EMPAJXQxzwY++o8JdIzML3ctlu4XJhuTbn+7LGalLDiCxiOTp06tmvHomQLqJ4Fw CuRr+G6IOZTFZubIGqVM9qu5yWEWXuGjg6Mrf0ztYXzxg6g52phtoSMBD6HodPEy uEHEZWD+HeH6CsM1sJZD+MoJC17eGE8vNrrj5H6CMcsr3TK1JcK1KEpfQegzHulJ /W3i1vXzTL8/afsM+UYd11Cu8xiHZ0i2OAnuAjwuEwXDB7ykbYU2MWsGQkTPulr4 eF8u0qjHUa0GtLCtaF7Y =7B5d -----END PGP SIGNATURE----- --=-=-=--