From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Tangle only current code block? Date: Mon, 08 Oct 2012 20:28:44 -0600 Message-ID: <87d30swf43.fsf@gmx.com> References: <87haq5zwbi.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLPbd-0000ch-6e for emacs-orgmode@gnu.org; Mon, 08 Oct 2012 22:31:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLPbc-0008Be-25 for emacs-orgmode@gnu.org; Mon, 08 Oct 2012 22:31:37 -0400 Received: from mailout-eu.gmx.com ([213.165.64.42]:37077) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TLPbb-00087k-NS for emacs-orgmode@gnu.org; Mon, 08 Oct 2012 22:31:35 -0400 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: yann.ledu.fr@gmail.com Cc: emacs-orgmode@gnu.org, Eric Schulte Yann Le Du writes: > On Mon, Oct 8, 2012 at 1:39 AM, Eric Schulte wrote: > >> Yann Le Du writes: >> >> > Hi, >> > >> > I have a bunch of code chunks with stuff like <> and headers >> like >> > :tangle toto.c exporting to different files in noweb style >> > >> > If I use C-c C-v t, it extracts all of those code chunks nicely >> > >> > However, sometimes I would like to put my cursor inside one of those code >> > chunks and then extract only that one, not the others. >> > >> > Is there a simple way ? >> > >> >> Yes, run the tangle with a prefix argument to tangle only the block >> under your cursor e.g., C-u C-c C-v t. >> >> > Very nice! Is that documented? It's not in > http://orgmode.org/manual/Extracting-source-code.html > This is now mentioned in the documentation. Cheers, > > >> Best, >> >> > >> > I narly found a solution, but to make it work nicely I need to put >> > org-babel-tangle inside a macro, but it fails: if I define a macro : >> > >> > C-x ( >> > M-x org-babel-tangle >> > C-x ) >> > C-x e >> > >> > it fails, saying wrong type argument stringp, nul >> > >> > I'm lost. >> > >> > Yann >> >> -- >> Eric Schulte >> http://cs.unm.edu/~eschulte >> -- Eric Schulte http://cs.unm.edu/~eschulte