emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Is it possible to run shell script src blocks as root or to expo


From: Eric Schulte
Subject: Re: [O] Is it possible to run shell script src blocks as root or to export individual blocks?
Date: Mon, 19 Mar 2012 10:46:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

Leo Alekseyev <address@hidden> writes:

> On Mon, Mar 5, 2012 at 10:24 AM, Eric Schulte <address@hidden> wrote:
>> Andreas Leha <address@hidden> writes:
>>
>>> Eric Schulte <address@hidden> writes:
>>>
>>>> Leo Alekseyev <address@hidden> 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

Thanks for raising this issue.  I can not apply patches to the git
repository until the recent git issues are sorted, so I am attaching the
patch to this email so that you can apply it locally if you like.  I
will push this up once our git repository is back in working order.

Best,

Attachment: 0002-Bring-back-prompt-for-single-block-tangling.patch
Description: Text Data


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]