emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Myles English <mylesenglish@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: How to initiate source edits
Date: Fri, 03 May 2013 11:13:52 +0200	[thread overview]
Message-ID: <51837FD0.6000808@easy-emacs.de> (raw)
In-Reply-To: <8738u4zck6.fsf@gmail.com>

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

  reply	other threads:[~2013-05-03  9:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03  5:54 How to initiate source edits Andreas Röhler
2013-05-03  8:07 ` Achim Gratz
2013-05-03  8:27   ` Andreas Röhler
2013-05-03  8:34 ` Myles English
2013-05-03  9:13   ` Andreas Röhler [this message]
2013-05-07  8:22     ` Alexander Baier
2013-05-07 10:55       ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51837FD0.6000808@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=mylesenglish@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).