From: Eli Zaretskii <eliz@gnu.org>
To: Johan Ekenberg <johan.ekenberg@gmail.com>
Cc: 75431@debbugs.gnu.org
Subject: bug#75431: 31.0.50; Fontification malfunction
Date: Wed, 08 Jan 2025 14:38:33 +0200 [thread overview]
Message-ID: <86a5c14h12.fsf@gnu.org> (raw)
In-Reply-To: <CAD+w+QmTLzLLDh6MYyTBvU_2tGRCz5dFaZ4SuH43Udai9nMqGQ@mail.gmail.com> (message from Johan Ekenberg on Tue, 7 Jan 2025 21:08:09 +0100)
> 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:
> (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?
next prev parent reply other threads:[~2025-01-08 12:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 20:08 bug#75431: 31.0.50; Fontification malfunction Johan Ekenberg
2025-01-08 12:38 ` Eli Zaretskii [this message]
2025-01-08 17:56 ` Johan Ekenberg
2025-01-08 18:47 ` Eli Zaretskii
2025-01-08 21:11 ` Johan Ekenberg
2025-01-09 17:29 ` Ihor Radchenko
2025-01-09 17:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86a5c14h12.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=75431@debbugs.gnu.org \
--cc=johan.ekenberg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.