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: Tick Reduction Date: Wed, 24 Nov 2021 20:53:45 +0200 Message-ID: <834k818jwm.fsf@gnu.org> References: <87bl2hyzca.fsf@gnus.org> <87h7c5jmbg.fsf@gnus.org> <838rxhqmqv.fsf@gnu.org> <878rxhjlot.fsf@gnus.org> <874k85jlmq.fsf@gnus.org> <87v90khaa8.fsf@gnus.org> <83zgpwp7v2.fsf@gnu.org> <87tug4fdn7.fsf@gnus.org> <83pmqsp0m7.fsf@gnu.org> <87k0gzyy8k.fsf@gnus.org> <835ysjoupv.fsf@gnu.org> <8735nnyob1.fsf@gnus.org> <83y25fneeh.fsf@gnu.org> <87pmqrx7rh.fsf@gnus.org> <83tug3ndaj.fsf@gnu.org> <874k81vmlf.fsf@gnus.org> <83sfvl8wjw.fsf@gnu.org> <87o869y0v2.fsf@gnus.org> <83fsrl8owz.fsf@gnu.org> <87o869wkcx.fsf@gnus.org> <83bl298n9b.fsf@gnu.org> <87pmqpv1jm.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8808"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, stefankangas@gmail.com, dgutov@yandex.ru To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 24 20:13:48 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 1mpxiA-0001tD-S1 for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 20:13:43 +0100 Original-Received: from localhost ([::1]:53400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpxi5-0002jP-08 for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 14:13:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpxOu-0003SQ-53 for emacs-devel@gnu.org; Wed, 24 Nov 2021 13:53:48 -0500 Original-Received: from [2001:470:142:3::e] (port=43384 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpxOt-0003iC-Oh; Wed, 24 Nov 2021 13:53:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=flQwWc2SAKrDZ2T904iJ9SdxaZzEPq6IRwNtTBgwlx4=; b=HyXpAhaLr8RL cqzVm6B2GgcEnozOCksyGVnSmjmAjWnU3mH8yBJTUFiIsmeqBxMREXkgRlg90WvSO3xNBQPF0bHua 1XXxGAgfds1pAUIBa/0Z5ii229H0WzcDP84CZIwKRPezuZHf0DlSrRCpRkFGhl7Hovo1EduckM3R5 7H+LG50Tts8bzaR26zBYJPRDxarS/ZdWmsZpB/Ulx1bLtZJDmBZRCdcFWJgnS9q5ayBZtZ/US3IFR oLI8VJ+leNEMIEov72RPUk2dCkdjRn2tDWs+Jx/Sx3zKQs6rHMbWONyMIN/zqWBqcWuyMffa2QS4m gUSlzPrJdjh1paq6jkyvxA==; Original-Received: from [87.69.77.57] (port=4881 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 1mpxOt-0006rE-EX; Wed, 24 Nov 2021 13:53:47 -0500 In-Reply-To: <87pmqpv1jm.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 24 Nov 2021 19:41:49 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:280045 Archived-At: > From: Lars Ingebrigtsen > Cc: dgutov@yandex.ru, stefankangas@gmail.com, emacs-devel@gnu.org > Date: Wed, 24 Nov 2021 19:41:49 +0100 > > There might be a bug somewhere. I've now added the previously discussed > `add-display-text-property' function, so now it's easier to test these > things, and it looks like there's something not quite working as it's > supposed to, but I haven't debugged yet. (It only seems to affect > "overlapping" regions.) One thing that seems wrong is that you expect handle_stop to be called at the end of the property. But that is only true if there's some text after the property, because handle_stop is called when text properties _change_, and there's no such change at EOB. So you need special handling for EOB and for end-of-string (for the mode-line case, when the padded field is the last one). In general, handle_stop and the other functions involved here are used both when displaying strings and when displaying buffer text, so if implemented correctly, this feature should automagically work for both cases. That's the main reason for implementing the feature at this level, the level which produces glyphs from some text, regardless of the origin of that text.