[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: ox-latex: omit empty date
From: |
Max Nikulin |
Subject: |
Re: [PATCH]: ox-latex: omit empty date |
Date: |
Mon, 1 Aug 2022 23:47:54 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 01/08/2022 17:55, emacs--- via General discussions about Org-mode. wrote:
*later in this mail)*
;; Date.
(let ((date (and (plist-get info :with-date) (org-export-get-date
info))))
(if (string-match-p "^\{.*\}$" (org-export-data date info))
(format "\\date%s\n" (org-export-data date info))
(format "\\date{%s}\n" (org-export-data date info))))
I am against such code.
_Why mostly:_
At the moment the code escapes the provided brackets and the current
behaviour is
#+date: {my}{fancy}{date} -> \date\{my\}\{fancy\}\{date\}
#+date: @@latex:{my}{fancy}{date}@@
Anyway such date is not suitable for other backends.
I think, custom command name and "#+latex_header:" with such command is
proper solution.
It is possible to choose some combination of existing options like
#+options: date:t
#+date:
as instruction to not add the \date command, but I think it would be
confusing for users and anyway a breaking change for some of them.
I suppose, reverting the patch was the proper step.