emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* cannot export asynchronously because of org-fold-core--update-buffer-folds
@ 2024-03-06 14:45 Alan Schmitt
  2024-03-07 12:35 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Schmitt @ 2024-03-06 14:45 UTC (permalink / raw)
  To: emacs-orgmode

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

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

end of thread, other threads:[~2024-03-07 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-06 14:45 cannot export asynchronously because of org-fold-core--update-buffer-folds Alan Schmitt
2024-03-07 12:35 ` Ihor Radchenko
2024-03-07 14:28   ` Alan Schmitt

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).