From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#18017: 24.4.50; Isearch case sensitivity broken/confusing Date: Mon, 14 Jul 2014 15:39:01 -0700 (PDT) Message-ID: <680b2b35-4afb-4c19-a04c-b6807cf0a73d@default> References: <87wqbftzb9.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1405377632 18847 80.91.229.3 (14 Jul 2014 22:40:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2014 22:40:32 +0000 (UTC) Cc: 18017@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 15 00:40:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X6ov2-00087X-BD for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jul 2014 00:40:24 +0200 Original-Received: from localhost ([::1]:60459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6ov1-0000ya-Tt for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Jul 2014 18:40:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6ouq-0000xY-QZ for bug-gnu-emacs@gnu.org; Mon, 14 Jul 2014 18:40:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6oui-0005Mw-35 for bug-gnu-emacs@gnu.org; Mon, 14 Jul 2014 18:40:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6oui-0005M1-0N for bug-gnu-emacs@gnu.org; Mon, 14 Jul 2014 18:40:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X6oug-00038a-VN for bug-gnu-emacs@gnu.org; Mon, 14 Jul 2014 18:40:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Jul 2014 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18017 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18017-submit@debbugs.gnu.org id=B18017.140537756111975 (code B ref 18017); Mon, 14 Jul 2014 22:40:02 +0000 Original-Received: (at 18017) by debbugs.gnu.org; 14 Jul 2014 22:39:21 +0000 Original-Received: from localhost ([127.0.0.1]:55069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6otz-000373-Em for submit@debbugs.gnu.org; Mon, 14 Jul 2014 18:39:20 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:51367) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6otq-00036e-Ay for 18017@debbugs.gnu.org; Mon, 14 Jul 2014 18:39:11 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s6EMd2XF017840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Jul 2014 22:39:03 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6EMd1HJ007340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 14 Jul 2014 22:39:02 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6EMd1GT007332; Mon, 14 Jul 2014 22:39:01 GMT In-Reply-To: <87wqbftzb9.fsf@mail.jurta.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91553 Archived-At: > > Add > > add > > ADD > > M-x set-variable case-fold-search nil > > C-s add C-s > > C-s M-c C-s > > > > The M-c says that search is now case-insensitive, but the second and > > subsequent C-s's do not find occurrences Add and ADD. > > > > C-s add C-s > > That finds all three (case-insensitive). >=20 > Did you mean `C-s M-c add C-s' in the last key sequence > (that finds all case-insensitive)? You have to use M-c to toggle > case-sensitivity for case-fold-search that you set to nil. I meant that after you use C-s add M-c C-s and then you start again with C-s C-s, the case insensitivity of the first search continues for the second (independent) search. IOW, M-c *does* extend beyond the current search, if you use C-s C-s to reuse the last search string. >From what I see, reusing the last search string really means, not just reusing its text, but reusing the last search state, including (at least) whether searching is case-sensitive. > And `C-s C-s' naturally restores case-sensitivity of the > previous search string, but it's possible to configure this > using `isearch-keep-mode-variables' from bug#11378. Dunno about "naturally". I'm really not sure what the best behavior to shoot for is. It does seem to me that the current behavior can be confusing. On the other hand, perhaps someone finds it handy to not have to repeat M-c to get back the same sensitivity as for the last search. Perhaps you and some others could play with this and make a suggestion wrt the best behavior. And perhaps we should define whatever is decided on as the _default_ behavior, and add a user option that lets users choose. I'd welcome your ideas about this. Currently I think the behavior is confusing and could probably be improved. For non-nil `case-fold-search' I think the current behavior is OK. But I suspect that less thought went into the behavior wrt case-sensitivity for the nil case. Note that things are additionally complicated for users because of the (handy) special handling based on the case of the chars you type (i.e., the special handling described in (emacs) `Special Isearch'). Emacs gives users lots of possibilities here, but _discovery_ of how things work is not straightforward. It is all too easy to stumble into behavior that one doesn't understand, especially for a newbie.