emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bjarte Johansen <Bjarte.Johansen@infomedia.uib.no>
To: emacs-orgmode@gnu.org
Subject: Re: org-babel for prolog
Date: Fri, 19 Dec 2014 16:25:53 +0100	[thread overview]
Message-ID: <619F74FC-4D9C-47FC-ADC8-2897FFF052F3@infomedia.uib.no> (raw)
In-Reply-To: <65BF665A-C03D-4CCB-A8C6-A052BDD1BEBD@infomedia.uib.no>

[-- Attachment #1: Type: text/plain, Size: 1826 bytes --]

I just wanted to report that it is now possible to evaluate prolog code and it should return the correct result. Both as a call to the executable and in a session. When calling a goal in a session, I add a cut at the end of the goal so that prolog doesn’t ask if you want to get the next possible answer. I am not sure if this is the best approach.

I haven’t implemented variable assignment yet because I haven’t decided how it should do that considering how prolog uses variables. If someone has any ideas for this I would be glad to hear them. I have considered entering the variables into the prolog database with the record predicates or replacing all prolog variables with the same name as in the var declaration with the value. The last one I don’t think is a particularly good idea, except if we only replace the free variables.

Regards,
Bjarte


> 10. des. 2014 kl. 18.20 skrev Bjarte Johansen <Bjarte.Johansen@infomedia.uib.no>:
> 
> Hi,
> 
> I have started to implement org-babel support for (swi-)prolog. I have gotten to the point where I can execute a goal in an external process and have the result show up in the org file. I am now working on getting the session to work correctly. It runs and prints, but it doesn’t do the correct thing in the inferior-mode-buffer and the output is garbled. I still have some work ahead of me.
> 
> I just thought I would let you know in case someone was interested in following the progress or maybe also in helping me. I have the mode hosted in its current state here https://gist.github.com/ljos/2e346333e1b7bfd56d05 <https://gist.github.com/ljos/2e346333e1b7bfd56d05> . 
> 
> And before you ask, yes, if I get this into a working order, I would eventually be interested in getting this into either contrib or core.
> 
> Regards,
> Bjarte


[-- Attachment #2: Type: text/html, Size: 2838 bytes --]

  reply	other threads:[~2014-12-19 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10 17:20 org-babel for prolog Bjarte Johansen
2014-12-19 15:25 ` Bjarte Johansen [this message]
2015-01-02 13:29   ` Bjarte Johansen
2015-05-14 18:11     ` Lawrence Bottorff
2015-05-14 18:22       ` Puneeth Chaganti
2015-05-14 21:03         ` Bjarte Johansen
2015-05-16 13:00           ` Lawrence Bottorff
     [not found]             ` <B34606FC-7BF5-48A8-A3D1-82B6A1913C16@infomedia.uib.no>
2015-05-16 13:31               ` Lawrence Bottorff
2015-05-17 12:59                 ` Bjarte Johansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=619F74FC-4D9C-47FC-ADC8-2897FFF052F3@infomedia.uib.no \
    --to=bjarte.johansen@infomedia.uib.no \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).