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