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: Mon, 21 Oct 2019 19:07:02 +0300 Message-ID: <835zki2ic9.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="39593"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Stefan Monnier , Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 21 18:08:20 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 1iMaEF-000A8w-Gb for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2019 18:08:19 +0200 Original-Received: from localhost ([::1]:44706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMaED-0006ni-L1 for ged-emacs-devel@m.gmane.org; Mon, 21 Oct 2019 12:08:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34744) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMaD9-0006dl-1K for emacs-devel@gnu.org; Mon, 21 Oct 2019 12:07:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMaD8-00050b-Ml; Mon, 21 Oct 2019 12:07:10 -0400 Original-Received: from [176.228.60.248] (port=3386 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMaD8-0007fD-0e; Mon, 21 Oct 2019 12:07:10 -0400 In-reply-to: (message from Stefan Monnier on Mon, 21 Oct 2019 10:15:43 -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:241316 Archived-At: > From: Stefan Monnier > Date: Mon, 21 Oct 2019 10:15:43 -0400 > > I was recently looking at the following code in keyboard.c: > > if (last_point_position > BEGV > && last_point_position < ZV > && (composition_adjust_point (last_point_position, > last_point_position) > != last_point_position)) > /* The last point was temporarily set within a grapheme > cluster to prevent automatic composition. To recover > the automatic composition, we must update the > display. */ > windows_or_buffers_changed = 21; > > and wondered: > > - 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)? > - more importantly, does the inhibition of composition when point is in > the middle of it still work? I don't use languages which rely on > composition so I'm not completely sure how this feature is/was > supposed to work, but I do remember searching for "lam" in Elisp > buffers in which I had "lambda" prettified to "λ" and having those "λ" > temporarily be expanded back to "lambda" to show the cursor in the > middle of it. Yet, I can't seem to reproduce this de-composition > behavior any more. Is it still working? How can I trigger it? Could be related to Backspace deleting just part of the grapheme cluster? Or searching for a codepoint that is part of a composition? But that's guessing, I don't really know the answer to this. Perhaps Handa-san (CC'ed) does.