From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Tangle only current code block? Date: Sun, 07 Oct 2012 17:39:13 -0600 Message-ID: <87haq5zwbi.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL0RO-0006PZ-9E for emacs-orgmode@gnu.org; Sun, 07 Oct 2012 19:39:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TL0RM-00005s-UK for emacs-orgmode@gnu.org; Sun, 07 Oct 2012 19:39:22 -0400 Received: from mailout-eu.gmx.com ([213.165.64.43]:36027) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TL0RM-00005o-Jp for emacs-orgmode@gnu.org; Sun, 07 Oct 2012 19:39:20 -0400 In-Reply-To: (Yann Le Du's message of "Mon, 8 Oct 2012 01:00:05 +0200") 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 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. 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