From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +OBRJUcG/2L0bQEAbAwnHQ (envelope-from ) for ; Fri, 19 Aug 2022 05:40:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aIklJUcG/2KJ3wAAauVa8A (envelope-from ) for ; Fri, 19 Aug 2022 05:40:55 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3E2A01D794 for ; Fri, 19 Aug 2022 05:40:55 +0200 (CEST) Received: from localhost ([::1]:41772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOssQ-0001h6-2N for larch@yhetil.org; Thu, 18 Aug 2022 23:40:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOslm-0006Qv-BX for guix-patches@gnu.org; Thu, 18 Aug 2022 23:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOslm-00049O-2M for guix-patches@gnu.org; Thu, 18 Aug 2022 23:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOsll-0003BV-Lf for guix-patches@gnu.org; Thu, 18 Aug 2022 23:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Aug 2022 03:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 57280@debbugs.gnu.org Received: via spool by 57280-submit@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 ) id 1oOsl5-0003AY-WF for submit@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 ) id 1oOsky-0003AF-OG for 57280@debbugs.gnu.org; Thu, 18 Aug 2022 23:33:18 -0400 Received: (Authenticated sender: andrew@trop.in) 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 In-Reply-To: <107d9c475d47842d67db4f0a7d85d63ae11f9f3c.camel@gmail.com> References: <87wnb5lhyr.fsf@trop.in> <107d9c475d47842d67db4f0a7d85d63ae11f9f3c.camel@gmail.com> Date: Fri, 19 Aug 2022 06:33:02 +0300 Message-ID: <87k074gb69.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660880455; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=ClDbi93EJ6sbl2S5buEETJ0iymgATsFWiAll7CC3eAw=; b=hnxjDxH4nbRfJBBJ9Rlx+JiJRA7VuzBpovO8c7ePsjlsDCDnuGBx3/zLlzdoy/C+F783ii LwcX14BZprLYijugQZtHDIbKKSoEXTdCnaxwu4o7GohAdVbAdmnMsSrtohTG7A6HP5lZJo WQFHFOTeUu3U/OBasG7Tos5BunV/Qk6m+Q+SawnHU4yY7PyvhOgVJI2OuyR73HdJNbN4aw lGKcKm1oG+wpiuB89ArrWz1PBGx5Cb3dcLGDACGNzRjAqIBC6wkrjoPGSX2ulGirEErCZ/ 8uwrj6tuPJIg0qn3gsRH1Mkt/KAPimlIcCHf85Q/ly96LSelel8UZtNk6FJEaQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660880455; a=rsa-sha256; cv=none; b=W+6q6OjGJd714p61y0nI1h7YDthOLEioV9Bv12TRVacWUegz3c+dwrB78xE1r3sW9qq14R ZIIvcbZd5GJyU1ExwQYZ1wgbug8z3/PxurLqmoehidKpLldlZ3NSjgiyfsD1vxLAqsDTBh onX2WcqY4T+FmdV7m8IDeMIqciVq1SkqgEiKydb3YX3xT0Z3mQJfwfnXIzH3FTRBXSiOdQ WDrmBTIGdvUqcRAzsisQtqr2KwvacUuhFJMejkvXtv7AAKZWjH2vl+XUlpGuWaUKH5Bepc 0pH4YXwcVIPLryCVe1Hn6/DpR+i+RILYg6HuTdwNHmcpnSlr/qo4RqEBinW6Iw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=cYgXZWSj; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=cYgXZWSj; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3E2A01D794 X-Spam-Score: -1.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: Xlz+AMAMDUz+ --=-=-= 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----- --=-=-=--