From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id c99kBoq4mmFxPAEAgWs5BA (envelope-from ) for ; Sun, 21 Nov 2021 22:22:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OHtaAYq4mmERDwAA1q6Kng (envelope-from ) for ; Sun, 21 Nov 2021 21:22:18 +0000 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 7CA06E35D for ; Sun, 21 Nov 2021 22:22:17 +0100 (CET) Received: from localhost ([::1]:59572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mouHw-0007PO-6q for larch@yhetil.org; Sun, 21 Nov 2021 16:22:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mouHi-0007PC-Rg for guix-patches@gnu.org; Sun, 21 Nov 2021 16:22:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mouHi-0006c8-JJ for guix-patches@gnu.org; Sun, 21 Nov 2021 16:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mouHi-0007cI-6J for guix-patches@gnu.org; Sun, 21 Nov 2021 16:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51755] [PATCH 1/1] gnu: proof-general: Adjust autoloads for Emacs. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Nov 2021 21:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51755 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou , Liliana Marie Prikler Cc: 51755@debbugs.gnu.org Received: via spool by 51755-submit@debbugs.gnu.org id=B51755.163752971329260 (code B ref 51755); Sun, 21 Nov 2021 21:22:02 +0000 Received: (at 51755) by debbugs.gnu.org; 21 Nov 2021 21:21:53 +0000 Received: from localhost ([127.0.0.1]:46230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mouHY-0007bs-I3 for submit@debbugs.gnu.org; Sun, 21 Nov 2021 16:21:52 -0500 Received: from mail-wm1-f45.google.com ([209.85.128.45]:56301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mouHX-0007bd-ES for 51755@debbugs.gnu.org; Sun, 21 Nov 2021 16:21:52 -0500 Received: by mail-wm1-f45.google.com with SMTP id p18so13491555wmq.5 for <51755@debbugs.gnu.org>; Sun, 21 Nov 2021 13:21:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=h9JJrB7U0P4DSbq2w83dXj0iFO6+eDLJmBXgl80fCGM=; b=jxJWs+HAL3UT1mExroSCU5rd688YpkaGmF1vLakL8HvmxcyQdgCbu73NIvS9jHJZZ8 bhXOHB5ULSFw+f6Hu3diM8iKGBXTitPAvK+NoKbGDdQbm0J9n3hU+b/7+jlkV7xdPkqb UcmLgDVmufvJFMrC/wVmvAzyRrc8Dw361/xYw+nBhOFfd+6MBvf4Qy/YcqXeNsboTBnJ i11OeLm1xf3EwbJopNLz78N96p2OYCfo8Y3zDdNmNubIsXeBR3BSTJ8qOszOAGF0WLL9 Tc2KxrSR70K3NWTmw7iNggDv1myNz5DRUdm/kKvxP/hq6cSBPazTOa4Rg4S3WV71kMo2 ppCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=h9JJrB7U0P4DSbq2w83dXj0iFO6+eDLJmBXgl80fCGM=; b=CCDsj5mZoae3CfXuHfAFQI82KZEuteT+6vCkN0FVDDHiJu0xWTh5txZovQGrQNNkyH LIF9HcWTAZTgYhmDO7E8PhBb/S6bDRD3einxlxn/BzLPhqM0HgtpDqj7QEnv/rEI8ncK dyP2qN8pMwU7jslinU2weiYpr8GcuP8x3Yj3htEgHzG46MuX2/t018EhgLEHbIdZuMAN OsqKtgNp/RWwgzcahHVaf49Pgg28/L/f9ItHyBme1dPCEMfRp4iMKNEWgWLO5UyR/DM5 Bl88lzIX3jBbcUh4/YdWm5fF+zv6dvCUPmE/5H1NDzpyZCfG9n7TbY4GnYxzQZBoG4lC DRbg== X-Gm-Message-State: AOAM530hq7SmJ/UjiGoO9m00HD9D29TvWdnbs0P43TW3nzBRcmSAmaDN 8fJi1gpQoHka2l96T5bkoabEWZz22sg= X-Google-Smtp-Source: ABdhPJy91r+2h0PYEREJewSd8KEF/1FTieamfdojfz2qP+4nDUQbFnxtI3sDdx9viXRNYD1fQVUYPw== X-Received: by 2002:a05:600c:4ec7:: with SMTP id g7mr23415370wmq.138.1637529705401; Sun, 21 Nov 2021 13:21:45 -0800 (PST) Received: from lili (2a01cb04061b8800444bb83f830ae295.ipv6.abo.wanadoo.fr. [2a01:cb04:61b:8800:444b:b83f:830a:e295]) by smtp.gmail.com with ESMTPSA id h13sm6872181wrx.82.2021.11.21.13.21.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 13:21:45 -0800 (PST) From: zimoun In-Reply-To: <87y25huuxp.fsf@nicolasgoaziou.fr> References: <20211110192622.368232-1-zimon.toutoune@gmail.com> <20211110193748.368696-1-zimon.toutoune@gmail.com> <8735npwdvr.fsf@nicolasgoaziou.fr> <6aab24bab9512e0957e33256a3addf1076a9d012.camel@gmail.com> <87y25huuxp.fsf@nicolasgoaziou.fr> Date: Sun, 21 Nov 2021 22:11:58 +0100 Message-ID: <86bl2dfc2p.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637529737; 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: content-transfer-encoding:content-transfer-encoding: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=h9JJrB7U0P4DSbq2w83dXj0iFO6+eDLJmBXgl80fCGM=; b=nsMXmFUWcLVFOhLhrvdFgQl1Xc5Hjc+WTdjFAT2+WZQLu9/JfB9F+Us/qh+Vvj48fOnGUR FnJ8+y5SQR0tHu2rpTNA2KzcXqiLX5LBQ7re2tk8mHPS1V38xDjz1cIONPqfXHtod9xoyN /NtYYuCBLiLSFa7y3UedP9aQjQjdjPFwNYXrvIIAr4FGYgyrYBBtJd9rUq0b+bERLo3x9j ioXWrAsIK1+N8IxdsYL+fWMmax3BZjoivHjFnNBPfWJc7dUZyBnMCLo3hE01k+COHFzqRK BLM8ArudCau2Epy+WNivd653T3JvdxjLCuo0Zj7XouhzRcOAqLOdbQkmBA6XVQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637529737; a=rsa-sha256; cv=none; b=r5cbSTTBsNAq0YfiuDva+MPC3i7wH9YSJxkXDzOWxz4HdMjE0hMSmI+VAU7RGc4H1CA8qm njW4A84fpFofnIppxpWbv7matGkZRPuSKMxXN0NunUgB4CEXbw1GVy0Sq4uf3zKzfnBAVz aP2ku1qA3K/BK6UNIP0FE3QTrQnrmojLOIHeXRJSbwzkbMzVl0KXi1U7c6zZYyj7ehznV7 Hcqkzy5OYz5kelyaO0YZg2aGtHpR4w7iUQrCls17D26AShmR9JvC9+yQsO3mdYAl+Ml182 fpv2Zt/M1yHcw4u9MYms4flruBPrf6bDrBLzzcjRbE626cqerHKmVZDl81NCIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jxJWs+HA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jxJWs+HA; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 7CA06E35D X-Spam-Score: -1.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: G2TdVJN6Wgy7 Hi, Thanks for the review. On Sun, 21 Nov 2021 at 21:15, Nicolas Goaziou wrot= e: > Liliana Marie Prikler writes: >> Am Sonntag, den 21.11.2021, 19:40 +0100 schrieb Nicolas Goaziou: >>> So, IIUC, the above is basically a hack: you disguise the main file >>> into an autoloads file because no autoloads file is generated from >>> the code base? If so, this might deserve a longer comment, IMO. > > Actually, my assumption was wrong. "proof-general.el" is > a meta-autoloads file: > > ;; This file is a thin, package.el-friendly wrapper around generic/pr= oof-site, > ;; suitable for execution on Emacs start-up. It serves two purposes: > ;; > ;; * Setting up the load path when byte-compiling PG. > ;; * Loading a minimal PG setup on startup (not all of Proof General,= of course; > ;; mostly mode hooks and autoloads). Yes. Note that =E2=80=99proof-general=E2=80=99 was at one moment in its lo= ng history a standalone package, i.e., running =E2=80=99bin/proofgeneneral=E2=80=99 star= ted Emacs and launched everything. This had been removed long time ago [1] but the current code inherits this long history. 1: >> Alternatively, we could in an after- >> unpack phase add autoload cookies to the source file or write our own >> autoloads altogether. WDYT? > > Autoload cookies are already present in the code base, but in > sub-directories. Yes. The limitation comes from this subdirectory structure. This breaks the usual way of packaging Emacs tools for Guix, IIUC. > OTOH, I assume the solution proposed by Zimoun, as hackish as it is, > works well enough. And it requires less work. IMO, it is acceptable with > a good comment. >From my point of view, my proposed patch appears to me the easiest fix. If something is better, please let me know. :-) About the comment, I thought =C2=AB allow-subfolders-autoloads =C2=BB and = =C2=AB Make it visible by Emacs =C2=BB would have been enough. ;-) --8<---------------cut here---------------start------------->8--- (add-after 'install 'allow-subfolders-autoloads (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) ;; Make it visible by Emacs --8<---------------cut here---------------end--------------->8--- Instead, I propose to extend to: --8<---------------cut here---------------start------------->8--- (add-after 'install 'allow-subfolders-autoloads ;; Autoload cookies are present in sub-directories. A friend= ly ;; wrapper proof-general.el around generic/proof-site.el is ;; provided for execution on Emacs start-up. It serves two ;; purposes: ;; * Setting up the load path when byte-compiling pg. ;; * Loading a minimal PG setup on startup (not all of Proof ;; General, of course;mostly mode hooks and autoloads). ;; The rename to proof-general-autoloads.el is Guix specific. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (copy-file "proof-general.el" (string-append out ,base-directory "/proof-general-autoloads.el")= )))))))) --8<---------------cut here---------------end--------------->8--- Is it fine? If yes, I can send* a v2. Or please push directly. :-) Cheers, simon *send v2: for the record, I do not have commit right. ;-)