From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: bug in field-string and field-string-no-properties Date: 29 Aug 2003 11:36:33 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200308282132.h7SLWeV1009685@rum.cs.yale.edu> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1062125852 8661 80.91.224.253 (29 Aug 2003 02:57:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Aug 2003 02:57:32 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , monnier@cs.yale.edu, Richard Stallman Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Aug 29 04:57:30 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19sZS6-0003jr-00 for ; Fri, 29 Aug 2003 04:57:30 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19sZZG-000636-00 for ; Fri, 29 Aug 2003 05:04:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sZLh-0007Ra-1M for emacs-devel@quimby.gnus.org; Thu, 28 Aug 2003 22:50:53 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sZC3-00058w-0I for emacs-devel@gnu.org; Thu, 28 Aug 2003 22:40:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sZBT-0004a2-UD for emacs-devel@gnu.org; Thu, 28 Aug 2003 22:40:21 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sZAl-0002Fg-Jn; Thu, 28 Aug 2003 22:39:35 -0400 Original-Received: from [210.143.35.50] (helo=TYO200.gate.nec.co.jp) by mx20.gnu.org with esmtp (Exim 4.22) id 19sZ8E-0005P7-2f; Thu, 28 Aug 2003 22:36:58 -0400 Original-Received: from TYO202.gate.nec.co.jp (TYO302 [10.7.69.202]) by TYO200.gate.nec.co.jp (8.11.6/3.7W01041220) with ESMTP id h7T2amc19025; Fri, 29 Aug 2003 11:36:49 +0900 (JST) Original-Received: from mailgate4.nec.co.jp (mailgate54.nec.co.jp [10.7.69.195]) by TYO202.gate.nec.co.jp (8.11.6/3.7W01080315) with ESMTP id h7T2afo22272; Fri, 29 Aug 2003 11:36:41 +0900 (JST) Original-Received: from mailsv4.nec.co.jp (mailgate52.nec.co.jp [10.7.69.191]) by mailgate4.nec.co.jp (8.11.6/3.7W-MAILGATE-NEC) with ESMTP id h7T2aeg27463; Fri, 29 Aug 2003 11:36:40 +0900 (JST) Original-Received: from edtmg04.lsi.nec.co.jp ([10.26.17.201]) by mailsv4.nec.co.jp (8.11.6/3.7W-MAILSV4-NEC) with ESMTP id h7T2adV11176; Fri, 29 Aug 2003 11:36:39 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg04.lsi.nec.co.jp (8.9.3p2+3.2W/3.7W_EDC_Ver.1.0) with ESMTP id LAA27001; Fri, 29 Aug 2003 11:36:39 +0900 (JST) Original-Received: from mcspd15.ucom.lsi.nec.co.jp (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.8/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id h7T2aYNH025399; Fri, 29 Aug 2003 11:36:35 +0900 (JST) Original-Received: by mcspd15.ucom.lsi.nec.co.jp (Postfix, from userid 31295) id 81A1C3718; Fri, 29 Aug 2003 11:36:34 +0900 (JST) Original-To: Greg Hill System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: Original-Lines: 37 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:16182 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16182 Greg Hill writes: > "At 1, field-property = X, field-string = '' > At 2, field-property = X, field-string = 'xX' > At 3, field-property = Y, field-string = '' > At 4, field-property = Y, field-string = 'yY' > At 5, field-property = nil, field-string = '' > " What version of emacs are you using? My emacs (roughly CVS HEAD), returns: "At 1, field-property = X, field-string = '' At 2, field-property = X, field-string = 'xX' At 3, field-property = Y, field-string = 'xX' At 4, field-property = Y, field-string = 'yY' At 5, field-property = nil, field-string = 'yY' " which makes sense since the default for text-properties is rear-stickyness. > The kind of function I would find useful wouldn't depend on stickiness > at all. For a given buffer position, the value of the field property > returned by get-text-property would determine the string returned by > field-string when it is passed the same buffer position. There _is_ a reason why fields use stickiness for ambiguous locations: it yields consistent result with what happens when a user inserts text, and fields are fundamentally about inserting text. Text insertion happens _between_ characters, and field operators reflect that. Perhaps mouse operations require some different operators, I don't know. -Miles -- "1971 pickup truck; will trade for guns"