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, 26 Apr 2016 22:02:23 -0700 Message-ID: <87zisfhcf4.fsf@secretsauce.net> References: <87si1a2tod.fsf@secretsauce.net> <8760x7vyui.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1461733403 32699 80.91.229.3 (27 Apr 2016 05:03:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 05:03:23 +0000 (UTC) Cc: 22541@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 07:03: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 1avHd0-0004fE-9s for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 07:03:10 +0200 Original-Received: from localhost ([::1]:41009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avHcz-0005pC-P1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 01:03:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avHcv-0005mV-RV for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 01:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avHcs-0004OY-Ku for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 01:03:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avHcs-0004OS-EL for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 01:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avHcs-0001VS-5S for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 01:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 05:03: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.14617333485746 (code B ref 22541); Wed, 27 Apr 2016 05:03:02 +0000 Original-Received: (at 22541) by debbugs.gnu.org; 27 Apr 2016 05:02:28 +0000 Original-Received: from localhost ([127.0.0.1]:49314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avHcK-0001Uc-5P for submit@debbugs.gnu.org; Wed, 27 Apr 2016 01:02:28 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:44788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avHcI-0001UU-Ay for 22541@debbugs.gnu.org; Wed, 27 Apr 2016 01:02:26 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id E183220AA1 for <22541@debbugs.gnu.org>; Wed, 27 Apr 2016 01:02:25 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 27 Apr 2016 01:02:25 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ALnVnVbJV86Dm4ezxV98Lh8Vg3c =; b=JdHSrj5KAv2+ZwnXghMkpNKXDSAqoDQ//qQEudby/hm4bAcsVf7MTpJvLy1 TMRyOc8GdelNB6rXmJx0y88PsDHsyXgo2r6gBYjWwsq4nb3OYudOu51cMO+/L1F4 8bsUfctYcBQH6jXg5lzn447fJmfIKxHpT36UnpfRARZZS6xE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ALnVnVbJV86Dm4e zxV98Lh8Vg3c=; b=jM2oFsp0COGr+MQNTZLVr5p09RwzrQzwpT15J6eRkffKPik Ej2Ysk9lLkln2+PcxsV5+wLYVCoIdG6MFhikNteUkOcX7pKJgrHSkAN46Xt613Ah 9M4L9AIuprC6oGQ4dLNozJPKn6sI1cct921IE64lRzvLIp2lpL97kFqunM7c= X-Sasl-enc: 0ZCKG3W9tZpfXNdfxo0x3IPgjnHn+y6ODhn7jnEtAxrj 1461733345 Original-Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 93BA56800F3; Wed, 27 Apr 2016 01:02:25 -0400 (EDT) Original-Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1avHcF-0002Fx-6J; Tue, 26 Apr 2016 22:02:23 -0700 User-agent: mu4e 0.9.17; emacs 25.0.92.1 In-reply-to: <8760x7vyui.fsf@mail.linkov.net> 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:116897 Archived-At: Juri Linkov writes: >> 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 “Database directory:” is not highlighted due to case-folding. >>> After toggling case-folding with ‘M-s c’ and preserving the capital D, >>> it's highlighted correctly. >>> >>> ...... > > The problem is that with introduction of char-folding, a hack responsible > for case-folding in isearch-highlight-regexp that turns isearch-string > into a case-insensitive regexp is not used anymore, i.e. it's overridden by > isearch-regexp-function. (Also note a FIXME comment in hi-lock-process-phrase) > > Since we can't change the value of font-lock-keywords-case-fold-search > for font-lock based highlighting in hi-lock for individual regexps, > the best solution is to rely on the feature allowing MATCHER in > font-lock-keywords to be a function. So we can let-bind case-fold-search > in its lambda. > > Now the remaining problem is how to transfer case-fold from > isearch-highlight-regexp down to hi-lock-set-pattern. Hi. Sorry it took me so long to reply to this. I haven't looked at isearch specifically in enough detail to comment on this, but if it makes this better, then I'm all for it :) > Implementing pcre-style embedded modifiers is a good long-term goal, > but we need to fix this for the next release. What options do we have now? > I see no other way than adding new argument to the chain of calls: > ... I've been looking long-term, and emacs-devel now has a thread about an initial implementation of one of the embedded modifiers. Since char-fold isn't the default anymore, maybe this issue isn't pressing and isn't critical to fix by emacs-25? Thanks dima