emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64367: closed (28.2; doc string of `text-property-search-forward')


From: GNU bug Tracking System
Subject: bug#64367: closed (28.2; doc string of `text-property-search-forward')
Date: Sat, 01 Jul 2023 09:33:01 +0000

Your message dated Sat, 01 Jul 2023 12:32:41 +0300
with message-id <83cz1cq8na.fsf@gnu.org>
and subject line Re: bug#64367: 28.2; doc string of 
`text-property-search-forward'
has caused the debbugs.gnu.org bug report #64367,
regarding 28.2; doc string of `text-property-search-forward'
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
64367: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64367
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.2; doc string of `text-property-search-forward' Date: Fri, 30 Jun 2023 15:07:02 +0000
The signature is this:

(text-property-search-forward PROPERTY
   &optional VALUE PREDICATE NOT-CURRENT)

The arguments should be described in order.

But the first line of the doc string - the most important - says this:

 Search for the next region of text where PREDICATE is true.

Not only is PREDICATE optional; it is not even the first optional arg.
The first line should describe the _default_ behavior (nil VALUE, nil
PREDICATE).  Something like this:

 Search forward for text where PROPERTY is non-nil.

Then go on to introduce, first VALUE, then PREDICATE, then NOT-CURRENT.

In GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
 of 2022-09-13
Windowing system distributor `Microsoft Corp.', version 10.0.19045
Configured using:
 `configure --with-modules --without-dbus --with-native-compilation
 --without-compress-install CFLAGS=-O2'




--- End Message ---
--- Begin Message --- Subject: Re: bug#64367: 28.2; doc string of `text-property-search-forward' Date: Sat, 01 Jul 2023 12:32:41 +0300
> From: Drew Adams <drew.adams@oracle.com>
> Date: Fri, 30 Jun 2023 15:07:02 +0000
> 
> The signature is this:
> 
> (text-property-search-forward PROPERTY
>    &optional VALUE PREDICATE NOT-CURRENT)
> 
> The arguments should be described in order.

Only preferably so.  It is not always possible to do so, and thus it
is not a hard requirement.

In this case, I see no way of describing the arguments in order and
still producing a useful doc string, let alone its first line.

> But the first line of the doc string - the most important - says this:
> 
>  Search for the next region of text where PREDICATE is true.
> 
> Not only is PREDICATE optional; it is not even the first optional arg.
> The first line should describe the _default_ behavior (nil VALUE, nil
> PREDICATE).

Now fixed on the emacs-29 branch.

> Something like this:
> 
>  Search forward for text where PROPERTY is non-nil.

This loses information and is also inaccurate, so I used a different
text:

  Search for next region of text where PREDICATE returns non-nil for PROPERTY.

Closing.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]