From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ILzrN7xu8WR+AgAA9RJhRA:P1 (envelope-from ) for ; Fri, 01 Sep 2023 06:55:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ILzrN7xu8WR+AgAA9RJhRA (envelope-from ) for ; Fri, 01 Sep 2023 06:55:24 +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 7CCDB3E23D for ; Fri, 1 Sep 2023 06:55:24 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=eGnNJjyB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693544124; 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=PeB77dmLyW/oNFIO7PuimXoufJVVwMr5bRtF+iyO+Cg=; b=dQiMOvxKMVcEHUGf5Nqg+bEX3f37YPmosoICMX4NJGGw4r5vNlDkpljaGewZqiXxB24KU8 aUCI1jUT/U3z7VMPja054v7iQJAs0pmb91awVD3WWWpmlrIYky+wCDFMVqHeVe2xwr1xVp +I0VcTt3kFuUIZSlpqf9NBKIX0X39ABDEhT39EReLhqX2QsvNfpkY+96tYuMMbXlqEjEXU Tf44sJonDEzN/cFFB2YmYCWlEYHChakdoAaKSWFZBt9Je7P/MLoiURx4jQKOOT6AEe/8Ul CUj/PSH0+ByIW47Tjnpzmo2NJuU7tmijOhZ8rhsRIYuikP/EYXTvhunz3KWUmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693544124; a=rsa-sha256; cv=none; b=ALarimdzejO7uj7g5B+qqSHUK21gCFlyfhBrMeOnChMuRC/oUDbSslQGoYca5CQj2EKB0m XLALizt6jcQEBcckWicLi23iU71gHeMQFwUQqYKPh0Cx2Ebz4gN1bFH4gCHUdrFd/mq0aR wyNxEiwdzVlmveSNn0scJdbKQgiftxF8hxpo6YQosERUCwEQGX3wtF9fM8pBcVaBO1Re+C qljp0r66riCQehXezFGC7ImoagDcp77vXJgrtHQY9A4eVgrvFZX0g40WLmq8B01uIPH4AC 0cZP+YbdM4Hf8hRJYuE4wHhdG97xAKDc9vATgaRY7dAs0wg4TE5AEmGK303Wzg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=eGnNJjyB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbwBL-0003lc-4X; Fri, 01 Sep 2023 00:54:55 -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 1qbwBK-0003lH-0i for bug-guix@gnu.org; Fri, 01 Sep 2023 00:54:54 -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 1qbwBJ-0006U4-NQ for bug-guix@gnu.org; Fri, 01 Sep 2023 00:54:53 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbwBS-00019N-K2; Fri, 01 Sep 2023 00:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65575: [PATCH v3 3/4] gnu: emacs: Allow producing verbose messages when loading autoloads. 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: Fri, 01 Sep 2023 04:55: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: 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.16935440754352 (code B ref 65575); Fri, 01 Sep 2023 04:55:02 +0000 Received: (at 65575) by debbugs.gnu.org; 1 Sep 2023 04:54:35 +0000 Received: from localhost ([127.0.0.1]:59652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbwB0-000183-VA for submit@debbugs.gnu.org; Fri, 01 Sep 2023 00:54:35 -0400 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:51598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbwAz-00017W-Dw for 65575@debbugs.gnu.org; Fri, 01 Sep 2023 00:54:33 -0400 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-411f5dd7912so9343941cf.3 for <65575@debbugs.gnu.org>; Thu, 31 Aug 2023 21:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693544059; x=1694148859; darn=debbugs.gnu.org; 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=PeB77dmLyW/oNFIO7PuimXoufJVVwMr5bRtF+iyO+Cg=; b=eGnNJjyBLR37XdBLNVup5gquHRNvV3xt7Oqanl3C8DLnRa7/dAvOSLMrNwW+9BJC1t XhNBfqeMoIrqI1vPpuxHpAw6aQYWXsYi8Dl9vmUj5IjKOZz/FLiOp2mE3rJAX8JR35lr JOG0vl1bnxONTMEOe6FyC8YbArxxo39is3xhosiAOMuWR0AqgxEzvFOQrRbhSQmHTrk5 RiOhJm74G0Bl4I1L/d6sW8rCtdRlVk4hYZCLLfETJNRB+/mIIk8Z24W64pRrsuAkww0c GjnlZG4eGgmXCys8sSWxH6+YRlAnd3xiI1JDPKEyVJpiRfqXymRb0YiR33APsCrPnoKr 1Z0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693544059; x=1694148859; 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=PeB77dmLyW/oNFIO7PuimXoufJVVwMr5bRtF+iyO+Cg=; b=QkQM3i0x39jd9VHK/pEEyxJF+X0snRl33xHu9BftP7AJSPbVxHxsHZlwXsGmXXlJVb r8IZUh2OFqAMQPnO2nB+eqVgjQdewbt4LNtGZFc5XqUMPuNr0xDK4DRUHO/MXxxY32DQ MMT905DIpkVOuavMyaAE+NeNYi6eG3GVTcLEvwJrTiOb+Cm2FiuKK9TZRVnqrGsSrfPD UUOuabY2t/iPd2xqUu/A5CcAmof+nGgtzBX2Kh5PnxooFVDU+VDyYdkDVDrd88BCfr5H sz+cXEVWKa53KxZakoidCY0dzkc+0ag3o9DHVDiolbjFpeUKmDxEz+V2pkcr5vluQR2c 3jyg== X-Gm-Message-State: AOJu0YzjWj72uts+udBtAXN5lqJkA9bUna8hY4fX0LWywi+OEXSF1V1t I4oBiqTQ4dmljRhBCUBO0Tiqnqfl/VM= X-Google-Smtp-Source: AGHT+IH4Staf2B0Kae1aBWq9ovOkoLFlHjAbWZxJV//eOUueUGUVM0aCm6xPScy2qx/DblSxVVnX9Q== X-Received: by 2002:a05:622a:4c6:b0:412:22cf:83fa with SMTP id q6-20020a05622a04c600b0041222cf83famr1549761qtx.28.1693544058696; Thu, 31 Aug 2023 21:54:18 -0700 (PDT) Received: from localhost.localdomain (dsl-10-128-23.b2b2c.ca. [72.10.128.23]) by smtp.gmail.com with ESMTPSA id v15-20020ac8748f000000b00410ad87b1e0sm1176627qtq.46.2023.08.31.21.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 21:54:18 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 1 Sep 2023 00:53:20 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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-Spam-Score: 4.78 X-Spam-Score: 4.78 X-Migadu-Queue-Id: 7CCDB3E23D X-Migadu-Scanner: mx2.migadu.com X-TUID: xdFg2XXhx7ON * gnu/packages/aux-files/emacs/guix-emacs.el: Expound commentary. (guix-emacs-verbose): New variable. (guix-emacs--load-file-no-error): New procedure. (guix-emacs-autoload-packages): Use it. --- (no changes since v2) Changes in v2: - New commit gnu/packages/aux-files/emacs/guix-emacs.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index 4db7ec28c9..84284dde39 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -22,8 +22,9 @@ ;;; Commentary: -;; This file provides auxiliary code to autoload Emacs packages -;; installed with Guix. +;; This file provides auxiliary code to autoload Emacs packages installed with +;; Guix. To produce verbose messages useful while debugging, set the +;; GUIX-EMACS-VERBOSE variable to true. ;;; Code: (require 'seq) @@ -41,6 +42,15 @@ The files in the list do not have extensions (.el, .elc)." (directory-files directory 'full-name guix-emacs-autoloads-regexp)))) +(defcustom guix-emacs-verbose nil + "Set to true to provide verbose messages, such as when loading packages." + :type 'boolean + :group 'guix-emacs) + +(defun guix-emacs--load-file-no-error (file) + "Load FILE, ignoring any errors" + (load file 'noerror (not guix-emacs-verbose))) + (defun guix-emacs--non-core-load-path () ;; Filter out core Elisp directories, which are already handled by Emacs. (seq-filter (lambda (dir) @@ -63,9 +73,7 @@ The files in the list do not have extensions (.el, .elc)." (interactive) (let ((autoloads (mapcan #'guix-emacs-find-autoloads (guix-emacs--non-core-load-path)))) - (mapc (lambda (f) - (load f 'noerror t)) - autoloads))) + (mapc #'guix-emacs--load-file-no-error autoloads))) ;;;###autoload (defun guix-emacs-load-package-descriptors () -- 2.41.0