GNU bug report logs -
#77846
[PATCH ]31.0.50; C# dotnet compiler output incorrectly handled by compilation-mode
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> 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).
--
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.