From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: ocaml babel no longer works? Date: Thu, 14 Feb 2013 10:34:08 -0700 Message-ID: <87sj4ylrzj.fsf@gmail.com> References: <876221i41q.fsf@gmail.com> <87vc9wtc55.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U62hu-0002yD-BY for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:34:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U62ho-0003rk-Fw for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:34:50 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:52768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U62ho-0003r9-6l for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:34:44 -0500 Received: by mail-pa0-f51.google.com with SMTP id hz1so1378147pad.10 for ; Thu, 14 Feb 2013 09:34:43 -0800 (PST) In-Reply-To: (Alan Schmitt's message of "Thu, 14 Feb 2013 08:40:16 +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: Alan Schmitt Cc: emacs-orgmode , Eric Schulte Alan Schmitt writes: > Hi Eric, > > Eric Schulte writes: > >>> The suggestion: instead of appending '"org-babel-ocaml-eoe";;' to the >>> code, how simply put ';;' (which will make sure everything is flushed) >>> then detect the toplevel is done by seeing the string '# ' at the >>> beginning of the line? Would there be an issue with the fact that this >>> line does not have a newline? If so, an alternative suggestion would be >>> to use the longer ';; "org-babel-ocaml-eoe";;' which makes sure the >>> phrase in the input won't interact with the marker. >>> >> >> You can customize the `org-babel-ocaml-eoe-output' and >> `org-babel-ocaml-eoe-indicator' variables so that they match the above. >> If this proves generally useful then I'd be happy to admit this change >> to the core. > > I'll have a look at it (as soon as my European grant deadline as > passed). Great. > The one thing I don't know about org-babel-comint-with-output is the > following: what does it do with the last line if it does not have a > carriage return? (After running a command, the toplevel outputs '# ' > with no carriage return. Will it be part of the returned string?) > This prompt should not be returned as ob-comint-w/output handles things like removing echo'd inputs, prompts etc... However, although I'm still writing OCaml fairly regularly I removed tuareg during a recent hard drive switch in favor of the default caml-mode, so I can't test this directly with an OCaml code block (another reason why I'm excited at the prospect of someone else's eyes on ob-caml). > >> I hope these pointers are useful. > > They definitely are. As ocaml is not only my language of choice but one > I have the chance of teaching, I'll clearly look into this. > > Thanks again, > > Alan > Cheers, -- Eric Schulte http://cs.unm.edu/~eschulte