Subject: bug#71879: closed (Re: bug#71879: 30.0.60; Docstring error in NOERROR argument part of re-search-forward)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 13 Jul 2024 10:24:02 +0000

Your bug report

#71879: 30.0.60; Docstring error in NOERROR argument part of re-search-forward

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
71879: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71879
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#71879: 30.0.60; Docstring error in NOERROR argument part of re-search-forward
From: Eli Zaretskii <[email-masked]>
To: Gerard Vermeulen <[email-masked]>
Cc: [email-masked]
Date: Sat, 13 Jul 2024 13:23:12 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Mon, 01 Jul 2024 17:48:18 +0000
> From: Gerard Vermeulen <[email-masked]>
> Cc: [email-masked]
> 
> On 01.07.2024 19:30, Eli Zaretskii wrote:
> > 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.

I've modified the doc string a bit to make this intent more clear, and
I'm therefore closing the bug.

Subject: 30.0.60; Docstring error in NOERROR argument part of re-search-forward
From: Gerard Vermeulen <[email-masked]>
To: Bug gnu emacs <[email-masked]>
Date: Mon, 01 Jul 2024 16:13:38 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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).

See for instance: (info "(Eintr) the-the")

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.

Regards -- Gerard