emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Lucas V. R." <lvreis.mail@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Fix date in org-latex--format-spec
Date: Tue, 22 Feb 2022 15:05:53 -0300	[thread overview]
Message-ID: <CAMBZ5ZD=qtARq4_JVP5VE8+C97vqo_dV6N+WxH-qBFci9C3e7A@mail.gmail.com> (raw)


[-- 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


             reply	other threads:[~2022-02-23  0:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 18:05 Lucas V. R. [this message]
2022-10-20  4:37 ` [PATCH] Fix date in org-latex--format-spec Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMBZ5ZD=qtARq4_JVP5VE8+C97vqo_dV6N+WxH-qBFci9C3e7A@mail.gmail.com' \
    --to=lvreis.mail@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).