From mboxrd@z Thu Jan 1 00:00:00 1970 From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) Subject: Re: How to set a default language for source blocks? Date: Tue, 17 Feb 2015 15:09:20 -0500 Message-ID: <87r3to5mhb.fsf@yale.edu> References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNoWw-0003j1-U2 for emacs-orgmode@gnu.org; Tue, 17 Feb 2015 15:14:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNoWt-0006hO-DT for emacs-orgmode@gnu.org; Tue, 17 Feb 2015 15:14:02 -0500 Received: from plane.gmane.org ([80.91.229.3]:50152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNoWt-0006h0-6w for emacs-orgmode@gnu.org; Tue, 17 Feb 2015 15:13:59 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YNoWo-0004Oy-JO for emacs-orgmode@gnu.org; Tue, 17 Feb 2015 21:13:54 +0100 Received: from nat-130-132-173-151.central.yale.edu ([130.132.173.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Feb 2015 21:13:54 +0100 Received: from jorge.alfaro-murillo by nat-130-132-173-151.central.yale.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Feb 2015 21:13:54 +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, Grant. Grant Rettke writes: > It would be simpler to say "this whole document will be R source > blocks, unless I specify other wise". I looked at [the spec]. I > wanted to obtain this behavior. I couldn't figure out how. Is it > possible? The problem is that if there is nothing after #+BEGIN_SRC, then org-babel-get-src-block-info returns nil. Probably you would have to modify org-babel-get-src-block-info so that it returns a default when there is nothing after #+BEGIN_SRC. But isn't it easier to set org-structure-template-alist as a local buffer variable, say in the first line of your file something like: #+BEGIN_EXAMPLE # -*- org-structure-template-alist: '(("s" "#+BEGIN_SRC python\n?\n#+END_SRC")) -*- #+END_EXAMPLE Then