unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 64367-done@debbugs.gnu.org
Subject: bug#64367: 28.2; doc string of `text-property-search-forward'
Date: Sat, 01 Jul 2023 12:32:41 +0300	[thread overview]
Message-ID: <83cz1cq8na.fsf@gnu.org> (raw)
In-Reply-To: <SJ0PR10MB5488ED4B7826888A893AAAFBF32AA@SJ0PR10MB5488.namprd10.prod.outlook.com> (message from Drew Adams on Fri, 30 Jun 2023 15:07:02 +0000)

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





      reply	other threads:[~2023-07-01  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 15:07 bug#64367: 28.2; doc string of `text-property-search-forward' Drew Adams
2023-07-01  9:32 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83cz1cq8na.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64367-done@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).