ob-tangle.el: A small fix and some refactoring
commitaa3091580d73f22e2715162ca707620993d62d37
authorBastien Guerry <bzg@altern.org>
Sat, 2 Mar 2013 16:15:08 +0000 (2 17:15 +0100)
committerBastien Guerry <bzg@altern.org>
Sat, 2 Mar 2013 16:15:08 +0000 (2 17:15 +0100)
treeda0c5cb7fbbcc8057b681d13392917e594b81660
parentff97a0ee9d55dff2bdefe3ca347de38c7560dd87
ob-tangle.el: A small fix and some refactoring

* ob-tangle.el (org-babel-tangle): Remove unused attempt of
prompting the user of the tangle file name since :tangle is
always set.  Don't prompt for a tangle file name when called
with two universal prefix arg outside of a src block.
Use `org-babel-tangle-single-block'.
(org-babel-tangle-single-block): New function.
(org-babel-tangle-collect-blocks): Use the new function.

Thanks to Rick Frankel who provided a patch for this fix.
The patch fixes this issue (quoting Rick's email):

"When attempting to tangle a single block, `org-babel-tangle'
would use `narrow-to-region', causing any header arguments not
on the "#+BEGIN_SRC" line to be excluded from the tangled file."
lisp/ob-tangle.el