From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: org-mode for swi-prolog and latex export ? Date: Mon, 21 Jul 2014 12:34:05 +0200 Message-ID: References: <87lhrolakb.fsf@gmail.com> <87d2czbb2m.fsf@gmail.com> <87fvhvni8c.fsf@gmail.com> <8761ir3tfs.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1132e8a4b05bef04feb1a63a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9AvL-00038R-No for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 06:34:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9AvK-0008Lz-Ma for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 06:34:27 -0400 Received: from mail-vc0-x235.google.com ([2607:f8b0:400c:c03::235]:54619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9AvK-0008LO-GB for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 06:34:26 -0400 Received: by mail-vc0-f181.google.com with SMTP id lf12so11663654vcb.40 for ; Mon, 21 Jul 2014 03:34:26 -0700 (PDT) In-Reply-To: <8761ir3tfs.fsf@alphaville.bos.redhat.com> 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: Nick Dokos Cc: "Liste-emacs-orgmode@gnu.org" --001a1132e8a4b05bef04feb1a63a Content-Type: text/plain; charset=UTF-8 Dear Nick, 2014-07-21 12:19 GMT+02:00 Nick Dokos : > I don't understand: what language are you trying to export to? My take > was that you export the doc to latex/pdf/html and you tangle the code > fragments to some arbitrary file (a file that can be fed to a prolog > interpeter to be executed). > You have quite correctly undersood me. > > > This is a (lisp)programmers task. The usual proceeding would be to look > > at the list of extisting ob-.el files and pick a language that > > is very similar to the new one (in case of prolog maybe a difficult > > task?). Then try to adapt this file to your new language -> ob-prolog.el. > > Assuming that the statement I quoted is true, one should be able to > export files that contain prolog code fragments: > > #+BEGIN_SRC prolog > foo > #+END_SRC > > One has to do `:exports code' since exporting results would require > evaluation which *would* require that one write an ob-prolog.el. > > Also, one should be able to tangle the prolog code fragment(s) into > files (no ob-prolog.el needed). > It is only because I do not understand how to "tangle the (prolog) code". I know the export function but I know nothing about tangle. Do not feel forced to answer. I know that I have to read the documentation first and I apologize. > Exporting and tangling are generic services that babel provides even if > there is no evaluation for that language. > > But as I said, I have not tried it: I am only trying to interpret what > the doc is saying, so when the eating comes, the pudding may be stale. > If the interpretation is wrong, I would love to be corrected. If the > interpretation is right, but the exporting/tangling does not work, then > that would be a babel bug. > I do not know. Best wishes, Jo. --001a1132e8a4b05bef04feb1a63a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear Nick,

2014-07-21 12:19 GMT+02:00 = Nick Dokos <ndokos@gmail.com>:
I don't understand: what language are you trying to export = to? My take
was that you export the doc to latex/pdf/html and you tangle the code
fragments to some arbitrary file (a file that can be fed to a prolog
interpeter to be executed).

You h= ave quite correctly undersood me.
=C2=A0

> This is a (lisp)programmers task. The usual proceeding would be to loo= k
> at the list of extisting ob-<language>.el files and pick a langu= age that
> is very similar to the new one (in case of prolog maybe a difficult > task?). Then try to adapt this file to your new language -> ob-prol= og.el.

Assuming that the statement I quoted is true, one should be able to export files that contain prolog code fragments:

#+BEGIN_SRC prolog
foo
#+END_SRC

One has to do `:exports code' since exporting results would require
evaluation which *would* require that one write an ob-prolog.el.

Also, one should be able to tangle the prolog code fragment(s) into
files (no ob-prolog.el needed).

I= t is only because I do not understand how to "tangle the (prolog) code= ". I know the export function but I know nothing about tangle. Do not = feel forced to answer. I know that I have to read the documentation first a= nd I apologize.


Exporting and tangling =C2=A0are generic services that babel provides even = if
there is no evaluation for that language.

But as I said, I have not tried it: I am only trying to interpret what
the doc is saying, so when the eating comes, the pudding may be stale.
If the interpretation is wrong, I would love to be corrected. If the
interpretation is right, but the exporting/tangling does not work, then
that would be a babel bug.

I do not know.

Best w= ishes,

Jo.

--001a1132e8a4b05bef04feb1a63a--