all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [patch] fix ox-latex async export bug
@ 2021-11-28 15:59 Rasmus
  2021-11-28 19:52 ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Rasmus @ 2021-11-28 15:59 UTC (permalink / raw)
  To: emacs-orgmode

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


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

end of thread, other threads:[~2021-12-10  9:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-28 15:59 [patch] fix ox-latex async export bug Rasmus
2021-11-28 19:52 ` 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.