org-mode in Emacs: eval chunks of code in asynchronous mode

2.7k views Asked by At

I am using org-mode to write reports including chunks of codes. When I want to generate the output (a PDF usually), org-mode executes all the commands in the file, which is fine. The problem however, is that during that executing, I cannot do anything else with emacs and I have to wait until all the commands to finish, which can take forever.

Is there a way to do the execution asynchronously, or at least, stop the execution once it's started?

Thank you for your help!

1

There are 1 answers

2
John Kitchin On

It sounds like you should use this to avoid executing those blocks.

(setq org-export-babel-evaluate nil)

It doesn't make sense to run them asynchronously during export, because then the output won't be available for the report. Alternatively, you could try doing an asynchronous export. After you type C-c C-e then type C-a to turn async export on. That should do the export in another process, and not block your current one.