From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#10113: 24.0.91; Isearch & `M-e' Date: Wed, 23 Nov 2011 23:23:37 +0200 Organization: JURTA Message-ID: <87wraqpm7a.fsf@mail.jurta.org> References: <871uszwxoi.fsf@mail.jurta.org> <87sjletwnb.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1322083667 8681 80.91.229.12 (23 Nov 2011 21:27:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Nov 2011 21:27:47 +0000 (UTC) Cc: 10113@debbugs.gnu.org To: Dani Moncayo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 23 22:27:43 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTKM0-0006s0-CA for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Nov 2011 22:27:40 +0100 Original-Received: from localhost ([::1]:52451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTKLz-0001Fy-TB for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Nov 2011 16:27:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:44188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTKLv-00018l-VN for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 16:27:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTKLu-0007kW-SO for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 16:27:35 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTKLu-0007kS-MY for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 16:27:34 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RTKNJ-0007uq-LS for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 16:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Nov 2011 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10113 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10113-submit@debbugs.gnu.org id=B10113.132208373730407 (code B ref 10113); Wed, 23 Nov 2011 21:29:01 +0000 Original-Received: (at 10113) by debbugs.gnu.org; 23 Nov 2011 21:28:57 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTKNE-0007uN-FB for submit@debbugs.gnu.org; Wed, 23 Nov 2011 16:28:56 -0500 Original-Received: from smarty.dreamhost.com ([208.113.175.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTKNC-0007uH-HI for 10113@debbugs.gnu.org; Wed, 23 Nov 2011 16:28:55 -0500 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id EC0866E8082; Wed, 23 Nov 2011 13:27:26 -0800 (PST) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B60B7451C635; Wed, 23 Nov 2011 13:27:20 -0800 (PST) In-Reply-To: (Dani Moncayo's message of "Wed, 23 Nov 2011 21:59:21 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 23 Nov 2011 16:29:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:54235 Archived-At: > 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: === modified file 'lisp/isearch.el' --- lisp/isearch.el 2011-11-19 21:51:29 +0000 +++ lisp/isearch.el 2011-11-23 21:21:22 +0000 @@ -1658,7 +1658,7 @@ (defun isearch-search-and-update () (setq isearch-success t isearch-error nil isearch-other-end (match-end 0)) - (if (and (eq isearch-case-fold-search t) search-upper-case) + (if search-upper-case (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string isearch-regexp)))) ;; Not regexp, not reverse, or no match at point. @@ -2328,7 +2328,7 @@ (defun isearch-search () (if isearch-message-function (funcall isearch-message-function nil t) (isearch-message nil t)) - (if (and (eq isearch-case-fold-search t) search-upper-case) + (if search-upper-case (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string isearch-regexp))) (condition-case lossage