Subject: [PATCH] 31.0.50; csharp-mode compilation-mode incorrectly matches filenames when output contains leading spaces
From: Jostein Kjønigsen <[email-masked]>
To: [email-masked]
Date: Tue, 29 Apr 2025 11:31:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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

￼