1

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!

maroxe
  • 2,057
  • 4
  • 22
  • 30

1 Answers1

1

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.

John Kitchin
  • 2,236
  • 1
  • 17
  • 25
  • thanks, that helps! Would you know a similar trick to execute single blocks of codes asynchronously? – maroxe Feb 22 '16 at 01:31
  • 1
    I did this for Python here http://kitchingroup.cheme.cmu.edu/blog/2015/11/20/Asynchronously-running-python-blocks-in-org-mode/. I have adapted it for shell commands but it isn't out anywhere as I haven't tested it much. – John Kitchin Feb 22 '16 at 15:30