From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#10507: 24.0.92; Doc of `search-forward' (and backward) Date: Mon, 16 Jan 2012 06:51:16 -0800 Message-ID: <4F0FFFB47E574B9D9DF35AD518F331AC@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1326725554 16210 80.91.229.12 (16 Jan 2012 14:52:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2012 14:52:34 +0000 (UTC) Cc: 10507@debbugs.gnu.org To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 16 15:52:29 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rmnv2-0005MB-6S for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jan 2012 15:52:20 +0100 Original-Received: from localhost ([::1]:54515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmnv1-0003Xm-Nl for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jan 2012 09:52:19 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmnuw-0003Xf-1c for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2012 09:52:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rmnup-000350-Vq for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2012 09:52:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmnup-00034u-Sv for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2012 09:52:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rmnvh-0000Gk-Ld for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2012 09:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Jan 2012 14:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10507-submit@debbugs.gnu.org id=B10507.1326725547986 (code B ref 10507); Mon, 16 Jan 2012 14:53:01 +0000 Original-Received: (at 10507) by debbugs.gnu.org; 16 Jan 2012 14:52:27 +0000 Original-Received: from localhost ([127.0.0.1]:59932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rmnv8-0000Fr-GX for submit@debbugs.gnu.org; Mon, 16 Jan 2012 09:52:27 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:63158) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rmnv6-0000Fj-2v for 10507@debbugs.gnu.org; Mon, 16 Jan 2012 09:52:24 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0GEpRjf007139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Jan 2012 14:51:28 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q0GEpRlu022569 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Jan 2012 14:51:27 GMT Original-Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0GEpQbk024201; Mon, 16 Jan 2012 08:51:26 -0600 Original-Received: from dradamslap1 (/10.159.39.219) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 16 Jan 2012 06:51:26 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AczUWI8atjARiSjRSoC0e1BbLwst3wABDBPg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4F143970.00D9,ss=1,re=0.000,fgs=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:55791 Archived-At: > > Furthermore, the doc says explicitly that the 4th arg MUST > > BE POSITIVE. That is no only NOT the case, it is even the > > case that the Emacs lisp code uses a negative value as the > > 4th arg. See, e.g., `zap-to-char'. > > "MUST BE POSITIVE" doesn't mean that a negative argument will > be rejected. So the doc is perfectly allowed to say "MUST BE > POSITIVE" even if the code handles negative values (it just > means that negative values are "NOT SUPPORTED"). And if some > core code uses negative values, that's a naughty breach of > abstraction, but that's about it. Words, even words like "must", can always be somewhat ambiguous. But "must" generally implies some sort of enforcement or negative consequences if not respected. "Should" is typically used when something is recommended but not prohibited or enforced. And if you say nothing at all about positive/non-positive then, as you are wont to say, "all bets are off" - no statement about support, the user knows nothing. I think that most readers would expect in this case ("must") that an error is raised if the arg is not positive - or at least that the function becomes a no-op. Compare the doc for `/': "The arguments must be numbers or markers." > So I see no bug here. If you want a change, please say which and why. A negative arg is supported by the code; it is used by Emacs source code; and it is useful. Knowing about it will mean simpler code by users. Please document (and support) it. Thx.