From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Hill Newsgroups: gmane.emacs.devel Subject: Re: bug in field-string and field-string-no-properties Date: Fri, 29 Aug 2003 14:55:06 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200308282132.h7SLWeV1009685@rum.cs.yale.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Trace: sea.gmane.org 1062194711 27923 80.91.224.253 (29 Aug 2003 22:05:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Aug 2003 22:05:11 +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 Sat Aug 30 00:05:09 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 19srMj-0007Cx-00 for ; Sat, 30 Aug 2003 00:05:09 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19srUF-0002YW-00 for ; Sat, 30 Aug 2003 00:12:55 +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 19srKj-0006Pk-Fi for emacs-devel@quimby.gnus.org; Fri, 29 Aug 2003 18:03:05 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19srIh-0005r3-QZ for emacs-devel@gnu.org; Fri, 29 Aug 2003 18:00:59 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19srGK-0005CT-K7 for emacs-devel@gnu.org; Fri, 29 Aug 2003 17:58:33 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.22) id 19srFX-0004GB-KR; Fri, 29 Aug 2003 17:57:43 -0400 Original-Received: from [153.105.4.30] (helo=synergymicro.com) by mx20.gnu.org with esmtp (Exim 4.22) id 19srE3-00074P-LZ; Fri, 29 Aug 2003 17:56:11 -0400 Original-Received: from synergy.synergy.encinitas.ca.us ([153.105.4.29]) by synergymicro.com (8.9.3/8.9.3) with ESMTP id OAA14645; Fri, 29 Aug 2003 14:57:17 -0700 Original-Received: from [198.17.100.22] (G_Hill_Mac [198.17.100.22]) by synergy.synergy.encinitas.ca.us (8.12.8/8.12.8) with ESMTP id h7TLtbIB005771; Fri, 29 Aug 2003 14:55:37 -0700 In-Reply-To: Original-To: Miles Bader 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:16197 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16197 At 11:36 AM +0900 8/29/03, Miles Bader wrote: >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? GNU Emacs 21.2.2 (sparc-sun-solaris2.7, X toolkit) of 2002-12-17 > 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"