From patchwork Tue Apr 1 16:37:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Kirsch X-Patchwork-Id: 41137 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 940A227BBE9; Tue, 1 Apr 2025 17:39:42 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 6E99827BBE2 for ; Tue, 1 Apr 2025 17:39:40 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzedv-0004IP-7F; Tue, 01 Apr 2025 12:39:18 -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 1tzedk-0004Hu-BG for guix-patches@gnu.org; Tue, 01 Apr 2025 12:39:05 -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 1tzedj-00006W-Hy for guix-patches@gnu.org; Tue, 01 Apr 2025 12:39:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:Subject; bh=YptPnbPbpTjWgLiBet2HraADduUHy+OmHEDdz8O9M18=; b=mq1SBPrXzy3M5yjS8eDakm+SCB84Pjz+76GPeOsh6jz5+qOt/RFU/fJcXZDoF3XwCVhfduRqSsfYnE9gDFe22KWb7Crekhdw9RylFGiRIbMv81xNYPzxaMz4PBe7A7qnOe5LbXCOm9q6Qk8f38OgwoZeYO6Zt31Sj/XtdmpPdZnNVIzK+o82gYgniSYMv148qhz++e9LRD2Wjm/asTX3OQT5Lnk1C9Mb8H1BDaa5wneoYBh/r22XCESikTQucxebEs9L1cp5n81wlAzgfpcYEk58QOA4XbbgDe8oL970YIhMfF6TaaNdLxDCXcIp9qFm79F8sMC/p8v8LcVNYJKVcQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzedj-0007oU-01 for guix-patches@gnu.org; Tue, 01 Apr 2025 12:39:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77436] [PATCH] guix: ui: Extend error message. Resent-From: Jakob Kirsch Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Apr 2025 16:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77436 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77436@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174352548529632 (code B ref -1); Tue, 01 Apr 2025 16:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Apr 2025 16:38:05 +0000 Received: from localhost ([127.0.0.1]:50656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzecn-0007ho-3P for submit@debbugs.gnu.org; Tue, 01 Apr 2025 12:38:05 -0400 Received: from lists.gnu.org ([2001:470:142::17]:35630) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzecj-0007gQ-PG for submit@debbugs.gnu.org; Tue, 01 Apr 2025 12:38:03 -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 1tzeca-00045t-Hh for guix-patches@gnu.org; Tue, 01 Apr 2025 12:37:54 -0400 Received: from mout.web.de ([212.227.15.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tzecX-0008RU-H1 for guix-patches@gnu.org; Tue, 01 Apr 2025 12:37:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1743525462; x=1744130262; i=jakob.kirsch@web.de; bh=YptPnbPbpTjWgLiBet2HraADduUHy+OmHEDdz8O9M18=; h=X-UI-Sender-Class:Date:From:To:Subject:Message-ID:MIME-Version: Content-Type:cc:content-transfer-encoding:content-type:date:from: message-id:mime-version:reply-to:subject:to; b=WUwV47KLygYUYUmw1iuJWQjIknmoJy8v5ki9MrdSzgO0XcsLKhP/Ik2ACGJGAz6j efJFKWD4Tcof3doxjWW+ZbAW7KlTit7i2L8Jlv17LPzcQan8t4HQRuop5WXbaJpSj RlPYDPI+vV8g1F2UAIBYVcpOgAOCOmgbubxn8pOei7itlUQtyUs8+BtSkBxyNHhZv l/Sgxv4GDxVDk/aHkdsPdTP9TBxTT7xYStyjT+LQEWzc7TfUVHH39eqMp2xq6+pO2 ukOGMpzTW/uqsTaGjuva7KP6WwyUi7eszClGRq4iY9lKDJheEpmxvRbKRTFP61tpF 67DQ2R7LK46FwnCaAQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from kernelpanicroom ([134.19.62.80]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MCoku-1tqtC22YAy-00Bflq for ; Tue, 01 Apr 2025 18:37:42 +0200 Date: Tue, 1 Apr 2025 18:37:41 +0200 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Provags-ID: V03:K1:EFoVyGZE2GCfsDs2+ReWGLaL+Wf/LSjiu+8s21w0W06CrHcq8sx fAsBbT5/r1WQIoEt4nGMLQtYmrM0FONXZThcVcJT4PXkrj0ERS7J53BMKsgvGpzTrhZfWs7 l9WlxXjctXoudM3ivwaYgTDFVuylwYXsXKoKekZoI2/hqXsQ/RM+PSICsD4qai8OFsbqiT1 UkY80mEtGWLo6JM4uiSEA== UI-OutboundReport: notjunk:1;M01:P0:pGwHY6IYSIc=;ZW6CTMQdfLGPqNC8pRYUShM+yD1 PtumP7UgZRF8HeBsGXfhgjsVfKxiPfznUo++MMmf4xcjXzGpZVSoY/DMYrzZzYM3Sne6ZAIuG 3GOHq/M3GhAl7P36UYDvDABmmhrWjy9PDXezYIA3qnoNIzB3BAKehAEDYmCfEBf3Vk1EVGWAb m8xag/tGau4lF+hP3ZMj6rtg/x4il4KFnmNtv0lX2lfU/7KmJonMJongWPWjIT57ECvzxgiHm Zn5ANu9JL6sEW25JIFvSsLiOkjZH0ekZ0E+zD+J3pcCQen2KUrpB07stJ23Q0SCIAtfkqx98o ELg6ap7/PrWHDQmBAnGyTgAUFV93eyzL6R2/2cU4Cju/zuvGPw9uRYLTeYOfdP7ADvrXncEQO JyWbEjdgxTefWaKjWmheL2wu9kmd/ahNGsGqk3YqiqCpc2OX7Zs5a/yTzSh9qjX6ceuIzZkX3 lPyN5Nn5NOw4ufwdlloz+1KjF8O/6m9KDBWG0FJFH+rFuqi8GD+fhq23FX2Kp4nJ65QFgKWNv dyHRKTOVoxu8bnl+JOXHDaUnZ+56fAL0/Wmskz6Xl3LB5TH7F9IxeKeUIbL+g3jgkRNma3XLl E/WYbYmVD9TznuUl0U14bGD6yT2yod6cRgecnKTvz81zGHS4LIV3UGVmvqxmQyblCuJBrrxZw J6MX2nBONMm/OXbwQXnZ5Ait/DiPrjgbeQFdfc7hkxBV6iPzBO4v/ZMtE5h/X8JQSzKt/eIsS udUe/06zoaGPg5MzK6fndDDporAcwuzEAxhVPWeO8HB19A9HBR0qpzo+qsyzTSFz4nIwbt3iK DOp/sgB/c9K97ZB//qlYtAmrA7aO3CI634oklnc4MUSuFFCd6t2uyixctj4D4x2FUBvoegXK+ xNty2A4zoBgT8rpAgRoT8GeE/Bhsclw8bRKBAzioF+3Yt9aSZkiwXgh/6J3yJIG3gXwLuD9l2 cEUVkdvwXGjsxzNTbFQcbzRIAztgLkxIy1TcStXGD4IzzvkWw2s0U+l0y187LAaak1vsqIC0d VP4nn4HoIlqmHCbJq3/hD/i1zHiQBOrl7cV7f1clWJUrv6yHQvvbsnMoECcrLWlnElaUnXqyE zyCYA9pIoHGtTditSiboughI3Cadco3uoDb8eAwDp+yCMUbiPhGfRIzK0A5iKcnDZfRytAgPB wOjk7Yeo2A2iPs2vqhTFUS5sFVoar/GdvrKFzrRO4rYajK1krjMD8sxQIWrV6d5Xe30Ooy2xa 4+LZ7EHx7g1bEMHml/2bEMOaLBeKSfQZCSNst3/UETRzkAhYq0j4k7k1g5z+94ff1QJN3RVRt Z8a9e2PrLIdJkPuuxw6CtaaS0/U5JEHRLKjqVhtOunPB6dWHNQl+kzB2zoPG7LfV5u8NvGaQy DMQ8BCxo2wsqancR36fSI4x6L2soP5/ck4VsDtQcIcY3Px/GvuaatiF6KBmqQdlaihnxBXQsN S82cq9A== Received-SPF: pass client-ip=212.227.15.3; envelope-from=jakob.kirsch@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Jakob Kirsch X-ACL-Warn: , Jakob Kirsch via Guix-patches X-Patchwork-Original-From: Jakob Kirsch via Guix-patches via From: Jakob Kirsch 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 The usual error message for when you forgot to import a variable only includes a suggestion for when you use (use-modules (...)) but not the #:use-module case that is used with the (define-module) syntax. This patch extends the error message so you can easily copy and paste it into the module definition. From aa3897ef3e99ec959ef27363cb7fd53e53301bd7 Mon Sep 17 00:00:00 2001 Message-ID: From: Jakob Kirsch Date: Tue, 1 Apr 2025 18:34:01 +0200 Subject: [PATCH] guix: ui: Extend error message. The usual error message for when you forgot to import a variable only includes a suggestion for when you use (use-modules (...)) but not the #:use-module case that is used with the (define-module) syntax. This patch extends the error message so you can easily copy and paste it into the module definition. Change-Id: Ia3c97a8c60294f4b4159987b438bd45412f0a367 --- guix/ui.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: 61fe7d1749720d4e6f0feb00a8baa8ca1606e1a4 -- 2.49.0 diff --git a/guix/ui.scm b/guix/ui.scm index d462f7133e..615d3e563a 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -366,8 +366,8 @@ (define* (report-unbound-variable-error args #:key frame) (#f (display-hint (G_ "Did you forget a @code{use-modules} form?"))) ((? module? module) - (display-hint (G_ "Did you forget @code{(use-modules ~a)}?") - (module-name module))))))) + (display-hint (G_ "Did you forget @code{(use-modules ~a)} or @code{#:use-module ~a}?") + (module-name module) (module-name module))))))) (define (check-module-matches-file module file) "Check whether FILE starts with 'define-module MODULE' and print a hint if