0

Is there a way to enable source block execution only if C-c C-c is pressed and keep them silent when C-c C-v C-b is used, i.e. all source blocks are executed?

3
  • I don't undestand what you are asking: C-c C-c will execute the code block at point, C-c C-v C-b will execute all code blocks in the buffer. So what exactly do you want done differently? What does "keep them silent" mean?
    – NickD
    Apr 16, 2020 at 18:10
  • I want a flag which keeps certain blocks from being executed if hit C-c C-v C-b but keep getting executed if invoked by C-c C-c
    – CD86
    Apr 16, 2020 at 18:48
  • 1
    OK - thanks for the clarification. There is no such flag however: C-c C-v C-b is bound to org-babel-execute-buffer: this just loops over all the source blocks and calls org-babel-execute-src-block which is what C-c C-c is (effectively) bound to. So any flag that would inhibit one, would also inhibit the other.
    – NickD
    Apr 16, 2020 at 19:23

1 Answer 1

1

You can "deactivate" a block with the :eval no header argument. You could also try to cache the results, using the :cache yes, which would not re-execute the block unless its contents has changed.

References:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.