forked from mirrors/org-mode
slight simplification
This commit is contained in:
parent
978104f1ae
commit
74b9c8f125
|
@ -44,7 +44,6 @@ file into their own source-specific files."
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((base-name (file-name-sans-extension (buffer-file-name)))
|
(let ((base-name (file-name-sans-extension (buffer-file-name)))
|
||||||
(blocks (org-babel-collect-blocks))
|
|
||||||
(block-counter 0))
|
(block-counter 0))
|
||||||
(mapc ;; for every language create a file
|
(mapc ;; for every language create a file
|
||||||
(lambda (by-lang)
|
(lambda (by-lang)
|
||||||
|
@ -68,7 +67,7 @@ file into their own source-specific files."
|
||||||
by-session)
|
by-session)
|
||||||
(setq block-counter (+ block-counter (length (cdr (car by-session)))))
|
(setq block-counter (+ block-counter (length (cdr (car by-session)))))
|
||||||
(to-file (format "%s.%s" base-name ext) (cdr (car by-session)))))))
|
(to-file (format "%s.%s" base-name ext) (cdr (car by-session)))))))
|
||||||
blocks)
|
(org-babel-collect-blocks))
|
||||||
(message "tangled %d source-code blocks" block-counter))))
|
(message "tangled %d source-code blocks" block-counter))))
|
||||||
|
|
||||||
(defun org-babel-collect-blocks ()
|
(defun org-babel-collect-blocks ()
|
||||||
|
|
Loading…
Reference in a new issue