From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OCmbMJnX42LzYgEAbAwnHQ (envelope-from ) for ; Fri, 29 Jul 2022 14:50:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OBy4L5nX42KsbQEAG6o9tA (envelope-from ) for ; Fri, 29 Jul 2022 14:50:33 +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 487123806F for ; Fri, 29 Jul 2022 14:50:33 +0200 (CEST) Received: from localhost ([::1]:59178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHPRo-0008Pw-AE for larch@yhetil.org; Fri, 29 Jul 2022 08:50:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHPQz-0008P0-Cu for emacs-orgmode@gnu.org; Fri, 29 Jul 2022 08:49:41 -0400 Received: from w4.tutanota.de ([81.3.6.165]:43890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHPQx-0004QX-8N for emacs-orgmode@gnu.org; Fri, 29 Jul 2022 08:49:41 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w4.tutanota.de (Postfix) with ESMTP id 286FC106015F for ; Fri, 29 Jul 2022 12:49:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1659098972; s=s1; d=vergauwen.me; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=VeStGEvqX/BHLHs+i52bsVaulqrPgXCUW2nv8qSYvTQ=; b=SQCxb/Ig40AynivjJdNRnbQIodkxc63FBHVQbEYQ8ZB+fN9otaLrOgi+0mv42jgX 4OSyV/ndNHub+xIQwTzYh2pP4UySJVRzs4j4uWqeYe8k+wBrCn3HL5M2ipBQkGE93Id PoMg0RJUlr74nMqdY8+OWLC5MB8v67MjMGNY/h/ksqNDrKPeYDNxEGOwR3deS1zl2Uu fEfTBlbVkNtevk1y6M4PviiFgbfcsewrH/Q0ur2c/7pQ+o7Ryj4Qzcgd8cK28SgloUe jcMT/lXyp2aeyM3N6NHwc9ZGSIC51G142h5j4J+Qx3qtWxkzW18m34Bi/IfCi2D55ZP 89GMxe2ubA== Date: Fri, 29 Jul 2022 14:49:32 +0200 (CEST) To: Emacs Orgmode Message-ID: Subject: [PATCH]: ox-latex: omit empty date MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2641402_1842872294.1659098972983" 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=1659099033; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VeStGEvqX/BHLHs+i52bsVaulqrPgXCUW2nv8qSYvTQ=; b=pkPX2Z5dgImzEtA2VuoouGka7sGfzAKimmCgPWwV8EDuNVadIVFAtQYs5k2XDeBF/04SBZ A6aPSyN4NQgorQCxgqZSbBn5WYbHjwEKrf4dlplRLZQhbLpE38y4iZYRb9b/Xhxk7n8OrQ shYtpUCAmJ50dg2NNheLy1LB3lpLt+A5X+8AxahM11LvDUQpQzMtEtylDU/5OSIVAoDLui QFUkh/eU1Nb/dSajbRwVAlxU7S9vw+RRyXsPGmkwPHLRSUqZwo1CrwCdNkGtzadpoK8OkL Evl78dsQaJ0/8kVAFuOjQqjRBWMyxexXzNp4sDZxXqdeCPnnL54Ydxbmtnrgvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659099033; a=rsa-sha256; cv=none; b=u7FQjtfQd2sNhKkU5GzwlaQad96wQ979avMkMamY7GOYMOmbrvZ0AyXzbToXZRssikfdXs ZuIYQ02R/JODhhWDkRRRSbWBtVVL6rWyT0qY/c3SdNHGagtltQTx6mi+KS20O/2UYCjH8t R1XIjlufwY96h1rzKGCE9Ln8ITbRwY0aswpFNuwERD/Zn9u0SICSiMpSgjSu0kxr5GMpk3 vnnyc+f8XHf5Fz2KFdsaPay1AI63oaH6SUQ1w5q5CyVunoqfDmIE26nAeG5UP9ZTA2qcTc v3+IjWkDcA/PvN1ZGsmpoXwsTuyB/t3epP6tCUj9sbWhNg3cvXyotT8HpXiWWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=vergauwen.me header.s=s1 header.b="SQCxb/Ig"; 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: -1.72 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=vergauwen.me header.s=s1 header.b="SQCxb/Ig"; 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: 487123806F X-Spam-Score: -1.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5AxP9tt/YsOR ------=_Part_2641402_1842872294.1659098972983 Content-Type: multipart/alternative; boundary="----=_Part_2641403_1354841175.1659098972983" ------=_Part_2641403_1354841175.1659098972983 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear list,=C2=A0 In the attachment you can find a patch which omits an empty \date{} line in a latex document when the option to include the date is set to nil or when= =C2=A0 no date is provided. This empty date line can cause problems is certain=C2= =A0 use cases.=C2=A0 Kind regads, Bob=C2=A0 ------=_Part_2641403_1354841175.1659098972983 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Dear list, 

In the attachment you can find a patch which omits an empty \date{} line in
a latex document when the option to include the date is set to nil or when 
no date is provided. This empty date line can cause problems is certain 
use cases. 

Kind regads,
Bob 

------=_Part_2641403_1354841175.1659098972983-- ------=_Part_2641402_1842872294.1659098972983 Content-Type: application/octet-stream; name=0001-lisp-ox-latex-Omit-empty-date.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-lisp-ox-latex-Omit-empty-date.patch >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. TINYCHANGE --- lisp/ox-latex.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 1ed988917..129b2dbf0 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1977,7 +1977,8 @@ holding export options." ((or author email) (format "\\author{%s}\n" (or author email))))) ;; Date. (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)))) ;; Title and subtitle. (let* ((subtitle (plist-get info :subtitle)) (formatted-subtitle -- 2.30.1 (Apple Git-130) ------=_Part_2641402_1842872294.1659098972983--