[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Starting a GNU Guile awesome list
From: |
Dr. Arne Babenhauserheide |
Subject: |
Re: Starting a GNU Guile awesome list |
Date: |
Thu, 16 Jul 2020 21:01:17 +0200 |
User-agent: |
mu4e 1.4.10; emacs 26.3 |
Dmitry Alexandrov <dag@gnui.org> writes:
> "Dr. Arne Babenhauserheide" <arne_bab@web.de> wrote:
>>>> In the case you will stick with Org, there at least should be a runnable
>>>> build recipe (i. e. a Makefile).
>>
>> I’d like to cut this discussion short:
>>
>> https://notabug.org/ZelphirKaltstahl/awesome-guile/pulls/1/files
>
>> all: readme.md readme.texi readme.html
>> .INTERMEDIATE: .exported
>> readme.md readme.texi readme.html: .exported
>> .exported: readme.org
>> HOME=$$(dirname $$(realpath "$<")) emacs -Q --batch "$<" --exec
>> "(require 'ox-md)" -f org-md-export-to-markdown -f org-html-export-to-html
>> -f org-texinfo-export-to-texinfo -f kill-emacs
>
> Alternatively, without reliance on implicit behaviour (setting HOME in order
> to get an expected filename??):
No, I actually set home, because I‘m used to having a custom emacs setup
there. With the -Q you can leave it out.
> #!/usr/bin/make -f
>
> SHELL := emacs
> .SHELLFLAGS := --quick --batch --eval
>
> orgs := $(wildcard *.org)
> objs := $(orgs:.org=.md) $(orgs:.org=.texi)
>
> .PHONY: all
> all: $(objs)
>
> .ONESHELL:
> %.md %.texi: %.org
> (with-temp-buffer
> (require 'ox-md)
> (require 'ox-texinfo)
> (when (insert-file-contents "$<")
> (org-mode)
> (org-export-to-file 'md "$*.md")
> (org-export-to-file 'texinfo "$*.texi")))
Wow, using emacs as shell is quite a trick to get full elisp in
makefiles. Nice!
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
signature.asc
Description: PGP signature
- Starting a GNU Guile awesome list, Zelphir Kaltstahl, 2020/07/13
- Re: Starting a GNU Guile awesome list, Jack Hill, 2020/07/13
- Re: Starting a GNU Guile awesome list, Aleix Conchillo Flaqué, 2020/07/13
- Re: Starting a GNU Guile awesome list, Dmitry Alexandrov, 2020/07/14
- Re: Starting a GNU Guile awesome list, Dr. Arne Babenhauserheide, 2020/07/15
- Re: Starting a GNU Guile awesome list, Zelphir Kaltstahl, 2020/07/15
- Re: Starting a GNU Guile awesome list, Dr. Arne Babenhauserheide, 2020/07/15
- Re: A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list), Dmitry Alexandrov, 2020/07/16
- Re: A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list), Dr. Arne Babenhauserheide, 2020/07/16
- Re: A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list), Dr. Arne Babenhauserheide, 2020/07/16
- Re: A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list), Zelphir Kaltstahl, 2020/07/16
- Re: A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list), Vladimir Zhbanov, 2020/07/16
- Re: A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list), Vladimir Zhbanov, 2020/07/16
- Re: A licence for an ‘awesome list’ (was: Starting a GNU Guile awesome list), John Cowan, 2020/07/16