From mboxrd@z Thu Jan 1 00:00:00 1970 From: "numbchild@gmail.com" Subject: ob-haskell.el evaluation error. Date: Wed, 21 Jun 2017 13:21:13 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045f581a37ea790552718bd1" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNY5L-0000dI-AZ for emacs-orgmode@gnu.org; Wed, 21 Jun 2017 01:21:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNY5J-0001Xj-Jj for emacs-orgmode@gnu.org; Wed, 21 Jun 2017 01:21:47 -0400 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]:33280) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNY5J-0001XL-7y for emacs-orgmode@gnu.org; Wed, 21 Jun 2017 01:21:45 -0400 Received: by mail-wr0-x232.google.com with SMTP id r103so118433213wrb.0 for ; Tue, 20 Jun 2017 22:21:45 -0700 (PDT) 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" To: Org-mode --f403045f581a37ea790552718bd1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Confirmed with minimal Emacs config. I'm using latest Emacs which build from source code, and latest version Org-mode which load from source code. Here is the steps to reproduce the issue: 1. emacs-minimal-init (command which load minimal init file) 2. [M-x run-haskell] ; load haskell inferior for `ob-haskell`. 3. press [C-c C-c] on haskell src block like this: #+BEGIN_SRC haskell :session "*haskell*" 1 + 9 #+END_SRC I got error: #+BEGIN_EXAMPLE Debugger entered--Lisp error: (error "=E2=80=98org-babel-script-escape=E2= =80=99 expects a string") signal(error ("=E2=80=98org-babel-script-escape=E2=80=99 expects a string= ")) error("`org-babel-script-escape' expects a string") org-babel-script-escape(nil) org-babel-execute:haskell("2 + 8" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "code") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:padlines . "no"))) org-babel-execute-src-block(nil ("haskell" "2 + 8" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "code") (:padlines . "no") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 110 "(ref:%s)")) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c) #+END_EXAMPLE In ~*haskell*~ buffer: #+BEGIN_EXAMPLE GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/stardiviner/.ghci =CE=BB> 2 + 8 "org-babel-haskell-eoe" 10 =CE=BB> "org-babel-haskell-eoe" =CE=BB> 2 + 8 "org-babel-haskell-eoe" 10 =CE=BB> "org-babel-haskell-eoe" =CE=BB> #+END_EXAMPLE In other way: when I start haskell inferior process with command: [M-x haskell-interactive-bring]. The error is: #+BEGIN_EXAMPLE Debugger entered--Lisp error: (error "Buffer *haskell* does not exist or has no process") signal(error ("Buffer *haskell* does not exist or has no process")) error("Buffer %s does not exist or has no process" #) org-babel-execute:haskell("main :: IO ()\nmain =3D do\n putStrLn \"Hello= , World!\"" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "code") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no") (:padlines . "no"))) org-babel-execute-src-block(nil ("haskell" "main :: IO ()\nmain =3D do\n putStrLn \"Hello, World!\"" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "code") (:padlines . "no") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 53 "(ref:%s)")) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c) #+END_EXAMPLE *Problem*: =3Dhaskell-interactive-bring=3D started =3D*haskell*=3D process buffer doe= s not work with Org-mode Babel ob-haskell's session =3D*haskell*=3D. But I have process buffer ~*haskell*~ running. This is weird. I used to report error at here: https://github.com/haskell/haskell-mode/issues/1429 [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ --f403045f581a37ea790552718bd1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Confirmed with minimal Emacs config.
I'm using latest Emacs which build from source code, and latest= version Org-mode which load from source code.

<= div class=3D"gmail_default" style=3D"font-family:"trebuchet ms",s= ans-serif">Here is the steps to reproduce the issue:
1. em= acs-minimal-init (command which load minimal init file)
2.= [M-x run-haskell] ; load haskell inferior for `ob-haskell`.
3. press [C-c C-c] on haskell src block like this:

=
#+BEGIN_SRC haskell :session= "*haskell*"
1 + 9
#+END_SRC

I got error= :

