From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Johan Ekenberg Newsgroups: gmane.emacs.bugs Subject: bug#75431: 31.0.50; Fontification malfunction Date: Wed, 8 Jan 2025 18:56:51 +0100 Message-ID: References: <86a5c14h12.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b8c34b062b3596ac" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18130"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75431@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 08 18:58:27 2025 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 1tVaK2-0004Tr-Ve for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Jan 2025 18:58:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVaJi-0002YY-Nc; Wed, 08 Jan 2025 12:58: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 1tVaJg-0002Y7-VW for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2025 12:58:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVaJe-0007pp-GG for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2025 12:58:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=cCTQ9EjIt4zvhwf7XVDQ1ZRL8E4qhzX0FRuYhWSD4+Y=; b=r5JjqYy9ux7zlfmrEnEpWGRb6nkjzcF7mtzHDy6fxU/pruxDDcGsk5AVb+G2gpaAD1oKdGXEoOFamh+/IlHtCa9xhZ1JaEMKgi4oljTb1K2hrVCi5h1m+14dymMQfUtB7ytw83W62UpDCjr2/VVMxTS6eCxCThsUcSEsehGID5KoFSGjCOnQsVI9sRdGc5mj5JtldOLflxduPumWDw8dR+QWgZfimqhZ6t/wSg20Pl9Hyc/56PZ5wPh+a0MOy+spCcva+BDgF4URdGW/1KsC+D5xxV/U539oY3Rwium6RbbgHXyUxeHmYaPazlYjyqtTxUnv+g34VSoJXGFlqyCgCQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVaJe-0000ou-AE for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2025 12:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Johan Ekenberg Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jan 2025 17:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75431 X-GNU-PR-Package: emacs Original-Received: via spool by 75431-submit@debbugs.gnu.org id=B75431.17363590333075 (code B ref 75431); Wed, 08 Jan 2025 17:58:02 +0000 Original-Received: (at 75431) by debbugs.gnu.org; 8 Jan 2025 17:57:13 +0000 Original-Received: from localhost ([127.0.0.1]:48905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVaIq-0000nX-PD for submit@debbugs.gnu.org; Wed, 08 Jan 2025 12:57:13 -0500 Original-Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:43403) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tVaIn-0000nH-Uz for 75431@debbugs.gnu.org; Wed, 08 Jan 2025 12:57:11 -0500 Original-Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2f13acbe29bso1843600a91.1 for <75431@debbugs.gnu.org>; Wed, 08 Jan 2025 09:57:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736359024; x=1736963824; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cCTQ9EjIt4zvhwf7XVDQ1ZRL8E4qhzX0FRuYhWSD4+Y=; b=Chp79vXyzsAYaNN4oJe0Qf/6M6gQiMgHCyDF5A3JBztXerZzhNX1t/oZL7qn3Oeqas gU1pCWju9RRhxhUhlbIzVwKLTT9e1zfJj6z8sBVX2XSD+5A3UQJPuN6aQOzaaLhmMtMQ HjFpUS4tt1sHeP5N7ej67vQ/SQLwAHPqnsr2LjAVRyoo89ETLFCUUUFeI/EbfwioWvai 4RTO1P15ilDKPFOh7TMNqECLGqLDr2Xg15QTp4SM4k5kn0srALwAqFcUM+EK1DjhFrTL Ar8pvaW0Tzn9SFDyg7wi2miX7NVHSkmT2IOTlEEyACoeG54JnJcZZeQtyeHWjxKKGg2D GzfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736359024; x=1736963824; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cCTQ9EjIt4zvhwf7XVDQ1ZRL8E4qhzX0FRuYhWSD4+Y=; b=mtvsRnrK4zlmiE7ZmgtGa75Ns2ZUIrWK9SYs8jDcUlhqX2ApwgBx1yUYGxm9NGRERt o8Qp7U+eJsUKrkGLg3SUxCIhS1L1e9bdPKNY3x9CHwH+51RwJ2LVNr9UNMoM9AZ8ZGtm 0vdd4bLyhRrklN0Fze9NTC2oofJVGRzHOZt/ssqDiIp/U8SkGd9OeXE0yOA5VT2BXXlM NL0zxe/3+aXaSbc9t17JxYqeU7smaoOSyLHTu7HVRnBCvVwg8DfLEy3OhIpo2rIZg0hq 69ZfCp0TIOkiAraKVnymi7Q05vPhUI7FFJzkqWUFVorHGhpD8WgGHfq8/Sh0NgLaThQs n6gg== X-Gm-Message-State: AOJu0Yyc7EPHZW6fT1ydoXMY7khzAl3PjfzTuTPS6a2mwGQTezYPY72x t5RBRxKp4iLhgLU/qyXaq3Dko91p/N1mGAGCs+d+o1z2bf/zcfLzhl95tgnFYyExvI11VT+xoB8 RDsVOmLxx5HQQ3YV0LnvcnmqNxw== X-Gm-Gg: ASbGnctqARt+2c+oL4oFx21iFJ3BBqR4H3AenEowXOUcqNGVDGBfPzhsQbW0fEtkBjF tsC1gKqii1e+1FUvG9YJhAlEfC/FlCFsBuA== X-Google-Smtp-Source: AGHT+IHC2CquOdqhikrV/df7IimW7AnH229jXwSe9Rj88vn/+mHZkT4zz8jhTMWhwcSCrqfIAGWD4rYWnI9N1j059UM= X-Received: by 2002:a17:90b:1d09:b0:2ee:e2f6:8abc with SMTP id 98e67ed59e1d1-2f55444ad74mr276666a91.10.1736359022214; Wed, 08 Jan 2025 09:57:02 -0800 (PST) In-Reply-To: <86a5c14h12.fsf@gnu.org> X-Gm-Features: AbW1kvbGANt_efODcPcRLov_jDCXadryDBRgLqmw5JPoenBdQZEeyhxoc9FA6j4 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:298792 Archived-At: --000000000000b8c34b062b3596ac Content-Type: text/plain; charset="UTF-8" Thank you for answering. If you believe this is an Org problem rather than Emacs, I shall report it as an Org bug. Best regards /Johan Ekenberg Den ons 8 jan. 2025 kl 13:38 skrev Eli Zaretskii : > > From: Johan Ekenberg > > Date: Tue, 7 Jan 2025 21:08:09 +0100 > > > > - Start emacs: 'emacs -Q' > > - Paste this function into the scratch buffer and evaluate it: > > (defun test-org-insertion-fontification () > > (interactive) > > (let* ((chunks > > '("#+begin_src elisp\n" > > "(+ 1 2)" > > "\n#+end_src\n"))) > > (insert "* NOTE: You need to run this with org-mode enabled and > point at end of buffer\n\n") > > (insert "** This code block is fontified correctly\n") > > (insert (car chunks)) > > (dolist (chunk (cdr chunks)) > > (insert chunk)) > > > > (insert "\n** But not this code block\n") > > (insert (car chunks)) > > (dolist (chunk (cdr chunks)) > > (sit-for (/ 10 1000.0)) ; simulate chunks received over network > and streamed into buffer > > ;; The following were also tested one by one instead of the > sit-for line above: > > ;; (redisplay) ; this triggers the bug > > ;; (force-mode-line-update) ; this does not trigger the bug > > ;; (read-event nil nil 0) ; this triggers the bug > > (insert chunk)) > > )) > > - Open an existing or new file/buffer with org-mode enabled (C-x C-f > foo.org) > > - Place point at end of buffer > > - M-x test-org-insertion-fontification > > - Optional: replace the line (sit-for...) with any of the lines below it. > > > > - Additional information: The problem was discovered when receiving > > streamed data responses via the package gptel which is an Emacs LLM > > Client. Here is the reported issue: > > https://github.com/karthink/gptel/issues/550 > > > > - Also replicated on Emacs 29.3 > > Isn't this an Org problem? If so, could you please report this to the > Org bug mailing list? > --000000000000b8c34b062b3596ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for answering. If you believe this is an Org pro= blem rather than Emacs, I shall report it as an Org bug.

