From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QDFcBQmWcmcZBwAAe85BDQ:P1 (envelope-from ) for ; Mon, 30 Dec 2024 12:46:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id QDFcBQmWcmcZBwAAe85BDQ (envelope-from ) for ; Mon, 30 Dec 2024 13:46:01 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I08G54AQ; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735562760; 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=H8D9YFquAjN6zTyQ190Ewa0PNqDEd6SacMXeAoYz2aU=; b=P29LuKvdklaIsOgcxiZ5/cNnhJULXUKHr701oVslrl928ZV4P0+T70LQSeqnSee2Zf0Uxm TtrMORI6h7zlKUEAmMj7XUeDmzqL6Bx3yTS/vuRFaUJf0VMk6U7pi5cEX37pLS8oPc53Ap O4bEwLphPByvq/MROyBrCvn5dINITlD10U9btHFNffAAHdnAJ5rvM7T4FRKGYrp7sPbelS 4kJmzHQTmlgHFfsCYT2qphhQoBW9BXAi1pBjGONUlmzFhMnKRczf/lHmyIkRaUDoFgtF46 LfdPP7NbWsiz05p1lZ7n6wv5gCDGXoHs1aZce86mWd6DmRxn1+wRzolsoDiI8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=I08G54AQ; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735562760; a=rsa-sha256; cv=none; b=oy42llm/NTCpTFPY/IzO1y++ISeLd2N0+N40p38DhF2tIYzEz2POzzPakLp3U0PORFRXN1 MufsCWbuF06ndy46kqG6GvPRxGDz86brK+mBZhYAaPXnNIKEEIcRTKqMZiIVLOnMfyLsys Or8IOR6Ano/VdPD9STfsGUDVjPZC+a4zL32geWvDqj4JRqCAVKfWWCXnfprLBoLm+wrTcQ bfsG/ja+2ko0Err3ynuoQtuSR0LbVYlwTuek/zrAiAdwMqO7SyxrA2A3XywwsQg4AJbEAY N5dNxRx4VXqJiubGzB0ZsVh+0KTppMzdzJQiLumVXsr/LAWyF8A7UI23fRt3sQ== 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 98E6E24C59 for ; Mon, 30 Dec 2024 13:46:00 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSF96-00047F-5D; Mon, 30 Dec 2024 07:45:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSF8s-00043f-IN for emacs-orgmode@gnu.org; Mon, 30 Dec 2024 07:45:06 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSF8j-0007Iy-Ba for emacs-orgmode@gnu.org; Mon, 30 Dec 2024 07:45:03 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4362f61757fso91508815e9.2 for ; Mon, 30 Dec 2024 04:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735562696; x=1736167496; darn=gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=H8D9YFquAjN6zTyQ190Ewa0PNqDEd6SacMXeAoYz2aU=; b=I08G54AQjzih7Mahom7soZg5Nqx2eoJx8K6CQHBjXMRr0I/n7icoxaLTH21RFlLdu6 eLGcTre1zM4a1KNYxBRXz+jbszCri/sB+tBVCzccRYjo3yG1DoTa9w09PG5kHxrPL8ji PXsZ4CPj/UZD0u5Wt7XsW2YsLh+hpNC8pPNgZtz+0eKUPQ/9bHByKmVuCFSy/xcQzy7u FRfE/cloRaI/RUPAnk/oOz59gh20uQv3/LGGNXtWov4+GgcCuk5quTNgp8V9CyN6HRbo 1fgDPt5dJhHVJ4KA7Fc1WZDZERXxzg8e+2XFlm4qzleUj+ymH8eflm6IqTAFSN+8K1RS x+4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735562696; x=1736167496; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H8D9YFquAjN6zTyQ190Ewa0PNqDEd6SacMXeAoYz2aU=; b=qAPQaK51ZUsNYBtiYakypqErvOYP1r9tmZG9L/K3mZdQhPIf0oU1J7/RUfRGul5ueK kWj4iozQazLdyjWb5fM+76/txdz1AXewnye6yXsLd0bkrDEMXmCgcF2QZjKdZyTazrz4 YIrkx4FMoasoVaRA/n8Gw+l2M4ig6rsCiewmR1pFXPluvNV+0VVd/1Rep1XN3FO5lpJg 7uRlWDP499/0madjoe21WEuQQAQdy5MLUIbyMULaguAoSegoSXoyOnF4xCEkOaZ8pmZN OAKeJMbGrH8FXkfqa3i4LrEJr6wQT3eSZdpncwp+i5NdXEzYLv60g71ErLTnKNnrINJH VR3A== X-Forwarded-Encrypted: i=1; AJvYcCXb4NECDiQQYMfVyC1rn3LCSGZSfBghqc7K2qS4UCYUIhhNXxBXIZfLNwm6bXtMjWZRGqTvVeNktGfnwVLE@gnu.org X-Gm-Message-State: AOJu0YwBywxbDWKuLjsH2HTn2v2WOU18xsnm7OynQs3ZvUw9xFAlvcXF em6T6lE3f8Tn7bVA9dpaxpD0StAGNaiGIrYO8fSkqEk+FTzlCfUo X-Gm-Gg: ASbGncuIkJ8Oqv83NRy23MoNui4okTk3NEl7i26JmfSjXMeSwQtz0UEaAWhyn3R0W49 qLOeNYqxbSOS0NNkBbXmSExBxWONTjoMhJzvDkx9+5uX3TTDsnRgRDsfHz10byqv/9gLCE6phLL cN4e4/XahEO/Ga3b1I1TzSymXYTIVnnGcZ5Sx0oHhhnwVsrnjL+HusP4OIlOT65cXB0SPw+IyL4 CuKIUIOWbHDMqZ7lbIIEwA4O22mtFN/0rLAV8UpBveS1fcBsETE81aszvUUyugXRZGg/lviBzsw VjMWyQwsPf1BHuU5fUcIex+HJX3Dr6iDV1mK388= X-Google-Smtp-Source: AGHT+IGB93CMrPcCUPOTwiOesQAIXw2wAq8mzem06B1//p/XfU9ycHOt+FvUIX2BuQ/JRWhq0AUsIA== X-Received: by 2002:a05:600c:45cf:b0:434:a781:f5e2 with SMTP id 5b1f17b1804b1-43668642289mr282550305e9.8.1735562695287; Mon, 30 Dec 2024 04:44:55 -0800 (PST) Received: from smtpclient.apple (127.red-79-148-63.dynamicip.rima-tde.net. [79.148.63.127]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436611ea40csm354130565e9.1.2024.12.30.04.44.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Dec 2024 04:44:54 -0800 (PST) From: Pedro Andres Aranda Gutierrez Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_8559E438-C591-4CD1-BD2B-6932E42AB41E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: [PATCH]: ox-latex.eel: handle unnumbered sections in TOC correctly Date: Mon, 30 Dec 2024 13:44:52 +0100 In-Reply-To: <87r05t3szf.fsf@localhost> Cc: rudolf@adamkovic.org, Org Mode List To: Ihor Radchenko References: <495AE5B0-0551-40EC-B501-B681E479D261@gmail.com> <87wmfl3ttn.fsf@localhost> <87r05t3szf.fsf@localhost> X-Mailer: Apple Mail (2.3696.120.41.1.10) Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=paaguti@gmail.com; helo=mail-wm1-x334.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -2.96 X-Spam-Score: -2.96 X-Migadu-Queue-Id: 98E6E24C59 X-TUID: cHIG8E8V8COH --Apple-Mail=_8559E438-C591-4CD1-BD2B-6932E42AB41E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, In some traditions, Xmas presents come on New Years Eve=E2=80=A6 so here = you are.=20 I hope this covers most use cases. Happy New Year, /PA --Apple-Mail=_8559E438-C591-4CD1-BD2B-6932E42AB41E Content-Disposition: attachment; filename=0001-ox-latex.el-Fix-adding-unnumbered-sections-to-the-To.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-ox-latex.el-Fix-adding-unnumbered-sections-to-the-To.patch" Content-Transfer-Encoding: quoted-printable =46rom=20d4dd85679939ff5b1e0dfb2cfedf3d59258c6a85=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"Pedro=20A.=20Aranda"=20=0A= Date:=20Mon,=2030=20Dec=202024=2013:09:43=20+0100=0ASubject:=20[PATCH]=20= ox-latex.el:=20Fix=20adding=20unnumbered=20sections=20to=20the=20ToC=0A=0A= *=20etc/ORG-NEWS:=20Announce=20the=20fix=0A*=20lisp/ox-latex.el:=20= (org-latex-headline):=20Add=20the=20logic=20to=20create=20the=0A= ~\\addcontentsline{toc}...~=20for=20unnumbered=20section=20headings.=20= This=0Agenerates=20correct=20LaTeX=20code=20that=20handles=20including=20= unnumbered=0Asections=20in=20the=20ToC=0A=0A---=0A=20etc/ORG-NEWS=20=20=20= =20=20|=20=205=20+++++=0A=20lisp/ox-latex.el=20|=2018=20= +++++++++++++++---=0A=202=20files=20changed,=2020=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20a/etc/ORG-NEWS=20b/etc/ORG-NEWS=0Aindex=20= b43db549d..7c882b96b=20100644=0A---=20a/etc/ORG-NEWS=0A+++=20= b/etc/ORG-NEWS=0A@@=20-436,6=20+436,11=20@@=20For=20example,=20given=20= =3DH:3=3D=20and=20=3Dtoc:2=3D=20in=20=3D#+OPTIONS:=3D,=20all=20headings=20= at=0A=20the=201st=20and=202nd=20level=20appear=20in=20the=20table=20of=20= contents=20and=20those=20at=20the=0A=203rd=20level=20do=20not.=0A=0A+***=20= LaTeX=20exporter=20now=20correctly=20adds=20unnumbered=20sections=20to=20= the=20ToC=0A+=0A+If=20you=20add=20the=20=3D:ALT_TITLE:=3D=20property=20= to=20an=20unnumbered=20section,=20it=20will=0A+be=20added=20to=20the=20= Table=20of=20Contents=20correctly.=0A+=0A=20*=20Version=209.7=0A=0A=20**=20= Important=20announcements=20and=20breaking=20changes=0Adiff=20--git=20= a/lisp/ox-latex.el=20b/lisp/ox-latex.el=0Aindex=204b2e797d0..a4cfe2f2c=20= 100644=0A---=20a/lisp/ox-latex.el=0A+++=20b/lisp/ox-latex.el=0A@@=20= -2402,7=20+2402,7=20@@=20holding=20contextual=20information."=0A=20=09=09= =09=09=20=20(string-match-p=20"\\"=20v)=0A=20=09=09=09=09=20=20= (format=20"\\stopcontents[level-%d]"=20level)))))=0A=20=09=09=20=20=20=20= info=20t)))))=0A-=09=20=20(if=20(and=20(or=20(and=20opt-title=20(not=20= (equal=20opt-title=20full-text)))=0A+=09=20=20(if=20(and=20numberedp=20= (or=20(and=20opt-title=20(not=20(equal=20opt-title=20full-text)))=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Heading=20contains=20footnotes.=20=20Add=20optional=20title=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20version=20= without=20footnotes=20to=20avoid=20footnotes=20in=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20TOC/footers.=0A= @@=20-2419,8=20+2419,20=20@@=20holding=20contextual=20information."=0A=20= =09=09=20=20=20=20=20=20(concat=20headline-label=20pre-blanks=20= contents))=0A=20=09=20=20=20=20;;=20Impossible=20to=20add=20an=20= alternative=20heading.=20=20Fallback=20to=0A=20=09=20=20=20=20;;=20= regular=20sectioning=20format=20string.=0A-=09=20=20=20=20(format=20= section-fmt=20full-text=0A-=09=09=20=20=20=20(concat=20headline-label=20= pre-blanks=20contents))))))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= (save-match-data=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20Try=20= to=20extract=20the=20section=20command=20from=20section-fmt=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20;;=20This=20should=20givee=20us=20some=20= protection=20against=20unexpeted=20stuff=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(let=20((matched=20(string-match=20"\\\\\\([a-z]+\\)[^a-z]"=20= section-fmt)))=0A+=09=20=20=20=20=20=20=20=20(if=20(or=20numberedp=20= (not=20matched))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20Just=20in=20case=20the=20section=20header=20is=20not=20a=20= standard=20\\xyz*{}=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(format=20section-fmt=20full-text=0A+=09=09=20=20=20=20=20=20=20= =20=20=20=20=20(concat=20headline-label=20pre-blanks=20contents))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(let*=20((section-label=20= (match-string=201=20section-fmt))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(add-contents=20=20(format=20= "\\addcontentsline{toc}{%s}{%s}\n"=20section-label=20opt-title)))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20prepend=20the=20= addcontentsline=20as=20the=20first=20element=20in=20the=20generated=20= section=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20this=20assures=20that=20it=20will=20go=20directly=20after=20the=20= section=20command=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(format=20section-fmt=20full-text=0A+=09=09=20=20=20=20=20=20=20=20= =20=20=20=20(concat=20add-contents=20headline-label=20pre-blanks=20= contents))))))))))))=0A=0A=20(defun=20= org-latex-format-headline-default-function=0A=20=20=20=20=20(todo=20= _todo-type=20priority=20text=20tags=20_info)=0A--=0A2.37.1=20(Apple=20= Git-137.1)=0A= --Apple-Mail=_8559E438-C591-4CD1-BD2B-6932E42AB41E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > El 27 dic 2024, a las 19:01, Ihor Radchenko = escribi=C3=B3: >=20 > Pedro Andres Aranda Gutierrez writes: >=20 >>> I am slightly concerned about generality of dropping ALT_TITLE from >>> unnumbered sectioning command. >> ... >> I do think we can. Unnumbered sectioning commands never appear in the = ToC... >> Unless you use additional magic like, ... >=20 > Good. I am not concerned about hacks, I am concerned about users who > customized `org-latex-classes' to use something non-standard for > sectioning. >=20 > But if doing so is not expected in general, I'd rather accept your fix > until someone comes and complains. Fixing the existing bug with = default > settings is more important than fixing possible bug (affecting less > users) with custom sectioning. >=20 > --=20 > Ihor Radchenko // yantar92, > Org mode maintainer, > Learn more about Org mode at . > Support Org development at , > or support my work at --Apple-Mail=_8559E438-C591-4CD1-BD2B-6932E42AB41E--