all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#35498: 26.2; doc string of `isearch-regexp-function'
@ 2019-04-30  1:48 Drew Adams
  2019-05-03  9:24 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2019-04-30  1:48 UTC (permalink / raw)
  To: 35498

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#35498: 26.2; doc string of `isearch-regexp-function'
  2019-04-30  1:48 bug#35498: 26.2; doc string of `isearch-regexp-function' Drew Adams
@ 2019-05-03  9:24 ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2019-05-03  9:24 UTC (permalink / raw)
  To: Drew Adams; +Cc: 35498-done

> Date: Mon, 29 Apr 2019 18:48:48 -0700 (PDT)
> From: Drew Adams <drew.adams@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#35498: 26.2; doc string of `isearch-regexp-function'
       [not found] ` <<831s1fopq8.fsf@gnu.org>
@ 2019-05-03 14:47   ` Drew Adams
  2019-05-03 15:06     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2019-05-03 14:47 UTC (permalink / raw)
  To: Eli Zaretskii, Drew Adams; +Cc: 35498-done

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#35498: 26.2; doc string of `isearch-regexp-function'
  2019-05-03 14:47   ` Drew Adams
@ 2019-05-03 15:06     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2019-05-03 15:06 UTC (permalink / raw)
  To: Drew Adams; +Cc: 35498

> Date: Fri, 3 May 2019 07:47:57 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 35498-done@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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-03 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-30  1:48 bug#35498: 26.2; doc string of `isearch-regexp-function' Drew Adams
2019-05-03  9:24 ` Eli Zaretskii
     [not found] <<95f9cdd4-4d43-458e-8354-dfc8972b14bf@default>
     [not found] ` <<831s1fopq8.fsf@gnu.org>
2019-05-03 14:47   ` Drew Adams
2019-05-03 15:06     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.