GNU bug report logs - #10113
24.0.91; Isearch & `M-e'

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Tue, 22 Nov 2011 22:47:01 UTC

Severity: normal

Found in version 24.0.91

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> jurta.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 10113 <at> debbugs.gnu.org
Subject: Re: bug#10113: 24.0.91; Isearch & `M-e'
Date: Mon, 05 Dec 2011 12:49:43 +0200
>>> I'll try to express myself better: by default (without touching
>>> `isearch-edit-string'), the "case fold search" behavior can be
>>> switched on/off in two ways:
>>> a. Manually: by typing `M-c'.
>>> b. Automatically (only applies if the previous criterion is "case
>>> insensitive"): based on whether the current search string contains any
>>> uppercase letter or not.
>>>
>>> What I say is that currently (as we are shown) the (b) criterion is
>>> not always re-evaluated, and it should.
>>>
>>> BTW, Stefan agrees on this, and I hope you too :-).
>>
>> True, currently after the first typed upper case letter,
>> case-sensitivity is not re-evaluated anymore.
>>
>> This behavior can be changed with the following patch:
>
> Your patch breaks the `M-c' case.

Yes, this patch makes automatic toggling in both directions:
from case-insensitive to case-sensitive and back from case-sensitive
to case-insensitive.

Without this patch the current behavior is automatic toggling in one
direction: from case-insensitive to case-sensitive (on the first
encountered upper case letter).  Toggling back from case-sensitive
to case-insensitive is manual with `M-c', and this choice is remembered
with the value `yes' of `isearch-case-fold-search'.

To remember the user's toggle in the reverse direction (from
case-insensitive to case-sensitive) we need to introduce
a new value of `isearch-case-fold-search' (e.g. `no',
but treating it as a nil value would be quite ugly).

So perhaps instead of that, a better solution would be
to re-evaluate case-sensitivity only in two places:
in `isearch-edit-string' and `isearch-del-char'.




This bug report was last modified 3 years and 57 days ago.

Previous Next


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