From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Auto de-composition when point is inside a composition Date: Tue, 22 Oct 2019 17:52:38 +0300 Message-ID: <83a79s25op.fsf@gnu.org> References: <835zki2ic9.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="92731"; mail-complaints-to="usenet@blaine.gmane.org" Cc: handa@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 22 16:53:27 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMvXK-000Nzy-QO for ged-emacs-devel@m.gmane.org; Tue, 22 Oct 2019 16:53:26 +0200 Original-Received: from localhost ([::1]:59754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMvXJ-0002JM-He for ged-emacs-devel@m.gmane.org; Tue, 22 Oct 2019 10:53:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50781) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMvWe-0002Gk-7e for emacs-devel@gnu.org; Tue, 22 Oct 2019 10:52:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMvWd-0001Yl-Uh; Tue, 22 Oct 2019 10:52:43 -0400 Original-Received: from [176.228.60.248] (port=3193 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMvWd-0004QD-DG; Tue, 22 Oct 2019 10:52:43 -0400 In-reply-to: (message from Stefan Monnier on Mon, 21 Oct 2019 14:43:32 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241348 Archived-At: > From: Stefan Monnier > Cc: Kenichi Handa , emacs-devel@gnu.org > Date: Mon, 21 Oct 2019 14:43:32 -0400 > > >> - why do we need to set windows_or_buffers_changed at all here? > >> after all, this code is only run in some circumstances, definitely not > >> all the circumstances where we might need to redraw the grapheme > >> cluster after point moved out of it, so it seems it's not the right > >> place to handle this case (it seems either redundant or insufficient). > > > > Maybe because otherwise the redisplay optimizations taken in case only > > point moved could fail to redisplay (they might only redraw the > > character at point, and fail to include the rest of the composition)? > > But in that case, if the command that moved point set > disable-point-adjustment to non-nil, we'd have a redisplay error, no > (since we'd then skip this chunk of code). I think this is about commands that add or remove codepoints from a potentially composable sequence of characters, and those commands aren't supposed to play games with this variable. And we reset the variable before reading a command anyway. Btw, I don't have a proof (and doing so would be neigh impossible), but I suspect we don't need to set windows_or_buffers_changed here, because it was needed when we had direct insertion and deletion of characters as part of redisplay. But given how much surrounding text HarfBuzzz wants to see to do what its developers consider a good job, I wouldn't touch this even so.