From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66912: With `require', the byte compiler reports the wrong file for errors. Date: Sat, 09 Nov 2024 11:45:36 -0500 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7378"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 66912@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 17:46:32 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t9obY-0001md-1E for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 17:46:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9ob8-0001N7-4i; Sat, 09 Nov 2024 11:46:06 -0500 Original-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 1t9ob4-0001Ja-Lm for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:46:02 -0500 Original-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 1t9ob4-0001EU-D4 for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:46:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=3QEAFlx45fqeFygfAQngx8yqKLpoqtilHJMXqLwrUSw=; b=eDRVZsi0OK6BVVwSgnuuRofEFqVxsHIG6S2WO8qN9dXvIxa/HuDkbNajfdgFjLoAWiaeP6D5MiG+wVB8x3v+N8dZCFEfEC07Y2dezWy0G15SG0L1iSP7b5D66Dmwc/qwTEDSC4uTD4PeHl0B3iiMnaMZa1deKLSJjxSmHeeHCheQNmRYCuOyUYPEe791oizp0fVNE4TOwggU4cu2i6v6beAb0y6BNZjfELC7kk3tO/utMP9POn3PxT5EMyJiPutTHD8LizGMfdrnUHBHoqUCCtE+dV2nkfVP92R1aERl46/FrsYVb3Wqh64or3SXuQ1czwkRZxEyivzLKqMNMv/7jQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9ob4-0004cT-98 for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 11:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 16:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66912 X-GNU-PR-Package: emacs Original-Received: via spool by 66912-submit@debbugs.gnu.org id=B66912.173117074817734 (code B ref 66912); Sat, 09 Nov 2024 16:46:02 +0000 Original-Received: (at 66912) by debbugs.gnu.org; 9 Nov 2024 16:45:48 +0000 Original-Received: from localhost ([127.0.0.1]:54256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9oaq-0004by-BP for submit@debbugs.gnu.org; Sat, 09 Nov 2024 11:45:48 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9oal-0004bQ-MZ for 66912@debbugs.gnu.org; Sat, 09 Nov 2024 11:45:44 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 078BD801F1; Sat, 9 Nov 2024 11:45:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731170737; bh=zJbNbZGtdl0aoI/IesL9pV78HyyX4cyHSWgM9KemMig=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AFXiipeRAbXvTcNBz8O1UUGOLyue9SN2Cd1vNwURoGFtIiQDySWs6D7QD3PgywHzz EFwvMinqoK/7UG+qz150jEfmmZgCGIchrzKybTVrecDGYJwTe+sHZPcH0gY/sDzjvy G6MUV7r5WJvhvwCJSNKQyv8QVjb2NzQGtMxtX/1hgSoD+Tl7iWqTZvDy35OrTHyDGj vT+fruFxd9UlkpqUZvVvjW4iIelFz2eZhdyv4N6iCVHSPrw8y/SB6FsDuVs0UlXL0F qPxFzllMk9nR56yiiXGn/LLTQg4ybKw8Pm1ae6stWCWEOwtb8FhaE/GjqbJWkBpcz5 XwyvhH760A2+w== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1D900803AD; Sat, 9 Nov 2024 11:45:37 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E63CF120401; Sat, 9 Nov 2024 11:45:36 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Sat, 9 Nov 2024 12:35:19 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295146 Archived-At: >> > OK, I see what you mean. I took it for granted that the message should >> > be the same, regardless of whether it is reported by a debugger or by >> > the error handler. >> AFAIK the debugger does not emit the "error message" at all, it shows >> the error object instead, so it's already different. > That doesn't seem to address the point I made above at all. Then I don't know what "the message" you're referring to. (or are you referring to some other point you made elsewhere?) >> And the full info would readily be available from `Vloads_in_progress_at_error`. > Vloads_in_progress_at_error is not available to the user, being an > internal variable. [ I'd make it user-visible, as well Vload_in_progress, but that's not actually relevant. ] Even if it's not directly exposed to the user the info *is* available, so we can offer ways to make use of it. > The problem with the Vloads_in_progress_at_error approach is that its > information gets prefixed to EVERY error message which occurs while the > debugger's recursive edit is in progress. This is not a Good Thing. If `load-in-progress-at-error` hold (C B A), I'd make the error message emit either nothing, or just C, or B and C, or A and B and C depending on where in the call stack we're calling from (using the `while` loop that compares to `load-in-progress`). >From within the debugger, presumably `load-in-progress` would still be (C B A), so error messages would usually display no "while loading" at all, unless the errors themselves occur within a load of some file D, of course. Note that this is not just the behavior we happen to get with the hacks I came upon along the way. It's the behavior I'm aiming for (e.g. it's also the behavior that we'd get with the `handler-bind` approach I advocated earlier). >> AFAICT > >> (equal (error-message-string ERROR-OBJECT) >> (error-message-string ERROR-OBJECT)) > >> will not always return t, which I'd consider as a misbehavior. > > No. The proposed mechanism of Vloads_still_in_progress has no influence > on error-message-string. Sorry, I meant (equal (prefix-load-file-names (error-message-string ERROR-OBJECT)) (prefix-load-file-names (error-message-string ERROR-OBJECT))) [ I assumed you had added a call to `prefix-load-file-names` in `error-message-string`. Not sure why you didn't, but I haven't thought very much about which option is best in this regard. ] > Can we get this bug closed soon, please? As I said, you don't need to convince me. Stefan