Search code examples
org-mode

force execution of code block org-mode


I frequently have to rerun code blocks in my org-mode reports because some corrections were needed upstream.

Is there a way to force the execution of a block?

Now I have to remove the results from the block in order to rerun it?

Thanks for your help.


Solution

  • C-c C-v C-e will force the execution of a code block, if there is no :eval no linked to it.

    I've written org-babel-force-execute-src-block to even go around that, without having to manually delete the :eval no directive. And I've bound it to H-f ("f" for "force") in my config. See https://github.com/fniessen/emacs-leuven/blob/master/emacs-leuven.el for détails (or the Org file, which contains comments and from which the .el is tangled).