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: Miles Bader
Subject: Re: bug in field-string and field-string-no-properties
Date: 29 Aug 2003 11:36:33 +0900

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?  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]