emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] tangle the code blocks in the regions


From: Eric Schulte
Subject: Re: [O] tangle the code blocks in the regions
Date: Thu, 06 Mar 2014 20:00:25 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

zhenjiang zech xu <address@hidden> writes:

> Hi all,
>
> is there function to extract all the code blocks in the selected region?
>
> For example, can I select the region of the following two blocks and
> extract them with just one command? Or I have to move cursor to each block
> and extract them one by one?
>
>    #+BEGIN_SRC sh :tangle foo.sh
>      echo 'hello'
>    #+END_SRC
>    #+BEGIN_SRC python :tangle foo.py
>      print 'hello'
>    #+END_SRC
>
> I doesn't find the extracting region command in manual. I would think this
> can be a convenient feature to have?
>
> Best,
> Zhenjiang

Currently tangling does not support limiting to the active region.  It
shouldn't be too difficult to update org-babel-tangle to use
region-active-p to perform such limiting, unfortunately I personally
don't have the time to implement such an extension.

Best,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



reply via email to

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