Re: [PATCH]: ox-latex: omit empty date

2022-08-05 Thread Ihor Radchenko
Ihor Radchenko writes: > Daniel Fleischer writes: > >> Daniel Fleischer [2022-07-31 Sun 18:25] wrote: >> >> In other words \date{} is what prevents from the date being printed. Or >> put differently \date{\today} and not putting \date is equivalent. See >> http://www.emerson.emory.edu/services/l

Re: [PATCH]: ox-latex: omit empty date

2022-08-01 Thread Max Nikulin
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"

Re: [PATCH]: ox-latex: omit empty date

2022-08-01 Thread General discussions about Org-mode.
> emacs--- via "General discussions about Org-mode." > writes: > >> My use case is very niche and be solved by changing my custom latex date >> command by renaming it as for example \mydate. >> >> Adding extra options like with_date:nil seems overkill for this small issue. >> > > I agree; I th

Re: [PATCH]: ox-latex: omit empty date

2022-08-01 Thread Daniel Fleischer
emacs--- via "General discussions about Org-mode." writes: > My use case is very niche and be solved by changing my custom latex date > command by renaming it as for example \mydate. > > Adding extra options like with_date:nil seems overkill for this small issue. I agree; I think we shouldn't

Re: [PATCH]: ox-latex: omit empty date

2022-08-01 Thread General discussions about Org-mode.
On 31/07/2022 09:38, Ihor Radchenko wrote: >> Max Nikulin writes: >> All the above makes sense. Do I miss something? >>> >>> To be precise, \date is not exported to LaTeX file, but current date >>> appears in PDF. That is why I consider the change as a breaking one. >>> >>> Try to export

Re: [PATCH]: ox-latex: omit empty date

2022-07-31 Thread Ihor Radchenko
Daniel Fleischer writes: > Daniel Fleischer [2022-07-31 Sun 18:25] wrote: > > In other words \date{} is what prevents from the date being printed. Or > put differently \date{\today} and not putting \date is equivalent. See > http://www.emerson.emory.edu/services/latex/latex_125.html. Would you m

Re: [PATCH]: ox-latex: omit empty date

2022-07-31 Thread Daniel Fleischer
Daniel Fleischer [2022-07-31 Sun 18:25] wrote: > I would reckon people don't want the date displayed when they set it to > nil. But removing the line \date{} just prints today's date. I don't > understand the purpose of the patch. In other words \date{} is what prevents from the date being printe

Re: [PATCH]: ox-latex: omit empty date

2022-07-31 Thread Daniel Fleischer
emacs--- via "General discussions about Org-mode." [2022-07-29 Fri 14:49] wrote: > 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 problem

Re: [PATCH]: ox-latex: omit empty date

2022-07-31 Thread Max Nikulin
On 31/07/2022 09:38, Ihor Radchenko wrote: Max Nikulin writes: All the above makes sense. Do I miss something? To be precise, \date is not exported to LaTeX file, but current date appears in PDF. That is why I consider the change as a breaking one. Try to export to PDF the following document

Re: [PATCH]: ox-latex: omit empty date

2022-07-30 Thread Ihor Radchenko
Max Nikulin writes: >> All the above makes sense. Do I miss something? > > To be precise, \date is not exported to LaTeX file, but current date > appears in PDF. That is why I consider the change as a breaking one. > > Try to export to PDF the following document. > > >8 > #+options: ti

Re: [PATCH]: ox-latex: omit empty date

2022-07-30 Thread Max Nikulin
On 31/07/2022 07:53, Ihor Radchenko wrote: Max Nikulin writes: (let ((date (and (plist-get info :with-date) (org-export-get-date info - (format "\\date{%s}\n" (org-export-data date info))) + (cond date I would consider (plist-get info :with-date) instead of date here t

Re: [PATCH]: ox-latex: omit empty date

2022-07-30 Thread Ihor Radchenko
Max Nikulin writes: >> (let ((date (and (plist-get info :with-date) (org-export-get-date >> info >> - (format "\\date{%s}\n" (org-export-data date info))) >> + (cond date > > I would consider (plist-get info :with-date) instead of date here to > allow to suppress date in t

Re: [PATCH]: ox-latex: omit empty date

2022-07-30 Thread Max Nikulin
On 29/07/2022 19:49, emacs--- via General discussions about Org-mode. wrote: 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 cert

Re: [PATCH]: ox-latex: omit empty date

2022-07-29 Thread Ihor Radchenko
em...@vergauwen.me writes: > The updated (and still untested) patch is attached to this mail. Well. The patch is simple enough to not worry too much about checking. And the tests are passing. Applied onto main via a753d0dd2. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a753d0d

Re: [PATCH]: ox-latex: omit empty date

2022-07-29 Thread General discussions about Org-mode.
Hi Ihor,  sorry for not testing my code! My test halted on the main branch with the message: Warning (python): Your `python-shell-interpreter' doesn't seem to support readline, yet `python-shell-completion-native-enable' was t and "python" is not part of the `python-shell-completion-native-disa

Re: [PATCH]: ox-latex: omit empty date

2022-07-29 Thread Ihor Radchenko
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 n

[PATCH]: ox-latex: omit empty date

2022-07-29 Thread General discussions about Org-mode.
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  0001-lisp-ox-latex-Omit-empt