GNU bug report logs - #58169
29.0.50; comint-fl-mode fontifies the output

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Thu, 29 Sep 2022 16:26:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: <miha <at> kamnitnik.top>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 58169 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Augusto Stoffel <arstoffel <at> gmail.com>, Visuwesh <visuweshm <at> gmail.com>
Subject: Re: bug#58169: 29.0.50; comint-fl-mode fontifies the output
Date: Thu, 06 Oct 2022 20:37:49 +0200
[Message part 1 (text/plain, inline)]
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

>> @@ -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

Thanks for feedback, discussion continued at
https://lists.gnu.org/r/emacs-devel/2022-10/msg00005.html.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.