From: Paul Maragakis via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 52067@debbugs.gnu.org
Subject: bug#52067: Acknowledgement (29.0.50; string-glyph-split halts on certain emoji strings)
Date: Tue, 23 Nov 2021 22:51:07 -0500 [thread overview]
Message-ID: <829C7136-B97A-47CB-9F35-76EF73D971E5@icloud.com> (raw)
In-Reply-To: <handler.52067.B.16377084873203.ack@debbugs.gnu.org>
The logic in string-glyph-split expects the first two elements in the result
from find-composition-internal to give the start and end of a multibyte grapheme
and return nil when there is a regular character at position POS. However, this
isn't always the case.
Let's call x the argument POS in find-composition-internal,
and "interval" the first two elements of the return value.
The following example works as expected, i.e. x of 0, or 1 returns the interval (0 2),
and x of 2, or 3 returns (2 4).
(null
(pp
(mapcar '(lambda (x) (list x (find-composition-internal x nil "✈️✈️" nil))) '(0 1 2 3 4))))
((0
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(1
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(2
(2 4
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(3
(2 4
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(4 nil))
nil
In the following case, however, x of 2 returns interval (0 2).
(null
(pp
(mapcar '(lambda (x) (list x (find-composition-internal x nil "✈️🌍" nil))) '(0 1 2 3))))
((0
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(1
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(2
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(3 nil))
nil
Interestingly, in the following case, an x of 0, 1, 2, or 3 all return (0 2).
(null
(pp
(mapcar '(lambda (x) (list x (find-composition-internal x nil "✈️🌍🌍" nil))) '(0 1 2 3 4))))
((0
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(1
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(2
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(3
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(4 nil))
nil
And in the following case a POS of 3 returns (3 5)
(null
(pp
(mapcar '(lambda (x) (list x (find-composition-internal x nil "✈️🌍✈️" nil))) '(0 1 2 3 4 5))))
((0
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(1
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(2
(0 2
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(3
(3 5
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(4
(3 5
[[#<font-object "-*-Apple Color Emoji-medium-normal-normal-*-19-*-*-*-m-0-iso10646-1"> 9992 65039]
296
[0 1 9992 233 23 0 23 18 4 nil]]))
(5 nil))
nil
> On Nov 23, 2021, at 6:02 PM, GNU bug Tracking System <help-debbugs@gnu.org> wrote:
>
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
> bug-gnu-emacs@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 52067@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 52067: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52067
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems
next prev parent reply other threads:[~2021-11-24 3:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 23:01 bug#52067: 29.0.50; string-glyph-split halts on certain emoji strings PAVLOS MARAGAKIS via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <handler.52067.B.16377084873203.ack@debbugs.gnu.org>
2021-11-24 3:51 ` Paul Maragakis via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-24 7:30 ` Lars Ingebrigtsen
2021-11-24 15:15 ` Paul Maragakis via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-24 16:14 ` Lars Ingebrigtsen
2021-11-24 4:58 ` bug#52067: possible fix for " Paul Maragakis via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=829C7136-B97A-47CB-9F35-76EF73D971E5@icloud.com \
--to=bug-gnu-emacs@gnu.org \
--cc=52067@debbugs.gnu.org \
--cc=paul.maragakis@icloud.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).