From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Sagemath with org-babel? Date: Tue, 4 Nov 2014 22:58:19 -0600 Message-ID: References: <50203b7f.a14dec0a.6450.ffffdea3@mx.google.com> <877fzaob5s.fsf@uw.edu> <87h9yemjn7.fsf@uw.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3a8c80b2d39b0507156dbd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlsfn-0006vf-5R for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 23:58:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlsfl-0002PE-Ul for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 23:58:23 -0500 Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:50112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlsfl-0002OZ-KJ for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 23:58:21 -0500 Received: by mail-la0-f42.google.com with SMTP id gq15so2137100lab.29 for ; Tue, 04 Nov 2014 20:58:19 -0800 (PST) In-Reply-To: <87h9yemjn7.fsf@uw.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: Brady Trainor Cc: emacs-orgmode --047d7b3a8c80b2d39b0507156dbd Content-Type: text/plain; charset=UTF-8 On Nov 4, 2014 9:06 PM, "Brady Trainor" wrote: > > John Hendy writes: > > > (require 'sage-mode) > > Thank you, this enabled me to at least have sage code blocks to mix into files for blog publishing. > > > #+begin_src test.org > > > > * header > > > > #+begin_src sage > > print "Hello World" > > print 2^3 > > #+end_src > > > > #+end_src > > > > =C-c '= on the block gets me to a typical Org babel buffer, and I can > > =C-c C-c= in it and get results output to *Sage-main*. > > > > I had to modify org-babel-load-languages to get C-c C-c to do something. But I'm not really sure what it did, or how to get it to work. But maybe this could wait till more people are showing interest here. > Oops. Re-reading, that came out ambiguously. I meant from the interactive code editing buffer after C-c ', from *there* I could do C-c C-c. From the org file itself, my result was the same as yours with no babel definition for sage. Sorry about the confusion! John > >> (org-babel-do-load-languages 'org-babel-load-languages > >> '((sage . t) > >> (emacs-lisp . t) > >> (latex . t) > >> (sh . t))) > > -- > Brady > > --047d7b3a8c80b2d39b0507156dbd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Nov 4, 2014 9:06 PM, "Brady Trainor" <algebrat@uw.edu> wrote:
>
> John Hendy <jw.hendy@gmail.co= m> writes:
>
> > (require 'sage-mode)
>
> Thank you, this enabled me to at least have sage code blocks to mix in= to files for blog publishing.
>
> > #+begin_src test.org
> >
> > * header
> >
> > #+begin_src sage
> > print "Hello World"<point>
> > print 2^3
> > #+end_src
> >
> > #+end_src
> >
> > =3DC-c '=3D on the block gets me to a typical Org babel buffe= r, and I can
> > =3DC-c C-c=3D in it and get results output to *Sage-main*.
> >
>
> I had to modify org-babel-load-languages to get C-c C-c to do somethin= g. But I'm not really sure what it did, or how to get it to work. But m= aybe this could wait till more people are showing interest here.
>

Oops. Re-reading, that came out ambiguously. I meant from th= e interactive code editing buffer after C-c ', from *there* I could do = C-c C-c. From the org file itself, my result was the same as yours with no = babel definition for sage.

Sorry about the confusion!
John

> >> (org-babel-do-load-languages 'org-babel-lo= ad-languages
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '((sage . t)
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (emacs-lisp . t)
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (latex . t)
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (sh . t)))
>
> --
> Brady
>
>

--047d7b3a8c80b2d39b0507156dbd--