From patchwork Sat Jan 27 12:20:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 59466 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0D3E227BBE2; Sat, 27 Jan 2024 12:21:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DA0EE27BBE9 for ; Sat, 27 Jan 2024 12:21:15 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rThg9-0005nu-AX; Sat, 27 Jan 2024 07:20:57 -0500 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 1rThg7-0005nf-L4 for guix-patches@gnu.org; Sat, 27 Jan 2024 07:20:55 -0500 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 1rThg7-0000mR-Al for guix-patches@gnu.org; Sat, 27 Jan 2024 07:20:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rThgE-00039f-18 for guix-patches@gnu.org; Sat, 27 Jan 2024 07:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68709] [PATCH] gnu: emacs-citar: Fix autoloads and restore tests Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 27 Jan 2024 12:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68709 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin , Edward Wilson , 68709-done@debbugs.gnu.org Cc: Katherine Cox-Buday , Edward Wilson , Liliana Marie Prikler Received: via spool by 68709-done@debbugs.gnu.org id=D68709.170635803512075 (code D ref 68709); Sat, 27 Jan 2024 12:21:01 +0000 Received: (at 68709-done) by debbugs.gnu.org; 27 Jan 2024 12:20:35 +0000 Received: from localhost ([127.0.0.1]:53600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rThfm-00038g-Eo for submit@debbugs.gnu.org; Sat, 27 Jan 2024 07:20:34 -0500 Received: from 9.mo582.mail-out.ovh.net ([87.98.171.146]:58005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rThfi-00038U-Rr for 68709-done@debbugs.gnu.org; Sat, 27 Jan 2024 07:20:33 -0500 Received: from director2.ghost.mail-out.ovh.net (unknown [10.108.2.78]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 2D77E27588 for <68709-done@debbugs.gnu.org>; Sat, 27 Jan 2024 12:20:22 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-2p4rw (unknown [10.110.113.182]) by director2.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 85A301FD4D; Sat, 27 Jan 2024 12:20:21 +0000 (UTC) Received: from ngraves.fr ([37.59.142.101]) by ghost-submission-6684bf9d7b-2p4rw with ESMTPSA id HnisFgX1tGWUjwAAPUO7qA (envelope-from ); Sat, 27 Jan 2024 12:20:21 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-101G004951ac8aa-1d0b-40d4-9607-cc5e55b9332c, BBC544E0C29A249A2CB0D8435C97D56FC2023E84) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 90.110.172.34 In-Reply-To: <87plxoca5z.fsf@trop.in> References: <10f970b791c6281a24e643714c0415fcab656246.1706135680.git.bienjensu@gmail.com> <87plxoca5z.fsf@trop.in> Date: Sat, 27 Jan 2024 13:20:20 +0100 Message-ID: <874jez9ddn.fsf@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 17655799389640188641 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelledgfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehmtderredttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepffdtvedtgedvgfdugeefueeuudeuhfegtdelgfdviedvteeuffejteeiheeutdfgnecukfhppeduvdejrddtrddtrddupdeltddruddutddrudejvddrfeegpdefjedrheelrddugedvrddutddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeikeejtdelqdguohhnvgesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvddpmhhouggvpehsmhhtphhouhht 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Just to let you know, on my side I had written this patch to provide a more general solution, I don't know if setting a particular emacs package is a good solution in the long run. I'm deleting it from my local guix, feel free to rework on it if useful. Nicolas On 2024-01-26 19:49, Andrew Tropin via Guix-patches via wrote: > On 2024-01-24 22:34, Edward Wilson wrote: > >> The default build-system emacs doesn't properly expand cl-lib macros when >> compiling autoloads. This patch changes the `#:emacs` build argument, fixing a >> present bug (reproducible by requiring citar-autoloads in a minimal >> environment). This change also allows the validation of compiled autoloads to >> succeed, hence the test phase is restored. >> >> * gnu/packages/emacs-xyz.scm (emacs-citar): Change build-system emacs and >> restore tests >> >> Change-Id: Id56de922e5220383f8c5015a01e39b4aa2ea8cfb >> --- >> gnu/packages/emacs-xyz.scm | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm >> index ad8c72e97d..b8c97d1767 100644 >> --- a/gnu/packages/emacs-xyz.scm >> +++ b/gnu/packages/emacs-xyz.scm >> @@ -23633,6 +23633,7 @@ (define-public emacs-citar >> (build-system emacs-build-system) >> (arguments >> (list >> + #:emacs emacs-no-x >> #:tests? #true >> #:test-command #~(list "emacs" "--batch" "-L" "." >> "-l" "test/citar-test.el" >> @@ -23642,10 +23643,7 @@ (define-public emacs-citar >> #:phases #~(modify-phases %standard-phases >> (add-before 'build 'set-home >> (lambda _ >> - (setenv "HOME" "/tmp"))) >> - ;; XXX: The following phase reports bogus errors. Suppress >> - ;; it for now. >> - (delete 'validate-compiled-autoloads)))) >> + (setenv "HOME" "/tmp")))))) >> (propagated-inputs (list emacs-auctex >> emacs-citeproc-el >> emacs-embark >> >> base-commit: ffc5fefce370f5fc01091869e13fdf525be1e0c0 > > Hi Edward! > > Thank you very much for the fix, added a trailing dot to commit message > and pushed as > https://git.savannah.gnu.org/cgit/guix.git/commit/?id=8ae8b9804f From d8cbd304da0e4a9a073a213002c9876fe3011fe3 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Wed, 15 Nov 2023 08:48:44 +0100 Subject: [PATCH] emacs-build-system: cl-defstruct autoloads. Change-Id: If46b1d44fcc7f93da58de2573e1515a702c4dd52 --- guix/build/emacs-utils.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm index 8e12b5b6d4..b7820d6390 100644 --- a/guix/build/emacs-utils.scm +++ b/guix/build/emacs-utils.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018, 2020, 2022 Maxim Cournoyer ;;; Copyright © 2019 Liliana Marie Prikler ;;; Copyright © 2022 Fredrik Salomonsson +;;; Copyright © 2023 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -119,7 +120,14 @@ (define (emacs-generate-autoloads name directory) ((fboundp 'make-directory-autoloads) ;; Emacs 28 (make-directory-autoloads ,directory ,file)) - (t (update-directory-autoloads ,directory)))))) + (t (update-directory-autoloads ,directory))) + (when (file-exists-p ,file) + (with-temp-buffer + (insert-file-contents ,file) + (when (search-forward "(cl-defstruct" nil t) + (beginning-of-line) + (insert "(require 'cl-lib)\n") + (write-region (point-min) (point-max) ,file))))))) (emacs-batch-eval expr #:dynamic? #t))) (define* (emacs-byte-compile-directory dir) -- 2.41.0