From 3ab7412410470a2a9d9cffa82f254f2f63a5ae71 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 15 Jun 2009 15:35:11 -0700 Subject: [PATCH] started on implementation --- lisp/org-babel-tangle.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/org-babel-tangle.el b/lisp/org-babel-tangle.el index 09484b66d..0bfb98a48 100644 --- a/lisp/org-babel-tangle.el +++ b/lisp/org-babel-tangle.el @@ -38,5 +38,18 @@ language, and the cdr should be a list containing the extension and shebang(#!) line to use when writing out the language to file.") +(defun org-bable-tangle () + "Extract the bodies of all source code blocks form the current +file into their own source-specific files." + (interactive) + (let (by-lang) + (org-babel-map-source-blocks (buffer-file-name) + (let ((link (progn (org-store-link nil) (pop org-stored-links))) + (source-name (intern (org-babel-get-src-block-name))) + (info (org-babel-get-src-block-info))) + ;; once collected these can be added to by-lang and then + ;; dropped out to buffers + )))) + (provide 'org-babel-tangle) ;;; org-babel-tangle.el ends here