From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#75431: 31.0.50; Fontification malfunction Date: Wed, 08 Jan 2025 14:38:33 +0200 Message-ID: <86a5c14h12.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75431@debbugs.gnu.org To: Johan Ekenberg Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 08 13:40:13 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 1tVVM5-0009D1-K2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Jan 2025 13:40:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVVLX-0002nQ-9v; Wed, 08 Jan 2025 07:39:41 -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 1tVVKx-0002jk-8S for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2025 07:39:06 -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 1tVVKw-0008Fn-VG for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2025 07:39:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=bWXEz0rB//LE2SF+yIkXakQXHsGZa/i5mxPkBbx3zsI=; b=Km6rg4kZt3lD3GHSJaytEy+Vg8AZoVbrOYxdNWnnbUnAFPcHVjOdD9RBhI2kRMqfEQv9u5asJ9JvniBCARt7ICBb1XB0poujwCyMuFDxlI5NhfJJlDHKw7RHkiH/3ekLLVjrmULE2BTGbkRvmM7Mg6RIw31jyn71zW2/kNiHusnoKgvnwpXB2mJbWIvk/qWNtJEmpT2zISRKu1fH7jLYMEpiXZk2hXVZOs6hnk/82991C5WBwvxnFWsa97Fw8MlAWkEjHxgjgW65lOfPRlKKaivbUImwM43wR8r8z5fndnB63BvmIh+U0Bfr0fkJKnd3SEdpRyBreJ7vOdxO44VPHQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVVKw-0000W7-HI for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2025 07:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jan 2025 12:39: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.17363399311966 (code B ref 75431); Wed, 08 Jan 2025 12:39:02 +0000 Original-Received: (at 75431) by debbugs.gnu.org; 8 Jan 2025 12:38:51 +0000 Original-Received: from localhost ([127.0.0.1]:46327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVVKl-0000Ve-CJ for submit@debbugs.gnu.org; Wed, 08 Jan 2025 07:38:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36372) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVVKi-0000VN-GY for 75431@debbugs.gnu.org; Wed, 08 Jan 2025 07:38:49 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tVVKc-0008DX-KK; Wed, 08 Jan 2025 07:38:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bWXEz0rB//LE2SF+yIkXakQXHsGZa/i5mxPkBbx3zsI=; b=pN17bnZk4mZj xYQDobBb7XYMI11lzhRmUGcaqwPV9p44UtYTCFWXMA2Auf/3ioEDfqCTXHIviokkUTobh85JJ789v QwEq90uo0pV6AL4N+qGOOJeVpZdZ2JM1L4GimGAjynhsaqtAoQ+un/+qfVnJ+cU/KvwYjpa3fVdcj rHnsqTaWhpZJypFRZCQqRQW5i6XLwolJ8oX4WIacMOx+s14OzUip2jxR96WYCeDax5A/bWlzgvjdI sKfE+qXaONXdwtXJHzAjWCWgRl57LZjt37yUAwHL1i6BG2dsdAwF5tNMxw/MXrFDKlZ+iCgYGg3MS pUA2/m1muJoBrEi7ZwR20Q==; In-Reply-To: (message from Johan Ekenberg on Tue, 7 Jan 2025 21:08:09 +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:298770 Archived-At: > 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?