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#6227: Color isearch regexp submatches differently Date: Sun, 23 May 2010 02:44:04 +0300 Organization: JURTA Message-ID: <87wruv1ohr.fsf@mail.jurta.org> References: <87bpca15ja.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1274576280 30096 80.91.229.12 (23 May 2010 00:58:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 May 2010 00:58:00 +0000 (UTC) Cc: 6227@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 23 02:57:59 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OFzVu-0004RK-TF for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 May 2010 02:57:59 +0200 Original-Received: from localhost ([127.0.0.1]:55996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFzVu-0005XK-5C for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 May 2010 20:57:58 -0400 Original-Received: from [140.186.70.92] (port=33860 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFzVB-00056v-5q for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 20:57:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFzV9-0006DG-KB for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 20:57:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37124) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFzV9-0006DC-Gq for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 20:57:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OFzEa-0001D5-Eb; Sat, 22 May 2010 20:40:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 May 2010 00:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6227 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6227-submit@debbugs.gnu.org id=B6227.12745751474613 (code B ref 6227); Sun, 23 May 2010 00:40:04 +0000 Original-Received: (at 6227) by debbugs.gnu.org; 23 May 2010 00:39:07 +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 1OFzDe-0001CJ-9f for submit@debbugs.gnu.org; Sat, 22 May 2010 20:39:06 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3] helo=mx1.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFzDa-0001Bc-Ki for 6227@debbugs.gnu.org; Sat, 22 May 2010 20:39:03 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.32.67.cable.starman.ee [82.131.32.67]) by mx1.starman.ee (Postfix) with ESMTP id EFA033F40F4; Sun, 23 May 2010 03:38:55 +0300 (EEST) In-Reply-To: (Lennart Borgman's message of "Fri, 21 May 2010 03:19:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 22 May 2010 20:40:04 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37190 Archived-At: >> We already have highlighting like that: lisp/emacs-lisp/re-builder.el >> uses faces `reb-match-1', `reb-match-2', `reb-match-3' to highlight >> regexp subexpressions. =A0I think this should be used by isearch. > > That sounds right to me. > > Also Drew suggestion to not color submatches in lazy marking seems righ= t. (add-hook 'isearch-update-post-hook (lambda () (require 're-builder) (when isearch-regexp (let ((reb-regexp isearch-string) (reb-target-buffer (current-buffer)) (reb-target-window (selected-window))) (reb-update-overlays))))) (add-hook 'isearch-mode-end-hook (lambda () (let ((reb-target-buffer (current-buffer))) (reb-delete-overlays)))) --=20 Juri Linkov http://www.jurta.org/emacs/