Re: [PATCH] Fix date in org-latex--format-spec

2022-10-19 Thread Ihor Radchenko
"Lucas V. R."  writes:

> This is my first time posting here. Sorry in advance if I did something
> wrong.
> I tried customizing org-latex-title-command with a "%D" placeholder but the
> LaTeX was not compiling since this placeholder was being replaced by the
> string
>
> ((latex-fragment (:value \today :begin 1 :end 7 :post-blank 0 :parent #0)))
>
> I could not find this in previous issues and the code in the main branch
> still reproduced this error. The problem seems to be a missing call to
> org-export-data in the function org-latex--format-spec. Perhaps it is not
> necessary but I'm attaching the one-line patch that fixed things for me.
> From ddeaa68f540173a27bc0fddd6f8957b5e6af7ffe Mon Sep 17 00:00:00 2001
> From: "Lucas V. R" 
> Date: Tue, 22 Feb 2022 14:46:45 -0300
> Subject: [PATCH] ox-latex: date should not be a property list

Applied onto main with amendments to the commit message.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a7a579d06acc048c259893839c304f2ef56eab45

Thanks for your contribution!
You will now be listed at https://orgmode.org/worg/contributors.html

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[PATCH] Fix date in org-latex--format-spec

2022-02-22 Thread Lucas V. R.
Hi all,

This is my first time posting here. Sorry in advance if I did something
wrong.
I tried customizing org-latex-title-command with a "%D" placeholder but the
LaTeX was not compiling since this placeholder was being replaced by the
string

((latex-fragment (:value \today :begin 1 :end 7 :post-blank 0 :parent #0)))

I could not find this in previous issues and the code in the main branch
still reproduced this error. The problem seems to be a missing call to
org-export-data in the function org-latex--format-spec. Perhaps it is not
necessary but I'm attaching the one-line patch that fixed things for me.
From ddeaa68f540173a27bc0fddd6f8957b5e6af7ffe Mon Sep 17 00:00:00 2001
From: "Lucas V. R" 
Date: Tue, 22 Feb 2022 14:46:45 -0300
Subject: [PATCH] ox-latex: date should not be a property list

---
 lisp/ox-latex.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 5dda9b3ab..b181cadca 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1630,7 +1630,7 @@ INFO is a plist used as a communication channel."
   (?c . ,(plist-get info :creator))
   (?l . ,language)
   (?L . ,(capitalize language))
-  (?D . ,(org-export-get-date info)
+  (?D . ,(org-export-data (org-export-get-date info) info)
 
 (defun org-latex--insert-compiler (info)
   "Insert LaTeX_compiler info into the document.
-- 
2.35.1