From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Isearch: add variable to control search match group Date: Tue, 25 Aug 2015 10:45:42 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1440513971 4531 80.91.229.3 (25 Aug 2015 14:46:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2015 14:46:11 +0000 (UTC) Cc: emacs-devel To: Alexander Shukaev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 25 16:45:57 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZUFU2-0004Om-VP for ged-emacs-devel@m.gmane.org; Tue, 25 Aug 2015 16:45:55 +0200 Original-Received: from localhost ([::1]:60499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUFTx-0004Yp-DK for ged-emacs-devel@m.gmane.org; Tue, 25 Aug 2015 10:45:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUFTu-0004Yi-FN for emacs-devel@gnu.org; Tue, 25 Aug 2015 10:45:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUFTr-00067L-7F for emacs-devel@gnu.org; Tue, 25 Aug 2015 10:45:46 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:9311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUFTq-00067E-Tj for emacs-devel@gnu.org; Tue, 25 Aug 2015 10:45:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsEwA731xV/5P+d0tcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAgEfizqFBQeELQWzP4FFI4QUIoJ4AQEB X-IPAS-Result: A0AsEwA731xV/5P+d0tcgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAgEfizqFBQeELQWzP4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="161320817" Original-Received: from 75-119-254-147.dsl.teksavvy.com (HELO ceviche.home) ([75.119.254.147]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Aug 2015 10:45:42 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2AAB766110; Tue, 25 Aug 2015 10:45:42 -0400 (EDT) In-Reply-To: (Alexander Shukaev's message of "Tue, 25 Aug 2015 01:55:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189159 Archived-At: > interactive one). Imagine that my search module wants to search for > \(^\|\s-+?\)(;;)\($\|\s-+?\) > and I am actually only interested in the "(;;)" part since I also want > to highlight it (with both, current match highlighting and all matches > lazy highlighting). Then, clearly, "\(^\|\s-+?\)" and "\($\|\s-+?\)" > are just anchors. How do you do that currently? I'd expect that to do the above, you'd set isearch-search-fun-function, and that function can take care of shuffling the match-data so that the interesting part is match-subgroup 0. Stefan