I want to ignore a subtree temporarily. I can do this by setting the property :header-args: to :tangle no, but this is not usually visible. Could I have this property set automatically by all subtrees tagged with :notangle:, and removed when the tag is removed; or something to a similar effect?

  • 1
    If the subtree will be commented (e.g. with C-c ;) it will not be tangled. Jan 5 '17 at 15:08
  • @KonstantinMorenko, perfect, thanks!
    – Toothrot
    Jan 5 '17 at 15:28

You could comment the subtree with C-c ; (org-toggle-comment). If the subtree marked COMMENT, it will not be tangled. I use it into my init files (with org-babel-load-file) to temporary exclude some code.

  • If you require you can modify the actual word that triggers the :notangle: behavior moreover you can put there a regex (setq org-comment-string "\(EXCL:\\|COMM:\\|NOTE:\\|PLOT:\\|CTRL:\)") (set-face-attribute 'org-special-keyword nil :foreground "#ff66cc" :background 'unspecified :weight 'bold) Jul 6 '19 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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