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

* Re: cannot export asynchronously because of org-fold-core--update-buffer-folds
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-03-07 12:35 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> 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)
> ...
> To make sure I have a reproducible export, I set
> org-export-async-init-file to a file with the following contents:
> ...
> (require 'ox-latex)
> ...
> I assume the problem is that there is a version mismatch between the org

Yes, looks like it. If you are using custom
`org-export-async-init-file', you need to make sure that Org mode
available to that init file has the same version as the Org mode that
initiates export process. Basically, you need to set the right load-path.

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

byte-compiled code is a function passed by Org mode to the async Emacs.
That function takes care about re-creating the right Elisp environment
inside the async process.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: cannot export asynchronously because of org-fold-core--update-buffer-folds
  2024-03-07 12:35 ` Ihor Radchenko
@ 2024-03-07 14:28   ` Alan Schmitt
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Schmitt @ 2024-03-07 14:28 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

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

On 2024-03-07 12:35, Ihor Radchenko <yantar92@posteo.net> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> 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)
>> ...
>> To make sure I have a reproducible export, I set
>> org-export-async-init-file to a file with the following contents:
>> ...
>> (require 'ox-latex)
>> ...
>> I assume the problem is that there is a version mismatch between the org
>
> Yes, looks like it. If you are using custom
> `org-export-async-init-file', you need to make sure that Org mode
> available to that init file has the same version as the Org mode that
> initiates export process. Basically, you need to set the right
> load-path.

Thank you, I can confirm that this fixes it.

>> 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.
>
> byte-compiled code is a function passed by Org mode to the async Emacs.
> That function takes care about re-creating the right Elisp environment
> inside the async process.

Ah, ok, I understand better now. Thanks again!

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