From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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 20:30:12 +0300 Message-ID: <86plrxdnq3.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22632"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71879@debbugs.gnu.org To: Gerard Vermeulen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 01 19:31:20 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 1sOKs3-0005iX-Ke for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Jul 2024 19:31:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOKrn-0003Hp-9S; Mon, 01 Jul 2024 13:31:03 -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 1sOKrm-0003HR-7Y for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 13:31: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 1sOKrl-0001kJ-VX for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 13:31:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOKrm-0005fU-30 for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2024 13:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jul 2024 17:31: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.171985502621722 (code B ref 71879); Mon, 01 Jul 2024 17:31:02 +0000 Original-Received: (at 71879) by debbugs.gnu.org; 1 Jul 2024 17:30:26 +0000 Original-Received: from localhost ([127.0.0.1]:34414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOKrB-0005eI-MJ for submit@debbugs.gnu.org; Mon, 01 Jul 2024 13:30:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOKr9-0005e1-Ad for 71879@debbugs.gnu.org; Mon, 01 Jul 2024 13:30:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOKr2-0001VY-LV; Mon, 01 Jul 2024 13:30:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ECDmIPJzXqW4F0Lk7Z4p85WdP0e3/O3HRasbXWPXOd4=; b=pFpKbEnK3jeW Eq4SWL8KFIrEgbEN3v6r82+cNK/L0VXITNJVbDvrWC7WO2IGSo+N7s6OnQ46tk2OvNTJn5PRaQK7/ umoC0ncH1wUyv70UVKmfiP7uhlL/8nQP1JXlmvZ/HK+Lj4QUYkinV64I8lx6Zz9F/jsmInWjcojgT oujVJhxeElBXo3nQV1gqHxh1d2BuyQbEAK85EA6Vrmp6qPPV3JX3CKCAQP6krU0/1BORnl6bz1UX4 kVq5NiDfEzqhatq4jWhC5lvwrMbNz17gBD1lXAI2ycCfJWg6jUlinRlpWC3XEaXwn/LuGjn+QCgi3 LmcpInuoXoHgADj0yJb+lQ==; In-Reply-To: (message from Gerard Vermeulen on Mon, 01 Jul 2024 16:13:38 +0000) 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:288262 Archived-At: > 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. > By the way: using the-the finds a duplication "is is" in the NEWS > file but I am unsure whether this merits a bug report. Fixed, thanks.