From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MOCQJxCcGmQnugAASxT56A (envelope-from ) for ; Wed, 22 Mar 2023 07:11:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kKaXJxCcGmQZ6QAA9RJhRA (envelope-from ) for ; Wed, 22 Mar 2023 07:11:28 +0100 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 7361224790 for ; Wed, 22 Mar 2023 07:11:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pergh-0003jh-8B; Wed, 22 Mar 2023 02:11:07 -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 1pergc-0003jG-A6 for bug-guix@gnu.org; Wed, 22 Mar 2023 02:11:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pergc-0007oJ-0H for bug-guix@gnu.org; Wed, 22 Mar 2023 02:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pergb-0001fJ-N5 for bug-guix@gnu.org; Wed, 22 Mar 2023 02:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#59256: Emacs-guix tab-completion returns gexp error Resent-From: Joshua Hecker Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 22 Mar 2023 06:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59256 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos , 59256@debbugs.gnu.org Received: via spool by 59256-submit@debbugs.gnu.org id=B59256.16794654306353 (code B ref 59256); Wed, 22 Mar 2023 06:11:01 +0000 Received: (at 59256) by debbugs.gnu.org; 22 Mar 2023 06:10:30 +0000 Received: from localhost ([127.0.0.1]:33282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1perg5-0001eP-O1 for submit@debbugs.gnu.org; Wed, 22 Mar 2023 02:10:30 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:47056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1perg3-0001eC-Dc for 59256@debbugs.gnu.org; Wed, 22 Mar 2023 02:10:28 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4PhJ3v2hC2z9sQ8; Wed, 22 Mar 2023 07:10:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679465419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wKQPc9kWixxQ3DuZSgKwr7qShG+gbd/txMZZpdZNSVc=; b=gEdLUqUBjVvJ8bna3l4WIM77F/DgavZB6LVEL/4Q4IvasdK1UuMHsBhZe+Nym60ta4af3B k3vO6o5peYW4AZ/vvBlypzXio01YuZQi+a7gS9DViEDyzbDrk5HtC4/N/GVyZBBPBPfja1 XvVUSpfLjsQJ/Pk0p7jLIKtW5BT2AHD4q8iI0hfSmUMaBrU5lSbI4hRGpYfsfjPtU1B7am UzQgg2NQ+ZHtiZlDwLpi/dw2gXo3e9sLURhLcHVschk7uJ59MzB/WJnrHBn9V+0LccjOMg K3szZnRQwPYOrTCAta2lJ78vPEc3ZtMW64URpoelX7Buyq8IVMtakescYs6Jtg== In-Reply-To: (Maxime Devos's message of "Tue, 3 Jan 2023 23:25:46 +0100") References: <87mt8umrex.fsf@mailbox.org> <87h6yl4f8b.fsf@mailbox.org> Date: Wed, 22 Mar 2023 01:10:14 -0500 Message-ID: <874jqde2pl.fsf@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain X-MBO-RS-ID: 464e135559470cf1008 X-MBO-RS-META: nd1dgg6ticqei4iogap39eknifqto515 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: Joshua Hecker From: Joshua Hecker via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679465488; a=rsa-sha256; cv=none; b=obQCde8B4Sk/gbgjRBL73ErU5uJt22oigYUVmZsbEWeBUzUrL4QIl9jFCyP/G5MTMzooW6 0S9REykU30dlLclk76l+laDymK8fVGYVkHY4pI7+cudCjtoQKNYrnkDa8u3wiNbUK0OEY4 YX+hC8xcS2xrjrfS5lKNBGW5JZppPDpPjeMHCkql0VR83SQFgSwc9qzns+DPC+zSmRUxa5 LOhNGTI++vF7VJFD/cDz3uYEdVZR6JCSO3dSMxpMASKok0sH/N5/KkiU3ec58ct0czARXi rw3OXCIYS7Bq2bUP9NnJkbct+nBzopQNUNZnNlJmQgOz7kXDoH1sTCOQEncmGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=gEdLUqUB; dmarc=pass (policy=none) header.from=gnu.org; 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=1679465488; 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: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=wKQPc9kWixxQ3DuZSgKwr7qShG+gbd/txMZZpdZNSVc=; b=CUes3NyRqX1vZTq+tnpebccdYrPTv0RdK9Deik0qEhZhiOZdF+JimzwHU9c4rKpTw9H7Yf JxfrkiTN5c9B1nwpxa4sIvpdsI+0bv5EwdyZq414WNhwgo653894uKdvGFYJb7J6kLSnQk Xs+PTDCzzYePeOJlmlRnuPeqQrCDZbbjavdtAl1BUhPZKdnaslMRhI90W2qDqJ/p2p+oKw kDiUpH63fvjpvvvZforrH99APMV5GvknE51FY0WRmvpvtZqfh6rMxsRrwblt39wmUrnE6t 818ikHeV84dNlRx14z9fjOOrwaNXedRfxQVoCcPdJghVD+J6Z0XrGJtPALWd3w== X-Migadu-Spam-Score: -3.85 X-Spam-Score: -3.85 X-Migadu-Queue-Id: 7361224790 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=gEdLUqUB; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Scanner: scn1.migadu.com X-TUID: klJ8hHavp5a8 Maxime Devos writes: Sorry for getting back to you so late, life got in the way, work and setting up my POWER9 machine :). But I still hope you can provide some wisdom. > I've heard about something about Guile sockets and REPLs, so I've > investigated a bit and I think I found a Guix bug instead of a Guile > bug (and is unrelated to sockets or REPLs): Im glad you found something different happening behind the scenes. I only came to that conclusion because I loaded my own [default] geiser repl with emacs-guix mode, and comparing that to the emacs-guix repl that loads automatically. > In the error message, there is a mention of "#~". Perhaps somehow, no > hash extension (not sure about terminology) for G-exps installed? > This is confirmed by: > > scheme@(emacs-guix) [2]> (fluid-ref* %read-hash-procedures 0) > $24 = ((#\. . # port)>)) > > It's also not a matter of some parametrisation: > > scheme@(emacs-guix) [2]> (fluid-ref* %read-hash-procedures 1) > $25 = () > scheme@(emacs-guix) [2]> (fluid-ref* %read-hash-procedures 2) > $26 = () > > How does this happen? (after all, (guix scripts deploy) imports (guix gexp)) > > Going by the backtrace I get: > > [...] > In guix/ui.scm: > 2263:7 17 (run-guix . _) > In ice-9/boot-9.scm: > 1747:15 16 (with-exception-handler # ice-9/boot-9.scm:1831:7 (exn)> _ #:unwind? _ #:unwind-for-type _) > In guix/ui.scm: > 2184:20 15 (show-guix-help) > In srfi/srfi-1.scm: > 691:23 14 (filter-map # _ . _) > In ice-9/ports.scm: > 433:17 13 (call-with-input-file _ _ #:binary _ #:encoding _ > #:guess-encoding _) > In guix/ui.scm: > 2109:16 12 (_ # /home/antipode/.config/guix/current/share/guile/site/3.0/guix/scripts/deploy.scm > 22>) > In ice-9/read.scm: > 734:20 11 (%read # /home/antipode/.config/guix/current/share/guile/site/3.0/guix/scripts/deploy.scm > 22> # datum)> _) > 210:5 10 (read-parenthesized #\)) > [...] > > That is, one of the earliest things that happen, is that (guix ui) > reads the file "(guix scripts deploy)" -- it doesn't do the reflection > equivalent of (use-module ...) which will run the imports before > reading the rest of the code. > > As such, the hash extension isn't installed even though it is required > to read the file and even though the required module (guix gexp) is > listed in the imports! > > To fix this, I propose modifying 'source-file-command' in (guix ui), > by adding a clause to > > (match (read port) > (('define-command _ ('synopsis synopsis) > _ ...) > (command command-name synopsis 'main)) > (('define-command _ > ('category category) ('synopsis synopsis) > _ ...) > (command command-name synopsis category)) > ((? eof-object?) > #f) > (_ > (loop))))))) > > which recognises (define-module [...] #:use-module MODULE ...), > and if MODULE is (guix gexp) or (srfi srfi-88), then does > (resolve-module 'MODULE #:ensure #false) before continuing with > (loop). > > (Untested!) Very cool that you found this. I would love to test this out, is there any formal way to apply this and have emacs point to the test guix? Sorry for novice questions, any info to do the work would be much appreciated. Stay safe, -Joshua