From: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
To: Tom Gillespie <tgbugs@gmail.com>
Cc: Asa Zeren <asaizeren@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Thoughts on the standardization of Org
Date: Sun, 01 Nov 2020 11:25:47 +0100 [thread overview]
Message-ID: <87wnz5e5lg.fsf@web.de> (raw)
In-Reply-To: <CA+G3_PNzdNxZ4x0s6T6V2gnYnoZ+C5EqLcmZjjWbsatVh9UtwA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4424 bytes --]
> see discussion on Mauro's thread about
> the fact that it is probably just easier to use Emacs directly if you
> need to export
> to a certain format in a specific way. It is free software after all.
I would like to add, that this is pretty easy to do, and also to make
independent of the users emacs environment. Here is an example that
uses the whole orgmode-babel-latex-html machinery to create derived
documents from source-of-truth org-mode files which get exported to a
book:
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/Makefile.am?rev=b8e3899c6d8b#L121
chargen.tex: chargen.org $(ewstables_SOURCES) kasten-alter-groesse-gewicht.org ews30setup.el
echo yes > $$(tty); Xvfb :3 -screen 0 1024x768x16 & time DISPLAY=:3 HOME=@abs_top_srcdir@ @EMACS@ -l "@abs_top_srcdir@/ews30setup.el" --eval '(setq vc-follow-symlinks nil)' --eval '(setq org-id-locations-file "@abs_top_builddir@/.org-id-locations")' "$<" -e org-latex-export-to-latex -e kill-emacs < $$(tty) >> build.log && rm -f "@abs_top_builddir@/.org-id-locations"
Note how this sets the HOME to the sourcedir (so a project-specific
.emacs.d setup is used) and loads ews30setup.el at startup for
additional customization. Also note the call to Xvfb which avoids
showing a graphical Emacs during build.
This uses an org-mode file that pulls data from tables in other org-mode
files by setting variables for code based on autotools-included
datafiles. Here’s an example of pulling the tables into variables:
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in?rev=b8e3899c6d8b#L153
#+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-kernantriebe :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-fantasy-oben-maenner :var kleidung_unten_maenner=tabelle-kleidung-fantasy-unten-maenner :var kleidung_oben_frauen=tabelle-kleidung-fantasy-oben-frauen :var kleidung_unten_frauen=tabelle-kleidung-fantasy-unten-frauen :var kleidung_oben_frauen=tabelle-kleidung-fantasy-oben-frauen :var kleidung_unten_frauen=tabelle-kleidung-fantasy-unten-frauen :var namen=tabelle-namen-fantasy-jetzt :var sex=tabelle-sexualitaet :var stichwort=tabelle-stichwort-fantasy
(let ()
{{{chargen-setup}}}
{{{chargen-generic}}}
{{{chargen-colors}}}
{{{chargen-specifics-fantasy}}}
{{{chargen-print-char}}}
(chargen-print-char)
)
#+end_src
Note the {{{…}}} blocks. Those use literate programming to include
blocks defined below, with customized separators:
chargen-setup block: https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in?rev=b8e3899c6d8b#L360
customization of separators: https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in?rev=b8e3899c6d8b#L638
# Local Variables:
# org-confirm-babel-evaluate: nil
# org-export-allow-bind-keywords: t
# org-babel-noweb-wrap-start: "{{{"
# org-babel-noweb-wrap-end: "}}}"
# End:
Here’s how it pulls tables:
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/chargen.org.in?rev=b8e3899c6d8b#L578
@tabelle_aussehen@
And this is an example of the datafiles that are used as source-of-truth
and also directly inluded in the main book as tables:
https://hg.sr.ht/~arnebab/ews/browse/Hauptdokument/ews30/tabelle-aussehen.org?rev=b8e3899c6d8b#L578
#+tblname: tabelle-hautfarbe
| | -5 | direkt | 6 |
|------+--------+-------------+----------------|
| -3 | blass | rosig | sommersprossig |
| -1 | grau | gelblich | elfenbein |
| 2 | kupfer | rotbraun | bronze |
| 4 | oliv | dunkelbraun | schwarz |
| -5/6 | albino | - | fleckig |
All this machinery can be invoked without ever seeing Emacs.
So yes, the Emacs implementation is the source of truth, and yes, this
can be used without requiring people to operate Emacs by simply using
Emacs as utility with project-specific setup — just as you would do it
with a compiler.
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]
next prev parent reply other threads:[~2020-11-01 10:26 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 0:22 Thoughts on the standardization of Org Asa Zeren
2020-11-01 0:40 ` Dr. Arne Babenhauserheide
2020-11-01 3:08 ` Asa Zeren
2020-11-01 4:23 ` Pankaj Jangid
2020-11-01 7:54 ` Tim Cross
2020-11-01 2:28 ` Tim Cross
2020-11-01 3:39 ` Pankaj Jangid
2020-11-02 12:39 ` Eric S Fraga
2020-11-02 14:22 ` Greg Minshall
2020-11-02 14:56 ` Eric S Fraga
2020-11-02 15:23 ` Russell Adams
2020-11-02 15:31 ` TEC
2020-11-02 15:48 ` Eric S Fraga
2020-11-02 16:27 ` Carsten Dominik
2020-11-02 22:05 ` Tim Cross
2020-11-03 3:29 ` Greg Minshall
2020-11-01 5:20 ` Tom Gillespie
2020-11-01 10:25 ` Dr. Arne Babenhauserheide [this message]
2020-11-01 10:28 ` TEC
2020-11-01 18:02 ` Jack Kamm
2020-11-01 16:03 ` Asa Zeren
2020-11-01 17:27 ` Dr. Arne Babenhauserheide
2020-11-01 17:29 ` TEC
2020-11-01 18:43 ` Asa Zeren
2020-11-01 6:24 ` TEC
2020-11-01 16:13 ` Russell Adams
2020-11-01 19:46 ` Daniele Nicolodi
2020-11-01 23:10 ` Dr. Arne Babenhauserheide
2020-11-02 8:37 ` Daniele Nicolodi
2020-11-02 9:02 ` TEC
2020-11-02 11:04 ` Daniele Nicolodi
2020-11-02 13:43 ` TEC
2020-11-07 21:20 ` Jean Louis
2020-11-09 14:04 ` Maxim Nikulin
2020-11-09 15:57 ` Daniele Nicolodi
2020-11-09 15:59 ` Jean Louis
2020-11-10 16:19 ` Maxim Nikulin
2020-11-10 20:22 ` Jean Louis
2020-11-10 23:08 ` Tom Gillespie
2020-11-11 0:00 ` Tim Cross
2020-11-09 21:46 ` Tim Cross
2020-11-09 22:45 ` Emails are not safe - " Jean Louis
2020-11-10 4:13 ` Greg Minshall
2020-11-10 4:49 ` Tim Cross
2020-11-10 7:12 ` Greg Minshall
2020-11-10 16:29 ` Maxim Nikulin
2020-11-10 20:35 ` Jean Louis
2020-11-10 22:30 ` Tim Cross
2020-11-11 5:03 ` Jean Louis
2020-11-11 6:40 ` Tim Cross
2020-11-27 16:49 ` Maxim Nikulin
2020-11-27 17:16 ` Jean Louis
2020-11-11 17:10 ` Maxim Nikulin
2020-11-11 17:34 ` Jean Louis
2020-11-12 3:39 ` Greg Minshall
2020-11-11 3:49 ` Greg Minshall
2020-11-02 9:53 ` Dr. Arne Babenhauserheide
2020-11-02 1:17 ` Ken Mankoff
2020-11-02 8:12 ` Russell Adams
2020-11-02 9:57 ` Dr. Arne Babenhauserheide
2020-11-03 8:24 ` David Rogers
2020-11-03 12:14 ` Ken Mankoff
2020-11-03 12:27 ` Russell Adams
2020-11-03 13:00 ` Eric S Fraga
2020-11-03 13:31 ` Ken Mankoff
2020-11-03 15:03 ` Eric S Fraga
2020-11-03 20:27 ` TEC
2020-11-03 14:38 ` Devin Prater
2020-11-03 22:03 ` David Rogers
-- strict thread matches above, loose matches on Subject: below --
2020-11-01 13:34 Gustav Wikström
2020-11-01 18:39 Asa Zeren
2020-11-03 22:30 Asa Zeren
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=87wnz5e5lg.fsf@web.de \
--to=arne_bab@web.de \
--cc=asaizeren@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=tgbugs@gmail.com \
/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).