emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Programmatically insert source-blocks
Date: Wed, 20 Mar 2013 21:43:17 +0100	[thread overview]
Message-ID: <m2fvzphkey.fsf@christianmoe.com> (raw)
In-Reply-To: <87k3p1q2xj.fsf@gmail.com>


Hi, Thorsten,

Here's one way, and pointers to more:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00406.html

Yours,
Christian

Thorsten Jolitz writes:

> Hi List, 
>
> it probably a command everybody knows, but I looked for it several times
> and just missed it: 'insert a source-block'. 
>
> I know about Chap. 15.2. of the manual (Easy Templates), thats not what
> I mean. To reformulate my question:
>
> Why doesn't (the most relevant function I have found) 
>
> ,------------------------------------------
> | (org-babel-demarcate-block &optional ARG)
> `------------------------------------------
>
> have a few more optional arguments, e.g. like this
>
> ,----------------------------------------------------------
> | (org-babel-demarcate-block &optional LANG ARG &rest args)
> `----------------------------------------------------------
>
> so that it can be called (e.g.) like this
>
> ,----------------------------------------------------------------------
> | (org-babel-demarcate-block &optional "emacs-lisp" nil :results output)
> `----------------------------------------------------------------------
>
> without asking the user for input (inserting a new src-block around
> point or region)? 
>
> There are so many functions that deal with source-blocks, but the most
> basic one - insert a new src-block for language xyz with args u v w - is
> not there. At least not for non-interactive use. At least I did not find
> it ;)

  reply	other threads:[~2013-03-20 20:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 19:36 Programmatically insert source-blocks Thorsten Jolitz
2013-03-20 20:43 ` Christian Moe [this message]
2013-03-20 22:03   ` Thorsten Jolitz
2013-03-23 22:35     ` Eric Schulte
2013-03-25  5:54       ` Bastien

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=m2fvzphkey.fsf@christianmoe.com \
    --to=mail@christianmoe.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tjolitz@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).