guix-patches
[Top][All Lists]
Advanced

[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: Andrew Tropin
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Date: Fri, 19 Aug 2022 09:21:14 +0300

On 2022-08-19 06:19, Liliana Marie Prikler wrote:

> Am Freitag, dem 19.08.2022 um 06:33 +0300 schrieb Andrew Tropin:
>> On 2022-08-18 20:31, Liliana Marie Prikler wrote:
>> [...]
>> > Am Donnerstag, dem 18.08.2022 um 17:50 +0300 schrieb Andrew Tropin:
>> > 
>> [...]
>> > > +(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?
>> 
>> It's not clear how to find a documentation file heuristically, it can
>> be README, DOCUMENTATION, README.org, docs/MANUAL.org docs/PACKAGE.texi
>> or anything else, morevover a few of them can be present at the same
>> time and I'm afraid it will be a very tough task to understand which of
>> them to use.
> I think it's possible to cover most of those with heuristics.  For the
> rest, we can still override the phase or just rename the file to
> something our heuristics handle.
>

If there is an info file(s) do nothing.
If there are texinfo file build them.
If there are no texinfo files build README.org or README.

Something like that?

Will play around with it a little bit and will publish v2 next week.

>> > 
>> > > +                (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.
>> > 
>> 
>> I thought #:emacs and #:texinfo arguments are enough to specify
>> custom emacs/texinfo inputs.
> And what if any of the documentations needs emacs-org rather than the
> org included by emacs-minimal?  Spamming keywords is not helpful.

This is a good point.  I'll reorder inputs.

-- 
Best regards,
Andrew Tropin

Attachment: signature.asc
Description: PGP signature


reply via email to

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