From: Ihor Radchenko <yantar92@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 48740@debbugs.gnu.org
Subject: bug#48740: 28.0.50; Composition text property is not always honoured
Date: Thu, 24 Jun 2021 22:35:45 +0800 [thread overview]
Message-ID: <874kdnwcse.fsf@localhost> (raw)
In-Reply-To: <83r1gvtnr4.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
> 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?
As I understand, the composition in the two intervals remains the same.
However, some other text properties differ, so the composition property
is "spread" across the two intervals.
>> 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?
The code formats todo keyword in agenda line according to
org-agenda-todo-keyword-format. The function does not know if the passed
string has composition property or not.
In any case, changing concat to format fixed the observed problem.
> 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.
I understand. However, the problem is quite unexpected. I do not see how
application can anticipate it. Probably, adding a note to docstring
would be useful? Something like in the attached patch.
Best,
Ihor
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-src-fns.c-Fconcat-Update-docstring.patch --]
[-- Type: text/x-diff, Size: 1042 bytes --]
From 4cf994cdb3cf9ca07ddfa53bc85d7daa07e7c9cc Mon Sep 17 00:00:00 2001
Message-Id: <4cf994cdb3cf9ca07ddfa53bc85d7daa07e7c9cc.1624545283.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Thu, 24 Jun 2021 22:33:08 +0800
Subject: [PATCH] src/fns.c (Fconcat): Update docstring
* src/fns.c (Fconcat): Note that composition values may not remain eq
in return value of concat. See bug#48740.
---
src/fns.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/fns.c b/src/fns.c
index a178216622..73669287c9 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -672,6 +672,9 @@ DEFUN ("concat", Fconcat, Sconcat, 0, MANY, 0,
doc: /* Concatenate all the arguments and make the result a string.
The result is a string whose elements are the elements of all the arguments.
Each argument may be a string or a list or vector of characters (integers).
+
+Values of `composition' property of the result are not guaranteed to
+be `eq'.
usage: (concat &rest SEQUENCES) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
--
2.31.1
next prev parent reply other threads:[~2021-06-24 14:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-30 7:35 bug#48740: 28.0.50; Composition text property is not always honoured Ihor Radchenko
2021-05-30 11:10 ` Eli Zaretskii
2021-05-30 13:08 ` Ihor Radchenko
2021-05-30 13:52 ` Eli Zaretskii
2021-05-30 15:13 ` Ihor Radchenko
2021-05-30 15:58 ` Eli Zaretskii
2021-05-31 13:00 ` Ihor Radchenko
2021-05-31 14:32 ` Eli Zaretskii
2021-06-01 14:28 ` Ihor Radchenko
2021-06-01 15:25 ` Eli Zaretskii
2021-06-01 16:25 ` Eli Zaretskii
2021-06-20 11:24 ` Ihor Radchenko
2021-06-20 11:53 ` Eli Zaretskii
2021-06-20 13:16 ` Ihor Radchenko
2021-06-21 12:18 ` Eli Zaretskii
2021-06-24 14:35 ` Ihor Radchenko [this message]
2021-06-24 16:06 ` Eli Zaretskii
2021-10-24 7:42 ` Stefan Kangas
2021-10-24 12:04 ` Eli Zaretskii
2021-10-24 12:27 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874kdnwcse.fsf@localhost \
--to=yantar92@gmail.com \
--cc=48740@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).