From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#22541: 25.0.50; highlight-regexp from isearch has is case-sensitive even if case-fold is active Date: Wed, 10 May 2017 01:10:03 +0300 Organization: LINKOV.NET Message-ID: <87fugdfzoq.fsf@localhost> References: <87si1a2tod.fsf@secretsauce.net> <8760x7vyui.fsf@mail.linkov.net> <87vapwipy4.fsf@calancha-pc> <87shkyems1.fsf@localhost> <87pog112pp.fsf@calancha-pc> <87mvb4yzux.fsf@localhost> <87bmrilylu.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1494367992 6021 195.159.176.226 (9 May 2017 22:13:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 May 2017 22:13:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu) Cc: 22541@debbugs.gnu.org, Dima Kogan To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 10 00:13:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8DNU-0001T3-8p for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 May 2017 00:13:08 +0200 Original-Received: from localhost ([::1]:39660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8DNZ-0005On-PO for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 May 2017 18:13:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8DNR-0005Of-G6 for bug-gnu-emacs@gnu.org; Tue, 09 May 2017 18:13:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8DNO-0006JX-Pa for bug-gnu-emacs@gnu.org; Tue, 09 May 2017 18:13:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60275) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8DNO-0006JS-Lq for bug-gnu-emacs@gnu.org; Tue, 09 May 2017 18:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d8DNO-00016M-BU for bug-gnu-emacs@gnu.org; Tue, 09 May 2017 18:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 May 2017 22:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22541 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22541-submit@debbugs.gnu.org id=B22541.14943679814227 (code B ref 22541); Tue, 09 May 2017 22:13:02 +0000 Original-Received: (at 22541) by debbugs.gnu.org; 9 May 2017 22:13:01 +0000 Original-Received: from localhost ([127.0.0.1]:34719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8DNM-000166-PV for submit@debbugs.gnu.org; Tue, 09 May 2017 18:13:00 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:43461 helo=homiemail-a15.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8DNK-00015y-SD for 22541@debbugs.gnu.org; Tue, 09 May 2017 18:12:59 -0400 Original-Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id 14F4176C069; Tue, 9 May 2017 15:12:57 -0700 (PDT) Original-Received: from localhost.linkov.net (m90-133-229-48.cust.tele2.ee [90.133.229.48]) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id 099CE76C065; Tue, 9 May 2017 15:12:55 -0700 (PDT) In-Reply-To: <87bmrilylu.fsf@calancha-pc> (Tino Calancha's message of "Thu, 27 Apr 2017 23:22:05 +0900") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:132406 Archived-At: >>> @@ -1950,7 +1950,12 @@ isearch-highlight-regexp >>> (regexp-quote s)))) >>> isearch-string "")) >>> (t (regexp-quote isearch-string))))) >>> - (hi-lock-face-buffer regexp (hi-lock-read-face-name))) >>> + (hi-lock-face-buffer regexp (hi-lock-read-face-name) >>> + (if (and (eq isearch-case-fold-search t) >>> + search-upper-case) >>> + (isearch-no-upper-case-p >>> + isearch-string isearch-regexp) >>> + isearch-case-fold-search))) >>> (and isearch-recursive-edit (exit-recursive-edit))) >> >> If this works reliably, then we could remove that ugly hack >> from =E2=80=98isearch-highlight-regexp=E2=80=99, I mean the one with t= he comment >> =E2=80=9CTurn isearch-string into a case-insensitive regexp=E2=80=9D. > That's right. We don't need such trick here anymore. But this hack > turned ut to be useful in hi-lock.el. > > The new patch, in addition to fix this bug report, it also > helps with the 5. in bug#22520, that is: > emacs -Q > M-s hr t RET RET ; Highlight with regexp "[Tt]" > M-s hu t RET ; Unhighlight the buffer. Thanks, could you find more test cases that still don't work?