Function: org-babel-tangle-clean

org-babel-tangle-clean is an interactive and byte-compiled function defined in ob-tangle.el.gz.

Signature

(org-babel-tangle-clean)

Documentation

Remove comments inserted by org-babel-tangle.

Call this function inside of a source-code file generated by org-babel-tangle to remove all comments inserted automatically by org-babel-tangle. Warning, this comment removes any lines containing constructs which resemble Org file links or noweb references.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-tangle.el.gz
(defun org-babel-tangle-clean ()
  "Remove comments inserted by `org-babel-tangle'.
Call this function inside of a source-code file generated by
`org-babel-tangle' to remove all comments inserted automatically
by `org-babel-tangle'.  Warning, this comment removes any lines
containing constructs which resemble Org file links or noweb
references."
  (interactive)
  (goto-char (point-min))
  (while (or (re-search-forward "\\[\\[file:.*\\]\\[.*\\]\\]" nil t)
             (re-search-forward (org-babel-noweb-wrap) nil t))
    (delete-region (save-excursion (beginning-of-line 1) (point))
                   (save-excursion (end-of-line 1) (forward-char 1) (point)))))