GNU bug report logs - #71879
30.0.60; Docstring error in NOERROR argument part of re-search-forward

Previous Next

Package: emacs;

Reported by: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>

Date: Mon, 1 Jul 2024 16:14:01 UTC

Severity: normal

Found in version 30.0.60

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71879 in the body.
You can then email your comments to 71879 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71879; Package emacs. (Mon, 01 Jul 2024 16:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerard Vermeulen <gerard.vermeulen <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 01 Jul 2024 16:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
To: Bug gnu emacs <bug-gnu-emacs <at> gnu.org>
Subject: 30.0.60; Docstring error in NOERROR argument part of re-search-forward
Date: Mon, 01 Jul 2024 16:13:38 +0000
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








Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71879; Package emacs. (Mon, 01 Jul 2024 17:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 71879 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
Cc: 71879 <at> debbugs.gnu.org
Subject: Re: bug#71879: 30.0.60;
 Docstring error in NOERROR argument part of re-search-forward
Date: Mon, 01 Jul 2024 20:30:12 +0300
> Date: Mon, 01 Jul 2024 16:13:38 +0000
> From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
> 
> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71879; Package emacs. (Mon, 01 Jul 2024 17:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 71879 <at> debbugs.gnu.org (full text, mbox):

From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 71879 <at> debbugs.gnu.org
Subject: Re: bug#71879: 30.0.60; Docstring error in NOERROR argument part of
 re-search-forward
Date: Mon, 01 Jul 2024 17:48:18 +0000

On 01.07.2024 19:30, Eli Zaretskii wrote:
>> Date: Mon, 01 Jul 2024 16:13:38 +0000
>> From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
>> 
>> 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.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 13 Jul 2024 10:24:02 GMT) Full text and rfc822 format available.

Notification sent to Gerard Vermeulen <gerard.vermeulen <at> posteo.net>:
bug acknowledged by developer. (Sat, 13 Jul 2024 10:24:02 GMT) Full text and rfc822 format available.

Message #16 received at 71879-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
Cc: 71879-done <at> debbugs.gnu.org
Subject: Re: bug#71879: 30.0.60; Docstring error in NOERROR argument part of
 re-search-forward
Date: Sat, 13 Jul 2024 13:23:12 +0300
> Date: Mon, 01 Jul 2024 17:48:18 +0000
> From: Gerard Vermeulen <gerard.vermeulen <at> posteo.net>
> Cc: 71879 <at> debbugs.gnu.org
> 
> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Aug 2024 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.