From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#50207: 28.0.50; ansi-color-compilation-filter and rgrep Date: Thu, 15 Dec 2022 10:02:14 +0200 Organization: LINKOV.NET Message-ID: <86fsdhgk69.fsf@mail.linkov.net> References: <9c24f4b0-e7aa-62d3-5737-0edffb8b2501@gmail.com> <87lf4nbj1l.fsf@mail.linkov.net> <875yeled97.fsf@gmail.com> <868rjhm57w.fsf@mail.linkov.net> <87lenalzdn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36161"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Jim Porter , Manuel Uberti , 50207@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 09:33:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5jg2-0009Fm-FF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 09:33:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5jfu-0000eK-HJ; Thu, 15 Dec 2022 03:33:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5jfr-0000dJ-Dv for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 03:33:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5jfq-0007Re-L0 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 03:33:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5jfq-0008N7-1m for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 03:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 08:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50207 X-GNU-PR-Package: emacs Original-Received: via spool by 50207-submit@debbugs.gnu.org id=B50207.167109315332153 (code B ref 50207); Thu, 15 Dec 2022 08:33:02 +0000 Original-Received: (at 50207) by debbugs.gnu.org; 15 Dec 2022 08:32:33 +0000 Original-Received: from localhost ([127.0.0.1]:42488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5jfN-0008MX-0p for submit@debbugs.gnu.org; Thu, 15 Dec 2022 03:32:33 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:48317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5jfI-0008MN-Nv for 50207@debbugs.gnu.org; Thu, 15 Dec 2022 03:32:31 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 4D8E3240014; Thu, 15 Dec 2022 08:32:19 +0000 (UTC) In-Reply-To: <87lenalzdn.fsf@gmail.com> (Augusto Stoffel's message of "Wed, 14 Dec 2022 17:32:36 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251034 Archived-At: >> Have you tried to replace a number with a marker? Does it help to fix >> this bug? > > I've tried this and, although I think it's sane and should be done > anyway, it didn't solve this bug in particular. Does this patch solve the bug? ``` diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 5e7015db549..d7508759702 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -688,6 +688,7 @@ ansi-color-filter-region (start (cadr context))) (save-excursion (goto-char start) + (forward-line 0) ;; Delete escape sequences. (while (re-search-forward ansi-color-control-seq-regexp end-marker t) (delete-region (match-beginning 0) (match-end 0))) @@ -727,6 +728,7 @@ ansi-color-apply-on-region (end-marker (copy-marker end))) (save-excursion (goto-char start-marker) + (forward-line 0) ;; Find the next escape sequence. (while (re-search-forward ansi-color-control-seq-regexp end-marker t) ;; Extract escape sequence. ```