From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EKrmGOww7GS8ywAAG6o9tA:P1 (envelope-from ) for ; Mon, 28 Aug 2023 07:30:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EKrmGOww7GS8ywAAG6o9tA (envelope-from ) for ; Mon, 28 Aug 2023 07:30:20 +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 E934C6B813 for ; Mon, 28 Aug 2023 07:30:19 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=a7UMdZAa; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693200620; a=rsa-sha256; cv=none; b=O8/c5NWVEFSZq3yu41MY41CzYjjoA7e0z0wHFlh+Pm4byeNKdZtVVa4J9duLqVv6PuBlPx SIBCy1bu5YL2gjcW1KpRFgfR5EoBqONs7S6E8BcrAX1RvASvPavaSAwJIGn/IR4IlzZtj2 +TmfhguMXvqGn83Lc6Z2AF/71UgWp1CeRmyoEnMw7VQp8gElC3zEtUvkNMao4Lsnc7nZKD juz4zEX3jvT5KKqxcr/LMSOCXzjojbqp7NRMKy9sIP/RJ2UTWsh0t9xDbEj9nkzQ29S9PJ w2MDw5mL1pQIVXRH6ks3cHffBLMVbiF2fSIvKkrOmqtlYBsGFrtAlg67sF3o0g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=a7UMdZAa; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693200620; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=A/S4uljm2i/U/DujQXPBiWWZ39h+lmTlwF+TGvevsQg=; b=llIRmoQ7cfo6xh3vfLUnBlVMvt6zX0HdPOQP480sFFOHw2z2TvoQxG5hWKyTY+sAy878Cy vzltQW12k7DmXKyTx+O1j8ztRWCRAkRnMZNIPCBOTjgWDzaZ3r6OwEOfUipGxx3nu/1cn8 H++36VOLb1NZfgXpYZSJYIqcXAg45Sk/pZ16E92e5kGo52JuyahQ1eRKdYtUOs3AMXhjij y6kswCNavAsOgrJe+VMeQJg41dlkFdyoC5XRmbViNxHAjfFkEp0s4kcDg2CsUOcGb8lNaH /iyXdewR5vX7TOCh2awxxs5xcmm1pDNUHrBHUq6XCVGz8MeivnLIylwmhdVNtw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaUYi-0007wz-9S; Mon, 28 Aug 2023 01:13:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaUYe-0007wS-Uf for bug-guix@gnu.org; Mon, 28 Aug 2023 01:13:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaUYc-0005Ds-6E for bug-guix@gnu.org; Mon, 28 Aug 2023 01:13:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qaUYh-0006FQ-A3; Mon, 28 Aug 2023 01:13:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65575: [PATCH 3/3] gnu: emacs: Reload subdirs.el files in 'guix-emacs-autoload-packages'. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, bug-guix@gnu.org Resent-Date: Mon, 28 Aug 2023 05:13:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65575 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 65575@debbugs.gnu.org Cc: Maxim Cournoyer , Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler X-Debbugs-Original-Xcc: Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler Received: via spool by 65575-submit@debbugs.gnu.org id=B65575.169319954823955 (code B ref 65575); Mon, 28 Aug 2023 05:13:03 +0000 Received: (at 65575) by debbugs.gnu.org; 28 Aug 2023 05:12:28 +0000 Received: from localhost ([127.0.0.1]:46698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaUY7-0006EE-T2 for submit@debbugs.gnu.org; Mon, 28 Aug 2023 01:12:28 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:51268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaUY5-0006Dg-2u for 65575@debbugs.gnu.org; Mon, 28 Aug 2023 01:12:25 -0400 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-76ef8b91a4bso215614385a.2 for <65575@debbugs.gnu.org>; Sun, 27 Aug 2023 22:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693199533; x=1693804333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A/S4uljm2i/U/DujQXPBiWWZ39h+lmTlwF+TGvevsQg=; b=a7UMdZAaE0MaS56p9sw4Agn4b81gi1IQNwBZKt8Waakq5mWhQ6Uzyhhw+hQJiAb08S pURzPVwKDw3PoIFUwQyQHlq9Y1kytM9qipz1GyJhrWYbzvzowmhSgLYNQQ0JL++uExJZ VH7tEFP3SYh1Jp3ELK3pOalBzixEh4vAP3P13PKezk5sjLXIf8cNcsAuLjXOlKbQeZKc Be88AU7D3zHZCvRSg9Mmg+kKhEI/NPMMSMiyboL8mCfKkGcGzJ8APyNvmMWnCN4Bu+W9 iAEVRgaGXx/chIOtMNvVUItpTuBDwNNWl3buBPcWiwE9nXpLbYdP6K44ATRQELyGMp6l sATw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693199533; x=1693804333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A/S4uljm2i/U/DujQXPBiWWZ39h+lmTlwF+TGvevsQg=; b=fYHjfn1MzqsWm+8p9/C8vohfdNlEhkfCz29x5NgzQNJgNOBKVoIf9JjtKV69wuVXXc K7//1MxdJeCOLVX0ru+q4MIvqD4+0yiuc5uO7qoWTWbvTCx6lUJvw2Ge3wEDewm6TZJp gKXL89gidEQhzBNrxbwEvD28NaU0g1nlXZh4px3VxnyrtikbFLCMiuIVhItBh9IO0aCD FDDnG9gPGcXORpy3HN5fGWtZQ7RfJHbZ2qnzWqblNHDhq5jKcDDziwPiUDZzE31ZfSIK iIeFvE2mMhZTEyFI3PKRwbrxKsnVcpIIwDDBi9+x3Yc1olFyL9ULkl9816IV1wRVDEvr ygiw== X-Gm-Message-State: AOJu0YxLV6LpgMCX4c02oRyWrp3u2tkRZRd+DC39P32GbhO7fnTXCTIR WjsmiZGSnjv5PX9pIsLK45gG8DMhhTQ= X-Google-Smtp-Source: AGHT+IF5se53edzeOD/1g1Gnep/x+LtqMciBbtIfjxoVHtaBmGpHdPRSgKmtJuDCd9jlf/nCjYGwlA== X-Received: by 2002:a0c:f246:0:b0:647:2e3f:d9d9 with SMTP id z6-20020a0cf246000000b006472e3fd9d9mr13161118qvl.36.1693199533141; Sun, 27 Aug 2023 22:12:13 -0700 (PDT) Received: from localhost.localdomain (dsl-155-106.b2b2c.ca. [66.158.155.106]) by smtp.gmail.com with ESMTPSA id z14-20020a0cf00e000000b0064f4d3bc78csm2312497qvk.61.2023.08.27.22.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Aug 2023 22:12:12 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 28 Aug 2023 01:11:34 -0400 Message-ID: <84a6b9e11ec0f8fcdd865dae40ab41100a5c763c.1693199493.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <6715bc07d825d632140c63bd98c959d31cc5de47.1693199493.git.maxim.cournoyer@gmail.com> References: <6715bc07d825d632140c63bd98c959d31cc5de47.1693199493.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Spam-Score: -3.12 X-Migadu-Queue-Id: E934C6B813 X-Migadu-Spam-Score: -3.12 X-TUID: zFNVMzvk0Gw1 This fixes a regression introduced with 79cfe30f3 ("build-system: emacs: Use subdirectories again.") which caused the 'guix-emacs-autoload-packages' to no longer be able to autoload all packages. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages-called): New variable. (guix-emacs-autoload-packages): Reload subdirs.el files an all but the first call of this procedure. * doc/guix.texi (Application Setup): Document that 'guix-emacs-autoload-packages' can be invoked interactively to auto-reload newly installed Emacs packages. --- doc/guix.texi | 11 +++++++---- gnu/packages/aux-files/emacs/guix-emacs.el | 12 ++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f82bb99069..66da4f9cd4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2167,12 +2167,15 @@ Application Setup Emacs through the @env{EMACSLOADPATH} environment variable, which is set when installing Emacs itself. +@cindex guix-emacs-autoload-packages, refreshing Emacs packages Additionally, autoload definitions are automatically evaluated at the initialization of Emacs, by the Guix-specific -@code{guix-emacs-autoload-packages} procedure. If, for some reason, you -want to avoid auto-loading the Emacs packages installed with Guix, you -can do so by running Emacs with the @option{--no-site-file} option -(@pxref{Init File,,, emacs, The GNU Emacs Manual}). +@code{guix-emacs-autoload-packages} procedure. This procedure can be +interactively invoked to have newly installed Emacs packages discovered, +without having to restart Emacs. If, for some reason, you want to avoid +auto-loading the Emacs packages installed with Guix, you can do so by +running Emacs with the @option{--no-site-file} option (@pxref{Init +File,,, emacs, The GNU Emacs Manual}). @quotation Note Emacs can now compile packages natively. Under the default diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index ed0c913163..b4a4fd1d91 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -54,6 +54,9 @@ The files in the list do not have extensions (.el, .elc)." (expand-file-name "subdirs.el" dir)) (guix-emacs--non-core-load-path)))) +(defvar guix-emacs-autoload-packages-called nil + "True if `guix-emacs-autoload-packages' was already run.") + ;;;###autoload (defun guix-emacs-autoload-packages () "Autoload Emacs packages found in EMACSLOADPATH. @@ -61,6 +64,15 @@ The files in the list do not have extensions (.el, .elc)." 'Autoload' means to load the 'autoloads' files matching `guix-emacs-autoloads-regexp'." (interactive) + ;; Reload the subdirs.el files such as the one generated by the Guix profile + ;; hook, so that newly installed Emacs packages located under + ;; sub-directories are put on the load-path without having to restart Emacs. + (if guix-emacs-autoload-packages-called + (progn + (mapc #'load-file (guix-emacs--subdirs-files)) + (setq load-path (delete-dups load-path))) + (setq guix-emacs-autoload-packages-called t)) + (let ((autoloads (mapcan #'guix-emacs-find-autoloads (guix-emacs--non-core-load-path)))) (mapc (lambda (f) -- 2.41.0