all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@lsi.nec.co.jp>
Cc: emacs-devel@gnu.org,
	Stefan Monnier <monnier+gnu/emacs@cs.yale.edu>,
	monnier@cs.yale.edu, Richard Stallman <rms@gnu.org>
Subject: Re: bug in field-string and field-string-no-properties
Date: 29 Aug 2003 11:36:33 +0900	[thread overview]
Message-ID: <buo4r01kx5a.fsf@mcspd15.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <p04310103bb744f47c66f@[198.17.100.22]>

Greg Hill <ghill@synergymicro.com> 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	other threads:[~2003-08-29  2:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-27 22:12 [ghill@synergymicro.com: Re: Re: bug in field-string and field-string-no-properties] Richard Stallman
2003-08-28 21:32 ` Fwd: Re: Re: bug in field-string and field-string-no-properties Stefan Monnier
2003-08-29  2:20   ` Greg Hill
2003-08-29  2:36     ` Miles Bader [this message]
2003-08-29 18:53       ` Kevin Rodgers
2003-08-29 21:55       ` Greg Hill
  -- strict thread matches above, loose matches on Subject: below --
2003-08-14 21:00 Greg Hill
2003-08-14 21:21 ` John Paul Wallington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buo4r01kx5a.fsf@mcspd15.ucom.lsi.nec.co.jp \
    --to=miles@lsi.nec.co.jp \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=monnier+gnu/emacs@cs.yale.edu \
    --cc=monnier@cs.yale.edu \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.