emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Library of Babel usage of other programming languages than elisp


From: Dr. Arne Babenhauserheide
Subject: Re: Library of Babel usage of other programming languages than elisp
Date: Tue, 10 Aug 2021 07:49:38 +0200
User-agent: mu4e 1.4.15; emacs 27.2

Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> writes:

> I have repeatedly tried to use another programming language than elisp for
> writing source blocks in org-mode, which I intended to use as functions inside
> org-mode spreadsheets. So far without success.

I’m using scheme in org-mode during export (though not it tables) and
that works.

call: 
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in?rev=ccc9148e78a4#L27

begin_src: 
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in?rev=ccc9148e78a4#L137

#+call: generate-char-jetzt()

#+name: generate-char-jetzt
#+begin_src scheme :exports none :results output raw :prologue "(import (srfi 
srfi-1)(ice-9 match)(ice-9 receive))(set! *random-state*  
(random-state-from-platform))\n" :tangle chargen.scm :noweb yes :var 
kernantriebe=tabelle-grundantriebe :var hautfarbe=tabelle-hautfarbe :var 
haarfarbe=tabelle-haarfarbe :var augenfarbe=tabelle-augenfarbe :var 
darstellung1=tabelle-darstellung1 :var darstellung2=tabelle-darstellung2 :var 
kleidung_oben_maenner=tabelle-kleidung-jetzt-oben-maenner  :var 
kleidung_unten_maenner=tabelle-kleidung-jetzt-unten-maenner :var 
kleidung_oben_frauen=tabelle-kleidung-jetzt-oben-frauen  :var 
kleidung_unten_frauen=tabelle-kleidung-jetzt-unten-frauen :var 
kleidung_oben_frauen=tabelle-kleidung-jetzt-oben-frauen  :var 
kleidung_unten_frauen=tabelle-kleidung-jetzt-unten-frauen :var 
namen=tabelle-namen-fantasy-jetzt :var sex=tabelle-sexualitaet :var 
stichwort=tabelle-stichwort-jetztzeit
  (let ()
    {{{chargen-setup}}}
    {{{chargen-generic}}}
    {{{chargen-colors}}}
    {{{chargen-specifics-jetzt}}}
    {{{chargen-print-char}}}
    (chargen-print-char)
  )
#+end_src

#+begin_src scheme :noweb-ref chargen-specifics-jetzt
    (define first-names 
      (map first 
        (map string-split-space 
          (map third 
            (remove (λ(x)(not (equal? geschlecht (fourth x)))) namen)))))
    (define last-names (map (λ (x) (string-join (cdr x))) (map 
string-split-space (map third namen))))
    (define names (apply append (map (λ (fi) (map (λ(la) (string-join (list fi 
la))) last-names)) first-names)))
  ;; (define worte (list->d6alist (second (apply zip zweiworte))))

#+end_src

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]