Best regards
/Johan Ekenberg

Den ons = 8 jan. 2025 kl 13:38 skrev Eli Zaretskii <eliz@gnu.org>:
> From: Johan Ekenberg <johan.ekenberg@gmail.com>
> Date: Tue, 7 Jan 2025 21:08:09 +0100
>
> - Start emacs: 'emacs -Q'
> - Paste this function into the scratch buffer and evaluate it:
>=C2=A0 =C2=A0(defun test-org-insertion-fontification ()
>=C2=A0 =C2=A0 =C2=A0(interactive)
>=C2=A0 =C2=A0 =C2=A0(let* ((chunks
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'("#+begin_src= elisp\n"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"(+ 1 2)&qu= ot;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\n#+end_sr= c\n")))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert "* NOTE: You need to run this w= ith org-mode enabled and point at end of buffer\n\n")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert "** This code block is fontifie= d correctly\n")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert (car chunks))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(dolist (chunk (cdr chunks))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(insert chunk))
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert "\n** But not this code block\n= ")
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert (car chunks))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(dolist (chunk (cdr chunks))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(sit-for (/ 10 1000.0)) ; simulate ch= unks received over network and streamed into buffer
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; The following were also tested one= by one instead of the sit-for line above:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; (redisplay) ; this triggers the bu= g
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; (force-mode-line-update) ; this do= es not trigger the bug
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; (read-event nil nil 0) ; this trig= gers the bug
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(insert chunk))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0))
> - Open an existing or new file/buffer with org-mode enabled (C-x C-f <= a href=3D"http://foo.org" rel=3D"noreferrer" target=3D"_blank">foo.org)=
> - Place point at end of buffer
> - M-x test-org-insertion-fontification
> - Optional: replace the line (sit-for...) with any of the lines below = it.
>
> - Additional information: The problem was discovered when receiving > streamed data responses via the package gptel which is an Emacs LLM > Client. Here is the reported issue:
> https://github.com/karthink/gptel/issues/550 >
> - Also replicated on Emacs 29.3

Isn't this an Org problem?=C2=A0 If so, could you please report this to= the
Org bug mailing list?
--000000000000b8c34b062b3596ac--