From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UF5IHajB7GR1EAAAauVa8A:P1 (envelope-from ) for ; Mon, 28 Aug 2023 17:47:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UF5IHajB7GR1EAAAauVa8A (envelope-from ) for ; Mon, 28 Aug 2023 17:47:52 +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 199584A0AF for ; Mon, 28 Aug 2023 17:47:52 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=iUv1N8ae; 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=1693237672; 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=eqXlGTS3Kfsw8jPHR4D9Zn93aDP2uVSuH4vPHYgEN2Y=; b=mNi6HJbAsQssmHHmtpQRmwKxkNMsYxlpxco0+6CqelWl0XOyKy4yefSJ9FnQoIt0hNS4ha A7wMxB7Ou+wALUSylJfOwR5fDxzJDa6CoKei6UQgOrA7RofM4DJBpc8KHWoNQ6YWZ6B+c6 jiHqACK5txJTIRoF8HZg3EGHt9P9WNtCphmgL52hWUZnWYc4svfDdqCqGWKi9RthF5vl7d Cf9YXXlLyMex7OQ6NOEd93LrS/q/aJ5DyRHY3b91+DT1BNRt5lXOg+4PIthMA9fdMlQfWY z0CrBthD3kBtuXOSCwF4myMoDsqa+L54Rh5vinRsjBycLhqNdlQ0sK4Rym8sXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693237672; a=rsa-sha256; cv=none; b=bXVxHaV+FjGhV7yYCypO7zgvA5kTYym+FEup0ASn6odMv/fHp+cfJUBIL+1Xm3pXuQxMNk 510SbCieKV4VPBVBDVGIas38Ws156so+jpTklZySFziUBZH83nQqi1bH7JUQz782JDwSmN lNdd2GLTy1Z18fp3SAwglU/5uYo+zU1wUdHi77orlRbUStHyp0WXFd1yvJ4AEFldm+7NbX Ea4F+gPrfwBUsI+h3ovuJNT1BImkl5bQO6mlLvLNmfmo3m1ZNWYZmbg0bZEwoD18PwIOeZ q4kbRSRtllJ4omeVLIF8nQPjYPoI1fDMnMB5EILmGCPbEhIXz15yJ2WJZPUjUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=iUv1N8ae; 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) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qae18-000247-Jf; Mon, 28 Aug 2023 11:19:02 -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 1qae13-00020W-9f for bug-guix@gnu.org; Mon, 28 Aug 2023 11:18: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 1qae13-0006ua-1n for bug-guix@gnu.org; Mon, 28 Aug 2023 11:18:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qae19-0000FO-D0; Mon, 28 Aug 2023 11:19:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65575: [PATCH v2 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: Mon, 28 Aug 2023 15:19: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.1693235892863 (code B ref 65575); Mon, 28 Aug 2023 15:19:03 +0000 Received: (at 65575) by debbugs.gnu.org; 28 Aug 2023 15:18:12 +0000 Received: from localhost ([127.0.0.1]:48772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qae0J-0000Dm-Ut for submit@debbugs.gnu.org; Mon, 28 Aug 2023 11:18:12 -0400 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]:49303) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qae0G-0000D6-Pr for 65575@debbugs.gnu.org; Mon, 28 Aug 2023 11:18:09 -0400 Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-d7838958d17so2850867276.2 for <65575@debbugs.gnu.org>; Mon, 28 Aug 2023 08:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693235876; x=1693840676; 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=eqXlGTS3Kfsw8jPHR4D9Zn93aDP2uVSuH4vPHYgEN2Y=; b=iUv1N8aeitdyNRyiArZIt5tTyymjYw2opWUQv6/rVD+SZXkQz40gYcUpRZbZ0FzZvM FrXB9Mqt07w35Tp9uFgc3hN0khDOcPDIjdTgcCEemDS+gMRBvbE7gxoUoq/sIFKLM1WK UQ6PvwYvCaVsYDvhGb6aHoEdRQRTRqir3OGFwqzK1LxhoABTpilaLbzxVjXmXAMdLube JVVCHo1s11BRUHVDoegWlRq6O3584fRTKEeExtdSK4rLMfn/I9HUywNzMLkF5GTlwRz1 nbDWm/CGQpumSWa21My5RJk3yVKJU8QxIaPg0wDovCCN6kFlBlTtL37f2vIEePh3JdW+ Qc9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693235876; x=1693840676; 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=eqXlGTS3Kfsw8jPHR4D9Zn93aDP2uVSuH4vPHYgEN2Y=; b=bavXFPl/EQPMGVl456jASfmxz4yhL+po5r6v3qTSFXmk2eRMTIcL2BSuzH6bvHxeQg /TNT19l4aAflaFgjL/EKoCOZ+yBG3yMmosQsMoC0+LFhIqjTZp5nF7bW/lKBVQjXxxfr nVp6IjOXlY5/AzjBYuSTua7Xn17ymTUIFitZQl3vw4zP6fJ82Ae7cUnlIyTKSwj/zh4s COl0FAF2UP/ashQnV8Xvt7Fta9PZTh0CwzR1JCg2C9PkC4HU0kLI5cvvfU6QfzLg/tCk DcBB1aq+pnSOuUREKnSQG6cF30PquPybG4PN6QCM3W83Lw1onSzcH3h4Fk0sSrO97rlb fEaA== X-Gm-Message-State: AOJu0YxzY7HFmgOHEpYvaOhsimgcX6AdYlKv7cwnfruee1YXfXAGeTdn W/ItUXTZBcmJSmtToEa3K54CpeqPC9U= X-Google-Smtp-Source: AGHT+IEl6hjWnMS1loDC3uE+D5Is9dizEgOrDZQmTQ/QV0FrHpJuHL9FMvmJPiRDQpXlGPTJNxCrMQ== X-Received: by 2002:a25:a28e:0:b0:d74:6cb3:3653 with SMTP id c14-20020a25a28e000000b00d746cb33653mr24442108ybi.29.1693235876599; Mon, 28 Aug 2023 08:17:56 -0700 (PDT) Received: from localhost.localdomain (dsl-10-132-204.b2b2c.ca. [72.10.132.204]) by smtp.gmail.com with ESMTPSA id s14-20020ac85ece000000b00410a9dd3d88sm2364705qtx.68.2023.08.28.08.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 08:17:56 -0700 (PDT) From: Maxim Cournoyer Date: Mon, 28 Aug 2023 11:16:35 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <6715bc07d825d632140c63bd98c959d31cc5de47.1693235796.git.maxim.cournoyer@gmail.com> References: <6715bc07d825d632140c63bd98c959d31cc5de47.1693235796.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-Spam-Score: -3.12 X-Spam-Score: -3.12 X-Migadu-Queue-Id: 199584A0AF X-Migadu-Scanner: mx1.migadu.com X-TUID: P8dAT++fLM1d * 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. --- 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