emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Programmatically insert source-blocks
Date: Wed, 20 Mar 2013 20:36:08 +0100	[thread overview]
Message-ID: <87k3p1q2xj.fsf@gmail.com> (raw)


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 ;)

-- 
cheers,
Thorsten

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 19:36 Thorsten Jolitz [this message]
2013-03-20 20:43 ` Programmatically insert source-blocks Christian Moe
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=87k3p1q2xj.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).