emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix date in org-latex--format-spec
@ 2022-02-22 18:05 Lucas V. R.
  2022-10-20  4:37 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas V. R. @ 2022-02-22 18:05 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 613 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 757 bytes --]

[-- Attachment #2: 0001-ox-latex-date-should-not-be-a-property-list.patch --]
[-- Type: text/x-patch, Size: 807 bytes --]

From ddeaa68f540173a27bc0fddd6f8957b5e6af7ffe Mon Sep 17 00:00:00 2001
From: "Lucas V. R" <lvr@s-viva.xyz>
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-20  4:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-22 18:05 [PATCH] Fix date in org-latex--format-spec Lucas V. R.
2022-10-20  4:37 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).