From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#17181: 24.4.50; previous-single-property-change: odd behavior Date: Thu, 03 Apr 2014 22:27:56 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396578576 23909 80.91.229.3 (4 Apr 2014 02:29:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2014 02:29:36 +0000 (UTC) Cc: 17181-done@debbugs.gnu.org To: raman@google.com (T.V Raman) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 04 04:29:27 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WVtsi-0003v3-IV for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Apr 2014 04:29:24 +0200 Original-Received: from localhost ([::1]:47291 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVtsi-0005TF-5i for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 22:29:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVtsX-0005L7-SE for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 22:29:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVtsQ-0007rz-D8 for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 22:29:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVtsQ-0007rs-Ay for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 22:29:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WVtsQ-0004XA-0A for bug-gnu-emacs@gnu.org; Thu, 03 Apr 2014 22:29:06 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Apr 2014 02:29:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 17181 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Mail-Followup-To: 17181@debbugs.gnu.org, monnier@IRO.UMontreal.CA, raman@google.com Original-Received: via spool by 17181-done@debbugs.gnu.org id=D17181.139657848517322 (code D ref 17181); Fri, 04 Apr 2014 02:29:04 +0000 Original-Received: (at 17181-done) by debbugs.gnu.org; 4 Apr 2014 02:28:05 +0000 Original-Received: from localhost ([127.0.0.1]:34840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVtrP-0004VD-La for submit@debbugs.gnu.org; Thu, 03 Apr 2014 22:28:04 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:59190) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVtrL-0004Ug-Hu; Thu, 03 Apr 2014 22:28:00 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s342RuYd030392; Thu, 3 Apr 2014 22:27:56 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 3FD33AE1E4; Thu, 3 Apr 2014 22:27:56 -0400 (EDT) In-Reply-To: (T. V. Raman's message of "Thu, 03 Apr 2014 17:47:28 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4901=0 X-NAI-Spam-Version: 2.3.0.9378 : core <4901> : inlines <689> : streams <1151610> : uri <1719727> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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 Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87732 Archived-At: tags 17181 notabug thanks > (put-text-property (point) (point-max) 'test t) > Move point to the front of "bar" ie point is at the beginning of the > line. > (get-text-property (point) 'test) returns T as expected. > (point) evaluates to 6 > Consequently, I'd expect > (previous-single-property-change (point) 'test) to return 5 > instead you get: nil Buffer positions are *between* characters. `get-text-property' gets you the value of the property on "the character after point". `previous-single-property-change' gets you the nearest change on *previous* characters. The property above is nil between point-min and point, so previous-single-property-change finds no change at all. The off-by-one error is in your expectations :-( Stefan