From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: tangle the code blocks in the regions Date: Thu, 06 Mar 2014 20:00:25 -0700 Message-ID: <87d2hyu306.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLl3O-0001yZ-Uo for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 22:02:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLl3K-00015C-EU for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 22:02:30 -0500 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:37291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLl3K-000151-7E for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 22:02:26 -0500 Received: by mail-pa0-f42.google.com with SMTP id fb1so3565984pad.29 for ; Thu, 06 Mar 2014 19:02:25 -0800 (PST) In-Reply-To: (zhenjiang zech xu's message of "Thu, 6 Mar 2014 17:47:16 -0700") 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: zhenjiang zech xu Cc: emacs-orgmode@gnu.org zhenjiang zech xu 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