emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: "emacs-orgmode" <emacs-orgmode@gnu.org>
Subject: cannot export asynchronously because of org-fold-core--update-buffer-folds
Date: Wed, 06 Mar 2024 15:45:08 +0100	[thread overview]
Message-ID: <m2v85zo1vv.fsf@petitepomme.net> (raw)

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

Hello,

I’m trying to export a file asynchronously to beamer/pdf, and I have a
strange error. Here is the contents of the *Org Export Process* buffer:

Debugger entered--Lisp error: (void-function org-fold-core--update-buffer-folds)
  org-fold-core--update-buffer-folds()
  #f(compiled-function () #<bytecode 0x1b5ee3daf7014ea1>)()
  funcall(#f(compiled-function () #<bytecode 0x1b5ee3daf7014ea1>))
  (progn nil (progn (setq kill-emacs-hook nil) (setq org-babel-confirm-evaluate-answer-no t)) (require 'ox) (funcall '#f(compiled-function () #<bytecode 0x1b5ee3daf7014ea1>)) (restore-buffer-modified-p nil) (print (let ((output (org-export-as 'beamer nil nil nil '(:output-file "slides.tex")))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (if ... nil ...) (let ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (or (condition-case nil (progn (funcall 'org-latex-compile "slides.tex")) (error nil)) "slides.tex"))))
  (unwind-protect (progn nil (progn (setq kill-emacs-hook nil) (setq org-babel-confirm-evaluate-answer-no t)) (require 'ox) (funcall '#f(compiled-function () #<bytecode 0x1b5ee3daf7014ea1>)) (restore-buffer-modified-p nil) (print (let ((output (org-export-as 'beamer nil nil nil '...))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ...) (and ... ...)))) (or (condition-case nil (progn (funcall ... "slides.tex")) (error nil)) "slides.tex")))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn nil (progn (setq kill-emacs-hook nil) (setq org-babel-confirm-evaluate-answer-no t)) (require 'ox) (funcall '#f(compiled-function () #<bytecode 0x1b5ee3daf7014ea1>)) (restore-buffer-modified-p nil) (print (let ((output (org-export-as ... nil nil nil ...))) (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...))) (or (condition-case nil (progn ...) (error nil)) "slides.tex")))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn nil (progn (setq kill-emacs-hook nil) (setq org-babel-confirm-evaluate-answer-no t)) (require 'ox) (funcall '#f(compiled-function () #<bytecode 0x1b5ee3daf7014ea1>)) (restore-buffer-modified-p nil) (print (let ((output ...)) (let (...) (save-current-buffer ... ...)) (or (condition-case nil ... ...) "slides.tex")))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  load-with-code-conversion("/private/var/folders/p6/3p2365qn1dx08q33rqwnr2hh00..." "/private/var/folders/p6/3p2365qn1dx08q33rqwnr2hh00..." nil t)
  command-line-1(("-l" "/Users/schmitta/work/skeletons/research/talks/Effe..." "-l" "/var/folders/p6/3p2365qn1dx08q33rqwnr2hh0000gn/T/o..."))
  command-line()
  normal-top-level()

To make sure I have a reproducible export, I set
org-export-async-init-file to a file with the following contents:

;;; export-init.el --- description -*- lexical-binding: t; -*-

;;; Commentary:

;;; Code:

(setq-default indent-tabs-mode nil)
(setq debug-on-error t)

(require 'ox-latex)

(add-to-list 'org-latex-classes
             '("my-beamer"
               "\\documentclass\[presentation,aspectratio=169\]\{beamer\}
[NO-DEFAULT-PACKAGES]"
               ("\\section\{%s\}" . "\\section*\{%s\}")
               ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
               ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))

(require 'ox-beamer)

(setq org-latex-listings 'minted)

(setq org-latex-pdf-process
      '("latexmk -pdflatex='%latex --shell-escape -8bit' -pdf -quiet %f"))

(setq org-export-async-debug t)

(provide 'export-init)
;;; export-init.el ends here


I assume the problem is that there is a version mismatch between the org
I’m using to start the export and the org in the async process, but I do
not understand how they would interact. In particular, I don’t
understand why there is a mention of byte-compiled code in the error
trace.

If it matters, the emacs with which I’m initializing the export with is
started with the --init-directory option.

How can I track where this error comes from?

Thanks,

Alan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

             reply	other threads:[~2024-03-06 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 14:45 Alan Schmitt [this message]
2024-03-07 12:35 ` cannot export asynchronously because of org-fold-core--update-buffer-folds Ihor Radchenko
2024-03-07 14:28   ` Alan Schmitt

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=m2v85zo1vv.fsf@petitepomme.net \
    --to=alan.schmitt@polytechnique.org \
    --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).