emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Illia Ostapyshyn <ilya.ostapyshyn@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug: Org async export fails with invalid read syntax “#” [9.4.4 (release_9.4.4 @ /Users/iostapyshyn/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]
Date: Sun, 20 Jun 2021 12:30:33 +0200	[thread overview]
Message-ID: <m2y2b4akvq.fsf@gmail.com> (raw)

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

When exporting asynchronously with an essentially empty org-export-async-init-file, the
process fails with this backtrace:

Debugger entered--Lisp error: (invalid-read-syntax "#" 1 0)
  read(#<buffer  *load*>)
  load-with-code-conversion("/var/folders/1q/6syg63894h5bqlwp2jdh8r440000gn/T/o..." "/var/folders/1q/6syg63894h5bqlwp2jdh8r440000gn/T/o..." nil t)
  command-line-1(("-l" "/Users/iostapyshyn/.emacs.d/org-export.el" "-l" "/var/folders/1q/6syg63894h5bqlwp2jdh8r440000gn/T/o..."))
  command-line()
  normal-top-level()

I have tracked the issue down to this bit in org-export-process tmpfile:

(or (ignore-errors (funcall '#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_77>
"paper.tex")) ...

Read doesn't like the '# syntax, seems like it should have been #' instead. I have quoted
the post-process lambda in org-latex-export-to-pdf (see attached diff) and it seems to
have fixed the issue for me. However it doesn't seem like a proper solution.

Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.5.0, NS appkit-2022.50 Version 11.4 (Build 20F71))
 of 2021-06-20
Package: Org mode version 9.4.4 (release_9.4.4 @ /Users/iostapyshyn/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ox-latex.el.diff --]
[-- Type: text/x-patch, Size: 815 bytes --]

diff -u --label /Users/iostapyshyn/emacs/lisp/org/ox-latex.el --label /Users/iostapyshyn/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-latex.el.gz /Users/iostapyshyn/emacs/lisp/org/ox-latex.el /var/folders/1q/6syg63894h5bqlwp2jdh8r440000gn/T/jka-comShObnq
--- /Users/iostapyshyn/emacs/lisp/org/ox-latex.el
+++ /Users/iostapyshyn/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/ox-latex.el.gz
@@ -3633,7 +3633,7 @@
   (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)))))
+      '(lambda (file) (org-latex-compile file)))))
 
 (defun org-latex-compile (texfile &optional snippet)
   "Compile a TeX file.

Diff finished.  Sun Jun 20 12:22:50 2021

             reply	other threads:[~2021-06-22  9:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20 10:30 Illia Ostapyshyn [this message]
2021-06-22 10:04 ` Bug: Org async export fails with invalid read syntax “#” [9.4.4 (release_9.4.4 @ /Users/iostapyshyn/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)] Nicolas Goaziou

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=m2y2b4akvq.fsf@gmail.com \
    --to=ilya.ostapyshyn@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).