GNU bug report logs - #75431
31.0.50; Fontification malfunction

Previous Next

Package: emacs;

Reported by: Johan Ekenberg <johan.ekenberg <at> gmail.com>

Date: Wed, 8 Jan 2025 03:07:01 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75431 in the body.
You can then email your comments to 75431 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75431; Package emacs. (Wed, 08 Jan 2025 03:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johan Ekenberg <johan.ekenberg <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Jan 2025 03:07:02 GMT) Full text and rfc822 format available.

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

From: Johan Ekenberg <johan.ekenberg <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Fontification malfunction
Date: Tue, 7 Jan 2025 21:08:09 +0100
[Message part 1 (text/plain, inline)]
--text follows this line--

- 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


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.33, cairo version 1.16.0) of 2025-01-07 built on piano
Repository revision: 4bf0f6655142b9e216325d051943b7b7ca4d2cd7
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Linux Mint 21.3

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: sv_SE.UTF-8
  value of $LC_NUMERIC: sv_SE.UTF-8
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: C.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug face-remap help-macro oc-basic cl-extra
help-mode org-element org-persist org-id org-refile org-element-ast
inline avl-tree generator ol-eww eww vtable mule-util url-queue mm-url
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015
mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku
url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail browse-url xdg url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core
cl-macs json map url-vars mail-source utf7 nnoo parse-time gnus-spec
gnus-int gnus-range message sendmail mailcap yank-media puny rfc822 mml
mml-sec password-cache epa derived epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util
text-property-search mail-utils range mm-util mail-prsvr wid-edit
ol-docview doc-view byte-opt gv bytecomp byte-compile filenotify
jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex iso8601
ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-src sh-script smie treesit executable
ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color ring
org-list org-footnote org-faces org-entities time-date subr-x noutline
outline icons org-version ob-emacs-lisp ob-core ob-eval org-cycle
org-table ol rx org-fold org-fold-core org-keys oc org-loaddefs
thingatpt find-func cal-menu calendar cal-loaddefs org-compat org-macs
format-spec cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
tty-child-frames emacs)

Memory information:
((conses 16 203329 36256) (symbols 48 21221 0) (strings 32 66951 3884)
 (string-bytes 1 1766656) (vectors 16 37794)
 (vector-slots 8 363252 21163) (floats 8 281 90) (intervals 56 804 0)
 (buffers 992 14))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75431; Package emacs. (Wed, 08 Jan 2025 12:39:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Johan Ekenberg <johan.ekenberg <at> gmail.com>
Cc: 75431 <at> debbugs.gnu.org
Subject: Re: bug#75431: 31.0.50; Fontification malfunction
Date: Wed, 08 Jan 2025 14:38:33 +0200
> From: Johan Ekenberg <johan.ekenberg <at> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75431; Package emacs. (Wed, 08 Jan 2025 17:58:02 GMT) Full text and rfc822 format available.

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

From: Johan Ekenberg <johan.ekenberg <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 75431 <at> debbugs.gnu.org
Subject: Re: bug#75431: 31.0.50; Fontification malfunction
Date: Wed, 8 Jan 2025 18:56:51 +0100
[Message part 1 (text/plain, inline)]
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 <eliz <at> gnu.org>:

> > From: Johan Ekenberg <johan.ekenberg <at> 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?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75431; Package emacs. (Wed, 08 Jan 2025 18:48:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Johan Ekenberg <johan.ekenberg <at> gmail.com>,
 Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 75431 <at> debbugs.gnu.org
Subject: Re: bug#75431: 31.0.50; Fontification malfunction
Date: Wed, 08 Jan 2025 20:47:19 +0200
> From: Johan Ekenberg <johan.ekenberg <at> gmail.com>
> Date: Wed, 8 Jan 2025 18:56:51 +0100
> Cc: 75431 <at> debbugs.gnu.org
> 
> Thank you for answering. If you believe this is an Org problem rather than Emacs, I shall report it as an Org
> bug.

I believe you should, but let's ask the expert.

Ihor, WDYT?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75431; Package emacs. (Wed, 08 Jan 2025 21:13:02 GMT) Full text and rfc822 format available.

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

From: Johan Ekenberg <johan.ekenberg <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Ihor Radchenko <yantar92 <at> posteo.net>, 75431 <at> debbugs.gnu.org
Subject: Re: bug#75431: 31.0.50; Fontification malfunction
Date: Wed, 8 Jan 2025 22:11:47 +0100
[Message part 1 (text/plain, inline)]
I have already reported it as an Org bug, thinking that was your request.
Well I hope someone will know where it belongs :)

Thanks again

Den ons 8 jan. 2025 kl 19:47 skrev Eli Zaretskii <eliz <at> gnu.org>:

> > From: Johan Ekenberg <johan.ekenberg <at> gmail.com>
> > Date: Wed, 8 Jan 2025 18:56:51 +0100
> > Cc: 75431 <at> debbugs.gnu.org
> >
> > Thank you for answering. If you believe this is an Org problem rather
> than Emacs, I shall report it as an Org
> > bug.
>
> I believe you should, but let's ask the expert.
>
> Ihor, WDYT?
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75431; Package emacs. (Thu, 09 Jan 2025 17:27:02 GMT) Full text and rfc822 format available.

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

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Johan Ekenberg <johan.ekenberg <at> gmail.com>, 75431 <at> debbugs.gnu.org
Subject: Re: bug#75431: 31.0.50; Fontification malfunction
Date: Thu, 09 Jan 2025 17:29:02 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Thank you for answering. If you believe this is an Org problem rather than Emacs, I shall report it as an Org
>> bug.
>
> I believe you should, but let's ask the expert.
>
> Ihor, WDYT?

Yes, Org bug.
Answered in Org mailing list.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Thu, 09 Jan 2025 17:44:01 GMT) Full text and rfc822 format available.

Notification sent to Johan Ekenberg <johan.ekenberg <at> gmail.com>:
bug acknowledged by developer. (Thu, 09 Jan 2025 17:44:02 GMT) Full text and rfc822 format available.

Message #25 received at 75431-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: johan.ekenberg <at> gmail.com, 75431-done <at> debbugs.gnu.org
Subject: Re: bug#75431: 31.0.50; Fontification malfunction
Date: Thu, 09 Jan 2025 19:43:21 +0200
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: Johan Ekenberg <johan.ekenberg <at> gmail.com>, 75431 <at> debbugs.gnu.org
> Date: Thu, 09 Jan 2025 17:29:02 +0000
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Thank you for answering. If you believe this is an Org problem rather than Emacs, I shall report it as an Org
> >> bug.
> >
> > I believe you should, but let's ask the expert.
> >
> > Ihor, WDYT?
> 
> Yes, Org bug.
> Answered in Org mailing list.

Thanks, so I'm closing this one.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 07 Feb 2025 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 192 days ago.

Previous Next


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