[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: TortoiseSVN Notification: Regex support in search boxes (steveking)

From: Alexander Klenin <klenin_at_gmail.com>
Date: 2007-08-31 01:33:21 CEST

On 8/31/07, TortoiseSVN <issues@tortoisesvn.tigris.org> wrote:
> The following task has a new comment added:
>
> FS#384 - Regex support in search boxes
> User who did this - Stefan Küng (steveking)

> While the balloon tooltip and the indication whether regex will be used or not
>(depending on whether the string is a valid regex expression or not) is good,
>the dropdown menu to choose regex search (or not) is something I
don't really like:
> Most users will simply enter some text there (e.g., "/path/to/look/for", "authorname",
> implemented feature", ...) which is a valid regex but still searches for
> what the user thinks it will (even if the user isn't even aware that a regex search is done).
>So adding yet another GUI element (button, menu, or whatever) is a
little bit overkill.

I too am unsure about this exact feature, but these are (small)
problems I wanted to address:
1) Although rare, there are cases when the user wanted to search a
string which just happened to be a valid regexp matching quite
different thing. (e.g. TMyClass.MyMethod actually searching for any
char instead of literal dot, a+b will found aaaab but not literal a+b
etc.)
Even if the user is aware of quoting rules, this still constitutes
slightly irritating 'oops' moment.
2) When entering simple search string, automatic refresh of search
results is good, because it provides a nice 'narrowing' filter -- with
each new letter, set of selected commits is either reduced or left the
same.
However, when trying to enter and edit regexp, continuous auto-refresh
is distracting, because the set of commits varies widely based on the
part you entered.

I agree that manual regexps on/off switch is unwieldy, so maybe the
following will be better:
1) Even if entered string is a valid regexp, still indicate (and
perhaps even use, for tiny optimization) normal substring search if
the string does not contain any special characters.
This way users unaware of regexp feature who entered such characters
will get visual indication that something 'unusual' happened.
2) If search string is 'essential' regexp, whether valid or not,
increase auto-refresh delay.
3) If an (excellent IMO) suggestion by Lübbe in this task is
implemented, add 'quote all special chars' in pattern menu, which will
add \Q and \E around current search string.

-- 
Alexander S. Klenin
Insight Experts Ltd.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Aug 31 01:30:30 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.