From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#20411: 24.3; Docstring of `next-single-property-change' Date: Thu, 23 Apr 2015 16:29:55 -0400 Message-ID: References: <21816.64705.641155.937890@home.barzilay.org> <83bnie274h.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1429821084 1348 80.91.229.3 (23 Apr 2015 20:31:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2015 20:31:24 +0000 (UTC) Cc: 20411@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 23 22:31:15 2015 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 1YlNmB-0005YW-PW for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Apr 2015 22:31:11 +0200 Original-Received: from localhost ([::1]:41936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlNmB-0007Zu-4B for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Apr 2015 16:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlNm6-0007XJ-G1 for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 16:31:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlNm2-0006c8-GW for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 16:31:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlNm2-0006c4-D8 for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 16:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YlNm2-0005lR-36 for bug-gnu-emacs@gnu.org; Thu, 23 Apr 2015 16:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Barzilay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Apr 2015 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20411 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20411-submit@debbugs.gnu.org id=B20411.142982100922040 (code B ref 20411); Thu, 23 Apr 2015 20:31:02 +0000 Original-Received: (at 20411) by debbugs.gnu.org; 23 Apr 2015 20:30:09 +0000 Original-Received: from localhost ([127.0.0.1]:38084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YlNlA-0005jO-7k for submit@debbugs.gnu.org; Thu, 23 Apr 2015 16:30:09 -0400 Original-Received: from mail-wi0-f182.google.com ([209.85.212.182]:38543) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YlNl3-0005iM-Pg for 20411@debbugs.gnu.org; Thu, 23 Apr 2015 16:30:05 -0400 Original-Received: by wiun10 with SMTP id n10so105493499wiu.1 for <20411@debbugs.gnu.org>; Thu, 23 Apr 2015 13:29:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FWfE6VBgyuETBVwSAsUsBslAwuq82mAWOMKPVXlk+w0=; b=gBU4w30wiyf7CTxvS1VWAG5jc364pIrphqbTLoixiggWE7FF8ngY+BaSrhxRpg7Zn0 yFJxfaKL1NkktXbJdqcXCXIRuVk0fgeG705/vama8WpCmSUpWfLSRY/Iqzw1j0x4s9bp mO5h/aAuac6gyU3/xD2htBXXol3l/CwkZ8HK/Ed7TQGm7VYX7AUSMQmpNw3jCScOrsYn P6MPUNX5vt9kbU7KfYSJiPYKLDC3D4vTHR2RyhpRsMJuEqoHKq1KflMsC4WaX33oL06d hNDLVj5hFzt3j8eZ8U0+qzB4V8JoqyNjvSBJpHQe+oSeJXrvMdRlxrknCy3lKPlWxUJi he0A== X-Gm-Message-State: ALoCoQmxUgsHVTdJ4jp6npAEuEDju7keWxFDcmzt2CqR/4MrXmcLDxRee67IM4cFRqnnNA29QFmQ X-Received: by 10.194.93.195 with SMTP id cw3mr9224573wjb.150.1429820995992; Thu, 23 Apr 2015 13:29:55 -0700 (PDT) Original-Received: by 10.194.206.101 with HTTP; Thu, 23 Apr 2015 13:29:55 -0700 (PDT) In-Reply-To: <83bnie274h.fsf@gnu.org> 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:101960 Archived-At: Bah. Yes, I completely missed that. Looking at it again, I think that it's that "never equal" that threw me off and write code that assumes that. To make it worse, it reads like an interface very similar to `re-search-forward' up to that paragraph, and that "helped" me miss the last sentence. So I still think that it's confusing -- maybe "except when LIMIT is non-nil" and possibly a warning that this is different from the searching functions? On Thu, Apr 23, 2015 at 11:31 AM, Eli Zaretskii wrote: >> From: Eli Barzilay >> Date: Thu, 23 Apr 2015 10:08:01 -0400 >> >> The documentation for `next-single-property-change' has: >> >> Return nil if the property is constant all the way to the end of >> object. If the value is non-nil, it is a position greater than >> position, never equal. >> >> Both of these are wrong when a bound is given. > > Which is why the doc string says, right after the text you cited: > > If the optional fourth argument LIMIT is non-nil, don't search > past position LIMIT; return LIMIT if nothing is found before LIMIT. > > Isn't this exactly what you were looking for? -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life!