From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sAQIB3uno2EEdwAAgWs5BA (envelope-from ) for ; Sun, 28 Nov 2021 16:59:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id AMOPAnuno2HCBgAAbx9fmQ (envelope-from ) for ; Sun, 28 Nov 2021 15:59:55 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B17E41689C for ; Sun, 28 Nov 2021 16:59:54 +0100 (CET) Received: from localhost ([::1]:39108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrMan-0004tj-Sa for larch@yhetil.org; Sun, 28 Nov 2021 10:59:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrMaK-0004tN-2h for emacs-orgmode@gnu.org; Sun, 28 Nov 2021 10:59:24 -0500 Received: from ciao.gmane.io ([116.202.254.214]:35354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrMaI-00032y-Eh for emacs-orgmode@gnu.org; Sun, 28 Nov 2021 10:59:23 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mrMaE-0000Xn-OR for emacs-orgmode@gnu.org; Sun, 28 Nov 2021 16:59:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Rasmus Subject: [patch] fix ox-latex async export bug Date: Sun, 28 Nov 2021 16:59:09 +0100 Message-ID: <874k7ww9te.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" User-Agent: Emacs Gnus Cancel-Lock: sha1:uivgeABlAR4UmSWpSQ3pi1oZu5U= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638115194; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=lszcUKV7lN3nZK1WJm4FNPw4Gmxp/iQCiGBtu6Maz0w=; b=BIW0bXG1111PuZ5Bdza0nCU33TzWZIwRbmT7wUaaNB86sCkhLPtJz0zBJYuZAGWWGrq6Oy Q8qJ33OcWJ+z2c4yjo7c0iEvGgplqkXUyxksHLaAQThhUHjcwVgEIZADDs7ubTqYD2hGw3 ncIM0VpvP/EgBkX9gaSsn/zse/HJl8TpPxeGgQocy5+nZZrhUGjIAmhdl4VyDF1jLkIUmO zz4XIyCe94BgaJLsAksb82nDBnsD6w5zSrQnrsEkiyr8g5r4uc9eirdZQnR9kvE4FXjwN7 qynqeY58c3x+FiCFbZHrGsQulO7DOR8OhQCFgz28ksrgLPSqCm1CA0dbOWHNew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638115194; a=rsa-sha256; cv=none; b=mcxaWKaSjzVrV8eoiRWTMEE7g+UWsUXo/9XFVhGrnHZacH1xVZ8+iiZJ5ph1vFrIrnIMGp urDGHcbfwSaG0bzFoWtSmjloJGHsR3WJVlzKUQzAAv01Kz1sL7+W1fbz2HSO7T1SWhLl33 zD62ZYfQ2E9qP3+OR38r9SZoOmEIVDkZ75WtU9L0G6NXC3wAylk6fJ/qunIJhX4mt0OAQv ifLSwNto2T3ryL7oekZq7SgWgb3dxPonsVzGNICqJ5ZWaPIXJkKGX6cTRFOHG9ixvpJEqt NJxw5C4agQJ5wxbJnZioniKjUn/+UN31c+cFA+6pAQyqVDmWbFtux94Zd2WbxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.us (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.30 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmx.us (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B17E41689C X-Spam-Score: -2.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7CVkByqIRPFw --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 '# "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! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-latex-export-to-pdf-Avoid-using-lambda-function.patch >From be15ab50ef4cefc579f87766b21eaed7514379d1 Mon Sep 17 00:00:00 2001 From: Rasmus Pank Roulund 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 --=-=-=--