From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CFagAQMs5GLGzwAAbAwnHQ (envelope-from ) for ; Fri, 29 Jul 2022 20:50:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OOmbAQMs5GIbgAEA9RJhRA (envelope-from ) for ; Fri, 29 Jul 2022 20:50:43 +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 8AC721931F for ; Fri, 29 Jul 2022 20:50:42 +0200 (CEST) Received: from localhost ([::1]:39680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHV4K-00006S-V7 for larch@yhetil.org; Fri, 29 Jul 2022 14:50:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHV30-00004t-RA for emacs-orgmode@gnu.org; Fri, 29 Jul 2022 14:49:24 -0400 Received: from w4.tutanota.de ([81.3.6.165]:39382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHV2y-0006Xp-Ns for emacs-orgmode@gnu.org; Fri, 29 Jul 2022 14:49:18 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id 22CF51060157; Fri, 29 Jul 2022 18:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1659120548; s=s1; d=vergauwen.me; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=VSCRV9M9Ut/mIco3cJ85B68PjEnGifSibzdr7uSUkzw=; b=r1/F9JwHgMWnQd++QDNi4cc3WTt2cwZBwebJlmrsLoNZCioyccQMh7C9spn2Flh0 WFemf0DGlvSLLTXmLkiCw1I0UXRssia0gjDx05oQO2fQ9BJj0UuCKtMfJ/u2uI7BV1v 2nZvXd65pfXaPlt83QiBfx1lpsHYB4TnKd5PB4AJ+e29+Dr3tRk1+5N68hTrR6SU4kk las8QGTBOkl6ReINd4RCQbNESuPGmOZ3CGfsIe3On8KZGSJ/IUNdb1aQ0DviD2ulvSz 3HIO7WhMmAIPa9va/tFLhOSMqQu0a3F1KoGYVmYi567+Ih2jKy8zjdFOGN8Clq1chHp gZ6vw9um9w== Date: Fri, 29 Jul 2022 20:49:08 +0200 (CEST) To: Ihor Radchenko Cc: Emacs Orgmode Message-ID: In-Reply-To: <87sfmkkptc.fsf@localhost-N898uXC--3-2> References: <87sfmkkptc.fsf@localhost-N898uXC--3-2> Subject: Re: [PATCH]: ox-latex: omit empty date MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_18347_1479288323.1659120548736" Received-SPF: pass client-ip=81.3.6.165; envelope-from=emacs@vergauwen.me; helo=w4.tutanota.de 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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" Reply-to: emacs@vergauwen.me From: emacs--- via "General discussions about Org-mode." 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=1659120642; h=from:from:sender:sender:reply-to: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=VSCRV9M9Ut/mIco3cJ85B68PjEnGifSibzdr7uSUkzw=; b=JVb7f0Z2CUuMfD4OtADk6+2vIsg0vu4F4xQcuJpHXpMgZEwlGS6kYy/pvqSTxzORYSQM7C Xi8eMRLi2FiddkawsDkyFbHJrQsRzOTdluOdBKK422KLeR2FVeQ3lrlgsYgRr601y0NZv6 GUz1SRZ3fFf7ty0XSUnVldi5Ht+p5csqFvJHiTHOJj/7VbtD6wzoi7OZqHXmUGlxU++T1v FJUdv+rn3OB/4Q4Fr26whPz4JQfi7ukjigE1KIYgsjonO+QPbIIJQt9gbqiZg4/tUrdP0U P5GTe3CjiS+NRHYg7mdPjLzLS+Q7kf1JwDAMe2P0GISaU2+noWLsTWVuZyuckw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659120642; a=rsa-sha256; cv=none; b=Klh1cZ6KKyzD/bhATqV2EpSHiNxXPKGjjYUvmmg05gB3iRiQvON9b/gnqUcA2t8ToTsZIh qMPryqOifpKkO/H1lztXnQX8W9LnEfEuvcql2UAiK4i5eYBXOdHTleOBOJfB9hoIdah0IS 0b9uqRBobNr8/gZqQQtc/jq4UslcDLBRGjL9fa/RcQKW/zbpjTHCTPsACTWGg98hRpDJgg H0BXrzrjUGORNbsrMWO3gpZ3X6yq0yIrCADPoi7ZnbhJjxJVxfGT8AE8lECZRn3BMJDopx wcQnL3j4jt8KkZICGUE0vWdOl/9neHTyq6DjGD0wVO0EVJ3fmwaXcxm7H9IiyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=vergauwen.me header.s=s1 header.b="r1/F9JwH"; dmarc=pass (policy=none) header.from=gnu.org; 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.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=vergauwen.me header.s=s1 header.b="r1/F9JwH"; dmarc=pass (policy=none) header.from=gnu.org; 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: 8AC721931F X-Spam-Score: -4.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: v+CkIucmV0ey ------=_Part_18347_1479288323.1659120548736 Content-Type: multipart/alternative; boundary="----=_Part_18348_570274504.1659120548736" ------=_Part_18348_570274504.1659120548736 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Ihor,=C2=A0 sorry for not testing my code! My test halted on the main branch with the message:=C2=A0Warning (python):= =20 Your `python-shell-interpreter' doesn't seem to support readline, yet=20 `python-shell-completion-native-enable' was t and "python" is not part of the `python-shell-completion-native-disabled-interpreters' list.=C2=A0= =20 Native completions have been disabled locally.=C2=A0 Shell native completion is disabled, using fallback and I was not in the mood to fix this small problem with my python installation. The updated (and still untested) patch is attached to this mail. Kind regards,=C2=A0 Bob=C2=A0 Jul 29, 2022, 15:31 by yantar92@gmail.com: > emacs--- via "General discussions about Org-mode." > writes: > >> From 120e4ca11f021fa2d7e7abf57187c2db71942302 Mon Sep 17 00:00:00 2001 >> From: Bob Vergauwen >> Date: Fri, 29 Jul 2022 14:28:21 +0200 >> Subject: [PATCH] lisp/ox-latex: Omit empty date >> >> * lisp/ox-latex.el: (org-latex-template): When no date is provided or >> the export option date is nil, the empty '\date{}' string is no >> longer included in the exported latex document. >> >> The default behaviour for ox-latex was to include an empty date line as >> '\date{}'. This empty date line can affect more complex latex templates >> when the date is for example set by the template on compilation, or when >> the date command is overwritten entirely. In this new patch, the date >> line is omitted from the exported document. >> > > Thanks! This looks reasonable. > >> (let ((date (and (plist-get info :with-date) (org-export-get-date info))= )) >> - (format "\\date{%s}\n" (org-export-data date info))) >> + (cond date >> + (format "\\date{%s}\n" (org-export-data date info)))) >> > > This will give compilation error. Did you mean (when date ...)? > > Best, > Ihor > ------=_Part_18348_570274504.1659120548736 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Ihor, 
sorry for not testing my cod= e!
My test halted on the main branch with the m= essage: Warning (python):
Your `python-shell-interpreter' d= oesn't seem to support readline, yet
`python-shell-completion-native-enable' was t= and "python" is not part
of the `python-shell-completion-native-disabled-interprete= rs' list. 
=
Native completions have been disabled= locally. 
Shell native completion is disabled, using fa= llback

and I = was not in the mood to fix this small problem with my python
installation.

The updated (and still untested) patch is attached to this mail.

Kind regards, 

Bob 
<= /div>



Jul 29, 2022, 15:31 = by yantar92@gmail.com:
=
emacs--- via "General discussions about Org-mode."
<e= macs-orgmode@gnu.org> writes:
From 120e4ca11f0= 21fa2d7e7abf57187c2db71942302 Mon Sep 17 00:00:00 2001
From: = Bob Vergauwen <emacs@vergauwen.me>
Date: Fri, 29 Jul 20= 22 14:28:21 +0200
Subject: [PATCH] lisp/ox-latex: Omit empty = date

* lisp/ox-latex.el: (org-latex-template):= When no date is provided or
the export option date is nil, t= he empty '\date{}' string is no
longer included in the export= ed latex document.

The default behaviour for o= x-latex was to include an empty date line as
'\date{}'. This= empty date line can affect more complex latex templates
when= the date is for example set by the template on compilation, or when
the date command is overwritten entirely. In this new patch, the d= ate
line is omitted from the exported document.

Thanks! This looks reasonable.
(let ((date (and (plist-get info :with-date) (org-export-get-dat= e info))))
- (format "\\date{%s}\n" (org-export-data da= te info)))
+ (cond date
+ (fo= rmat "\\date{%s}\n" (org-export-data date info))))

This will give compilation error. Did you mean (when date= ...)?

Best,
Ihor

------=_Part_18348_570274504.1659120548736-- ------=_Part_18347_1479288323.1659120548736 Content-Type: application/octet-stream; name=0001-lisp-ox-latex-Omit-empty-date.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-lisp-ox-latex-Omit-empty-date.patch RnJvbSAxMjBlNGNhMTFmMDIxZmEyZDdlN2FiZjU3MTg3YzJkYjcxOTQyMzAyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBCb2IgVmVyZ2F1d2VuIDxlbWFjc0B2ZXJnYXV3ZW4ubWU+CkRh dGU6IEZyaSwgMjkgSnVsIDIwMjIgMTQ6Mjg6MjEgKzAyMDAKU3ViamVjdDogW1BBVENIXSBsaXNw L294LWxhdGV4OiBPbWl0IGVtcHR5IGRhdGUKCiogbGlzcC9veC1sYXRleC5lbDogKG9yZy1sYXRl eC10ZW1wbGF0ZSk6IFdoZW4gbm8gZGF0ZSBpcyBwcm92aWRlZCBvcgp0aGUgZXhwb3J0IG9wdGlv biBkYXRlIGlzIG5pbCwgdGhlIGVtcHR5ICdcZGF0ZXt9JyBzdHJpbmcgaXMgbm8KbG9uZ2VyIGlu Y2x1ZGVkIGluIHRoZSBleHBvcnRlZCBsYXRleCBkb2N1bWVudC4KClRoZSBkZWZhdWx0IGJlaGF2 aW91ciBmb3Igb3gtbGF0ZXggd2FzIHRvIGluY2x1ZGUgYW4gZW1wdHkgZGF0ZSBsaW5lIGFzCidc ZGF0ZXt9Jy4gIFRoaXMgZW1wdHkgZGF0Z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