#+Title: Detangle Example #+Babel: :comments link :tangle detangle.el This file demonstrates detangling of source files with Org-mode. 1. Evaluate this elisp code block to customize the behavior of link creation on your system -- in the future this could be folded into ob-tangle. #+begin_src emacs-lisp :results silent :tangle no (setq org-link-to-org-use-id nil) #+end_src 2. Tangle out this file by calling `[[elisp:(org-babel-tangle)]]' bound to =C-c C-v t=, notice the buffer-wide =:comments= and =:tangle= header arguments at the top of the file. 3. Open up the [[file:detangle.el][detangle.el]] file to find the tangled source code. Notice the comments which are used to associate parts of the source file with this org file. 4. Call the `org-babel-tangle-jump-to-org' function from one of the =message= lines in the elisp file to jump back to the related portion of this org file. 5. Navigate back to [[file:detangle.el][detangle.el]] and edit part of the elisp code (e.g. change the text of one of the messages), then call the `org-babel-detangle' function from inside of the elisp code buffer. Notice that your edits have now been propagated back to the original Org-mode buffer. * first A first section. #+source: a-named-block #+begin_src emacs-lisp (message "this is the contents of the first code block.") #+end_src * second A second section. #+begin_src emacs-lisp (message "this block has no name -- it is the second code block") #+end_src