GNU bug report logs - #8101
24.0.50; `isearch-search-fun-function'

Previous Next

Package: emacs;

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

Date: Wed, 23 Feb 2011 18:11:02 UTC

Severity: minor

Tags: fixed

Found in version 24.0.50

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.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 8101 in the body.
You can then email your comments to 8101 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8101; Package emacs. (Wed, 23 Feb 2011 18:11: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. (Wed, 23 Feb 2011 18:11: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: 24.0.50; `isearch-search-fun-function'
Date: Wed, 23 Feb 2011 10:10:30 -0800
Doc string is broken:
 
"Override `isearch-search-fun'.
This function should return the search function for Isearch to use.
It will call this function with three arguments
as if it were `search-forward'."
 
First line is incorrect.  It overrides the default search function which
is used by `isearch-search-string', but it does not override
`isearch-search-fun'. It is *called* from `isearch-search-fun', so it
certainly cannot override it.
 
The biggest problem is the last sentence.  "It will call this function"
What is "IT"?  What is "THIS FUNCTION"?  And why mention
`search-forward' here?  Very confusing, if not downright incorrect.
 
Make it clear that this var's value is a function that is called with NO
ARGS and whose return value should be a function of the SAME THREE ARGS
as `isearch-search-string'.  That returned function will be used by
`isearch-search-string' to "search for the first occurrence of STRING or
its translation."
 
Further, the doc string of `isearch-search-fun' should also say that the
function returned accepts the same three args as `isearch-search-string'
- and so on.
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-02-14 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8101; Package emacs. (Sun, 03 Jul 2011 20:04:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8101 <at> debbugs.gnu.org
Subject: Re: 24.0.50; `isearch-search-fun-function'
Date: Sun, 03 Jul 2011 22:03:12 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> Make it clear that this var's value is a function that is called with NO
> ARGS and whose return value should be a function of the SAME THREE ARGS
> as `isearch-search-string'.  That returned function will be used by
> `isearch-search-string' to "search for the first occurrence of STRING or
> its translation."

I've clarified the doc string to the best of my ability now:

(defvar isearch-search-fun-function nil
  "Overrides the default `isearch-search-fun' behaviour.
This variable should be a function, which will be called with no
arguments, and should return a function that takes the same three
arguments as `isearch-search-string' requires.")

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 03 Jul 2011 20:04:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 8101 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 03 Jul 2011 20:04:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8101; Package emacs. (Mon, 04 Jul 2011 05:36:01 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 8101 <at> debbugs.gnu.org
Subject: RE: 24.0.50; `isearch-search-fun-function'
Date: Sun, 3 Jul 2011 22:34:59 -0700
> > Make it clear that this var's value is a function that is 
> > called with NO ARGS and whose return value should be a
> > function of the SAME THREE ARGS as `isearch-search-string'.
> > That returned function will be used by `isearch-search-string'
> > to "search for the first occurrence of STRING or
> > its translation."
> 
> I've clarified the doc string to the best of my ability now:
> 
> (defvar isearch-search-fun-function nil
>   "Overrides the default `isearch-search-fun' behaviour.
> This variable should be a function, which will be called with no
> arguments, and should return a function that takes the same three
> arguments as `isearch-search-string' requires.")

OK, but:

1. (English) "This variable's value should be..."  It is the value, not the
variable itself.

2. (Meaning) Without the last sentence I wrote above (or something equivalent)
we don't say what the function (value of the var) _does_.  What's the point of
someone providing a function as the value if we don't say what the function is
for?





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8101; Package emacs. (Mon, 04 Jul 2011 12:16:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8101 <at> debbugs.gnu.org
Subject: Re: 24.0.50; `isearch-search-fun-function'
Date: Mon, 04 Jul 2011 14:13:40 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> OK, but:
>
> 1. (English) "This variable's value should be..."  It is the value, not the
> variable itself.
>
> 2. (Meaning) Without the last sentence I wrote above (or something equivalent)
> we don't say what the function (value of the var) _does_.  What's the point of
> someone providing a function as the value if we don't say what the function is
> for?

How about this version, which I've now checked in:

(defvar isearch-search-fun-function nil
  "Overrides the default `isearch-search-fun' behaviour.
This variable's value should be a function, which will be called
with no arguments, and should return a function that takes three
arguments: STRING, BOUND, and NOERROR.

This returned function will be used by `isearch-search-string' to
search for the first occurrence of STRING or its translation.")


-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8101; Package emacs. (Mon, 04 Jul 2011 16:15:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 8101 <at> debbugs.gnu.org
Subject: RE: 24.0.50; `isearch-search-fun-function'
Date: Mon, 4 Jul 2011 09:14:11 -0700
> How about this version, which I've now checked in:
> 
> (defvar isearch-search-fun-function nil
>   "Overrides the default `isearch-search-fun' behaviour.
> This variable's value should be a function, which will be called
> with no arguments, and should return a function that takes three
> arguments: STRING, BOUND, and NOERROR.
> 
> This returned function will be used by `isearch-search-string' to
> search for the first occurrence of STRING or its translation.")

Yes, thank you.





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

This bug report was last modified 13 years and 326 days ago.

Previous Next


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