emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: [patch] fix ox-latex async export bug
Date: Sun, 28 Nov 2021 16:59:09 +0100	[thread overview]
Message-ID: <874k7ww9te.fsf@gmx.us> (raw)

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

Hi there,

When I try to export documents asynchronously with ox-latex, I always get
a bug in the “org-export-processFOO” files. The last sexp is always something like this: 

    (funcall '#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_83> "test.tex")

where the “#” and “’” are mixed around. This happens even with a very
simple ‘org-export-async-init-file’ just loading ELPA Org.

This was previously reported here:

    https://lists.gnu.org/archive/html/emacs-orgmode/2021-06/msg00422.html

Nicolas’ fix (replicated in this patch) seems to fix it.
I don’t really understand why this bug happens to be honest.

This happens both on my GNU/Linux system (Emacs v29) and my work Windows
PC (Emacs v28 or v29) [all pre-releases, obviously].

Thanks,
Rasmus

-- 
If you can mix business and politics wonderful things can happen!

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-latex-export-to-pdf-Avoid-using-lambda-function.patch --]
[-- Type: text/x-patch, Size: 986 bytes --]

From be15ab50ef4cefc579f87766b21eaed7514379d1 Mon Sep 17 00:00:00 2001
From: Rasmus Pank Roulund <X260@pank.eu>
Date: Sun, 28 Nov 2021 16:34:37 +0100
Subject: [PATCH] org-latex-export-to-pdf: Avoid using lambda function.

Fix "invalid-read-syntax '#'" when exporting asynchronously with
ox-latex.

See also previous bug report: https://lists.gnu.org/archive/html/emacs-orgmode/2021-06/msg00422.html
---
 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 409d92164..8187119ec 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3708,7 +3708,7 @@ Return PDF file's name."
   (let ((outfile (org-export-output-file-name ".tex" subtreep)))
     (org-export-to-file 'latex outfile
       async subtreep visible-only body-only ext-plist
-      (lambda (file) (org-latex-compile file)))))
+      #'org-latex-compile)))
 
 (defun org-latex-compile (texfile &optional snippet)
   "Compile a TeX file.
-- 
2.34.1


             reply	other threads:[~2021-11-28 15:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 15:59 Rasmus [this message]
2021-11-28 19:52 ` [patch] fix ox-latex async export bug Nicolas Goaziou
2021-11-28 22:54   ` Tim Cross
2021-11-29  5:15     ` Timothy
2021-11-30 19:46       ` Rasmus
2021-11-29  9:19   ` Sébastien Miquel
2021-11-29 21:39     ` Nicolas Goaziou
2021-11-30 11:58       ` Sébastien Miquel
2021-12-10  9:30         ` Nicolas Goaziou
2021-11-30 19:35     ` Rasmus Pank Roulund
2021-12-01  6:40       ` Sébastien Miquel
2021-12-01  8:06         ` Rasmus

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=874k7ww9te.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).