From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: Is it possible to run shell script src blocks as root or to export individual blocks? Date: Tue, 06 Mar 2012 10:11:27 +0100 Message-ID: <87pqcqytz4.fsf@med.uni-goettingen.de> References: <87pqctkahb.fsf@gmx.com> <87ty25hbz6.fsf@med.uni-goettingen.de> <87wr6zax0z.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4qRe-0006Gq-M9 for emacs-orgmode@gnu.org; Tue, 06 Mar 2012 04:12:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4qRB-000719-Fg for emacs-orgmode@gnu.org; Tue, 06 Mar 2012 04:12:34 -0500 Received: from plane.gmane.org ([80.91.229.3]:33308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4qRB-00070k-91 for emacs-orgmode@gnu.org; Tue, 06 Mar 2012 04:12:05 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S4qR8-0000Pf-CE for emacs-orgmode@gnu.org; Tue, 06 Mar 2012 10:12:02 +0100 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Mar 2012 10:12:02 +0100 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Mar 2012 10:12:02 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Eric Schulte writes: > Andreas Leha writes: > >> Eric Schulte writes: >> >>> Leo Alekseyev 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, >> >> I did not know this either. Thanks for the hint! >> >> Shouldn't this be mentioned in the manual (14.4)? >> >> I have two questions/issues about this: >> (1) Can I get noweb-references to be expanded by this? Or how would I >> tangle one block with noweb references expanded? > > There was a conflict between the narrowing to a single code block caused > by the prefix argument, and the code which searches for replacements to > noweb elements. I've just pushed up a fix so noweb elements should now > expand as normal. > >> >> (2) I am asked for a filename. But the header argument :tangle somefile >> is overruling my input, which is un-expected. >> > > This is now fixed as well. > Hi Eric, thanks for both fixes! Tangling of single source blocks is a really nice feature now! Regards, Andreas