[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Org mode & "literate programming": including files
From: |
Bob Heffernan |
Subject: |
Re: Org mode & "literate programming": including files |
Date: |
Tue, 6 Apr 2021 22:59:44 +0100 |
On 21-04-06 23:18, Nikolay Kudryavtsev wrote:
> In org mode you can extract your source code from the org file into a proper
> language specific file. The general idea is that you write your library in
> org, then you tangle it into a proper scheme file and then just import that.
> See this part of the manual for more info (info "(org) Extracting Source
> Code")
> <https://orgmode.org/manual/Extracting-Source-Code.html#Extracting-Source-Code>.
Nikolay,
Thank you for your help. Something like the following isn't
particularly elegant, but it works. Perhaps as I learn more I'll be
able to clean it up.
#+name: lib
#+begin_src emacs-lisp :results silent
(car (org-babel-tangle-file "/home/bob/projects/literate/foo.org"))
#+end_src
#+begin_src scheme :var input=lib :results silent
(load input)
#+end_src
#+begin_src scheme
(f 1)
#+end_src
#+RESULTS[7f10...]:
: 2
> Also, while you can expect people on this list to have a reasonable amount
> of org knowledge, the best place to ask org questions is actually
> emacs-orgmode@gnu.org mailing list.
I'll bear this in mind. Thanks.
Regards,
Bob