Subject: bug#57214: closed (Re: bug#57214: 29.0.50; Incorrect rendering of Emoji (grapheme cluster) in Org heading)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 15 Aug 2022 14:13:02 +0000

Your bug report

#57214: 29.0.50; Incorrect rendering of Emoji (grapheme cluster) in Org heading

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
57214: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57214
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#57214: 29.0.50; Incorrect rendering of Emoji (grapheme cluster) in Org heading
From: Protesilaos Stavrou <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Mon, 15 Aug 2022 17:12:20 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Eli Zaretskii <[email-masked]>
> Date: Mon, 15 Aug 2022 14:43:25 +0300
>
> [... 17 lines elided]
>
>> Should we close this or there is potential to change things?
>
> The potential always exists, although the implementation will not be
> trivial, because we'll need to invent a new kind of "display vector"
> to hold the font glyph codes (or maybe just the composition ID?), and
> implement the code to support its display.

Understood.

> Is this an important feature to have?

No.  I just wanted to be sure that it is not trivial to change.

Closing the issue now.  Thank you for your time!

-- 
Protesilaos Stavrou
https://protesilaos.com

Subject: 29.0.50; Incorrect rendering of Emoji (grapheme cluster) in Org heading
From: Protesilaos Stavrou <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sun, 14 Aug 2022 21:47:21 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear maintainers,

I have encountered a bug where grapheme clusters are not rendered
properly when used inside of a folded heading in Org.

Steps to reproduce with 'emacs -Q':

1. Evaluate:

      (setq org-pretty-entties t
            org-ellipsis " ☀️")

2. Either visit an existing Org file or use the attached sample.

3. Fold a heading in Org by pressing TAB with point somewhere on the
   heading.

4. Notice the incorrectly rendered sun emoji at the end of the folded
   heading.

If I change 'org-ellipsis' to a single character emoji, such as the
generic smile, the problem no longer occurs:

* Evaluate:

      (setq org-ellipsis " 😀")

* Then in the Org file do 'M-x org-mode-restart'.

The smile emoji renders properly at the end of the folded heading's
line.

The attached screenshots show the different results.

All the best,
Protesilaos (or simply "Prot")

* * *

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
 of 2022-08-14 built on kronos
Repository revision: b93e14fa0fd5833adbdd88ec86fccc4b59172302
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --without-libotf --without-m17n-flt --without-gconf
 --with-native-compilation --with-pgtk --with-sound=no --without-gpm
 --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM GTK3
ZLIB

-- 
Protesilaos Stavrou
https://protesilaos.com