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


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: mattias.engdegard <at> gmail.com, Jostein Kjønigsen
 <jostein <at> secure.kjonigsen.net>
Cc: 77846 <at> debbugs.gnu.org
Subject: Re: bug#77846: [PATCH ]31.0.50; C# dotnet compiler output incorrectly
 handled by compilation-mode
Date: Sat, 10 May 2025 12:15:27 +0300
Ping!  Mattias, could you please answer Jostein's question?

> From: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
> Date: Wed, 23 Apr 2025 08:29:36 +0200
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>  77846 <at> debbugs.gnu.org
> 
> 
>  On 19 Apr 2025, at 21:28, Mattias Engdegård <mattias.engdegard <at> gmail.com> wrote:
> 
>  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?
> 
>  This hook would be the most obvious thing to use if the stray sequence is emitted by a different layer
>  and risks appearing in different contexts. For example, one could write something like
> 
>  (defun stray-msbuild-seq-compilation-filter ()
>   (defvar compilation-filter-start)
>   (let ((begin compilation-filter-start)
>         (end (point))
>         (inhibit-read-only t))
>     (save-excursion
>       (goto-char begin)
>       (while (re-search-forward (rx bol "\e=") end t)
>         (delete-region (match-beginning 0) (match-end 0))))))
> 
>  and then add that function to compilation-filter-hook.
> 
> Just to be clear and to make sure I understand: Do you suggest I test that hook locally and if it works,
> propose that as a patch? If so, should I add it to compile.el? Or were you suggesting something else?
> 
> I see that in the entirety of the current Emacs code-base, there are only 4 implemented hooks of this kind,
> and they are kinda spread around all over (follow.el, grep.el, so-long.el).




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.