From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#50207: 28.0.50; ansi-color-compilation-filter and rgrep Date: Thu, 08 Dec 2022 23:34:12 +0100 Message-ID: <875yeled97.fsf@gmail.com> References: <9c24f4b0-e7aa-62d3-5737-0edffb8b2501@gmail.com> <87lf4nbj1l.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7121"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Jim Porter , Manuel Uberti , 50207@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 23:35:17 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 1p3PU5-0001eB-1v for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 23:35:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3PTw-0002uY-4c; Thu, 08 Dec 2022 17:35:08 -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 1p3PTt-0002u7-4O for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 17:35: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 1p3PTq-0000Rn-9B for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 17:35:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3PTq-0006nY-2K for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 17:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2022 22:35: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.167053886226109 (code B ref 50207); Thu, 08 Dec 2022 22:35:02 +0000 Original-Received: (at 50207) by debbugs.gnu.org; 8 Dec 2022 22:34:22 +0000 Original-Received: from localhost ([127.0.0.1]:59553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3PTC-0006n3-1x for submit@debbugs.gnu.org; Thu, 08 Dec 2022 17:34:22 -0500 Original-Received: from mail-ed1-f47.google.com ([209.85.208.47]:34624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3PTA-0006mw-Rv for 50207@debbugs.gnu.org; Thu, 08 Dec 2022 17:34:21 -0500 Original-Received: by mail-ed1-f47.google.com with SMTP id z92so835637ede.1 for <50207@debbugs.gnu.org>; Thu, 08 Dec 2022 14:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=lKCDt8BGgk0PGjFeI4G3mR+XjupUjPkNTc0bZDgmIY4=; b=pIY0jwBv8w3N67PQDBuvsO2nuTn0+VElgl6tLQGV4fFzzebQUhEFWUjdWshxW2iOn5 LDSFLjswV+rKnUJjY7dlHzhCzbASl6CP7w/9LQYYdpF4GuP8WDwcjuhrYQtpI6IK1Zxs Il4sYYM08WphyJhxqNobnONSLp5hmbK/kHEQgjzLPq1b7+0kMpYQJCOKvbCnHl27HpxK DAtOCmxAIBWbQT92Ts1GgZXZuLQu+0i7n2iz3TUDkQEkE3CiKiyJ1wlnwd6pbJX8d/DT bFErWO3ytzXvNHFiNxjGYjKS0b5SHdMS7+cdWfSafQZ5/QPYjjCtzPZmCQEzSU6vTuwS M+7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lKCDt8BGgk0PGjFeI4G3mR+XjupUjPkNTc0bZDgmIY4=; b=3V2IXpwr+HopdjUXxnAHWJbqZaQW8Ut71bx3wGV2UlvMPGOjexTVee8g0O/KSvCvAL 8wjE+zwFoNZk9J4aLW6X4RU8w8ohNPI0iOIRidscstgoPIbKe+ynvyTw2W5MdQEVo7gw dc0eBXwMmUp9ayz+xF9c8VOCdzuUMJaKHtQ/3i2gsynp1+LabqHk+8LEOgWHKQ6dLPHR MyNwDFs3OB1LKZeSGOicc3YdKr9+xEJOcZCgKN2uyazC36FjI1UxSG7/q/zCfnoKDbSn CC2GgSIGy6B4IESh+3TLVrJFYrrRKxLislvh/3akiRWRjuUDBRkpT/XAQi1V9S8K5Yxz zbEg== X-Gm-Message-State: ANoB5pntM8QjwW9IBRSIyaCQweZ0sN23yX8fd+Kvofy6eAEGWJe776hP i+GU/BXJI72wDHmguh8AnPLChOh+9e/rsw== X-Google-Smtp-Source: AA0mqf7UBgO/RiKBHDdrPySfstcUEKrVkb1Efp7otPO63ITbhBjIVg/IbKs2LGmLL5gm75pMRq7law== X-Received: by 2002:aa7:c548:0:b0:46d:cf59:c3df with SMTP id s8-20020aa7c548000000b0046dcf59c3dfmr283775edr.388.1670538854445; Thu, 08 Dec 2022 14:34:14 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::a4bf]) by smtp.gmail.com with ESMTPSA id lb14-20020a170907784e00b0077a11b79b9bsm10152716ejc.133.2022.12.08.14.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 14:34:13 -0800 (PST) In-Reply-To: <87lf4nbj1l.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 27 Aug 2021 09:06:38 +0300") 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:250342 Archived-At: On Fri, 27 Aug 2021 at 09:06, Juri Linkov wrote: >>> - (add-hook 'compilation-filter-hook #'ansi-color-compilation-filter) >> >> I encountered this a bit ago, and did a bit of diagnosis, but it ended up >> on my back-burner. I think the issue is due to how the >> compilation-filter-hooks for grep and ansi-color interact. `grep-filter' is >> fairly simple and wants to see both the start and end of an ANSI-colorized >> region, so it "rewinds" to the beginning of a line every time it's >> called. `ansi-color-compilation-filter', on the other hand, is smart enough >> to handle the case where it only sees the start of a colorized region in >> one call, and the end in the next call (see `ansi-color-context' for >> details). > > Would it be possible to solve the problem by adding a new buffer-local > variable (disabled by default) that will enable line mode for > `ansi-color-compilation-filter' so that it will handle only complete lines > like grep mode does? To complement this a bit, my hunch is that the problem is due to `compilation-filter-start' being a number and not a marker (bug?). When `grep-filter' deletes some characters between `compilation-filter-start' and the beginning of its line, it causes `ansi-color-compilation-filter' to skip treating a portion of the buffer. Or at least I was having this kind of issue in the `grep-heading-mode' suggested in a recent ticket. :-)