all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: mah@everybody.org, emacs-devel@gnu.org, jdsmith@as.arizona.edu
Subject: Re: xml-parse-file and text properties
Date: Fri, 21 Jul 2006 15:35:03 +0900	[thread overview]
Message-ID: <E1G3obH-000332-00@etlken> (raw)
In-Reply-To: <E1G3muP-0000l5-26@fencepost.gnu.org> (message from Richard Stallman on Fri, 21 Jul 2006 00:46:41 -0400)

In article <E1G3muP-0000l5-26@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:

>     ;; Note that {buffer-substring,match-string}-no-properties were
>     ;; formerly used in several places, but that removes composition info.

>     but neither of us were clear on the meaning of the statement, or why
>     retaining text properties in any XML parsed data would be desirable.  

> I think I see why.  Losing the composition info could mean that the
> composed characters turn into other sequences of characters.  It
> literally would change the text!

??? Composition is just a text property.  It doesn't change
the character sequence.  It just changes how characters are
displayed.  In that sense, it's the same as `display'
property.

> This is an ugly problem.  Many things want to get rid of most text
> properties, but they don't want to forget about composition.
> Logically speaking, composition is really part of the characters in
> the text.  Using text properties to encode it is fundamentally
> inconsistent.

I don't understand why `composition' property is that
special compared with other properties such as `display',
`fill-space'.

In addition, I don't understand why XML parsed data wants to
get rid of text properties.  What's the problem of strings
in the returned list containing text properties?

Anyway, logically speaking, composition should be internal
to display engine and should be hidden from any other place.
In emacs-unicode-2, loosing of composition property has no
problem because I've implemented a code to construct
composition automatically in display engine.

> We have been lucky so far, in that this inconsistency has not caused a
> lot of problems -- but now our luck is running out.

> I can see only two kinds of approaches:

> 1. Distinguish composition properties from others, and make functions
> like buffer-substring-no-properties preserve composition properties,
> even as they discard all other properties.

> 2. Change the representation of composition so it uses something other
> than text properties.

> #2 would be a big maintenance trouble.  It would take us a long time
> to get everything working again after such a change.  We certainly
> should not install such a change now, and I hope we won't need to do
> it ever.

> Can #1 work?

I don't know.  If text properties causes a problem in XML,
#1 doesn't solve the current problem.  If text properties is
not a problem, we don't need #1.

---
Kenichi Handa
handa@m17n.org

  reply	other threads:[~2006-07-21  6:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18 21:35 xml-parse-file and text properties JD Smith
2006-07-20 21:46 ` Richard Stallman
2006-07-20 22:11   ` JD Smith
2006-07-21  4:46     ` Richard Stallman
2006-07-21  6:35       ` Kenichi Handa [this message]
2006-07-21  7:24         ` Eli Zaretskii
2006-07-21  8:14           ` Kenichi Handa
2006-07-22  4:39         ` Richard Stallman
2006-07-21 16:13       ` Kevin Rodgers
2006-07-21 23:33         ` Kevin Rodgers
2006-07-20 21:46 ` Richard Stallman
2006-07-20 22:40   ` JD Smith
2006-07-21 12:55 ` Stefan Monnier
2006-07-21 17:34   ` JD Smith
2006-07-21 20:22     ` Stefan Monnier
2006-07-21 21:50       ` JD Smith
2006-07-22 15:49       ` Richard Stallman
2006-07-24  1:51         ` Kenichi Handa
2006-07-24  3:17           ` Stefan Monnier
2006-07-24  4:36             ` Kenichi Handa
2006-07-24 18:22           ` Richard Stallman
2006-07-24 20:38             ` Stuart D. Herring
2006-07-25  3:09               ` Richard Stallman
2006-07-25 14:00                 ` Stefan Monnier
2006-07-25 22:15                   ` Richard Stallman
2006-07-24 20:51             ` Stefan Monnier
2006-07-25  3:09               ` Richard Stallman
2006-07-21 20:52     ` Thien-Thi Nguyen
2006-07-21 21:45       ` JD Smith
2006-07-22  9:15         ` Eli Zaretskii
2006-07-24 16:44           ` JD Smith
2006-07-25 16:05             ` JD Smith
2006-07-25 16:27               ` Stefan Monnier
2006-07-25 19:16                 ` JD Smith

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1G3obH-000332-00@etlken \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=jdsmith@as.arizona.edu \
    --cc=mah@everybody.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.