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.bugs Subject: bug#48740: 28.0.50; Composition text property is not always honoured Date: Tue, 01 Jun 2021 18:25:17 +0300 Message-ID: <83wnrdzjxe.fsf@gnu.org> References: <87im30ad2g.fsf@localhost> <837djg4gvq.fsf@gnu.org> <87wnrgtlln.fsf@localhost> <8335u449de.fsf@gnu.org> <87pmx8tfub.fsf@localhost> <83y2bw2oyr.fsf@gnu.org> <87eedn12j6.fsf@localhost> <835yyz2ctp.fsf@gnu.org> <878s3tbqvx.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27410"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48740@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 01 17:32:37 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lo6Nh-0006xI-Hc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 17:32:37 +0200 Original-Received: from localhost ([::1]:51312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo6Ng-0003Kn-K2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 11:32:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lo6HM-0007PI-Ml for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2021 11:26:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lo6HK-0001be-KP for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2021 11:26:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lo6HK-0002vg-Gk for bug-gnu-emacs@gnu.org; Tue, 01 Jun 2021 11:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Jun 2021 15:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48740 X-GNU-PR-Package: emacs Original-Received: via spool by 48740-submit@debbugs.gnu.org id=B48740.162256114111229 (code B ref 48740); Tue, 01 Jun 2021 15:26:02 +0000 Original-Received: (at 48740) by debbugs.gnu.org; 1 Jun 2021 15:25:41 +0000 Original-Received: from localhost ([127.0.0.1]:37534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lo6Gz-0002v2-9c for submit@debbugs.gnu.org; Tue, 01 Jun 2021 11:25:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lo6Gx-0002un-BK for 48740@debbugs.gnu.org; Tue, 01 Jun 2021 11:25:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lo6Gs-0001Es-4l; Tue, 01 Jun 2021 11:25:34 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2833 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 1lo6Gr-0005qJ-A8; Tue, 01 Jun 2021 11:25:33 -0400 In-Reply-To: <878s3tbqvx.fsf@localhost> (message from Ihor Radchenko on Tue, 01 Jun 2021 22:28:50 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207783 Archived-At: > From: Ihor Radchenko > CC: 48740@debbugs.gnu.org > Date: Tue, 01 Jun 2021 22:28:50 +0800 > > Eli Zaretskii writes: > > >> The two intervals are there because other properties in the list are > >> not same, as I understand. > > > > Exactly. And that cannot work with the composition property. > > Again, I feel that I miss something. Consider the following test case: > > (switch-to-buffer "test") > (insert "asdasd") > (compose-region (point-min) (point-max) '(?a (bl . tl) ?| (bl . tl) ?b)) > (put-text-property 1 3 'test 1) > (put-text-property 3 6 'test 2) > (buffer-string) > > The output is > > #("asdasd" 0 2 (composition (43 6 [97 72 124 72 98]) test 1) 2 5 (composition (43 6 [97 72 124 72 98]) test 2) 5 6 (composition (43 6 [97 72 124 72 98]))) > > Composition works fine here despite spanning over multiple intervals. > Again, I feel that I miss something in your explanation. We are mis-communicating. You already stated correctly the reason for the problem: > The only possibility I can think about is that compositions in the two > intervals are 'eq at step 6, but only 'equal at step 8. (How on Earth > can one debug this???) More accurately, it isn't the intervals that must be 'eq', it's the values of the 'composition' property in the 2 adjacent intervals. In Step 6 (and in the example above) they are 'eq', in Step 8 they aren't. All the rest was my failed attempt to correct your inaccurate description of what happens; forget about that if you want. I don't know why the values of the 'composition' property become not 'eq'; perhaps some code does a copy-sequence or something? Presumably if you take a good look at what happens in org-agenda-redo-all and its subroutines, you will find that code. In general, when you are dealing with static compositions, I'd suggest not to break the composed region into several separate intervals with different property lists: it's dangerous, as you see.