From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-mode for swi-prolog and latex export ? Date: Mon, 21 Jul 2014 06:19:35 -0400 Message-ID: <8761ir3tfs.fsf@alphaville.bos.redhat.com> References: <87lhrolakb.fsf@gmail.com> <87d2czbb2m.fsf@gmail.com> <87fvhvni8c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9AhO-0003y6-TP for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 06:20:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9AhH-0003b2-8B for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 06:20:02 -0400 Received: from plane.gmane.org ([80.91.229.3]:34686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9AhG-0003ar-RJ for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 06:19:54 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X9AhB-0002Az-MW for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 12:19:49 +0200 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Jul 2014 12:19:49 +0200 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Jul 2014 12:19:49 +0200 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: emacs-orgmode@gnu.org Thorsten Jolitz writes: > Joseph Vidal-Rosset writes: > >> 2014-07-21 6:16 GMT+02:00 Nick Dokos : >> >> The first sentence of the doc that Tom pointed to is: >> >> ,---- >> | The core Babel functions (viewing, export, tangling, etc…) are >> language >> | agnostic and will work even for languages that are not >> explicitly >> | supported. Explicit language-specific support is required only >> for >> | evaluation of code blocks in a language. >> `---- >> >> So maybe nothing more is needed for just exporting and tangling >> (completely untested). >> >> Yes, but I do not know how to define such and such language to export. >> When I Cc -Ce I can export to latex and html for example , but I do >> not know how to extend this list. > 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). > 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). 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. Nick