I organize my
init.el in a single org-file as many do. Often times I remove code from my config to test things out. I typically do this by changing the src-block to have a
:tangle no setting. In many cases, I forget about it and eventually realize large portions of my config are not tangled.
I'm not quite sure if I need to craft some type of watcher or hook function.
* This is a heading #+BEGIN_SRC emacs-lisp ... #+END_SRC would become * TODO This is a heading #+BEGIN_SRC emacs-lisp :tangle no ... #+END_SRC
I was thinking about adding something like this to an on-save hook and then modifying the code blocks section header if :tangle no.
(org-element-map (org-element-parse-buffer) 'src-block #'identity nil nil 'src-block)
But it takes a really long time just to run this function.