From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerard Vermeulen Newsgroups: gmane.emacs.bugs Subject: bug#71879: 30.0.60; Docstring error in NOERROR argument part of re-search-forward Date: Mon, 01 Jul 2024 17:48:18 +0000 Message-ID: <77229ea00f071fa9fb077ab6e6737368@posteo.net> References: <86plrxdnq3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="916"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71879@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 01 19:49:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sOL9L-000Acg-Q6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jul 2024 19:49:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOL9E-0003dU-8J; Mon, 01 Jul 2024 13:49:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOL9C-0003cV-4a for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 13:49:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOL9B-0002P7-Sl for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 13:49:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOL9C-0006AI-8H for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 13:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerard Vermeulen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jul 2024 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71879 X-GNU-PR-Package: emacs Original-Received: via spool by 71879-submit@debbugs.gnu.org id=B71879.171985610923660 (code B ref 71879); Mon, 01 Jul 2024 17:49:02 +0000 Original-Received: (at 71879) by debbugs.gnu.org; 1 Jul 2024 17:48:29 +0000 Original-Received: from localhost ([127.0.0.1]:34457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOL8e-00069Y-JC for submit@debbugs.gnu.org; Mon, 01 Jul 2024 13:48:28 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:51283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOL8c-00069H-US for 71879@debbugs.gnu.org; Mon, 01 Jul 2024 13:48:27 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 97C89240101 for <71879@debbugs.gnu.org>; Mon, 1 Jul 2024 19:48:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719856099; bh=WakMHAzGPAsbkGsXpp+zEgmL56kYQVGPm663It4ITas=; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To: Cc:Subject:Message-ID:From; b=i2OCwwlcaQaJxuKLX0HXiep+9FuqS1cSUNjDtJl6PwUma4Mw36wjvB81R0yS7PDtX PWXDKtMU9GaMLa5FH1a7L3YvpXIhuh1A8CezuYnTnGRi7OUqeYDTEs8yt1RJ/x9AJE 8kQE43g1hXvPBK4WP3AmhcjggK/f8ztFK6IrG2B3BQWzR38eM2M7gE52BAIi/TLaEI 6jSTqmIOkCAli7jjH60kvvwwwKSlv4NPjLmNZIzc+VfVZAFAsx9tUDSTctqJyBsZAD sOAd/K6G/0T2aUOaaQTznyQjgnL+tP9tvx0vQKt4hO2QEFjKa7by4rYtAegOVK1eqj T6btocftC/o/w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WCYRk2F6wz6typ; Mon, 1 Jul 2024 19:48:18 +0200 (CEST) In-Reply-To: <86plrxdnq3.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288264 Archived-At: On 01.07.2024 19:30, Eli Zaretskii wrote: >> Date: Mon, 01 Jul 2024 16:13:38 +0000 >> From: Gerard Vermeulen >> >> Hello, >> >> The last "if" clause in the NOERROR part of the re-search-forward >> docstring >> is wrong. >> >> It reads "if it is neither nil nor t, move to the limit of search and >> return nil." >> >> but if NOERROR equals neither nil nor t re-search-forward returns >> the start position of the match (when found) or nil (when no match >> found). > > The full text of that part is as follows: > > The optional third argument NOERROR indicates how errors are handled > when the search fails. If it is nil or omitted, emit an error; if > it is t, simply return nil and do nothing; if it is neither nil nor > t, move to the limit of search and return nil. > > Note the first sentence of the paragraph: this entire paragraph > describes how NOERROR affects the case when the search _fails_. Thus, > the situation where the search succeeds is not relevant to the above > part of the doc string. > > So I think this text is accurate and correct. > Yes, I agree that the paragraph can be read like this.