GNU bug report logs - #35498
26.2; doc string of `isearch-regexp-function'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 30 Apr 2019 01:50:02 UTC

Severity: minor

Found in version 26.2

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 35498 in the body.
You can then email your comments to 35498 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#35498; Package emacs. (Tue, 30 Apr 2019 01:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 30 Apr 2019 01:50:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; doc string of `isearch-regexp-function'
Date: Mon, 29 Apr 2019 18:48:48 -0700 (PDT)
The doc string should describe the possible values and their
meanings/behaviors.  Currently it describes only a function as value.

Searching isearch.el it seems that this variable can be any of the
values possible for `search-default-mode'.  Please describe each of the
values for `isearch-regexp-function'.

Even when the value is a function the description could be better,
saying that it must accept a string as its first arg and must return a
string.  That can be surmised from saying that it converts a plain
search string to a regexp [search string], but it could be clearer.

Also, "plain search string" and "regexp" are unclear here.  The
distinction is presumably (?) that the former contains no regexp special
chars?  Or does the return value need to be a _valid_ (complete) regexp,
and does the function raise an error if that's not possible?



In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
 of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 03 May 2019 09:25:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Fri, 03 May 2019 09:25:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 35498-done <at> debbugs.gnu.org
Subject: Re: bug#35498: 26.2; doc string of `isearch-regexp-function'
Date: Fri, 03 May 2019 12:24:15 +0300
> Date: Mon, 29 Apr 2019 18:48:48 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> The doc string should describe the possible values and their
> meanings/behaviors.  Currently it describes only a function as value.

I added the existing functions that could be used as values.  Their
descriptions are available by using the hyperlink, so no need to
duplicate that here.  The list is, of course, not exhaustive, as Lisp
programs could define their own functions.

> Searching isearch.el it seems that this variable can be any of the
> values possible for `search-default-mode'.  Please describe each of the
> values for `isearch-regexp-function'.

See above: not needed.

> Even when the value is a function the description could be better,
> saying that it must accept a string as its first arg and must return a
> string.  That can be surmised from saying that it converts a plain
> search string to a regexp [search string], but it could be clearer.

Added.

> Also, "plain search string" and "regexp" are unclear here.  The
> distinction is presumably (?) that the former contains no regexp special
> chars?  Or does the return value need to be a _valid_ (complete) regexp,
> and does the function raise an error if that's not possible?

I didn't see any problem here, although I improved the wording to some
extent.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35498; Package emacs. (Fri, 03 May 2019 14:49:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 35498-done <at> debbugs.gnu.org
Subject: RE: bug#35498: 26.2; doc string of `isearch-regexp-function'
Date: Fri, 3 May 2019 07:47:57 -0700 (PDT)
> > The doc string should describe the possible values and their
> > meanings/behaviors.  Currently it describes only a function as value.
> 
> I added the existing functions that could be used as values.  Their
> descriptions are available by using the hyperlink, so no need to
> duplicate that here.  The list is, of course, not exhaustive, as Lisp
> programs could define their own functions.

It should instead, or in addition, specify what args it
must accept and what kind of value it must return.
Examples are only nice-to-have, not a replacement for a
description/spec.

> > Searching isearch.el it seems that this variable can be any of the
> > values possible for `search-default-mode'.  Please describe each of the
> > values for `isearch-regexp-function'.
> 
> See above: not needed.

The doc string should say that the value can be t, nil,
or a function. It should say what the behavior is for
each.  Or, as I suggested, it can just say that the
value can be anything acceptable for `search-default-mode'. 

> > Even when the value is a function the description could be better,
> > saying that it must accept a string as its first arg and must return a
> > string.  That can be surmised from saying that it converts a plain
> > search string to a regexp [search string], but it could be clearer.
> 
> Added.

OK, good.  That cancels what I said first, above.  I
thought you were saying that it is sufficient to just
give a list of existing such function values.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35498; Package emacs. (Fri, 03 May 2019 15:07:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 35498 <at> debbugs.gnu.org
Subject: Re: bug#35498: 26.2; doc string of `isearch-regexp-function'
Date: Fri, 03 May 2019 18:06:14 +0300
> Date: Fri, 3 May 2019 07:47:57 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 35498-done <at> debbugs.gnu.org
> 
> > > The doc string should describe the possible values and their
> > > meanings/behaviors.  Currently it describes only a function as value.
> > 
> > I added the existing functions that could be used as values.  Their
> > descriptions are available by using the hyperlink, so no need to
> > duplicate that here.  The list is, of course, not exhaustive, as Lisp
> > programs could define their own functions.
> 
> It should instead, or in addition, specify what args it
> must accept and what kind of value it must return.

Did you look at the changes I installed?  Because I actually did that.

> > > Searching isearch.el it seems that this variable can be any of the
> > > values possible for `search-default-mode'.  Please describe each of the
> > > values for `isearch-regexp-function'.
> > 
> > See above: not needed.
> 
> The doc string should say that the value can be t, nil,
> or a function.

Did you see the changes I install?

> > > Even when the value is a function the description could be better,
> > > saying that it must accept a string as its first arg and must return a
> > > string.  That can be surmised from saying that it converts a plain
> > > search string to a regexp [search string], but it could be clearer.
> > 
> > Added.
> 
> OK, good.  That cancels what I said first, above.

So why did you send them anyway?




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

This bug report was last modified 4 years and 324 days ago.

Previous Next


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