[Geany] New Release: Geany 0.8

Nick Treleaven nick.treleaven at xxxxx
Fri Aug 11 18:55:58 UTC 2006


On 11/08/06 15:21:46, John Gabriele wrote:
> On 8/11/06, Nick Treleaven <nick.treleaven at btinternet.com> wrote:
>> On 10/08/06 17:40:27, John Gabriele wrote:
>> > On 8/9/06, Enrico Tröger <enrico.troeger at uvena.de> wrote:
>> >> Changes since Geany 0.7:
>> >> [snip]
>> >> * Added support for back references when using regex replace.
>> >
>> > Nice. :) But, I think I found a problem with it. Try putting this  
>> into
>> > your file:
>> >
>> > LiquidCooled
>> > WaterCooled
>> >
>> > Then try the following Search/Replace:
>> > search text: [A-Z]([a-z]+)Cooled
>> > replace text: XXX\1Cooled
>> >
>> > It works the first time through, but then if you make the search  
>> loop
>> > around, the 2nd time it finds too much (all three of the X's  
>> instead
>> > of just the first one), and the replacement gives you a strange  
>> number
>> > of X's...
>> 
>> I think you don't have case sensitive checked ;-) So [A-Z] is the  
>> same
>> as [a-z]. It works if you use case sensitive regexes.
> 
> Gah! Ouch. Missed that. Thanks.
> 
> Incidentally, in a previous thread
> (http://lists.uvena.de/pipermail/geany/2006-August/000358.html) I
> requested that, when the user clicks that "Use regular
> expressions"checkbox, that it might be a good idea to automatically
> select the "Case sensitive" option too, since users will be expecting
> that regexes start off case-sensitive by default. Nick, you mentioned
> you didn't think it's necessary, but I think it's kinda' funny that I
> was caught by it myself (embarrassingly, after previously bringing it
> up!). I will now train myself to always check that option whenever I
> select the regex option (since almost all of my regex searches are
> case sensitive), but if you think that the majority of your users will
> also have to train themselves like that, you might reconsider setting
> the option automatically. Principle of least surprise and all. :)

Well, the problem is twofold:
1. It could be surprising that the case sensitive option becomes  
checked when regexes are checked.
2. What to do when regexes are unchecked - unchecking case sensitive  
search could be surprising too.

I wonder about having a separate checkbox for regex case sensitive -  
this would seem to fix the above problems.

Regards,
Nick



More information about the Users mailing list