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

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

bug#1352: marked as done (23.0.60; isearch-success-function)


From: Emacs bug Tracking System
Subject: bug#1352: marked as done (23.0.60; isearch-success-function)
Date: Sun, 16 Nov 2008 16:55:07 -0800

Your message dated Mon, 17 Nov 2008 02:46:02 +0200
with message-id <87tza7kwmt.fsf@jurta.org>
and subject line Re: bug#1352: 23.0.60; isearch-success-function
has caused the Emacs bug report #1352,
regarding 23.0.60; isearch-success-function
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1352: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1352
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems
--- Begin Message --- Subject: 23.0.60; isearch-success-function Date: Sat, 15 Nov 2008 15:39:35 -0800
The name of `isearch-success-function' seems wrong, if we believe the
doc string. The doc string suggests that it is a predicate that
filters the search hits that would otherwise be available. That's very
general. If that's true, then the name should reflect this meaning -
perhaps `isearch-predicate'.
 
Similarly, the name of `isearch-success-function-default' should be
something that suggests its very limited meaning: it filters search
hits to those that are visible, unless invisible text too can be
searched. It is a particular kind of search filter, and its name
should reflect that particularity.
 
Also, in `isearch-search', there is this:
 
;; Clear RETRY unless we matched some invisible text
;; and we aren't supposed to do that.
(if (or (not isearch-success)
        (bobp) (eobp)
        (= (match-beginning 0) (match-end 0))
        (funcall isearch-success-function
                 (match-beginning 0) (match-end 0)))
    (setq retry nil)))
 
The code here is general; it is not related to text visibility. So the
comment is not general enough. It is a vestige that is appropriate now
only when the value of `isearch-success-function' is
`isearch-success-function-default'. The comment should instead say
that we clear RETRY unless the search predicate says to skip this
search hit.
 
It seems like this is a partly finished enhancement to behavior that
was originally only for searching invisible text. Seems like this was
generalized to an arbitrary predicate that filters possible search
hits - but the job seems only half done. The code presumably works in
a general way, but the comments and symbol names are inappropriate.
 
The comments and the variable and function names need to reflect the
new behavior, and this behavior should be documented for users. Users
should know how to take advantage of this feature, defining their own
search predicates that filter the search hits that would normally be
available, so that hits that dissatisfy the predicate are skipped.
 

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-11-08 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
 




--- End Message ---
--- Begin Message --- Subject: Re: bug#1352: 23.0.60; isearch-success-function Date: Mon, 17 Nov 2008 02:46:02 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)
> Sounds very good, thank you, please install it.

Done.

-- 
Juri Linkov
http://www.jurta.org/emacs/


--- End Message ---

reply via email to

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