From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58169: 29.0.50; comint-fl-mode fontifies the output Date: Sat, 01 Oct 2022 10:43:09 -0400 Message-ID: References: <87h70qcfmt.fsf@gmail.com> <871qrt8w2s.fsf@gmail.com> <8735c976a6.fsf@miha-pc> <87edvt56e3.fsf@gnus.org> <87o7uwu2pt.fsf@miha-pc> <87a66g4t1s.fsf@gnus.org> <87leq0u0p8.fsf@miha-pc> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32810"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 58169@debbugs.gnu.org, Lars Ingebrigtsen , Augusto Stoffel , Visuwesh To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 01 16:46:48 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 1oedlP-00087U-Ic for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 16:46:47 +0200 Original-Received: from localhost ([::1]:51088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oedlO-0006bP-Cr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 10:46:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oedik-0004iO-JU for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 10:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oedik-0000Ng-Bc for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 10:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oedik-0001Is-7R for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 10:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Oct 2022 14:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58169 X-GNU-PR-Package: emacs Original-Received: via spool by 58169-submit@debbugs.gnu.org id=B58169.16646354004953 (code B ref 58169); Sat, 01 Oct 2022 14:44:02 +0000 Original-Received: (at 58169) by debbugs.gnu.org; 1 Oct 2022 14:43:20 +0000 Original-Received: from localhost ([127.0.0.1]:45515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oedi3-0001Hp-RU for submit@debbugs.gnu.org; Sat, 01 Oct 2022 10:43:20 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oedi1-0001Hd-RU for 58169@debbugs.gnu.org; Sat, 01 Oct 2022 10:43:18 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7D408440C13; Sat, 1 Oct 2022 10:43:12 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0A5F1440714; Sat, 1 Oct 2022 10:43:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1664635391; bh=SGeFA/DnGZ3lM5kFksYpor2LKhxuzdu5VLvvs26rsLg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HhNRfeTSh7qxT5/qX4TBm9zgk4Ph/TE3p5yrsMN/jtu6CiOp9QXdzHrtxKFRyLlJm WmoaArbNFcze7RqWSeYxQ59O699fOgkkRoaw2WfpO87MmHEG+b5Ufq4OvXgGgXOlxx dYEZaYkl7zkpBKcBqCbU3LKwV2hMJ3i3C+hMHpS0CStEOQyPjdcSih0kd6NdoZyOmk /qAid0K7NUizBY/Q8cAJIpzJCp4Ogb4NE0WIS45KRWOMujMqlRyTQpijKaCwP9gVGF OjFx+Rd27Qq6PtUtsyeIpFxVDgUPpgxUoM2HwgtVOWKiLhPuwVu1cMWv3EIODFthLG LZ/WTUJaIdLYA== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C82E7120744; Sat, 1 Oct 2022 10:43:10 -0400 (EDT) In-Reply-To: <87leq0u0p8.fsf@miha-pc> (miha@kamnitnik.top's message of "Fri, 30 Sep 2022 21:22:27 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:244142 Archived-At: > @@ -2150,24 +2150,26 @@ comint-output-filter > ;; insert-before-markers is a bad thing. XXX > ;; Luckily we don't have to use it any more, we use > ;; window-point-insertion-type instead. > - (insert string) > + (make-local-variable 'jit-lock-mode) > + (let ((jit-lock-mode nil)) > + (insert string) Yuck! Oh, and this will fail to do what it intends if the user has set `font-lock-support-mode` t nil: don't confuse font-lock and jit-lock. Also, I suspect that the above is not sufficient if you edit earlier parts of the buffer (presumably previous inputs) which may cause later parts to be *re*fontified. A better way might be to change the font-lock rules to skip any text that is marked as being output (e.g. by testing if the `field` property is set to `output`). Stefan