From: "Sébastien Miquel" <sebastien.miquel@posteo.eu>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>, Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] fix ox-latex async export bug
Date: Mon, 29 Nov 2021 09:19:20 +0000 [thread overview]
Message-ID: <ae2ab5f1-ee7e-5e3a-504e-fef5da3448a2@posteo.eu> (raw)
In-Reply-To: <877dcsoy6m.fsf@nicolasgoaziou.fr>
[-- Attachment #1.1: Type: text/plain, Size: 435 bytes --]
Hi,
Nicolas Goaziou writes:
>> I don’t really understand why this bug happens to be honest.
> The patch is already an improvement, but the beast is still lurking,
> indeed.
This is most likely due to native compilation which compiles the
unquoted lambda. Once compiled, it (presumably) fails to be passed to
the external emacs process.
Attached is a patch that applies the same fix where affected.
Regards,
--
Sébastien Miquel
[-- Attachment #1.2: Type: text/html, Size: 1102 bytes --]
[-- Attachment #2: 0001-ox-Fix-async-export-with-native-compilation.patch --]
[-- Type: text/x-patch, Size: 3364 bytes --]
From 35ae093113d9a04a99b55f0747848b373a7463f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= <sebastien.miquel@posteo.eu>
Date: Mon, 29 Nov 2021 09:54:33 +0100
Subject: [PATCH] ox: Fix async export with native compilation
* lisp/ox-beamer.el (org-beamer-export-to-pdf):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-koma-letter.el (org-koma-letter-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-pdf):
* lisp/ox-texinfo.el (org-texinfo-export-to-info): Quote lambda.
Quote or name lambdas to prevent their compilation into anonymous
functions which cannot be passed to the external async emacs process.
---
lisp/ox-beamer.el | 2 +-
lisp/ox-icalendar.el | 4 ++--
lisp/ox-koma-letter.el | 2 +-
lisp/ox-man.el | 2 +-
lisp/ox-texinfo.el | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index c9a67f891..3bfcd01d4 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -1059,7 +1059,7 @@ Return PDF file's name."
(let ((file (org-export-output-file-name ".tex" subtreep)))
(org-export-to-file 'beamer file
async subtreep visible-only body-only ext-plist
- (lambda (file) (org-latex-compile file)))))
+ #'org-latex-compile)))
;;;###autoload
(defun org-beamer-select-environment ()
diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 0a682c7c8..68c5679ea 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -888,8 +888,8 @@ Return ICS file name."
(org-export-to-file 'icalendar outfile
async subtreep visible-only body-only
'(:ascii-charset utf-8 :ascii-links-to-notes nil)
- (lambda (file)
- (run-hook-with-args 'org-icalendar-after-save-hook file) nil))))
+ '(lambda (file)
+ (run-hook-with-args 'org-icalendar-after-save-hook file) nil))))
;;;###autoload
(defun org-icalendar-export-agenda-files (&optional async)
diff --git a/lisp/ox-koma-letter.el b/lisp/ox-koma-letter.el
index 6a895a6a2..978e4e41f 100644
--- a/lisp/ox-koma-letter.el
+++ b/lisp/ox-koma-letter.el
@@ -982,7 +982,7 @@ Return PDF file's name."
(org-koma-letter-special-contents))
(org-export-to-file 'koma-letter file
async subtreep visible-only body-only ext-plist
- (lambda (file) (org-latex-compile file)))))
+ #'org-latex-compile)))
(provide 'ox-koma-letter)
diff --git a/lisp/ox-man.el b/lisp/ox-man.el
index 6d3476cda..9a1f00f35 100644
--- a/lisp/ox-man.el
+++ b/lisp/ox-man.el
@@ -1117,7 +1117,7 @@ Return PDF file's name."
(let ((outfile (org-export-output-file-name ".man" subtreep)))
(org-export-to-file 'man outfile
async subtreep visible-only body-only ext-plist
- (lambda (file) (org-latex-compile file)))))
+ #'org-latex-compile)))
(defun org-man-compile (file)
"Compile a Groff file.
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index b0125894a..734c8a4f3 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -1701,7 +1701,7 @@ Return INFO file's name."
(org-export-coding-system org-texinfo-coding-system))
(org-export-to-file 'texinfo outfile
async subtreep visible-only body-only ext-plist
- (lambda (file) (org-texinfo-compile file)))))
+ #'org-texinfo-compile)))
;;;###autoload
(defun org-texinfo-publish-to-texinfo (plist filename pub-dir)
--
2.34.1
next prev parent reply other threads:[~2021-11-29 9:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=ae2ab5f1-ee7e-5e3a-504e-fef5da3448a2@posteo.eu \
--to=sebastien.miquel@posteo.eu \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
--cc=rasmus@gmx.us \
/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).