On Mon, Mar 5, 2012 at 10:24 AM, Eric Schulte <eric.schu...@gmx.com> wrote:
> Andreas Leha <andreas.l...@med.uni-goettingen.de> writes:
>
>> Eric Schulte <eric.schu...@gmx.com> writes:
>>
>>> Leo Alekseyev <dnqu...@gmail.com> writes:
>>>
>>>> I was wondering if there was an easy way to execute some shell
>>>> commands contained in a src block as root.  Alternatively, is there a
>>>> quick way to export _just_ that one source block to a temp file so
>>>> that I could run it as root manually?
>>>>
>>>
>>> Just call org-babel-tangle with a prefix argument and it only tangles
>>> the current block

Hi all,

I just pulled a fresh version of org, and this tangling an individual
block only works if there's a :tangle header argument present.  I
don't think this is the intended behavior!  The problem, it seems, is
that when :tangle is not present, the (or ...) in the code below
always evaluates to true.

#+begin_src emacs-lisp
      (unless (or (cdr (assoc :tangle (nth 2 (org-babel-get-src-block-info))))
                  target-file)
        (setq target-file
              (read-from-minibuffer "Tangle to: " (buffer-file-name)))))
#+end_src

Reply via email to