emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in field-string and field-string-no-properties


From: Greg Hill
Subject: Re: bug in field-string and field-string-no-properties
Date: Fri, 29 Aug 2003 14:55:06 -0700

At 11:36 AM +0900 8/29/03, Miles Bader wrote:
Greg Hill <address@hidden> 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"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]