GNU bug report logs - #77846
[PATCH ]31.0.50; C# dotnet compiler output incorrectly handled by compilation-mode

Previous Next

Package: emacs;

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

Date: Wed, 16 Apr 2025 18:26:03 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77846 <at> debbugs.gnu.org
Subject: bug#77846: [PATCH ]31.0.50; C# dotnet compiler output incorrectly handled by compilation-mode 
Date: Fri, 18 Apr 2025 18:57:39 +0200
[Message part 1 (text/plain, inline)]
> On 18 Apr 2025, at 17:14, Mattias Engdegård <mattias.engdegard <at> gmail.com> wrote:
> 
> +          (optional (seq "{ESC}=")) ; escape sequence sometimes found on first line of output
> 
> Please keep lines within 80 columns, and don't put actual control chars in source code; use escape sequences. You don't need the `seq`.
> Something like
> 
> +          (opt "\e=")  ; sequence sometimes found on first line of output
> 
> perhaps.
> 

I've made some changes like that, and that seems to work fine.

> As Eli remarked we'd like to see an example in compilation.txt

Done. Didn't know about this one.

> , and just as important is adding a test case in compile-tests.el.

I'll defer that slightly based on comment below.

> 
> It would also be useful to know precisely what that escape sequence is supposed to be doing. As far as I can tell, `ESC =` is the DECKPAM sequence that puts the keypad in application mode, which makes no sense at all in this context.

I'll admit to not know too much in depth stuff about escape codes and how they're used.

From trying to read the MSBuild source code, my best guess so far is that the escape-code seems to be used in an elaborate output-mode detection process:

https://github.com/dotnet/msbuild/blob/a9d68ab58eab3c25b6378a90be8060dd1429a6ef/src/Framework/NativeMethods.cs#L1588-L1642

Someone else might know more about this, or are better able to parse this code.

> 
> Perhaps it's compilation-filter-hook that really should be used to filter it out, and other sequences like it?
> 

That also seems like an appropriate solution.

Is there precedence for solution like in place already?

--
Jostein
[Message part 2 (text/html, inline)]

This bug report was last modified 19 days ago.

Previous Next


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