<= /div>
#+BEGIN_EXAMPLE
Debugger entered--Lisp= error: (error "=E2=80=98org-babel-script-escape=E2=80=99 expects a st= ring")
=C2=A0= signal(error ("=E2=80=98org-babel-script-escape=E2=80=99 expects a st= ring"))
=C2= =A0 error("`org-babel-script-escape' expects a string")
=C2=A0 org-babel-script= -escape(nil)
=C2= =A0 org-babel-execute:haskell("2 + 8" ((:colname-names) (:rowname= -names) (:result-params "replace") (:result-type . value) (:resul= ts . "replace") (:exports . "code") (:session . "n= one") (:cache . "no") (:noweb . "no") (:hlines . &= quot;no") (:tangle . "no") (:padlines . "no")))
=C2=A0 org-babel-exe= cute-src-block(nil ("haskell" "2 + 8" ((:colname-names)= (:rowname-names) (:result-params "replace") (:result-type . valu= e) (:results . "replace") (:exports . "code") (:padline= s . "no") (:tangle . "no") (:hlines . "no") (= :noweb . "no") (:cache . "no") (:session . "none&q= uot;)) "" nil 110 "(ref:%s)"))
=C2=A0 org-ctrl-c-ctrl-c(nil)
=
=C2=A0 funcall-interactively(o= rg-ctrl-c-ctrl-c nil)
=C2=A0 call-interactively(org-ctrl-c-ctrl-c nil nil)
<= font face=3D"trebuchet ms, sans-serif">=C2=A0 command-execute(org-ctrl-c-ct= rl-c)
#+END_EXAMPL= E

In ~*ha= skell*~ buffer:
#+BEGIN_EXAMPLE=
GHCi, version 8.0= .1: http://www.haskell.org/ghc/= =C2=A0:? for help
Loaded GHCi configuration from /home/stardiviner/.ghci
=CE=BB> 2 + 8
"org-babel-haskell-eoe"
10
=CE=BB> "org-babel-haskell-eo= e"
=CE=BB>= 2 + 8
"org-b= abel-haskell-eoe"
10
=CE=BB>= "org-babel-haskell-eoe"
=CE=BB>=C2=A0
#+END_EXAMPLE

In other way: when I start haskell inferi= or process with command: [M-x=C2=A0haskell-interactive-bring].

The error is:

#+BEGIN_EXAMPLE
<= div>Debugger entered--Lisp error: (= error "Buffer *haskell* does not exist or has no process")=
=C2=A0 signal(error (&qu= ot;Buffer *haskell* does not exist or has no process"))
=C2=A0 error("Buffer %s doe= s not exist or has no process" #<buffer *haskell*>)
=
=C2=A0 org-babel-execute:haske= ll("main :: IO ()\nmain =3D do\n =C2=A0putStrLn \"Hello, World!\&= quot;" ((:colname-names) (:rowname-names) (:result-params "replac= e") (:result-type . value) (:results . "replace") (:exports = . "code") (:session . "none") (:cache . "no")= (:noweb . "no") (:hlines . "no") (:tangle . "no&q= uot;) (:padlines . "no")))
=C2=A0 org-babel-execute-src-block(nil ("haskell&qu= ot; "main :: IO ()\nmain =3D do\n =C2=A0putStrLn \"Hello, World!\= "" ((:colname-names) (:rowname-names) (:result-params "repla= ce") (:result-type . value) (:results . "replace") (:exports= . "code") (:padlines . "no") (:tangle . "no"= ) (:hlines . "no") (:noweb . "no") (:cache . "no&q= uot;) (:session . "none")) "" nil 53 "(ref:%s)&quo= t;))
=C2=A0 org-ct= rl-c-ctrl-c(nil)
= =C2=A0 funcall-interactively(org-ctrl-c-ctrl-c nil)
=C2=A0 call-interactively(org-ctrl-c-ctrl= -c nil nil)
=C2=A0= command-execute(org-ctrl-c-ctrl-c)
#+END_EXAMPLE

=C2=A0*Problem*:
=
=C2=A0=3Dhask= ell-interactive-bring=3D started =3D*haskell*=3D process buffer does not wo= rk with
=C2=A0Org-= mode Babel ob-haskell's session =3D*haskell*=3D.


But=C2=A0I have proc= ess buffer ~*haskell*~ running.

This is weird.

I used to report error at here:=C2=A0https://github.com= /haskell/haskell-mode/issues/1429



[stardiv= iner]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <Hack = this world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433
IRC(f= reeenode): stardiviner =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=C2=A0=C2=A0=C2=A0 Twitter:=C2= =A0 @numbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 CB99 B= 8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/
<= /div> --f403045f581a37ea790552718bd1--