From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Paul Wallington Newsgroups: gmane.emacs.bugs Subject: Re: bug in field-string and field-string-no-properties Date: Thu, 14 Aug 2003 22:21:28 +0100 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1060896233 29612 80.91.224.253 (14 Aug 2003 21:23:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2003 21:23:53 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 14 23:23:51 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19nPZX-0004US-00 for ; Thu, 14 Aug 2003 23:23:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nPYc-0006Bd-Nh for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Aug 2003 17:22:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19nPYa-0006BT-AB for bug-gnu-emacs@gnu.org; Thu, 14 Aug 2003 17:22:52 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19nPY3-00068s-6n for bug-gnu-emacs@gnu.org; Thu, 14 Aug 2003 17:22:50 -0400 Original-Received: from [217.44.221.169] (helo=indigo.shootybangbang.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nPY2-00068m-QG for bug-gnu-emacs@gnu.org; Thu, 14 Aug 2003 17:22:18 -0400 Original-Received: from jpw by indigo.shootybangbang.com with local (Exim 3.36 #1 (Debian)) id 19nPXE-0006kL-00; Thu, 14 Aug 2003 22:21:28 +0100 Original-To: Greg Hill In-reply-to: (message from Greg Hill on Thu, 14 Aug 2003 14:00:49 -0700) X-Attribution: jpw X-Face: R(_z-rF:grdKO.*u`n); p.i$Eiz=h^CO5eDYv"4:K@#\HN09*Ykx}}B{kF/KH}%f_o^Wp List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5545 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5545 > 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."