From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Re: org-babel for prolog Date: Sat, 16 May 2015 09:31:25 -0400 Message-ID: References: <65BF665A-C03D-4CCB-A8C6-A052BDD1BEBD@infomedia.uib.no> <619F74FC-4D9C-47FC-ADC8-2897FFF052F3@infomedia.uib.no> <04441E2C-21DB-4A7B-AF73-76D5AA2CA2CB@infomedia.uib.no> <38284347-6B57-4A67-A48C-5A6FA1D48160@infomedia.uib.no> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b15fe2f3a357d051632fa18 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtcBc-0001Yn-Be for emacs-orgmode@gnu.org; Sat, 16 May 2015 09:31:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtcBb-0002Sk-2e for emacs-orgmode@gnu.org; Sat, 16 May 2015 09:31:28 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:36514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtcBa-0002SQ-Ml for emacs-orgmode@gnu.org; Sat, 16 May 2015 09:31:26 -0400 Received: by pabts4 with SMTP id ts4so66850998pab.3 for ; Sat, 16 May 2015 06:31:25 -0700 (PDT) In-Reply-To: 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: Bjarte Johansen , emacs-orgmode@gnu.org --047d7b15fe2f3a357d051632fa18 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable No worries. I can wait. Thanks again for your efforts. On Sat, May 16, 2015 at 9:28 AM, Bjarte Johansen < bjarte.johansen@infomedia.uib.no> wrote: > > On 16 May 2015, at 15:00, Lawrence Bottorff wrote: > > I'm just a Prolog beginner, but this: > > #+begin_src prolog > edge(a,b). > edge(a,e). > edge(b,d). > edge(b,c). > edge(c,a). > edge(e,b). > tedge(Node1,Node2) :- > edge(Node1,SomeNode), > edge(SomeNode,Node2). > #+end_src > > keeps giving me this: > > executing Prolog code block... > executing Prolog source code block > org-babel-execute:prolog: Wrong type argument: char-or-string-p, ni > > > Thank you for reporting a bug. I think I see what the problem is. You > haven't defined a goal for the source block and ob-prolog doesn't guard f= or > that. It should be easy to fix, but I am not sure if I will be able to do > that before next week. If you want you can try to fix it yourself and sen= d > a PR on GitHub or a patch here. > > BTW, should it be > > (eval-after-load 'org > '(require 'ob-prolog)) > > or > > (eval-after-load "org" > '(require 'ob-prolog)) > > . . . org in quotes? > > > I think both should work. I can't check right now as I only have my phone > with me right now. > > > On Thu, May 14, 2015 at 5:03 PM, Bjarte Johansen < > bjarte.johansen@infomedia.uib.no> wrote: > >> >> > On 14 May 2015, at 20:22, Puneeth Chaganti wrote= : >> > >> > On Thu, May 14, 2015 at 11:41 PM, Lawrence Bottorff >> wrote: >> >> >> >> Confused by the requirement: >> >> >> >> ;; To activate ob-prolog add the following to your init.el file: >> >> ;; >> >> ;; (eval-after-load 'org >> >> ;; '(require 'org-prolog)) >> > >> > >> > I'm guessing its a typo and should be ob-prolog. The file provides >> ob-prolog. >> >> Yes, I typed it wrong. Thank you for bringing it to my attention. I also >> discovered that it is better to use `org-babel-do-load-languages=E2=80= =99 instead >> as well. I will change the recommendation tomorrow. >> >> Regards, >> Bjarte > > > --047d7b15fe2f3a357d051632fa18 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
No worries. I can wait. Thanks again for your efforts.

On Sat, May 16,= 2015 at 9:28 AM, Bjarte Johansen <bjarte.johansen@infomedi= a.uib.no> wrote:

On 16 May 2015, at 15:00, La= wrence Bottorff <= borgauf@gmail.com> wrote:

I'm just a Prolog beginner, but this:

=
#+begin_src prolog
edge(a,b).
edge(a,e).
edge(b,d).
edge(b,c).
edge(c,a).
edge(e= ,b).
tedge(Node1,Node2) :-
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = edge(Node1,SomeNode),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 edge(SomeNode,N= ode2).
#+end_src

keeps giving me t= his:

executing Prolog code block...
=
executing Prolog source code block
org-babel-execute:prolog:= Wrong type argument: char-or-string-p, ni

=

Thank you for reporting a bug. I t= hink I see what the problem is. You haven't defined a goal for the sour= ce block and ob-prolog doesn't guard for that. It should be easy to fix= , but I am not sure if I will be able to do that before next week. If you w= ant you can try to fix it yourself and send a PR on GitHub or a patch here.= =C2=A0

BTW, should it be

(eval-after-load &= #39;org
=C2=A0 '(require 'ob-prolog))
or=C2=A0

(eval-after-load "o= rg"
=C2=A0 '(require 'ob-prolog))
. . . org in quotes?

I think both should work. I can't check right now as I = only have my phone with me right now.=C2=A0


On Thu, May 14, 2015 at 5:03 PM, Bjarte Johansen <= bjarte.johansen@infomedia.uib.no> wrote:

> On 14 May 2015, at 20:22, Puneeth Chaganti <punchagan@gmail.com> wrote:
>
> On Thu, May 14, 2015 at 11:41 PM, Lawrence Bottorff <borgauf@gmail.com> wrote: >>
>> Confused by the requirement:
>>
>> ;; To activate ob-prolog add the following to your init.el file: >> ;;
>> ;;=C2=A0 (eval-after-load 'org
>> ;;=C2=A0 =C2=A0 '(require 'org-prolog))
>
>
> I'm guessing its a typo and should be ob-prolog. The file provides= ob-prolog.

Yes, I typed it wrong. Thank you for bringing it to my attentio= n. I also discovered that it is better to use `org-babel-do-load-languages= =E2=80=99 instead as well. I will change the recommendation tomorrow.

Regards,
Bjarte


--047d7b15fe2f3a357d051632fa18--