From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: Programmatically insert source-blocks Date: Wed, 20 Mar 2013 21:43:17 +0100 Message-ID: References: <87k3p1q2xj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIPq1-0002jl-6F for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 16:42:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIPpz-0003RO-Ou for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 16:42:21 -0400 Received: from mail2.b1.hitrost.net ([91.185.211.205]:28131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIPpz-0003QN-Ic for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 16:42:19 -0400 In-reply-to: <87k3p1q2xj.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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org 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 ;)