From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: xml-parse-file and text properties Date: Fri, 21 Jul 2006 10:13:32 -0600 Organization: IHS Message-ID: References: <1153433461.32596.48.camel@turtle.as.arizona.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1153498491 21939 80.91.229.2 (21 Jul 2006 16:14:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2006 16:14:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 18:14:49 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G3xeJ-0002L0-Ss for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 18:14:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3xeJ-0003pO-7b for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 12:14:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3xe5-0003nq-GC for emacs-devel@gnu.org; Fri, 21 Jul 2006 12:14:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3xe1-0003if-9H for emacs-devel@gnu.org; Fri, 21 Jul 2006 12:14:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3xe1-0003iM-3G for emacs-devel@gnu.org; Fri, 21 Jul 2006 12:14:29 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G3xeS-0004V8-Em for emacs-devel@gnu.org; Fri, 21 Jul 2006 12:14:56 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G3xdt-0002G4-DI for emacs-devel@gnu.org; Fri, 21 Jul 2006 18:14:21 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jul 2006 18:14:21 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jul 2006 18:14:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 43 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57432 Archived-At: Richard Stallman wrote: > ;; 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! > > 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. > > 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? How about extending buffer-substring-no-properties with an optional KEEP-PROPERTIES argument, a list of text properties to preserve in the returned string? Then xml-parse-file could call it with the list of composition properties (whatever they are). -- Kevin