[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build
From: |
Liliana Marie Prikler |
Subject: |
[bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system. |
Date: |
Thu, 18 Aug 2022 21:31:48 +0200 |
User-agent: |
Evolution 3.42.1 |
Hi Andrew,
again for the mailing list.
Am Donnerstag, dem 18.08.2022 um 17:50 +0300 schrieb Andrew Tropin:
>
> This patch adds a handy way for generating info documentation for
> emacs packages from texinfo or org files.
>
> Andrew Tropin (3):
> build-system: emacs: Add documentation-files argument.
> gnu: emacs-orderless: Use documentation-files argument.
> gnu: emacs-consult: Use documentation-files argument.
Is it just those two packages that require this phase? If so, what
value is there in making it a "standard" phase?
> +(define (default-texinfo)
> + "Return the default texinfo package."
> + ;; Lazily resolve the binding to avoid a circular dependency.
> + (let ((texinfo-mod (resolve-interface '(gnu packages texinfo))))
> + (module-ref texinfo-mod 'texinfo)))
> +
> (define* (lower name
> #:key source inputs native-inputs outputs system
> target
> + documentation-files
I don't think hard-coding this list is useful. Instead, it would be
nice if we simply used find-files with the right pattern, and use a
binary switch as in meson-build-systems #:glib-or-gtk?
> + (texinfo (default-texinfo))
> (emacs (default-emacs))
> #:allow-other-keys
> #:rest arguments)
> @@ -77,6 +85,7 @@ (define private-keywords
> ;; Keep the standard inputs of 'gnu-build-
> system'.
> ,@(standard-packages)))
> (build-inputs `(("emacs" ,emacs)
> + ,@(if (null? documentation-files) '()
> `(("texinfo" ,texinfo)))
> ,@native-inputs))
We should probably append rather than prepend implicit inputs. In
fact, doing so for emacs itself also means that people could prepend
their own emacs if emacs-minimal is not enough rather than needing a
transformer.
> +(define* (generate-docs #:key outputs documentation-files #:allow-
> other-keys)
> + "Convert texinfo or org files specified in DOCUMENTATION-FILES
> argument to
> +info files."
> + (map
> + (lambda (path)
> + (if (or (string-suffix? ".texi" path)
> + (string-suffix? ".texinfo" path)
> + (string-suffix? ".txi" path))
> + (invoke "makeinfo" path)
> + (emacs-batch-script ; else org file
> + `(progn
> + (require 'ox-texinfo)
> + (find-file ,path)
> + (org-texinfo-export-to-info)))))
> + documentation-files))
(ice-9 match) is your friend.
Cheers
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Andrew Tropin, 2022/08/18
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.,
Liliana Marie Prikler <=
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Andrew Tropin, 2022/08/18
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Liliana Marie Prikler, 2022/08/19
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Andrew Tropin, 2022/08/19
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Liliana Marie Prikler, 2022/08/19
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Andrew Tropin, 2022/08/26
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Liliana Marie Prikler, 2022/08/29
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Andrew Tropin, 2022/08/30
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Liliana Marie Prikler, 2022/08/30
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Andrew Tropin, 2022/08/31
- [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system., Liliana Marie Prikler, 2022/08/31