all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Paul Wallington <jpw@gnu.org>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: bug in field-string and field-string-no-properties
Date: Thu, 14 Aug 2003 22:21:28 +0100	[thread overview]
Message-ID: <E19nPXE-0006kL-00@indigo.shootybangbang.com> (raw)
In-Reply-To: <p04310104bb61a5d84ffb@[198.17.100.22]> (message from Greg Hill on Thu, 14 Aug 2003 14:00:49 -0700)

> There appears to be a bug in field-string and 
> field-string-no-properties.  When (point) or the POS argument is at 
> the first character of a field, the function returns an empty string. 
> The following fragment of code, executed in the scratch buffer, 
> illustrates the problem.
> 
> (progn
>    (set-buffer (get-buffer-create "junk"))
>    (erase-buffer)
>    (insert "Test")
>    (put-text-property (point-min) (point-max) 'field 1)
>    (message "field-string at 1 = '%s'\nfield-string at 2 = '%s'"
>    (field-string-no-properties 1) (field-string-no-properties 2)))

>From (elisp) Fields Info node:

"When the characters before and after POS are part of the same field,
there is no doubt which field contains POS: the one those characters
both belong to.  When POS is at a boundary between fields, which field
it belongs to depends on the stickiness of the `field' properties of
the two surrounding characters (see *note Sticky Properties::).  The field
whose property would be inherited by text inserted at POS is the field
that contains POS."

  reply	other threads:[~2003-08-14 21:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-14 21:00 bug in field-string and field-string-no-properties Greg Hill
2003-08-14 21:21 ` John Paul Wallington [this message]
  -- strict thread matches above, loose matches on Subject: below --
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
2003-08-29 18:53       ` Kevin Rodgers
2003-08-29 21:55       ` Greg Hill

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=E19nPXE-0006kL-00@indigo.shootybangbang.com \
    --to=jpw@gnu.org \
    --cc=bug-gnu-emacs@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.