emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Tangle only current code block?


From: Yann Le Du
Subject: Re: [O] Tangle only current code block?
Date: Mon, 8 Oct 2012 08:21:40 +0200



On Mon, Oct 8, 2012 at 1:39 AM, Eric Schulte <address@hidden> wrote:
Yann Le Du <address@hidden> writes:

> Hi,
>
> I have a bunch of code chunks with stuff like <<fun name>> 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
 
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


reply via email to

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