From fed7056833c55337118012f9d37ff401bd605a2e Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Thu, 25 Jun 2009 20:17:21 -0700 Subject: [PATCH] stubbed out functions for inserting source-blocks into files --- lisp/org-babel-tangle.el | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lisp/org-babel-tangle.el b/lisp/org-babel-tangle.el index 145c43aae..dc2cce928 100644 --- a/lisp/org-babel-tangle.el +++ b/lisp/org-babel-tangle.el @@ -66,7 +66,26 @@ file into their own source-specific files." ;; blocks should contain all source-blocks organized by language ;; and session (message "block = %S" blocks) - blocks)) + (mapc ;; for every language create a file + (lambda (by-lang) + (let ((lang (car by-lang)) + (by-session (cdr by-lang))) + (if (> (length by-session) 1) + ) + )) + ) + )) + +(defun org-babel-tangle-specs-to-file (filename specs) + "Take a list of source-block specifications in SPECS and write +it out to FILENAME." + (with-temp-file filename + (insert (mapconcat #'org-babel-spec-to-string specs "\n")))) + +(defun org-babel-spec-to-string (spec) + "Return the string version of spec suitable for inclusion in a +source code file." + ) (provide 'org-babel-tangle) ;;; org-babel-tangle.el ends here