From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan 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: Tue, 02 Feb 2016 22:29:22 -0800 Message-ID: <87si1a2tod.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1454481023 27837 80.91.229.3 (3 Feb 2016 06:30:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Feb 2016 06:30:23 +0000 (UTC) To: 22541@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 03 07:30:10 2016 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 1aQqx7-00027F-TT for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Feb 2016 07:30:10 +0100 Original-Received: from localhost ([::1]:32792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQqx7-0003GU-4a for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Feb 2016 01:30:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQqx4-0003Fu-3T for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 01:30:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQqx0-00017x-TN for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 01:30:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQqx0-00017s-Pm for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 01:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aQqx0-0004hA-H9 for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 01:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Feb 2016 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22541 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145448099418002 (code B ref -1); Wed, 03 Feb 2016 06:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Feb 2016 06:29:54 +0000 Original-Received: from localhost ([127.0.0.1]:57362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQqws-0004gH-It for submit@debbugs.gnu.org; Wed, 03 Feb 2016 01:29:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50145) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQqwp-0004g4-Oz for submit@debbugs.gnu.org; Wed, 03 Feb 2016 01:29:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQqwj-00013q-Js for submit@debbugs.gnu.org; Wed, 03 Feb 2016 01:29:46 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQqwj-00013m-GN for submit@debbugs.gnu.org; Wed, 03 Feb 2016 01:29:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQqwi-0003DP-LX for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 01:29:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQqwf-00013a-Fl for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 01:29:44 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQqwf-00013T-7E for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2016 01:29:41 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id A0B322098B for ; Wed, 3 Feb 2016 01:29:36 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Wed, 03 Feb 2016 01:29:36 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=lDg X5oEQZENwsiKx3+o13CJnlR4=; b=MwkP+Qt1ZCvX68HE8dLQyuBEtiB9nbMxHIf 6M7e5nIBmjvTqDH9vTVeGYT5Of9pdBUJsdGNApj6KCcTi8fy1oi/ahcv5kPxD1sj FE8OTxTS6Tl7QcUFE1RS8wbiBE3bB3WgBbYqBAAuxN9lQ2Jyvbx6hKRX+grm6Mdc Puj8zNZ4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=lDgX5oEQZENwsiKx3+o13CJnlR4=; b=J1qxy zN9n+LOlnu4UNhzEFe1K9Uu/L18ZKtser9sZQ/LP/Y0qfaOBtHYyYbuJkfwtA3en E8AqF1Ion6HkY9XxM8SmZFln6ld1jH3hjvf5HOSiIyZxLNuNrH+3j9AxpaCEJV6y bQLUniv0CDMrwqBnDUVpK7GZq3WYzNpQYrfTHY= X-Sasl-enc: Yh9k/Hf1cNRIJoeJuLeLlWSb64ZxGgMAsYu2pA/gKaIc 1454480975 Original-Received: from shorty.local (174-28-85-47.albq.qwest.net [174.28.85.47]) by mail.messagingengine.com (Postfix) with ESMTPA id 56E4968010A for ; Wed, 3 Feb 2016 01:29:35 -0500 (EST) Original-Received: from localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aQqwN-0007b4-TQ for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 22:29:23 -0800 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112321 Archived-At: This is an offshoot of #22520: Juri Linkov wrote: > > Another possible side effect of this is that highlighting > > > > Database directory: > > > > doesn't work: hi-lock goes through the motions but nothing ends up being > > highlighted. Turning off char-folding fixes that. > > Actually =E2=80=9CDatabase directory:=E2=80=9D is not highlighted due to = case-folding. > After toggling case-folding with =E2=80=98M-s c=E2=80=99 and preserving t= he capital D, > it's highlighted correctly. This is true! And it's really weird... The user expectation is that if we highlight something (M-s h r) directly from isearch, then at least the thing isearch was finding would be highlighted, and here this doesn't happen. So a slightly simpler example is: 0: Let the buffer have the string Ab 1: put the point on A 2: C-s 3: C-w (to isearch the whole thing) 4: M-s h r enter Then Ab isn't found because we defaulted to char-folding, and the regex was \(?:a[=CC=80-=CC=84=CC=86-=CC=8A=CC=8C=CC=8F=CC=91=CC=A3=CC=A5=CC=A8]\|[a= =C2=AA=C3=A0-=C3=A5=C4=81=C4=83=C4=85=C7=8E=C8=81=C8=83=C8=A7=E1=B5=83=E1= =B8=81=E1=BA=A1=E1=BA=A3=E2=82=90=E2=93=90=EF=BD=81=F0=9D=90=9A=F0=9D=91=8E= =F0=9D=92=82=F0=9D=92=B6=F0=9D=93=AA=F0=9D=94=9E=F0=9D=95=92=F0=9D=96=86=F0= =9D=96=BA=F0=9D=97=AE=F0=9D=98=A2=F0=9D=99=96=F0=9D=9A=8A]\)\(?:b[=CC=87=CC= =A3=CC=B1]\|[b=E1=B5=87=E1=B8=83=E1=B8=85=E1=B8=87=E2=93=91=EF=BD=82=F0=9D= =90=9B=F0=9D=91=8F=F0=9D=92=83=F0=9D=92=B7=F0=9D=93=AB=F0=9D=94=9F=F0=9D=95= =93=F0=9D=96=87=F0=9D=96=BB=F0=9D=97=AF=F0=9D=98=A3=F0=9D=99=97=F0=9D=9A=8B= ]\) This clearly has no case-folding active on top of the char-folding. But the isearch had both, so the regex should get both. This would make the regex twice as long, but it would be right, at least. If we turn off char-folding (but leave case-folding alone; on) by adding a step 2.5: M-s ' then the regex we get is [Aa][Bb] which clearly has the case-folding, and works the way we expect.