GNU logs - #57280, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Andrew Tropin <andrew@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Thu, 18 Aug 2022 18:36:02 +0000
Resent-Message-ID: <handler.57280.B.16608477228746 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 57280 <at> debbugs.gnu.org
Cc: Liliana Marie Prikler <liliana.prikler@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16608477228746
          (code B ref -1); Thu, 18 Aug 2022 18:36:02 +0000
Received: (at submit) by debbugs.gnu.org; 18 Aug 2022 18:35:22 +0000
Received: from localhost ([127.0.0.1]:56672 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oOkMT-0002H0-FL
	for submit <at> debbugs.gnu.org; Thu, 18 Aug 2022 14:35:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:42254)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1oOkMQ-0002Gr-5N
 for submit <at> debbugs.gnu.org; Thu, 18 Aug 2022 14:35:20 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37338)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <andrew@HIDDEN>) id 1oOkMP-0005F7-KC
 for guix-patches@HIDDEN; Thu, 18 Aug 2022 14:35:17 -0400
Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:50609)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <andrew@HIDDEN>) id 1oOkML-0005F9-SE
 for guix-patches@HIDDEN; Thu, 18 Aug 2022 14:35:17 -0400
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id DBCEF240009;
 Thu, 18 Aug 2022 18:35:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1660847705;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type;
 bh=TkZRBsMd+REY2qohPcNkbnF7G66eIZ2T1cgjbl6TBwo=;
 b=CdowcTcwivvJtN4OJOK7uf0kRcWxmaHkXqLpUloCtaSCG0qorEmFOYFkZfJShXs9dP1hB+
 t7E/C1NppuBbinGFhCrVbwTRqFzuevjh5Ib4F1c17lq/BGb+oNW66d8lZM6HGvL8HIMwG2
 wGLWE6G3nhe9XtGe5Q6wwqWCgPzoZrI+zKGm3b6fUsRyWPIbfaTHFprt3bExlCtJVXYH7s
 O9BsTZBq46PPNQiGPOk44GSxwLJRVGEhQxg48SZR49/BwgRyvJO3D2DCXLJmn046kvwqT6
 ZR0Wl9I8v3h25KSVrTW1J44ikYkdS1xUHwhV544vhE3ak7jekuA/GShcaogaSg==
From: Andrew Tropin <andrew@HIDDEN>
Date: Thu, 18 Aug 2022 21:35:02 +0300
Message-ID: <87mtc18ko9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="
Received-SPF: pass client-ip=2001:4b98:dc4:8::221; envelope-from=andrew@HIDDEN;
 helo=relay1-d.mail.gandi.net
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--=-=-=
Content-Type: multipart/mixed; boundary="==-=-="

--==-=-=
Content-Type: text/plain
Content-Disposition: inline


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.

 gnu/packages/emacs-xyz.scm        | 11 +++--------
 guix/build-system/emacs.scm       | 11 +++++++++++
 guix/build/emacs-build-system.scm | 17 +++++++++++++++++
 3 files changed, 31 insertions(+), 8 deletions(-)

-- 
2.37.1


--==-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-build-system-emacs-Add-documentation-files-argument.patch

From 74b671b94d16db2f21c1df02672fef0b5228a08a Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@HIDDEN>
Date: Thu, 18 Aug 2022 17:43:14 +0300
Subject: [PATCH 1/3] build-system: emacs: Add documentation-files argument.

Allows to build info files from texinfo or org.

* guix/build-system/emacs.scm (default-texinfo): New variable.
* guix/build-system/emacs.scm (lower): New arguments.
* guix/build/emacs-build-system.scm (generate-docs): New variable.
---
 guix/build-system/emacs.scm       | 11 +++++++++++
 guix/build/emacs-build-system.scm | 17 +++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 3df68789ff..632ba2ddb3 100644
--- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -56,8 +56,16 @@ (define (default-emacs)
   (let ((emacs-mod (resolve-interface '(gnu packages emacs))))
     (module-ref emacs-mod 'emacs-minimal)))
 
+(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
+                (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))
          (outputs outputs)
          (build emacs-build)
@@ -87,6 +96,7 @@ (define* (emacs-build name inputs
                       (tests? #f)
                       (parallel-tests? #t)
                       (test-command ''("make" "check"))
+                      (documentation-files ''())
                       (phases '%standard-phases)
                       (outputs '("out"))
                       (include (quote %default-include))
@@ -109,6 +119,7 @@ (define builder
                        #:test-command #$test-command
                        #:tests? #$tests?
                        #:parallel-tests? #$parallel-tests?
+                       #:documentation-files #$documentation-files
                        #:phases #$phases
                        #:outputs #$(outputs->gexp outputs)
                        #:include #$include
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 6a6918bfdd..08c61ddfd8 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -274,6 +274,22 @@ (define (match-stripped-file action regex)
                            (install-file? file stat #:verbose? #t)))
       #f))))
 
+(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))
+
 (define* (move-doc #:key outputs #:allow-other-keys)
   "Move info files from the ELPA package directory to the info directory."
   (let* ((out (assoc-ref outputs "out"))
@@ -343,6 +359,7 @@ (define %standard-phases
   (modify-phases gnu:%standard-phases
     (replace 'unpack unpack)
     (add-after 'unpack 'expand-load-path expand-load-path)
+    (add-after 'expand-load-path 'generate-docs generate-docs)
     (delete 'bootstrap)
     (delete 'configure)
     (delete 'build)
-- 
2.37.1


--==-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0002-gnu-emacs-orderless-Use-documentation-files-argument.patch

From 6c8fb7d173c24ef6c00aca5a7697cf14d1353f37 Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@HIDDEN>
Date: Thu, 18 Aug 2022 17:49:18 +0300
Subject: [PATCH 2/3] gnu: emacs-orderless: Use documentation-files argument.

* gnu/packages/emacs-xyz.scm (emacs-orderless): Use documentation-files argument.
---
 gnu/packages/emacs-xyz.scm | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 811e293c1d..f3d515b3c6 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -9045,14 +9045,7 @@ (define-public emacs-orderless
        (file-name (git-file-name name version))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'makeinfo
-           (lambda* (#:key outputs #:allow-other-keys)
-             (invoke "makeinfo" "orderless.texi")
-             (install-file "orderless.info"
-                           (string-append (assoc-ref outputs "out")
-                                          "/share/info")))))))
+     (list #:documentation-files #~'("orderless.texi")))
     (native-inputs
      (list texinfo))
     (home-page "https://github.com/oantolin/orderless")
-- 
2.37.1


--==-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0003-gnu-emacs-consult-Use-documentation-files-argument.patch

From d3ad4d4446ba4275bec5f9ed2aaa7e74289727f2 Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@HIDDEN>
Date: Thu, 18 Aug 2022 17:50:00 +0300
Subject: [PATCH 3/3] gnu: emacs-consult: Use documentation-files argument.

* gnu/packages/emacs-xyz.scm (emacs-consult): Use documentation-files argument.
---
 gnu/packages/emacs-xyz.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f3d515b3c6..cab1ad9dee 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -9071,6 +9071,8 @@ (define-public emacs-consult
         (base32 "0sy4rn1vjk1g50r8z14hzj8lds6s7ij2zkjqfi6mfash5il75wnq"))
        (file-name (git-file-name name version))))
     (build-system emacs-build-system)
+    (arguments
+     (list #:documentation-files #~'("README.org")))
     (propagated-inputs (list emacs-compat))
     (home-page "https://github.com/minad/consult")
     (synopsis "Consulting completing-read")
-- 
2.37.1


--==-=-=--

--=-=-=
Content-Type: application/pgp-signature; name=signature.asc
Content-Transfer-Encoding: base64

LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ2dBZEZpRUVLRUdheGxBNGRF
REg2Uy82SWdqU0NWakIzckFGQW1MK1Vzd0FDZ2tRSWdqU0NWakIKM3JESE1nLytKc1ZtazZSVHNp
OWRmR0lhODFqMzlGbVVyUzQ4OVlEeHpQWjBBNHhlcjdKU2FyQk9XcHc3NC82awo2Nm1mb0Vqa2JW
cVZWYjNURlg1R2dQdEV6SjlUVlJXWVl1MW9qY0hpNVJLN1VPa01NSEpFNy9EMEhiOXdIU2dmCm8z
WWg5K1BJdW9OZitXTnNYNnBrYTlrbzQyVDJPSGxLdTdtdTNuV0RvNXpOc2tqQUZCY3lLWmJGblVF
bUJiNUUKbjcvZnZscWl3MXhCRzVJZlNFYm5oQ0lYc2tLVVRtd2ZnaVRPM003bDJoYVkyNkU5Umxz
YjkvZTZ4MUlGY1VhQwpEVGIxbjUwQ25BUkQySHJNSS9jWm9IY2xnM3pHOFpBUFlUMTBkOUEyZzBX
L3ZGZ2dsWjJBSzhZZFpMdmNpY2JuCmN1NmhyV0pRZjJ6c1p4ZW5reGFNVDc0QXBHbWs0OHFVSXBx
a2lVY1BwOTh0aXFEbjdUSmRTYkp1RnVOSjZrai8KZjJQRnMrN1FTSjJsQ1dLejJuNm1FN0NRVi93
M3J4cVRZRElIWUh4RGh4aFozRG8vZ2tLMXJqYW55cU8vNTdYVApXNFBZRHl1ZTJCMTdsMHJLNzJp
aStnUTV1K01FQ2Z2ckZzdXRINXlQTW11VEN5RGg2OXZORk9lSzlZc2srcnUyCkFLKzhNQkNhVHRx
UnRNMDU0cXVlbklqU2Z3V1A3dG9LY1djR2FhWEZSbXM5WGNFMGgzT29HRlc2SE5GNDJVSGgKNXRZ
MFhiM01xdVN5OUpIZVpZZ2wvOGVzY29BbTczVWxncUg2T09Dbm9UMG9LeEU1czNoQWFZYldBUldi
OHNTbgpoaXdYUHNJbHg1QlQwWko1Kyt1Z1EwblJOUC80eXE0cFJYZkdIbVlUZGNjaUY0SVJJOXc9
Cj1yQnA5Ci0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ==
--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Andrew Tropin <andrew@HIDDEN>
Subject: bug#57280: Acknowledgement ([PATCH 0/3] Add documentation-files
 argument to emacs build system.)
Message-ID: <handler.57280.B.16608477228746.ack <at> debbugs.gnu.org>
References: <87mtc18ko9.fsf@HIDDEN>
X-Gnu-PR-Message: ack 57280
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 57280 <at> debbugs.gnu.org
Date: Thu, 18 Aug 2022 18:36:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 57280 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
57280: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D57280
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Thu, 18 Aug 2022 19:33:02 +0000
Resent-Message-ID: <handler.57280.B57280.166085112222766 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Andrew Tropin <andrew@HIDDEN>, 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.166085112222766
          (code B ref 57280); Thu, 18 Aug 2022 19:33:02 +0000
Received: (at 57280) by debbugs.gnu.org; 18 Aug 2022 19:32:02 +0000
Received: from localhost ([127.0.0.1]:56765 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oOlFJ-0005uy-Vq
	for submit <at> debbugs.gnu.org; Thu, 18 Aug 2022 15:32:02 -0400
Received: from mail-ej1-f67.google.com ([209.85.218.67]:34626)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oOlFD-0005uZ-ON
 for 57280 <at> debbugs.gnu.org; Thu, 18 Aug 2022 15:32:00 -0400
Received: by mail-ej1-f67.google.com with SMTP id tl27so5092233ejc.1
 for <57280 <at> debbugs.gnu.org>; Thu, 18 Aug 2022 12:31:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:to:from:subject:message-id:from:to:cc;
 bh=PEA+6Xh3aifJk7CkO3RMg+BlJStisBQVimf2zAgBmvs=;
 b=CqaQgmuOPSh6DQYIMug4w/BU9FeBVOnyjxhM6oVmlTC4XP6oR+eMaDy44OAxPRQaYX
 8zkMAh9Q8rSa0jFQ3YgQKkmsgApNeq3pRU+CgzDA0L/B9Q4GBJSOWYIF8oSyDh6P63cH
 2B6yk24ovhmNO/pDnLt3M/z7qK82b1uDuigGsS4dIKiwMqJM326Ib2BFpb2ZNVQVK1pQ
 PJSTZaKrEtw4qd87N7p/kYL7VOS+5TiqUVph4M5PvGeOaTscuBwSCyD17Qzq1gRWTS7R
 mRGAmJgh+TD8tZvfkhzuCdwmjZzSLecSj5oEmIyx0NLAtCq6OJYguunbagwEgBK1yTo0
 mC0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from
 :to:cc;
 bh=PEA+6Xh3aifJk7CkO3RMg+BlJStisBQVimf2zAgBmvs=;
 b=mJxi7z+y7Ne1BqqLePjNjwIrpUGeVbN9Q5KQHgDZqSQy3aibrELAdHVI+FfyVOFdPS
 iyZumfMLa+mXj7kQUgzvBPrn09eUhCmqDQeuvECDQoRysCrFc8MVwoIbbizT5RhH5EID
 nlgARYvF0/HCu/9UzuadqD9o1pVE87guXwOMyitD0h3JVN1M8KMn7jXtTsOS1wMikrru
 bBp0huoI6AaTjP28O3y18EpcPHnfZSTlU+Lj3/XWeF4fsb9jd816tei3Cxt34uPRJPPG
 2giFc6/NltuiAtmZhODZVQKV9dMgXcoW82nCNCbQrRE/qQK9WG8BnEzxOALwQoUqlRKu
 WIlQ==
X-Gm-Message-State: ACgBeo26j7sYj7qcEvk5QCwp1463ad5HqWAEVUHwEbdE0ixWGlHfDzjJ
 sqtNGorv8JF+zFLAxFw6utk=
X-Google-Smtp-Source: AA6agR756cwAW+1rpJa/742lq1VDxXUM43bfbsxmexdVtwjCmosk8qWr2LlRhlg2WBbAM7qrqWtnRg==
X-Received: by 2002:a17:907:16ab:b0:731:55c0:e7a1 with SMTP id
 hc43-20020a17090716ab00b0073155c0e7a1mr2733898ejc.154.1660851109822; 
 Thu, 18 Aug 2022 12:31:49 -0700 (PDT)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 r17-20020a1709061bb100b00731745a7e62sm1206806ejg.28.2022.08.18.12.31.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 18 Aug 2022 12:31:49 -0700 (PDT)
Message-ID: <6ea43d7f4b9595d15404bdca462dd8dc71fefea7.camel@HIDDEN>
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Date: Thu, 18 Aug 2022 21:31:48 +0200
In-Reply-To: <87mtc18ko9.fsf@HIDDEN>
References: <87mtc18ko9.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Andrew Tropin <andrew@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 19 Aug 2022 03:34:01 +0000
Resent-Message-ID: <handler.57280.B57280.166088000012191 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.166088000012191
          (code B ref 57280); Fri, 19 Aug 2022 03:34:01 +0000
Received: (at 57280) by debbugs.gnu.org; 19 Aug 2022 03:33:20 +0000
Received: from localhost ([127.0.0.1]:57011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oOsl5-0003AY-WF
	for submit <at> debbugs.gnu.org; Thu, 18 Aug 2022 23:33:20 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:45667)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1oOsky-0003AF-OG
 for 57280 <at> debbugs.gnu.org; Thu, 18 Aug 2022 23:33:18 -0400
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 98956240004;
 Fri, 19 Aug 2022 03:33:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1660879986;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=ClDbi93EJ6sbl2S5buEETJ0iymgATsFWiAll7CC3eAw=;
 b=cYgXZWSjNgoouEdOePrJicpajEmAyp7A3fcq0U/j2wkBSkvlVM8/yu6mTHQRXSSBaArwaM
 GlafSTsLpCC0A6LdV9So2VRD41GndUx9YttPL3wohqqnf8dGI3crdd1IqLupYSvgR5RPSG
 ISTdOkI9G/V5XO3sBXMOk/wUXvtZihRbSD1rQUHRblI8dKlGsyVd27UluR/kmXluVN5X+s
 NL2iiB5IdGLBnuqx0BdEc8r5RDGPfAOT2h4Mj68Mn2i8wtpf7bvk1MjqEXbDAXh3/BkJul
 a7jjJf1HwWrO8DI4RfgAuwfLN1rXR3ANhfVO5h5PrNnUlkEDiRE8l2UzFzOyCw==
From: Andrew Tropin <andrew@HIDDEN>
In-Reply-To: <107d9c475d47842d67db4f0a7d85d63ae11f9f3c.camel@HIDDEN>
References: <87wnb5lhyr.fsf@HIDDEN>
 <107d9c475d47842d67db4f0a7d85d63ae11f9f3c.camel@HIDDEN>
Date: Fri, 19 Aug 2022 06:33:02 +0300
Message-ID: <87k074gb69.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2022-08-18 20:31, Liliana Marie Prikler wrote:

> Hi Andrew,
>
> if this ought to have went to a mailing list, it didn't.

Yep, I missed To:, resent it yesterday.

>
> Am Donnerstag, dem 18.08.2022 um 17:50 +0300 schrieb Andrew Tropin:
>>=20
>> This patch adds a handy way for generating info documentation for
>> emacs packages from texinfo or org files.
>>=20
>> Andrew Tropin (3):
>> =C2=A0 build-system: emacs: Add documentation-files argument.
>> =C2=A0 gnu: emacs-orderless: Use documentation-files argument.
>> =C2=A0 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?
>

It's just two examples, I think there is much more packages.

>> +(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.

The idea is inspired by :doc keyword from elpa and the fact that some of
emacs-xyz packages either miss documentation or have custom build phases
for it:
https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages#n781

>> +                (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.

>> +(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.

That's right, I thought about it when was writting this code :)  Will
wait for a few more comments and will refactor in the next revision.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmL/BG4ACgkQIgjSCVjB
3rDV2Q//axhYE3GFe/ejo5yZ0j7PxHJuBWFf5hnuH3ZAhWWRzSLDEcps2LAbH8SC
xkMRqxWns9prWhE76IfAOy4IJ1Hb7aYdMu3T9lL3iQSQRlx880VAGC5uRnviPLvG
BTaKrpxsMD+QVg5Xeb47vy0RTYknEOmtiCwmJ/bWWmv6p90jAp25Hqg9W0sPsWld
fM7yN5TAqKTHgPGtL9aIqAvSeLTr4Q0T3WFL+st5Vd6pqcX06HJZ1aV5ppaFTfBI
K6SC5dymQ0ccEczpeLxFiKR3dvpm4ckhpTGrgC2GYtM+lq0C0eC+lLKbH/7dYkxa
aaciEem/iH9/rmHKZlIIBJBEY1Dq9Z8ZyP4W751LN6FIzYk5VGq2rB7ycJc+orSi
VpmnwcRB0OFLmeaI5a3qv1S9vOyKltqtVjadYulBTJWXUihcM0wp0LGNxAN4Tfc9
TPke8952Fp5sewdlXtaihaUUvhyOJP6UoN1kyHvBW2oCvtzcwG9mccMjnaRSvv8P
VanHx4+C4OA3EW7hWbGk80VPUeOMZo50hXBBWwycUk2VUwEE024hqYMDFWtUUheL
6S2g02MYAC3yllvoV+PUnZFlig4ML6CnUOk6acyBEJ5dholP1pIEvf+rUecQ6vTc
u39ez7/9/YUr5k3hxAcFoUR0yp9TqWk7uI0WCdUinohLXSL14vQ=
=PVaN
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 19 Aug 2022 04:20:01 +0000
Resent-Message-ID: <handler.57280.B57280.166088279217179 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Andrew Tropin <andrew@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.166088279217179
          (code B ref 57280); Fri, 19 Aug 2022 04:20:01 +0000
Received: (at 57280) by debbugs.gnu.org; 19 Aug 2022 04:19:52 +0000
Received: from localhost ([127.0.0.1]:57142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oOtU8-0004T0-Ac
	for submit <at> debbugs.gnu.org; Fri, 19 Aug 2022 00:19:52 -0400
Received: from mail-ed1-f66.google.com ([209.85.208.66]:37612)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oOtU2-0004SZ-Dg
 for 57280 <at> debbugs.gnu.org; Fri, 19 Aug 2022 00:19:51 -0400
Received: by mail-ed1-f66.google.com with SMTP id b16so4254533edd.4
 for <57280 <at> debbugs.gnu.org>; Thu, 18 Aug 2022 21:19:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc;
 bh=yJ4z0CDH1EPZEC4Wq/+uUFDE+GS8kvKTfUZRHKwec/g=;
 b=Q7zYmoPUcTIP7hbJ0VxkxuHP1X2pi/JFWx52S4zoI0+3vcai2fefaaazvw/lgaAxxM
 Gx8HfQkfw+URRicohFQBmsA1kLtyhoMWGRfZw4Zxd/LXmGrdcl8eI/LF7wEE6xdj+q/Q
 cf9NdQzeyWahewzBaVRMDxdw138AwFqGGPqzZyng2s/Rb9evWaf9zJ8UZ45J648Oq+rz
 tqZC5BsUUdBX4xTpYq0drz2cZQZ04g+2jVM2mVxBvc5dS/kVnF48j+r4EoiBrxoFMFWS
 xHzMzZvtwLxEnBR8yrBEpjRjEwgKUSB9UVIyUM6AIyVmbtatKhUuaqbbW7oR3+7qg6us
 G7HA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc;
 bh=yJ4z0CDH1EPZEC4Wq/+uUFDE+GS8kvKTfUZRHKwec/g=;
 b=BN4DUbNqAkessnu6lc6//owPf3GBwDVPKKTg+gh+s1l6tlw4K+NRJ8czDK0eKvZ6zg
 bSOmc4vQrOhAqdjsh6ZA1P4SJC3XcOC9f2AMFZLaiN+iPRHo8WVm5BW8zGBAQazpYrV+
 4ZXGTufqz3URpAZHMZkJXeoa4f3PSKD0A7Q1HR4TIYdvYA9/3AwP87ZHHZGgcY1IhXX8
 9g0x86xDOzDs7TiZvXmGMHtcS+o/8sR26nsjhjaYd/UluM3M3D/7kbMJWIhZi2R7tWQd
 88jj2lBAEqvIKjlm7I+W8sZ3oryOzesSh8e8xk9w+uNNuzd7KArtbEPdQ9n8DPgWGGbS
 KRjA==
X-Gm-Message-State: ACgBeo1NZJB6M83kVnAGracHKvIFcuDUuhLzQhSwBWSIC3iDYU8mvVJ8
 YaarMJOkCRhxHnrFn0XR6iU=
X-Google-Smtp-Source: AA6agR4Z8CQpItYv3bNq/vOsGczH5G68Il9HgTL6KLsPXDvxrMknczZI8iNZRhRPss73nWphNlyknw==
X-Received: by 2002:a05:6402:42d3:b0:435:2c49:313d with SMTP id
 i19-20020a05640242d300b004352c49313dmr4565957edc.86.1660882780301; 
 Thu, 18 Aug 2022 21:19:40 -0700 (PDT)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 dk5-20020a0564021d8500b00442d5054a51sm2312422edb.87.2022.08.18.21.19.39
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 18 Aug 2022 21:19:39 -0700 (PDT)
Message-ID: <0f6169482efaaf9f0caac9810841e38c9c569e66.camel@HIDDEN>
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Date: Fri, 19 Aug 2022 06:19:38 +0200
In-Reply-To: <87k074gb69.fsf@HIDDEN>
References: <87wnb5lhyr.fsf@HIDDEN>
 <107d9c475d47842d67db4f0a7d85d63ae11f9f3c.camel@HIDDEN>
 <87k074gb69.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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.

> > 
> > > +                (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.

Cheers
> > 




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Andrew Tropin <andrew@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 19 Aug 2022 06:22:02 +0000
Resent-Message-ID: <handler.57280.B57280.16608900936400 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.16608900936400
          (code B ref 57280); Fri, 19 Aug 2022 06:22:02 +0000
Received: (at 57280) by debbugs.gnu.org; 19 Aug 2022 06:21:33 +0000
Received: from localhost ([127.0.0.1]:57265 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oOvNt-0001fA-1g
	for submit <at> debbugs.gnu.org; Fri, 19 Aug 2022 02:21:33 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:34939)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1oOvNn-0001eq-5R
 for 57280 <at> debbugs.gnu.org; Fri, 19 Aug 2022 02:21:31 -0400
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 288BBC0005;
 Fri, 19 Aug 2022 06:21:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1660890080;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=8XqHnNKh4599ewmryIP4rJBih7HXs/MX3t+dFB+NUt8=;
 b=XN7Sm4i3Xq5spb/g/TC3aMlbZIuVufbi7gQpNaWL5AAMSb12FxAvldxl33IhXbQ96RRrin
 2Jbhydg8VJ3ufsVYHwFJczlIvmseGNtNSqFwBZtEy1Is0AfsWkeVYuLcSo5tjdqDX23Hc4
 kkPayDQFvgZbacY/MtEygNE7HPFgWuoRIRFlQFO/4VKLWlSUD10NzBTGcdVvPdxthndTsI
 SWAvObuKEZ1mpZATfMysU6VOBN43Cw5GLt7aIMCSS1rBgCLCMGOPtcM1qBfBK3jCjk5M7E
 0yQK5IkT0doW9Rwn3gsGOeZihfgbp2YEiZBi+xsf34BmFDK/Cts7lVXTPdKt3Q==
From: Andrew Tropin <andrew@HIDDEN>
In-Reply-To: <0f6169482efaaf9f0caac9810841e38c9c569e66.camel@HIDDEN>
References: <87wnb5lhyr.fsf@HIDDEN>
 <107d9c475d47842d67db4f0a7d85d63ae11f9f3c.camel@HIDDEN>
 <87k074gb69.fsf@HIDDEN>
 <0f6169482efaaf9f0caac9810841e38c9c569e66.camel@HIDDEN>
Date: Fri, 19 Aug 2022 09:21:14 +0300
Message-ID: <87wnb47nz9.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

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:
>> >=20
>> [...]
>> > > +(define (default-texinfo)
>> > > +=C2=A0 "Return the default texinfo package."
>> > > +=C2=A0 ;; Lazily resolve the binding to avoid a circular dependency.
>> > > +=C2=A0 (let ((texinfo-mod (resolve-interface '(gnu packages texinfo=
))))
>> > > +=C2=A0=C2=A0=C2=A0 (module-ref texinfo-mod 'texinfo)))
>> > > +
>> > > =C2=A0(define* (lower name
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:key source inputs native-inputs outputs sy=
stem
>> > > target
>> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 documentation-files
>> > I don't think hard-coding this list is useful.=C2=A0 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?
>>=20
>> 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.

>> >=20
>> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 (texinfo (default-texinfo))
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (emacs (default-emacs))
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:allow-other-keys
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:rest arguments)
>> > > @@ -77,6 +85,7 @@ (define private-keywords
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 ;; Keep the standard inputs of 'gnu-
>> > > build-
>> > > system'.
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 ,@(standard-packages)))
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (build-inputs=
 `(("emacs" ,emacs)
>> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 ,@(if (null? documentation-files) '()
>> > > `(("texinfo" ,texinfo)))
>> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 ,@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.
>> >=20
>>=20
>> 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.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmL/K9oACgkQIgjSCVjB
3rDIdw/8CvqSiAfvJ/1PZ7z6P/PVq+6hbbNYOWTtWD/DKqfbdQ6PZubkQTwQ6pbk
njgkUvCic9J4hDHz8cOQQE32iOQxHVUka1Tv/eUDogOu/9briV9+e87WSjYx+qw/
QOIMWmzulsn2ddLHEu+GU7aO3/T7CSI0ogxu0Sr0a4EKt8+fJS6XnGwEWyThADnk
qm77Wzf9AjhASJxt2cbitutRynE2IL2Hy8wcIhxpQ+cKzGB3pCApus2MyQtGvyKz
I/aofunlakzdSvSCIDRWGnqfitXBnrgDsR6EVjCOZYkioxoFK2qzXqmJN9O0yAoJ
v4uBCAywqBX3t+m6kvq3shqVwfV4pk+kEyMeIKp9Nu8/hhXjIG7gy7UGZYXxfDxc
K8mO2vHGTbtNrblB8zwniZ5wtItbUmyUbZFpnqPO9uk/14WyaZKwCXCx36VP/F0o
/7PYHvyr1zN7bOcen56FgZ6n25b7ie1UqC6cEmCsJUBUxG8Qs4BHgjVQixseZdJb
fdvx3Bjyy1Mz81JwFT0yqg5TOfH0e9PmxWhfORYKIyDL933CUHl2/MDfggVjTOWR
SHKwgv6mXtfQsgLz9q4TSdUoopcYItJ2NJWfVDvvud4TyFGfXsnd7N7VYRpqX9/W
FbZiAKWCs9zKf1RSB4EgKT39ND0P+pEpNKU0SjbbdCmhFh8pTN4=
=1zUa
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 19 Aug 2022 15:41:02 +0000
Resent-Message-ID: <handler.57280.B57280.16609236026775 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Andrew Tropin <andrew@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.16609236026775
          (code B ref 57280); Fri, 19 Aug 2022 15:41:02 +0000
Received: (at 57280) by debbugs.gnu.org; 19 Aug 2022 15:40:02 +0000
Received: from localhost ([127.0.0.1]:59147 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oP46L-0001l7-Kb
	for submit <at> debbugs.gnu.org; Fri, 19 Aug 2022 11:40:02 -0400
Received: from mail-ej1-f66.google.com ([209.85.218.66]:37659)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oP46J-0001ko-C8
 for 57280 <at> debbugs.gnu.org; Fri, 19 Aug 2022 11:40:00 -0400
Received: by mail-ej1-f66.google.com with SMTP id kb8so9525250ejc.4
 for <57280 <at> debbugs.gnu.org>; Fri, 19 Aug 2022 08:39:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc;
 bh=eGPmHaQwsOzJgN6Mzn34qNB7xsz/cJ2lVgqc12JrMWw=;
 b=JFptSZZEypqFH46YGcwXPEuTnqie7a+ORVEeQajMyv5baZ/f5T+gFKW2gzii54y2T1
 j+kp9fOMbvUtDFLIPoWTPhfiO6Wc+MLSZqfIDb8DBqKm6XlR2QqzRQbqsY2dz8hnfnct
 o+/LF/Ic54gQLsseeSiALgQqZFHCD3ZK8vjKPyE4o4jzjeVDg2Z2RIO6jy6fyovR5NQp
 bLagcL7oWNs11d/0EsN9//0+x9fcOgU/syUgMqwMA0E4m3vDSa40636asNxD6SjLaDPC
 MllEjXH+mQNVSclHxAfMx1znrnyk18RxbuKJ+gkm52+/g5b77uGJRshm0t3jvCF1A4La
 Zg6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc;
 bh=eGPmHaQwsOzJgN6Mzn34qNB7xsz/cJ2lVgqc12JrMWw=;
 b=xxpPXHJRg8B27JIPFoLp9DjpvCukdj2vjgGgI7wMw1FJWlYAp90FWV1vV6ALCxyTxD
 zhTPZqsrBwO80gVNzkw2+dtsTOXH+knXSrKfEg+z4BtqWAXC/yisbUPqfeKBNHlD5qSA
 Bh99ZmZ7c11gGbfVg41TpxdDJm3mj088ix46Jt2K5BjbIsGeV/aWDUW/9ALsthxn8axT
 TFcDmh8SflQOR4erl9hTOvC/wKjp8hgXi4q4mh0eV4FsJohlVqSnMxtnl3AULpn2fUlN
 iHgrglsiQvGc8jm8ndJF5ceryKzZTis2BXbRbtpSwN4A/5MsO5q8UBY/lmLUfejNB2Xt
 OZ2A==
X-Gm-Message-State: ACgBeo072vQiP5SOAbzfeVtkHJhYHxVaIQHgF5m3S3nTpSbKnTf3G0zN
 lVhQUthNhneJG3DUgyLkEDw=
X-Google-Smtp-Source: AA6agR7tyK8jYBoTgirJJwaQt+XtSr9mD05xeHL4Sc3sALOkwBLzB6b3IZ4t4A5BOd36dKmwzo4gAw==
X-Received: by 2002:a17:907:28d6:b0:731:10ff:86a6 with SMTP id
 en22-20020a17090728d600b0073110ff86a6mr5364377ejc.128.1660923593359; 
 Fri, 19 Aug 2022 08:39:53 -0700 (PDT)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 n1-20020a1709061d0100b0073d6093ac93sm51572ejh.16.2022.08.19.08.39.52
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 19 Aug 2022 08:39:52 -0700 (PDT)
Message-ID: <c76deb583d7ef2d9ecaa173c3c1cdf0a9280aa84.camel@HIDDEN>
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Date: Fri, 19 Aug 2022 17:39:51 +0200
In-Reply-To: <87wnb47nz9.fsf@HIDDEN>
References: <87wnb5lhyr.fsf@HIDDEN>
 <107d9c475d47842d67db4f0a7d85d63ae11f9f3c.camel@HIDDEN>
 <87k074gb69.fsf@HIDDEN>
 <0f6169482efaaf9f0caac9810841e38c9c569e66.camel@HIDDEN>
 <87wnb47nz9.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Am Freitag, dem 19.08.2022 um 09:21 +0300 schrieb Andrew Tropin:
> On 2022-08-19 06:19, Liliana Marie Prikler wrote:
> > 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.
I'd word those in terms of for-each, i.e. "build all texinfo files and
org-mode files".  Don't trust already compiled sources, i.e. if there's
both README.info and README.org, you still want to generate README.info
from README.org (though "README" doesn't sound like a particular good
heuristic for an org-file to makeinfo from).

> > > 
Cheers




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
References: <87mtc18ko9.fsf@HIDDEN>
Resent-From: Andrew Tropin <andrew@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 26 Aug 2022 14:34:01 +0000
Resent-Message-ID: <handler.57280.B57280.166152441320840 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.166152441320840
          (code B ref 57280); Fri, 26 Aug 2022 14:34:01 +0000
Received: (at 57280) by debbugs.gnu.org; 26 Aug 2022 14:33:33 +0000
Received: from localhost ([127.0.0.1]:54259 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oRaOq-0005Q4-Sz
	for submit <at> debbugs.gnu.org; Fri, 26 Aug 2022 10:33:33 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45465)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1oRaOo-0005Pn-Jr
 for 57280 <at> debbugs.gnu.org; Fri, 26 Aug 2022 10:33:31 -0400
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 4DDC3E000A;
 Fri, 26 Aug 2022 14:33:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1661524402;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to; bh=aUlJ1nFZ/7/tvRAI1ZIYgCg7Mc2xzacN79+Grvce5Mw=;
 b=W0fsUJWlWxu5zYSy4/YM/5nrIhph8091DEv27WNBZX2qlHzrdz3cuWC2pLmX1Qq3xEPokl
 vCG1Wg/Q9QOXuYD8i54/5EkdpfK0z80oyFxRABzf4sb0vG7deTT8qZSIufvJHyNR+vwbJ7
 KNHKP1flS2FCKo5eKBzHMPi5HeHCWJArhigoyDWPKutvASTz8f4T938FiIjmBm5hJIwI/R
 y03a3fKtekmMax7aLg9R+WwriVku4cbI2Xz2b1DtP85JQb6HrQ7NxNr93JUoDQZlQWd53K
 raed3dwczWGQqnWhwTQvq2WOqdjIOkaYOuhTg94x/0BWWI3wKnnEVfX4nnVzFg==
From: Andrew Tropin <andrew@HIDDEN>
In-Reply-To: <c76deb583d7ef2d9ecaa173c3c1cdf0a9280aa84.camel@HIDDEN>
Date: Fri, 26 Aug 2022 17:33:18 +0300
Message-ID: <87mtbr13dd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2022-08-19 17:39, Liliana Marie Prikler wrote:

> Am Freitag, dem 19.08.2022 um 09:21 +0300 schrieb Andrew Tropin:
>> On 2022-08-19 06:19, Liliana Marie Prikler wrote:
>> > I think it's possible to cover most of those with heuristics.=C2=A0 For
>> > the rest, we can still override the phase or just rename the file
>> > to something our heuristics handle.
>> >=20
>>=20
>> 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.
>>=20
>> Something like that?
>>=20
>> Will play around with it a little bit and will publish v2 next week.
> I'd word those in terms of for-each, i.e. "build all texinfo files and
> org-mode files".  Don't trust already compiled sources, i.e. if there's
> both README.info and README.org, you still want to generate README.info
> from README.org (though "README" doesn't sound like a particular good
> heuristic for an org-file to makeinfo from).
>
>> > >=20
> Cheers

I went through a few popular packages and came up with conclusion that
it's hard to make good heuristic for automatical documentation build:

1. I tried (find-files "." "\\.(texi|txi|texinfo)$") with consequent
for-each and it doesn't work in general case because it will build files
intended for inclusion, not standalone building.  And it's not fixable
with auxiliary build phase.  Examples: geiser, dash.  It seems that we
need to decide manually for each package, which documentation files to
build.

2. Adding automatic documentation build phase also means that almost all
emacs packages will be rebuild and we don't know what documentation will
be shipped (if it useful doc compiled from texinfo or almost empty
README.org).

It seems that manual approach is more precise, less intrusive and helps
to get rid of many custom and non-uniform documentation build phases.

I'll check a few more emacs packages I use and will send updated
implementation of #:documentation-files argument.

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmMI2a4ACgkQIgjSCVjB
3rAE7w/9EMMmMVurXQE0dETQPiikNEolzL3kEWgmZG+J9smv4fm0XHYfXpbJ9b+J
0aeeOH4SbCH3cn7Zfs5lCm4D1dXQ1WGTu14C/0+yqiHESoJXhzYTvsY3enWeRlXM
WSjPlPP2RGJlXGulCkBDPINUaLDCd7KHKlY/pp7KdX03WwEteMiM+Sr4r3PvB3DX
3dMmU0tte4EMjCDaSA3QKSJeay1MwJw4LAxG7wgeuiIuqQcGpYHLeJiMYc0vaqt3
poyryTCaOFU02d1iBvgt6b3fmpB7lkKsCRzhnd4u50YTc13Dx9n9ICjHWWUpmggp
nssnfGCx/5OzVSAstYBwL/YS+TLNwGVr4rBia/Gvqoc5f0bCK6WrpcRvrA7JMymL
mlThWzjm0s+dkYNRODRFTz9swSNZgmrm+D/iWISF+Np6aDphIXvSEOJ4KUB1g6dc
/9ROAJbUMzvPGtzx4zjh4/j95pj1aIesXkFstaQ0VHFAmd1crj8mQgFNi7a54Ca1
Jm0yP5sgqfSfdWuqm06ObbgIuOqkBrkfcZg3F1N/EMGy5P8R6y5X0lehnCAkr6EH
OuE0OO6M8GKJb1wjPkqOCw1T3dGrgxc9hCaalVL0/ekcYuDpoDumTXWGVgOBsN0+
Yf9rBVMxcAKIK0DYvPK+h9EpiPC+Rc8qX6906+tl6GCyFN2MkoA=
=uYib
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 29 Aug 2022 16:39:02 +0000
Resent-Message-ID: <handler.57280.B57280.166179111330651 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Andrew Tropin <andrew@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.166179111330651
          (code B ref 57280); Mon, 29 Aug 2022 16:39:02 +0000
Received: (at 57280) by debbugs.gnu.org; 29 Aug 2022 16:38:33 +0000
Received: from localhost ([127.0.0.1]:33703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oShmS-0007yI-OW
	for submit <at> debbugs.gnu.org; Mon, 29 Aug 2022 12:38:32 -0400
Received: from mail-ed1-f67.google.com ([209.85.208.67]:39843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oShmR-0007y5-10
 for 57280 <at> debbugs.gnu.org; Mon, 29 Aug 2022 12:38:31 -0400
Received: by mail-ed1-f67.google.com with SMTP id z8so2071607edb.6
 for <57280 <at> debbugs.gnu.org>; Mon, 29 Aug 2022 09:38:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc;
 bh=vAa8kyeAEyOOOPDSAGnl9wsgnFbffrHI7dSqjjkWolY=;
 b=BgEsWovMMFUapo9D491KubBY3KY0w5iyttCz6AGCyJifRovjuLXlSQBucyMunYFjqM
 ey5AZKQVDlMoaSYwrpWh79Xrc/jcA2BKGgi75qZ5Qm2XeTf69Iiz0u+HtPbQjeEimR7U
 xPpA9rNiWZ9r9CvZmYYocVZ6kLIMI/yAm8R5BVnflkshJcEHCdkLPhBrRm4nIXYNvF1n
 ZnEXVdhpjlZ2nLcELYScGVGZzuqZeIOwwG1hkqB2rNpjPzmMIr9fY7yI1nF/EP9Rui7j
 hZO+burHM9aJrKdIHfjsNaIawpA788wA5aItYML6s4FqrhZ8OXHMPh/L4Mo3Ef0HlRCG
 PAUw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc;
 bh=vAa8kyeAEyOOOPDSAGnl9wsgnFbffrHI7dSqjjkWolY=;
 b=G+7t53CvJjHSRvT4FO+6aIhpql4RRbV/v6bIT9SX+zplkornjCgzFJtV7WUsM6mgCO
 eFBiRFxRJTEVdhYsSSCmlIlGfkNbvhmaEtTyvkKn0Wf4W60DIj8H0d/22wUtASqb/yGZ
 R0ivZ4ALpawLOdoiksLMys5MezYAOezTvBwyu865equMo3qvElNEvWjWRMfjR8BLop/M
 mV+AdB8fKPluEJNaHzUx0vwybdA84/5hGBVDP/3OdhGKHkO3/UPoif7Noc4seH5ZXxXb
 NOrsafJMT3r/lsxa4SXGqielH4jJuyLjsrpWqOJjOkfjPXD66/wYm6nUfF/CO3/TEBmF
 E8Jw==
X-Gm-Message-State: ACgBeo0LpK7AQfsz1S7X+sM3z0AM3C4wJM0H/HQ2NS6RmKf+2MxvtiM4
 jphSPzUDtwiAeTJD9NbMlzw=
X-Google-Smtp-Source: AA6agR7wL5rhDlVtLq08yZz+TsI1lVH6ht08zy3xDh9nCoDuTAyH4NL9Rzm4RKXEFchVAbs+QhuXOg==
X-Received: by 2002:a05:6402:1d54:b0:447:b1f7:9ecf with SMTP id
 dz20-20020a0564021d5400b00447b1f79ecfmr16664622edb.425.1661791105055; 
 Mon, 29 Aug 2022 09:38:25 -0700 (PDT)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 kw5-20020a170907770500b0073d645e6dd8sm4624448ejc.223.2022.08.29.09.38.24
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 29 Aug 2022 09:38:24 -0700 (PDT)
Message-ID: <6f1b7bc2361cd375ee54abbeb1e9c4091329283b.camel@HIDDEN>
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Date: Mon, 29 Aug 2022 18:38:22 +0200
In-Reply-To: <87mtbr13dd.fsf@HIDDEN>
References: <87mtbr13dd.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Am Freitag, dem 26.08.2022 um 17:33 +0300 schrieb Andrew Tropin:

> > > > 
> > Cheers
> 
> I went through a few popular packages and came up with conclusion
> that it's hard to make good heuristic for automatical documentation
> build:
> 
> 1. I tried (find-files "." "\\.(texi|txi|texinfo)$") with consequent
> for-each and it doesn't work in general case because it will build
> files intended for inclusion, not standalone building.
Fair enough, there's probably similar issues with org etc.  That said,
wouldn't the top-level info/org/whatever file share the package name?

> 2. Adding automatic documentation build phase also means that almost
> all emacs packages will be rebuild
That's why I'm currently delaying native-comp until all other changes
to emacs-build-system are done.

> It seems that manual approach is more precise, less intrusive and
> helps to get rid of many custom and non-uniform documentation build
> phases.
If you're going for a "manual" approach, I'd suggest instead making a
curried ((build-documentation #:texinfo-files #:texinfo-regexp ...)
#:outputs ...) so that the files can be written directly into the (add-
after ...) syntax.

Cheers




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Andrew Tropin <andrew@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Tue, 30 Aug 2022 08:16:02 +0000
Resent-Message-ID: <handler.57280.B57280.166184735224615 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.166184735224615
          (code B ref 57280); Tue, 30 Aug 2022 08:16:02 +0000
Received: (at 57280) by debbugs.gnu.org; 30 Aug 2022 08:15:52 +0000
Received: from localhost ([127.0.0.1]:34682 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oSwPY-0006Ow-9n
	for submit <at> debbugs.gnu.org; Tue, 30 Aug 2022 04:15:52 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:54413)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1oSwPV-0006Og-DL
 for 57280 <at> debbugs.gnu.org; Tue, 30 Aug 2022 04:15:50 -0400
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 921DAFF809;
 Tue, 30 Aug 2022 08:15:40 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1661847343;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=9feKESxnp9S+bEKqkS+kqxklM0jwXcBQkq29DdJvJg8=;
 b=HW28nJDTiriA1U1/BbzFxIeEBb9erTjyVlNNGH9bEBGheygt0hrb9kv5vyVf71qw5gliB3
 Gg9Veoyc2Ye90WdP0xYaFGQefpIjyE6FKfMdidG2EIlE7SUwF/af2vq9f7PKXaeYW6jSH/
 uEAQeECEA8NswhcwMDy6lSSkSf7+oYZCK1ATs1RbkcZzdh5KYfopiyKO6wci0lIg8GPi+b
 8POach7VM3cfoyzE3AwdoSwJTzBxkmbu/aOnSqtNEYhGelCKH/bM+rfpkEkP7NMwNVZndp
 OPXo7y/KqNao9Gs9AasLAwpFiS+1UFrpU85J+RYEEGRmEECkPe9uZ9xie0M3rQ==
From: Andrew Tropin <andrew@HIDDEN>
In-Reply-To: <6f1b7bc2361cd375ee54abbeb1e9c4091329283b.camel@HIDDEN>
References: <87mtbr13dd.fsf@HIDDEN>
 <6f1b7bc2361cd375ee54abbeb1e9c4091329283b.camel@HIDDEN>
Date: Tue, 30 Aug 2022 11:15:37 +0300
Message-ID: <87bks22lli.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On 2022-08-29 18:38, Liliana Marie Prikler wrote:

> Am Freitag, dem 26.08.2022 um 17:33 +0300 schrieb Andrew Tropin:
>
>> > > >=20
>> > Cheers
>>=20
>> I went through a few popular packages and came up with conclusion
>> that it's hard to make good heuristic for automatical documentation
>> build:
>>=20
>> 1. I tried (find-files "." "\\.(texi|txi|texinfo)$") with consequent
>> for-each and it doesn't work in general case because it will build
>> files intended for inclusion, not standalone building.
> Fair enough, there's probably similar issues with org etc.  That said,
> wouldn't the top-level info/org/whatever file share the package name?
>

In many cases, yes it would, but not always.

magit: ("docs/magit.texi" "docs/magit-section.texi")
geiser: ("doc/geiser.texi")
geiser-guile: ("geiser-guile.texi")
dash: ("dash.texi")
orderless: ("orderless.texi")
consult/cape/tempel: ("README.org")
cider: ("doc/modules/ROOT/nav.adoc")
all-the-icons: ("README.md")
citar: ("README.org")
org-roam: ("doc/org-roam.texi")
debbugs: ("debbugs.texi" "debbugs-ug.texi")
modus-themes: ("doc/modus-themes.org")

>> 2. Adding automatic documentation build phase also means that almost
>> all emacs packages will be rebuild
> That's why I'm currently delaying native-comp until all other changes
> to emacs-build-system are done.
>
>> It seems that manual approach is more precise, less intrusive and
>> helps to get rid of many custom and non-uniform documentation build
>> phases.
> If you're going for a "manual" approach, I'd suggest instead making a
> curried ((build-documentation #:texinfo-files #:texinfo-regexp ...)
> #:outputs ...) so that the files can be written directly into the (add-
> after ...) syntax.

Do you mean to make a helper function, which can be used to generate a
closure of build phase, which can be added with replace/add-after?

Another idea is to make a separate functions for different documentation
type: build-{texinfo,markdown,org,etc}-documentation.  Also, it seems
useful outside of emacs-build-system as well.

In such case user will need to accomplish following steps: 1. add
texinfo/pandoc/emacs-org dependency 2. use modify-phases to add
(build-{texinfo,whatever}-documentation #:texinfo-files
'("doc/manual.{texi,whatever}")), seems a little less convenient than
simple #:documentation-files #~(list "manual.{texi,whatever}"), but also
work, at least documentation will be built more uniformly for different
packages.

WDYT?

=2D-=20
Best regards,
Andrew Tropin

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmMNxykACgkQIgjSCVjB
3rDvzBAAh7YpdzAatG8Ja8UWyB+jDUi4jFp8hXNX6nvdI+82so9cGAkzF4d0yRhV
vVOVi9JcJ9yliSdR1PiljIxvnTsZkIVe8WFWUl9RbC3FAJzdSjdtCf4I4JGs42B0
7TI9GiE4bb7mbCGR1ZEqIQ4GpFwHsIyHgnE+klz+CHx0haMczt8tuDWaQjOKtD2I
yTqV+PPsXmk3SOI9xiRF1f2jPG95ICGVk+/2kLXkYLA2MjR91syXYWM3q3XG7MGO
Xo5O66R4lAUqkktgb7TIG7huxghPvmlzP2IJRGths53Sfg2MkTmfUFWYew1dMSSU
soAxwXurjGt9K5XYZMZDRMd0ErwvoX47C+gG4HVBoM6/sJJMYEWlfgPpu/VgcXD/
3KDiW36l/AH3mt/EGmer5cQ7NGMleeP6igLMdfXmNVyAnjivefpWrUKUWsbyKOua
9llVbCgGdQQMkoj8qwmV5KJP84T9LGlWBQOm/r7UsI8rKnuaPi+q8ENIPfrBoRqR
33oFXOOJWXjom+ptzODJS7zo+/mM4rWZQu6vQuvqpJ1/NUXkbQSdIrFJ0Mhqo+ii
YUic9X44apaPjE6X8jSvdvZkaeFL60Kqua7b6sJ06az0HTO9tER1W6LLB/NSLWAZ
Rc9wKhKYzGcW/zREFJYbjzy2+hH9+LwrO6eJBvSJDowkM1Qt/k4=
=tJA0
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Tue, 30 Aug 2022 08:30:02 +0000
Resent-Message-ID: <handler.57280.B57280.166184814725881 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Andrew Tropin <andrew@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.166184814725881
          (code B ref 57280); Tue, 30 Aug 2022 08:30:02 +0000
Received: (at 57280) by debbugs.gnu.org; 30 Aug 2022 08:29:07 +0000
Received: from localhost ([127.0.0.1]:34695 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oSwcM-0006jN-HM
	for submit <at> debbugs.gnu.org; Tue, 30 Aug 2022 04:29:06 -0400
Received: from mail-ed1-f67.google.com ([209.85.208.67]:40449)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oSwcK-0006ip-HG
 for 57280 <at> debbugs.gnu.org; Tue, 30 Aug 2022 04:29:05 -0400
Received: by mail-ed1-f67.google.com with SMTP id m1so13195870edb.7
 for <57280 <at> debbugs.gnu.org>; Tue, 30 Aug 2022 01:29:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc;
 bh=Q+ZcQiuz9DD6Wy9H3OL+T8+IJOxY6mmRHjpe0dte4AU=;
 b=ggUBzcYH/6X99FCgb6IlWb+6Zn4U+sPyHdGHyG7VfRM76UQIFvnN1lO77cfdSYL/p2
 KW+/+RU1FlLY3E+3euIxvyVjvpC3n/JdBA2/3h9tcunfkAn097WE9X6sqWMnb9W8RymK
 Y60ymkXx2FRUzu4zA90ua45htRSDdeaScMvvXpAREYxDsgXbHeHcXh3aJL9gEozd+fD8
 7kNj8d6qWmrvUmLum7DPljXiiUE4qzIF0ECHoi2YNJU/8e033d0uhTQmEuq79You/NGM
 4YMOif24bNTAybST6liTYUYOAzIsUlj2dCGTxFvEE7UCVodPpiMM0sp/BW1Xd5v9UyLa
 Wmwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc;
 bh=Q+ZcQiuz9DD6Wy9H3OL+T8+IJOxY6mmRHjpe0dte4AU=;
 b=3XjyBz1JkXy4hQudvur4wAAa+iLPyG44jJ64ulZIvUVlEh0Kr1wjSNsRTsPWaUtTSn
 eduhNABhjYSLBzgcuvxUcmtkhqaPq9e8t/MxVwvRN8eMBzDAzs0AcxxL5ZWaViLJNAIM
 WDkhh+yxpA4aqjtBRjlf7r+SVYfOk/7IE0HhNDYbbOywbf5qBocFRNrEEisfLdd7Hy48
 SbuxtHvtzrAUiiCI/uUT6O2YDiY7H+LvcaGKBmcrnJ0FaGBxXieBt7WdnXohJmgEAS4C
 EXpD+l34D69GTRO9tnxQRUYXHeVujEd3wqTqYDFhh6IScwBzS0ThgPCzYkkZbyAqvog5
 VrwQ==
X-Gm-Message-State: ACgBeo00qSJ/HEk7MTi325M/gLfjh+ZcxAplznJPwQVmVVE3qn8wfwWn
 dmw75a+mlpJHgKGQMY6UJYs=
X-Google-Smtp-Source: AA6agR74QZtLYM2WJ0qSZ5skk5+QY0V/SzvUAIBJO6tHqXo0Mqq3rPzfzSEWozN9WtpNOAejhUUAeA==
X-Received: by 2002:aa7:c956:0:b0:43b:206d:c283 with SMTP id
 h22-20020aa7c956000000b0043b206dc283mr19354628edt.381.1661848138611; 
 Tue, 30 Aug 2022 01:28:58 -0700 (PDT)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 kz13-20020a17090777cd00b0073d753759fasm5547527ejc.172.2022.08.30.01.28.57
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 30 Aug 2022 01:28:57 -0700 (PDT)
Message-ID: <4b09e4416d637e121a71a316c1eb5d8912b05430.camel@HIDDEN>
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Date: Tue, 30 Aug 2022 10:28:56 +0200
In-Reply-To: <87bks22lli.fsf@HIDDEN>
References: <87mtbr13dd.fsf@HIDDEN>
 <6f1b7bc2361cd375ee54abbeb1e9c4091329283b.camel@HIDDEN>
 <87bks22lli.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Am Dienstag, dem 30.08.2022 um 11:15 +0300 schrieb Andrew Tropin:
> On 2022-08-29 18:38, Liliana Marie Prikler wrote:
> 
> > Am Freitag, dem 26.08.2022 um 17:33 +0300 schrieb Andrew Tropin:
> > 
> > > > > > 
> > > > Cheers
> > > 
> > > I went through a few popular packages and came up with conclusion
> > > that it's hard to make good heuristic for automatical
> > > documentation
> > > build:
> > > 
> > > 1. I tried (find-files "." "\\.(texi|txi|texinfo)$") with
> > > consequent
> > > for-each and it doesn't work in general case because it will
> > > build
> > > files intended for inclusion, not standalone building.
> > Fair enough, there's probably similar issues with org etc.  That
> > said,
> > wouldn't the top-level info/org/whatever file share the package
> > name?
> > 
> 
> In many cases, yes it would, but not always.
> 
> magit: ("docs/magit.texi" "docs/magit-section.texi")
Is magit-section a top-level file?

> geiser: ("doc/geiser.texi")
I think trying docs?/whatever is good praxis, so I count that as a hit.

> geiser-guile: ("geiser-guile.texi")
Hit.

> dash: ("dash.texi")
Hit.

> orderless: ("orderless.texi")
Hit.

> consult/cape/tempel: ("README.org")
Hit for README.whatever

> cider: ("doc/modules/ROOT/nav.adoc")
Miss.

> all-the-icons: ("README.md")
Hit for README.whatever

> citar: ("README.org")
Hit for README.whatever

> org-roam: ("doc/org-roam.texi")
Hit.

> debbugs: ("debbugs.texi" "debbugs-ug.texi")
Is debbugs-ug a top-level file?

> modus-themes: ("doc/modus-themes.org")
Hit.

> > 
> > 
> > > It seems that manual approach is more precise, less intrusive and
> > > helps to get rid of many custom and non-uniform documentation
> > > build
> > > phases.
> > If you're going for a "manual" approach, I'd suggest instead making
> > a curried ((build-documentation #:texinfo-files #:texinfo-regexp
> > ...)
> > #:outputs ...) so that the files can be written directly into the
> > (add-after ...) syntax.
> 
> Do you mean to make a helper function, which can be used to generate
> a closure of build phase, which can be added with replace/add-after?
> 
> Another idea is to make a separate functions for different
> documentation
> type: build-{texinfo,markdown,org,etc}-documentation.  Also, it seems
> useful outside of emacs-build-system as well.
Hmm, if we wanted to make that even more generic than just emacs, it'd
go to core-updates.  

> In such case user will need to accomplish following steps: 1. add
> texinfo/pandoc/emacs-org dependency 2. use modify-phases to add
> (build-{texinfo,whatever}-documentation #:texinfo-files
> '("doc/manual.{texi,whatever}")), seems a little less convenient than
> simple #:documentation-files #~(list "manual.{texi,whatever}"), but
> also work, at least documentation will be built more uniformly for
> different packages.
> 
> WDYT?
I think if we want to go this more generic route, we'd have to redesign
this a little.  For instance, (build-texinfo-documentation) should take
regular expressions as remaining arguments.  As for the native-inputs
required, there has already been a precedent set with bash-minimal that
anything requiring extraneous inputs needs to declare them explicitly.

Cheers 




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
References: <87mtc18ko9.fsf@HIDDEN>
Resent-From: Andrew Tropin <andrew@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Wed, 31 Aug 2022 09:37:01 +0000
Resent-Message-ID: <handler.57280.B57280.16619385821086 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.16619385821086
          (code B ref 57280); Wed, 31 Aug 2022 09:37:01 +0000
Received: (at 57280) by debbugs.gnu.org; 31 Aug 2022 09:36:22 +0000
Received: from localhost ([127.0.0.1]:38228 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oTK8z-0000HR-4X
	for submit <at> debbugs.gnu.org; Wed, 31 Aug 2022 05:36:21 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:35773)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andrew@HIDDEN>) id 1oTK8u-0000H8-OH
 for 57280 <at> debbugs.gnu.org; Wed, 31 Aug 2022 05:36:20 -0400
Received: (Authenticated sender: andrew@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 9A01C40010;
 Wed, 31 Aug 2022 09:36:09 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1;
 t=1661938570;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to; bh=ISCeWSTbmsI+1UoOihwtRiS0bzSWZSMlWhLFYsuiyNs=;
 b=ThgO+P0Ph4qanoVuGstRF14ZEWa5AOWNTdwXVd64QjRK1RKANRjMI9oIP+twPHlbt9Ho6m
 KT/r3b7LILwtvo3cVPXEgaIugE9tdOozOF1TxlJe8L6GHYTdikQP5rPJX8wfRazxiVvPPH
 h7ii7NQL44E4sAZB1eMVJeCFKDogUyADEHQ2jg9dmekr396OcAfxhsMiHUfnWppze596yS
 xVYY0xk34+aqlWPgMgbnQoBLp+Ez2V0zptmUYiBWUNFO9UoUwLqD2Il3qc6sURiTGBNhrz
 jJsUeJU0PyWpcGQ+sSXD2VyLbHBsR/mg7qR4QsNNXg0xDNmKqdVzrSjeXRNLQg==
From: Andrew Tropin <andrew@HIDDEN>
In-Reply-To: <4b09e4416d637e121a71a316c1eb5d8912b05430.camel@HIDDEN>
Date: Wed, 31 Aug 2022 12:36:06 +0300
Message-ID: <87v8q8u54p.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2022-08-30 10:28, Liliana Marie Prikler wrote:

> Am Dienstag, dem 30.08.2022 um 11:15 +0300 schrieb Andrew Tropin:
>> On 2022-08-29 18:38, Liliana Marie Prikler wrote:
>>=20
>> > Am Freitag, dem 26.08.2022 um 17:33 +0300 schrieb Andrew Tropin:
>> >=20
>> > > > > >=20
>> > > > Cheers
>> > >=20
>> > > I went through a few popular packages and came up with conclusion
>> > > that it's hard to make good heuristic for automatical
>> > > documentation
>> > > build:
>> > >=20
>> > > 1. I tried (find-files "." "\\.(texi|txi|texinfo)$") with
>> > > consequent
>> > > for-each and it doesn't work in general case because it will
>> > > build
>> > > files intended for inclusion, not standalone building.
>> > Fair enough, there's probably similar issues with org etc.=C2=A0 That
>> > said,
>> > wouldn't the top-level info/org/whatever file share the package
>> > name?
>> >=20
>>=20
>> In many cases, yes it would, but not always.
>>=20
>> magit: ("docs/magit.texi" "docs/magit-section.texi")
> Is magit-section a top-level file?

Yes.  In 3.3.0 it's Documentation/magit.texi and
Documentation/magit-section.texi, but in recent not yet released
version it's ("docs/magit.texi" "docs/magit-section.texi"), there are
also org counterparts of magit and magit-section files, but they are in
sync with texi files.

>
>> geiser: ("doc/geiser.texi")
> I think trying docs?/whatever is good praxis, so I count that as a hit.
>
>> geiser-guile: ("geiser-guile.texi")
> Hit.
>
>> dash: ("dash.texi")
> Hit.
>
>> orderless: ("orderless.texi")
> Hit.
>
>> consult/cape/tempel: ("README.org")
> Hit for README.whatever
>
>> cider: ("doc/modules/ROOT/nav.adoc")
> Miss.
>
>> all-the-icons: ("README.md")
> Hit for README.whatever
>
>> citar: ("README.org")
> Hit for README.whatever
>
>> org-roam: ("doc/org-roam.texi")
> Hit.
>
>> debbugs: ("debbugs.texi" "debbugs-ug.texi")
> Is debbugs-ug a top-level file?

Yes, the second one is User Guide.

>
>> modus-themes: ("doc/modus-themes.org")
> Hit.
>
>> >=20
>> >=20
>> > > It seems that manual approach is more precise, less intrusive and
>> > > helps to get rid of many custom and non-uniform documentation
>> > > build
>> > > phases.
>> > If you're going for a "manual" approach, I'd suggest instead making
>> > a curried ((build-documentation #:texinfo-files #:texinfo-regexp
>> > ...)
>> > #:outputs ...) so that the files can be written directly into the
>> > (add-after ...) syntax.
>>=20
>> Do you mean to make a helper function, which can be used to generate
>> a closure of build phase, which can be added with replace/add-after?
>>=20
>> Another idea is to make a separate functions for different
>> documentation
>> type: build-{texinfo,markdown,org,etc}-documentation.=C2=A0 Also, it see=
ms
>> useful outside of emacs-build-system as well.
> Hmm, if we wanted to make that even more generic than just emacs, it'd
> go to core-updates.=20=20
>
>> In such case user will need to accomplish following steps: 1. add
>> texinfo/pandoc/emacs-org dependency 2. use modify-phases to add
>> (build-{texinfo,whatever}-documentation #:texinfo-files
>> '("doc/manual.{texi,whatever}")), seems a little less convenient than
>> simple #:documentation-files #~(list "manual.{texi,whatever}"), but
>> also work, at least documentation will be built more uniformly for
>> different packages.
>>=20
>> WDYT?
> I think if we want to go this more generic route, we'd have to redesign
> this a little.  For instance, (build-texinfo-documentation) should take
> regular expressions as remaining arguments.=20=20

What can be a good place (module) for such build phases?

> As for the native-inputs required, there has already been a precedent
> set with bash-minimal that anything requiring extraneous inputs needs
> to declare them explicitly.

I think it will work, need to experiment with (build-*-documentation) to
get the feeling.


Attaching the latest version of the documentation-files patch I have:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=v2-0001-build-system-emacs-Add-documentation-files-argume.patch
Content-Transfer-Encoding: quoted-printable

From=20a1534b2158c97986e1048379661ee9d250ad6c02 Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@HIDDEN>
Date: Thu, 18 Aug 2022 17:43:14 +0300
Subject: [PATCH v2 1/2] build-system: emacs: Add documentation-files argume=
nt.

Allows to build info files from texinfo or org.

* guix/build-system/emacs.scm (default-texinfo): New variable.
* guix/build-system/emacs.scm (lower): New arguments.
* guix/build/emacs-build-system.scm (generate-docs): New variable.
=2D--
 guix/build-system/emacs.scm       | 16 ++++++++++++++--
 guix/build/emacs-build-system.scm | 22 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/guix/build-system/emacs.scm b/guix/build-system/emacs.scm
index 3df68789ff..02379ee54c 100644
=2D-- a/guix/build-system/emacs.scm
+++ b/guix/build-system/emacs.scm
@@ -56,8 +56,16 @@ (define (default-emacs)
   (let ((emacs-mod (resolve-interface '(gnu packages emacs))))
     (module-ref emacs-mod 'emacs-minimal)))
=20
+(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
+                (texinfo (default-texinfo))
                 (emacs (default-emacs))
                 #:allow-other-keys
                 #:rest arguments)
@@ -76,8 +84,10 @@ (define private-keywords
=20
                         ;; Keep the standard inputs of 'gnu-build-system'.
                         ,@(standard-packages)))
=2D         (build-inputs `(("emacs" ,emacs)
=2D                         ,@native-inputs))
+         (build-inputs `(,@native-inputs
+                         ("emacs" ,emacs)
+                         ;; ,@(if (null? documentation-files) '() )
+                         ("texinfo" ,texinfo)))
          (outputs outputs)
          (build emacs-build)
          (arguments (strip-keyword-arguments private-keywords arguments)))=
))
@@ -87,6 +97,7 @@ (define* (emacs-build name inputs
                       (tests? #f)
                       (parallel-tests? #t)
                       (test-command ''("make" "check"))
+                      (documentation-files ''())
                       (phases '%standard-phases)
                       (outputs '("out"))
                       (include (quote %default-include))
@@ -109,6 +120,7 @@ (define builder
                        #:test-command #$test-command
                        #:tests? #$tests?
                        #:parallel-tests? #$parallel-tests?
+                       #:documentation-files #$documentation-files
                        #:phases #$phases
                        #:outputs #$(outputs->gexp outputs)
                        #:include #$include
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-sys=
tem.scm
index 6a6918bfdd..3ffa196862 100644
=2D-- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -274,6 +274,27 @@ (define (match-stripped-file action regex)
                            (install-file? file stat #:verbose? #t)))
       #f))))
=20
+(define* (generate-documentation
+          #:key outputs documentation-files
+          #:allow-other-keys)
+  "Convert texinfo or org files specified in DOCUMENTATION-FILES argument =
to
+info files.  And move info files site-lisp directory."
+  (for-each (lambda (f)
+              (if (regexp-exec
+                   (make-regexp "\\.(txi|texi|texinfo)" regexp/icase)
+                   f)
+                  (invoke "makeinfo" f)
+                  (emacs-batch-script ; else org file
+                   `(progn
+                     (require 'ox-texinfo)
+                     (find-file ,f)
+                     (org-texinfo-export-to-info)))))
+            documentation-files)
+  (for-each (lambda (f)
+              (install-file f (string-append (assoc-ref outputs "out")
+                                             %install-dir)))
+            (find-files "." "\\.info$")))
+
 (define* (move-doc #:key outputs #:allow-other-keys)
   "Move info files from the ELPA package directory to the info directory."
   (let* ((out (assoc-ref outputs "out"))
@@ -343,6 +364,7 @@ (define %standard-phases
   (modify-phases gnu:%standard-phases
     (replace 'unpack unpack)
     (add-after 'unpack 'expand-load-path expand-load-path)
+    (add-after 'expand-load-path 'generate-documentation generate-document=
ation)
     (delete 'bootstrap)
     (delete 'configure)
     (delete 'build)
=2D-=20
2.37.2


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=v2-0002-gnu-emacs-xyz-Add-documentation-files-example-usa.patch
Content-Transfer-Encoding: quoted-printable

From=208adbef898ef80851753ba9d64b31eed727bb34de Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@HIDDEN>
Date: Wed, 31 Aug 2022 12:16:10 +0300
Subject: [PATCH v2 2/2] gnu: emacs-xyz: Add documentation-files example usa=
ge.

* gnu/packages/emacs-xyz.scm (emacs-geiser, emacs-geiser-guile, emacs-magit,
emacs-dash, emacs-consult, emacs-tempel): Add documentation-files example
usage.
=2D--
 gnu/packages/emacs-xyz.scm | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 90ee485f1e..df0570a4a1 100644
=2D-- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -262,7 +262,8 @@ (define-public emacs-geiser
         (base32 "1pm33zlcq84h61xhplmrlicckrax1pv39zrmv8ryzhi9mqrb6bdg"))))
     (build-system emacs-build-system)
     (arguments
=2D     '(#:phases
+     '(#:documentation-files (list "doc/geiser.texi")
+       #:phases
        (modify-phases %standard-phases
          ;; Move the source files to the top level, which is included in
          ;; the EMACSLOADPATH.
@@ -271,12 +272,7 @@ (define-public emacs-geiser
              (let ((el-files (find-files "./elisp" ".*\\.el$")))
                (for-each (lambda (f)
                            (rename-file f (basename f)))
=2D                         el-files))))
=2D         (add-before 'install 'make-info
=2D           (lambda _
=2D             (with-directory-excursion "doc"
=2D               (invoke "makeinfo" "--no-split"
=2D                       "-o" "geiser.info" "geiser.texi")))))))
+                         el-files)))))))
     (native-inputs
      (list texinfo))
     (home-page "https://www.nongnu.org/geiser/")
@@ -311,6 +307,7 @@ (define-public emacs-geiser-guile
     (arguments
      (list
       #:include #~(cons "^src/" %default-include)
+      #:documentation-files #~(list "geiser-guile.texi")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-geiser-guile-binary
@@ -978,17 +975,11 @@ (define-public emacs-magit
       #:exclude #~(cons* "magit-libgit.el"
                          "magit-libgit-pkg.el"
                          %default-exclude)
+      #:documentation-files #~(list "Documentation/magit.texi"
+                                    "Documentation/magit-section.texi")
       #:phases
       #~(modify-phases %standard-phases
=2D          (add-after 'unpack 'build-info-manual
=2D            (lambda _
=2D              (invoke "make" "info")
=2D              ;; Copy info files to the lisp directory, which acts as
=2D              ;; the root of the project for the emacs-build-system.
=2D              (for-each (lambda (f)
=2D                          (install-file f "lisp"))
=2D                        (find-files "Documentation" "\\.info$"))))
=2D          (add-after 'build-info-manual 'set-magit-version
+          (add-after 'unpack 'set-magit-version
             (lambda _
               (make-file-writable "lisp/magit.el")
               (emacs-substitute-variables "lisp/magit.el"
@@ -3909,6 +3900,7 @@ (define-public emacs-dash
     (build-system emacs-build-system)
     (arguments
      (list #:tests? #t
+           #:documentation-files #~(list "dash.texi")
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'unpack 'disable-byte-compile-error-on-warn
@@ -9188,6 +9180,7 @@ (define-public emacs-consult
        (sha256
         (base32 "0sy4rn1vjk1g50r8z14hzj8lds6s7ij2zkjqfi6mfash5il75wnq"))
        (file-name (git-file-name name version))))
+    (arguments (list #:documentation-files #~(list "README.org")))
     (build-system emacs-build-system)
     (propagated-inputs (list emacs-compat))
     (home-page "https://github.com/minad/consult")
@@ -14145,6 +14138,7 @@ (define-public emacs-tempel
                (base32
                 "0iyh6wxchqg83gpwvg6lz4qy4c2qh25iqjpjm56kif52346a99d2"))))
     (build-system emacs-build-system)
+    (arguments (list #:documentation-files #~(list "README.org")))
     (home-page "https://github.com/minad/tempel")
     (synopsis "Simple templates for Emacs")
     (description
=2D-=20
2.37.2


--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


=2D-=20
Best regards,
Andrew Tropin

--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmMPK4YACgkQIgjSCVjB
3rBWlBAAh59C6bqMbM7/Z8D/LjfUiibCfubL1TPZ2LUMrJ5nky8Kkvs62CehVQm1
cSdtAqfiJAHO4ru3xKSfOBYMsfutT0vNY0KI93H5KNVqzQVe26Mivd2aqvNzDRrz
UAVz/xQYucCWW4higWOnr5Q8tud7JS+b3umA79TDrRi8VF95huKs8iG2M/P+7gVJ
qBAa7u0HfKsoi8raVNXUKZm6c6KxPL6rTGmx+PWGi9m/b8cKBR9ZNIwMVKTYaegG
dueZZQQ0GijUxQ8CT50yNwzk9fW53oFYGV2UvlIn/N2RIj7ob0Q+UzoU1F7ldU0z
TpCGBYAS373VdxZoUWwkVsv9YkVYWekIUOjY42/SOa8CkB1POIVRa9ouhsoAf/jQ
741ESDyK2EskoK17x2G9d6bMUDqWjaguTj1ItaJyYHRUVOCyPxI5Fi/A8M+zRN+m
t8asNL66RXP7kuM7VzHVq7pyAktKQTPHB/7x77HrTAM91vHH1oQJ2/FoEc0OEk/M
UIWnQk/HaLI78E45YI1buIf0r6w2l9f3qgOmYfOI5b+/McgNcRlVNUa72S1PI1v5
ttdBViHmfnEGs+0qWqPR3XnljnfdJwOJwb5vDlK3oNeDz2XbeGFLcBNUWPn8KqBp
SVUkTh2Tdi7Wn9Xl51zQvYfmCZXqtPfrQpCs2q3fmGighpgF2L0=
=GLod
-----END PGP SIGNATURE-----
--==-=-=--




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system.
Resent-From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Wed, 31 Aug 2022 10:08:01 +0000
Resent-Message-ID: <handler.57280.B57280.16619404704275 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 57280
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Andrew Tropin <andrew@HIDDEN>
Cc: 57280 <at> debbugs.gnu.org
Received: via spool by 57280-submit <at> debbugs.gnu.org id=B57280.16619404704275
          (code B ref 57280); Wed, 31 Aug 2022 10:08:01 +0000
Received: (at 57280) by debbugs.gnu.org; 31 Aug 2022 10:07:50 +0000
Received: from localhost ([127.0.0.1]:38245 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oTKdR-00016t-NE
	for submit <at> debbugs.gnu.org; Wed, 31 Aug 2022 06:07:49 -0400
Received: from mail-ej1-f65.google.com ([209.85.218.65]:40723)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1oTKdQ-00016g-4t
 for 57280 <at> debbugs.gnu.org; Wed, 31 Aug 2022 06:07:49 -0400
Received: by mail-ej1-f65.google.com with SMTP id qh18so7068305ejb.7
 for <57280 <at> debbugs.gnu.org>; Wed, 31 Aug 2022 03:07:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc;
 bh=1Nkcq0CyArYTYGvVAJjyQHYaK7YodwaWfV8mOkLfF6Q=;
 b=fvLEdkr16TS9grzUkBFNzig1/KeEZinLoUn34i5DBEHyqwKQpvC+uC39Rhra3QF0a4
 zdlk05akjC+hQ6hErRATwmOCb2UGRqZLXuXttXiprs31u9YxWLqKzwQLh+YXuo5JzYy6
 16Z4+Xp8bIj9parEnKKoKz5vaMsOA9P2oVBAtl5RYYWl5tg1mThAHwkqPDwnmK8kJRzj
 hrO6v881xcRVgTYYmolqUnMRNhICq83v5525hp5E3CsYUYJEijlxcC305RtILj5lB+Oa
 HaK4ToH5gygpX36EHBYpsC4qHZsbyZSUwiczmA0MjKKypm5NgY/zZRqTZv1Qgy+IXVXX
 8eVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:user-agent:references
 :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
 :from:to:cc;
 bh=1Nkcq0CyArYTYGvVAJjyQHYaK7YodwaWfV8mOkLfF6Q=;
 b=6wcqDg5+9oBL7LeAflWCwfYiDj9n6L27GF09nzH+4v6YEWD/esSzOt8zjvfi0hdCpA
 /i8v+7G42TUw/pV90ABrgDiog586r+ST5vkMzHFpyEC1i3pcXjTTOrAUwzF4Mn2R6L69
 tvK/rcEEL4q+Ud7rLHxMhJBTKh7e5T6gAfpz8u31tsgLm+8ePKdprzDISjbbTS9LdrQ/
 qb4f7EikgJ6SJvWopQNdaRklVrmQ+C5+ku0/P3VxrdbzRpUJY/bySU/znnXZ5E/m57wr
 ywyIk1ILI4TtT9GtTVkyHI1sjBYr1/4v0b2JyijkqMJydTaOQ7mZPi2kWtjirjBPmG5N
 IRgA==
X-Gm-Message-State: ACgBeo0kh2fL1LC25lg7OpmvSiqsDhj4pyJhQQi5dkrfvyhWMXe1U/6g
 zeLi1/QdV4RaUkefmK9Bx8s=
X-Google-Smtp-Source: AA6agR4yZ9RyrRyw9p12jIOuCDyx95UGhL+7kxTTQS4ZaPTa3jF9os1lfOSj+2krhqRB+NpT3fBMRA==
X-Received: by 2002:a17:907:724d:b0:731:8022:94e9 with SMTP id
 ds13-20020a170907724d00b00731802294e9mr20585079ejc.172.1661940462332; 
 Wed, 31 Aug 2022 03:07:42 -0700 (PDT)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 bi26-20020a170906a25a00b0072b7d76211dsm6934064ejb.107.2022.08.31.03.07.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 31 Aug 2022 03:07:41 -0700 (PDT)
Message-ID: <64cd6f7171047bfe95ba9621c4616b9288b7dba9.camel@HIDDEN>
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Date: Wed, 31 Aug 2022 12:07:40 +0200
In-Reply-To: <87v8q8u54p.fsf@HIDDEN>
References: <87v8q8u54p.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Am Mittwoch, dem 31.08.2022 um 12:36 +0300 schrieb Andrew Tropin:
> > I think if we want to go this more generic route, we'd have to
> > redesign this a little.  For instance, (build-texinfo-
> > documentation) should take
> > regular expressions as remaining arguments.  
> 
> What can be a good place (module) for such build phases?
I was thinking (guix build utils).  Of course, one could introduce a
new module, but doing that would come with even more downsides in terms
of UX (or PX if we're pedantic).

> Attaching the latest version of the documentation-files patch I have
Looking at this patch, perhaps we'd also have to allow customizing
command line options.  Also, as for installing, I think this should be
handled by the install phase, which already has includes
"^[^/]*\\.info$" and "^doc/.*\\.info$" by default.  Thus, you only need
to build documentation before the install phase.

Cheers





Last modified: Wed, 31 Aug 2022 10:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.