From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: How to set a default language for source blocks? Date: Tue, 17 Feb 2015 20:26:47 -0600 Message-ID: References: <87r3to5mhb.fsf@yale.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNuLi-0003Aj-2p for emacs-orgmode@gnu.org; Tue, 17 Feb 2015 21:26:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNuLg-0007ua-TI for emacs-orgmode@gnu.org; Tue, 17 Feb 2015 21:26:49 -0500 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]:47790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNuLg-0007uR-MN for emacs-orgmode@gnu.org; Tue, 17 Feb 2015 21:26:48 -0500 Received: by mail-wg0-f43.google.com with SMTP id z12so26016135wgg.2 for ; Tue, 17 Feb 2015 18:26:47 -0800 (PST) In-Reply-To: <87r3to5mhb.fsf@yale.edu> 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: "Jorge A. Alfaro-Murillo" Cc: "emacs-orgmode@gnu.org" Rasmus: Thanks Jorge: Yes probably On Tue, Feb 17, 2015 at 2:09 PM, Jorge A. Alfaro-Murillo wrote: > 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 modi= fy > 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 example. > > Best, > > -- > Jorge. > > --=20 Grant Rettke gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) =E2=80=9CLife has become immeasurably better since I have been forced to st= op taking it seriously.=E2=80=9D --Thompson