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: Mon, 21 Jun 2021 15:18:07 +0300 Message-ID: <83r1gvtnr4.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> <83wnrdzjxe.fsf@gnu.org> <87v968ok1k.fsf@localhost> <835yy8vjje.fsf@gnu.org> <87o8c0r801.fsf@localhost> 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="14125"; 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 Mon Jun 21 14:19:14 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 1lvItW-0003T9-AV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Jun 2021 14:19:14 +0200 Original-Received: from localhost ([::1]:45592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvItV-0003fl-Bc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Jun 2021 08:19:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvItK-0003dP-CK for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 08:19:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvItK-0007QO-4Z for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 08:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lvItJ-0003qv-SW for bug-gnu-emacs@gnu.org; Mon, 21 Jun 2021 08:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Jun 2021 12:19:01 +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.162427791514763 (code B ref 48740); Mon, 21 Jun 2021 12:19:01 +0000 Original-Received: (at 48740) by debbugs.gnu.org; 21 Jun 2021 12:18:35 +0000 Original-Received: from localhost ([127.0.0.1]:35703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvIss-0003q0-No for submit@debbugs.gnu.org; Mon, 21 Jun 2021 08:18:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lvIsr-0003po-15 for 48740@debbugs.gnu.org; Mon, 21 Jun 2021 08:18:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40576) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvIsl-0007Dq-PK; Mon, 21 Jun 2021 08:18:27 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3290 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 1lvIsl-0000ea-Ap; Mon, 21 Jun 2021 08:18:27 -0400 In-Reply-To: <87o8c0r801.fsf@localhost> (message from Ihor Radchenko on Sun, 20 Jun 2021 21:16:46 +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:208810 Archived-At: > From: Ihor Radchenko > CC: 48740@debbugs.gnu.org > Date: Sun, 20 Jun 2021 21:16:46 +0800 > > 1. After manually changing the todo state from TODO to ONGOING in > inbox.org, the composition property appears to be broken. Yet, the > ONGOING is replaced by 👷: > > #("* ONGOING" 0 1 (...) 2 5 (... composition (0 7 [128119]) prettify-symbols-start 3 prettify-symbols-end 10 > face org-todo) 5 9 (... composition (0 7 [128119]) prettify-symbols-start 3 prettify-symbols-end 10 face > org-todo)) > > I know no way to know if the property intervals are split because > composition properties are not eq there is some other properties are > not eq. > > Now, after writing this, I start to believe that composition is still > eq in this kind of situation, because, as you have explained, the > composition would not render otherwise. Yes, it must be eq. What I don't understand is why the property is broken into two intervals. You have only one word, ONGOING, so why is the property divided into 2? > 2. The following code in org-agenda-highlight-todo unexpectedly breaks > the composition into two intervals with composition values becoming > not eq: Why is this code needed? And why not put the property on the word after concatenating, to avoid the issue? > So, it appears to me that concat somehow messed up the composition > proprety. May it be the case? > > I found a suspicious code in C concat function (fns.c:735): > > /* If successive arguments have properties, be sure that the > value of `composition' property be the copy. */ > if (last_to_end == textprops[argnum].to) > make_composition_value_copy (props); > > I can barely understand what is going on in the C code of concat, > but if it copies the composition property in some cases, we might > get the issue at hand. It looks like some other use cases want to keep the compositions separate when a string is generated by 'concat'. I don't want to make low-level changes in how static compositions are treated, so I'd prefer that this problem be fixed on the application level.