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.devel Subject: Re: Entering emojis Date: Sat, 30 Oct 2021 09:19:07 +0300 Message-ID: <83mtmrox0k.fsf@gnu.org> References: <87cznths5j.fsf@gnus.org> <87ilxi7531.fsf@gnus.org> <875yth7bjr.fsf@gnus.org> <8335oltgyd.fsf@gnu.org> <837ddws6p5.fsf@gnu.org> <87zgqrsdwg.fsf@gnus.org> <87v91fschk.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27955"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, stefankangas@gmail.com, mardani29@yahoo.es To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 30 08:21:14 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mghju-00072M-EX for ged-emacs-devel@m.gmane-mx.org; Sat, 30 Oct 2021 08:21:14 +0200 Original-Received: from localhost ([::1]:48768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mghjs-0006S5-He for ged-emacs-devel@m.gmane-mx.org; Sat, 30 Oct 2021 02:21:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mghi6-0005fM-AR for emacs-devel@gnu.org; Sat, 30 Oct 2021 02:19:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mghi5-0005hy-QV; Sat, 30 Oct 2021 02:19:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=BCwH+j9SemEDBF1XMVvw5S4lyM3CjE074asn+48Z4pU=; b=bAukTJzJW0EVnNVuO6Qs Gz3PXQK+KJkDB/PAJxOb8eWoHE97mBGT8ftbXdV0RWxdOalbUyux+YYV7Hl/HSkdkF1kRP/l/RUJC fBB1POeWssNvVC5Phruuq2AjZmYh3hflyqGiOqeB0OL3BOp9ifXB/RhuXPbEmcJMwlUOJdCdtC1nI Q+eLM1ttm/XTRXuKPzMoRVTFhfuSLKU7NlqaX5A8HGC3GDCn7CEmRVIHoOEgPhL8SxN+KNu0Ovi16 OgjWgSU4j9jOe8XqSg5CgQc4hgoqwDzIfDZRgqix3wecOBZucroCjzrjm/b8xqOpmMx2fMIEiwisX lpwnmKKOl4s/5g==; Original-Received: from [87.69.77.57] (port=4730 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mghi5-0004dk-9w; Sat, 30 Oct 2021 02:19:21 -0400 In-Reply-To: <87v91fschk.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 30 Oct 2021 00:16:39 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278258 Archived-At: > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , Stefan Kangas , > emacs-devel@gnu.org > Date: Sat, 30 Oct 2021 00:16:39 +0200 > > A more ticklish question is what we should do with out string primitives > (if anything). For instance: > > (string-limit "Hello, 👨🏽‍❤️‍💋‍👨🏾" 8) > => "Hello, 👨" > > and > > (truncate-string-to-width "👨🏽‍❤️‍💋‍👨🏾" 2 nil t) > => "👨" Nothing, they should "just work", barring bugs. What does string-width return for this string on your system? > which is... uhm... In a way, this grapheme cluster thing is slightly > like it was during the shift to utf-8, when not all string primitives > worked on characters, but bytes instead. Less dramatic, of course, but. > > I think we'll be seeing many amusing display glitches in this area. 🥲 We shouldn't, because string-width already supports composed text. There's always one more bug, of course, but there are no design problems here, AFAICT. Emoji sequences are just one special case of character composition, that's all. So this is nothing like a switch to multibyte characters, at least not in theory.