From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Programmatically insert source-blocks Date: Wed, 20 Mar 2013 20:36:08 +0100 Message-ID: <87k3p1q2xj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIOoF-0002Eu-8j for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 15:36:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIOoE-0006kU-98 for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 15:36:27 -0400 Received: from plane.gmane.org ([80.91.229.3]:35286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIOoE-0006kO-2g for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 15:36:26 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UIOoZ-0002Tt-Rt for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 20:36:47 +0100 Received: from e178055100.adsl.alicedsl.de ([85.178.55.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Mar 2013 20:36:47 +0100 Received: from tjolitz by e178055100.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Mar 2013 20:36:47 +0100 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: emacs-orgmode@gnu.org 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