My dot emacs config consists of a short init.el file and a very large org file in which I have created dozens of emacs-lisp code-blocks. This works very well for me, especially in terms of organization. Every now I then I wish to temporarily disable one of these code blocks without having to delete the blocks in part or altogether. Is there a more elegant way of doing this? At present I tend to archive the code blacks to another file. However, I would like to keep them in the same file, and activate them if I need them. Is there a tag that might do this?

1 Answer 1


Set the state of a header to COMMENT:

** COMMENT This will not be tangled
#+BEGIN_SRC elisp

C-c ; runs the command org-toggle-comment.

  • It seems to me it still tangles child headlings, though... Is this correct?
    – Thriveth
    Nov 20, 2020 at 21:06
  • Not for me Org mode version 9.4 (9.4-41-g9bb930-elpaplus @ /home/kdm/.emacs.d/elpa/org-plus-contrib-20201116/)
    – mankoff
    Nov 20, 2020 at 22:34
  • No it was something else that went wrong, it works as expected now. Sorry for the noise!
    – Thriveth
    Nov 21, 2020 at 2:04

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.