From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 cP6lJx887GQGKwAAauVa8A:P1 (envelope-from ) for ; Mon, 28 Aug 2023 08:18:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cP6lJx887GQGKwAAauVa8A (envelope-from ) for ; Mon, 28 Aug 2023 08:18:07 +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 D40F06EDCC for ; Mon, 28 Aug 2023 08:18:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=IjsqBxhP; 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=tugraz.at (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693203487; a=rsa-sha256; cv=none; b=QqY5MicjVQVcp4iqtVDED0peFjrQIdhFOwlQ+yE6yUdgsxMZ5E6iz207L5TJorYdLzPEt7 uCIJntkesRZ3ZcFkyCJGnfq1++jBaFem9J6pUU97h1oVQOvE/p8GAVqpUToIIeaGXqS1zF l0HNsgbwMS2iRiMK4xZE9ohvzCD2ouxJ78UbmmtFctKjDag5RkeYrSMdJ7bc9si7SLGrOS +VFtqT2sAI9xE+Xa924Y/GXkU34Xk7lQuof4JTa0VlskmFkfaXUNyd3fFgFwThQk2VoPVU RxTnDK5OPve8QwKMXMv1CLY9LRf+kTeuuXm2hbnrFbs190Q/m3Mki/shQ7YHqw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=IjsqBxhP; 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=tugraz.at (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693203487; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=Bw1fQ+2nYPJDf/nuZeNThmjxHQ0qlVfBkv0tImtytHg=; b=uWpKV2m0mbRaUuezGlHJ/APb3ybKVoqFILl+YZ+scuvC4om+uJY9t3qTm/yLUDbZ7vfUqw YHlMtR08xOJnIRtvEni2dp2gx6FSjyF9Mim6ZQfJFNzakFzefxV5RqpEqTEGTWrzzCpr+o URlUqLjhKbHGOtUgG5jiZ1VNAWp+diuUTI6OFAF4zhgLNSd4ZXAiekDXPbg4cXQq8cBXhQ P6DHVWBCe1+YZNcLLCP4T1qO3rLXrJOhpno/3vmZEHoLnspPigR44pseCitvyWHLuEzw3u R1Fzag492GKl29UJgedpsJWc43qmwwUXqRvSvFARgKqRKxx+RFW9QhrUEhY/xg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaVZX-0005k0-En; Mon, 28 Aug 2023 02:17:59 -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 1qaVZV-0005jA-1V for bug-guix@gnu.org; Mon, 28 Aug 2023 02:17:57 -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 1qaVZU-0007Eu-P5 for bug-guix@gnu.org; Mon, 28 Aug 2023 02:17:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qaVZa-0007x9-In for bug-guix@gnu.org; Mon, 28 Aug 2023 02:18:02 -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: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 28 Aug 2023 06:18:02 +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: Maxim Cournoyer , 65575@debbugs.gnu.org Received: via spool by 65575-submit@debbugs.gnu.org id=B65575.169320343030509 (code B ref 65575); Mon, 28 Aug 2023 06:18:02 +0000 Received: (at 65575) by debbugs.gnu.org; 28 Aug 2023 06:17:10 +0000 Received: from localhost ([127.0.0.1]:46747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaVYk-0007w1-AY for submit@debbugs.gnu.org; Mon, 28 Aug 2023 02:17:10 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:33315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaVYe-0007vo-Sj for 65575@debbugs.gnu.org; Mon, 28 Aug 2023 02:17:09 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4RZ0h63XZhz1LM0J; Mon, 28 Aug 2023 08:16:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4RZ0h63XZhz1LM0J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1693203414; bh=Bw1fQ+2nYPJDf/nuZeNThmjxHQ0qlVfBkv0tImtytHg=; h=Subject:From:Reply-To:To:Date:In-Reply-To:References:From; b=IjsqBxhPUpSfum2aXisev4TpNdIf8dstW3dYNJURSadBvausnEfO3SXjTxHnbnAWe sSdMPpBRK3hb8vdD0k84q1+fpzTDvyBNes9eiLMlwA2Y6V2C7ULRpO+lbpnb5dIZci lyN0H+AkmagcZ6M3OyVQ0z/k5ZMvKz68BdiG5JRY= Message-ID: <88f150c1356008a1d1c4251a8ec98afcd6e1b6f2.camel@ist.tugraz.at> From: Liliana Marie Prikler Date: Mon, 28 Aug 2023 08:16:53 +0200 In-Reply-To: <84a6b9e11ec0f8fcdd865dae40ab41100a5c763c.1693199493.git.maxim.cournoyer@gmail.com> References: <6715bc07d825d632140c63bd98c959d31cc5de47.1693199493.git.maxim.cournoyer@gmail.com> <84a6b9e11ec0f8fcdd865dae40ab41100a5c763c.1693199493.git.maxim.cournoyer@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 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: , Reply-To: Liliana Marie Prikler 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: -5.32 X-Migadu-Queue-Id: D40F06EDCC X-Migadu-Spam-Score: -5.32 X-TUID: Q2mQVqDP+qVv Hi Maxim, Am Montag, dem 28.08.2023 um 01:11 -0400 schrieb Maxim Cournoyer: > 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. >=20 > * 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. >=20 > --- Thank you for looking at this. I agree that even if we don't want to generally load new packages into existing Emacs processes for the breakages they might induce, not being able to do so at all is also not a great option. However, I don't think that tracking is the right solution here, see below. > =C2=A0doc/guix.texi=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=C2=A0=C2=A0=C2=A0=C2=A0 | 11 +++++++---- > =C2=A0gnu/packages/aux-files/emacs/guix-emacs.el | 12 ++++++++++++ > =C2=A02 files changed, 19 insertions(+), 4 deletions(-) >=20 > 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 > =C2=A0Emacs through the @env{EMACSLOADPATH} environment variable, which i= s > =C2=A0set when installing Emacs itself. > =C2=A0 > +@cindex guix-emacs-autoload-packages, refreshing Emacs packages > =C2=A0Additionally, autoload definitions are automatically evaluated at > the > =C2=A0initialization of Emacs, by the Guix-specific > -@code{guix-emacs-autoload-packages} procedure.=C2=A0 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.=C2=A0 This procedure can > be > +interactively invoked to have newly installed Emacs packages > discovered, > +without having to restart Emacs.=C2=A0 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}). > =C2=A0 > =C2=A0@quotation Note > =C2=A0Emacs can now compile packages natively.=C2=A0 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)." > =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 (e= xpand-file-name "subdirs.el" dir)) > =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 (guix-emacs--n= on-core-load-path)))) > =C2=A0 > +(defvar guix-emacs-autoload-packages-called nil > +=C2=A0 "True if `guix-emacs-autoload-packages' was already run.") > + > =C2=A0;;;###autoload > =C2=A0(defun guix-emacs-autoload-packages () > =C2=A0=C2=A0 "Autoload Emacs packages found in EMACSLOADPATH. > @@ -61,6 +64,15 @@ The files in the list do not have extensions (.el, > .elc)." > =C2=A0'Autoload' means to load the 'autoloads' files matching > =C2=A0`guix-emacs-autoloads-regexp'." > =C2=A0=C2=A0 (interactive) > +=C2=A0 ;; Reload the subdirs.el files such as the one generated by the > Guix profile > +=C2=A0 ;; hook, so that newly installed Emacs packages located under > +=C2=A0 ;; sub-directories are put on the load-path without having to > restart Emacs. > +=C2=A0 (if guix-emacs-autoload-packages-called > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (progn > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mapc #'load-file (guix-emacs= --subdirs-files)) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq load-path (delete-dups = load-path))) > +=C2=A0=C2=A0=C2=A0 (setq guix-emacs-autoload-packages-called t)) > + Rather than keeping track of whether the function was already called (which would make debugging more tedious if you also have e.g. broken packages from another source on your EMACSLOADPATH), I think the user ought to signal their intent to reload the subdirs files via the universal argument. e.g.=C2=A0 (defun guix-emacs-autoload-packages (&optional reload) =C2=A0"..." (interactive "P") (when reload (mapc #'load-file (guix-emacs--subdirs-files))) ...) WDYT?