From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Subject: Re: How to initiate source edits Date: Fri, 03 May 2013 11:13:52 +0200 Message-ID: <51837FD0.6000808@easy-emacs.de> References: <51835119.9000805@easy-emacs.de> <8738u4zck6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYC1k-0001Ro-QK for emacs-orgmode@gnu.org; Fri, 03 May 2013 05:11:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYC1j-0001G0-O9 for emacs-orgmode@gnu.org; Fri, 03 May 2013 05:11:40 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:55175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYC1j-0001Ft-Eq for emacs-orgmode@gnu.org; Fri, 03 May 2013 05:11:39 -0400 In-Reply-To: <8738u4zck6.fsf@gmail.com> 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: Myles English Cc: emacs-orgmode Am 03.05.2013 10:34, schrieb Myles English: > > Hi Andreas, > > Andreas Röhler writes: > >> Hi, >> >> have in some source file, let's assume Python, the following: >> >> >> foo = { >> "bar": ( >> "baz", >> "qux", >> ), >> } >> >> What is the best way to put this into an >> >> #+BEGIN_SRC python >> >> foo = { >> "bar": ( >> "baz", >> "qux", >> ), >> } >> >> #+END_SRC > > A literal answer would be: > > echo "#+BEGIN_SRC python\n" > newfile.org > cat somefile.py >> newfile.org > echo "\n#+END_SRC\n" >> newfile.org > > Myles > ahh, that's great too :) BTW think it should exist a way to transform a region accordingly. Will open a separate thread maybe. Andreas