GNU bug report logs - #78128
[PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches filenames when output contains leading spaces

Previous Next

Package: emacs;

Reported by: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>

Date: Tue, 29 Apr 2025 09:32:02 UTC

Severity: normal

Tags: patch

Done: Yuan Fu <casouri <at> gmail.com>

To reply to this bug, email your comments to 78128 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#78128; Package emacs. (Tue, 29 Apr 2025 09:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 29 Apr 2025 09:32:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches
 filenames when output contains leading spaces
Date: Tue, 29 Apr 2025 11:31:02 +0200
[Message part 1 (text/plain, inline)]
Hey everyone

When using csharp-mode (or csharp-ts-mode) in Emacs, and you invoke M-x compile with "dotnet build", sometimes errors in the compiler output will contain leading whitespace (especially for nuget errors).

The expressions defined in csharp-mode.el does not account for this leading whitespace, and in those cases will capture it as part of the filename where the error occurred. This leads to failure to navigate to the point of error.

Attached is a patch which corrects this bug.

—
Kind Regards
Jostein Kjønigsen



[Message part 2 (text/html, inline)]
[0001-csharp-mode.el-fix-incorrect-compilation-mode-matche.patch (application/octet-stream, attachment)]
[Message part 4 (text/html, inline)]

Reply sent to Yuan Fu <casouri <at> gmail.com>:
You have taken responsibility. (Thu, 01 May 2025 07:55:02 GMT) Full text and rfc822 format available.

Notification sent to Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>:
bug acknowledged by developer. (Thu, 01 May 2025 07:55:02 GMT) Full text and rfc822 format available.

Message #10 received at 78128-done <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Cc: 78128-done <at> debbugs.gnu.org
Subject: Re: bug#78128: [PATCH] 31.0.50; csharp-mode compilation-mode
 incorrectly matches filenames when output contains leading spaces
Date: Thu, 1 May 2025 00:53:59 -0700

> On Apr 29, 2025, at 2:31 AM, Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> wrote:
> 
> Hey everyone
> 
> When using csharp-mode (or csharp-ts-mode) in Emacs, and you invoke M-x compile with "dotnet build", sometimes errors in the compiler output will contain leading whitespace (especially for nuget errors).
> 
> The expressions defined in csharp-mode.el does not account for this leading whitespace, and in those cases will capture it as part of the filename where the error occurred. This leads to failure to navigate to the point of error.
> 
> Attached is a patch which corrects this bug.

Thanks! I applied the patch to emacs-30 since it’s a bug fix. BTW, checkout the CONTRIBUTE file under emacs repo root for the commit message convention. You can also just take a look at the commit messages in git history. If you use magit, you can just press C with point in a hunk to automatically insert the correct commit message entry to the commit message buffer.

Yuan



This bug report was last modified 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.