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 18:08:59 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1440540576 25748 80.91.229.3 (25 Aug 2015 22:09:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2015 22:09:36 +0000 (UTC) Cc: emacs-devel To: Alexander Shukaev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 26 00:09:28 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 1ZUMPH-0004vX-BU for ged-emacs-devel@m.gmane.org; Wed, 26 Aug 2015 00:09:27 +0200 Original-Received: from localhost ([::1]:34835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMPG-0005Hq-RV for ged-emacs-devel@m.gmane.org; Tue, 25 Aug 2015 18:09:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMP2-0005Ha-QV for emacs-devel@gnu.org; Tue, 25 Aug 2015 18:09:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUMOx-0000U0-Qh for emacs-devel@gnu.org; Tue, 25 Aug 2015 18:09:12 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:47441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUMOx-0000TT-Mn for emacs-devel@gnu.org; Tue, 25 Aug 2015 18:09:07 -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="161373373" 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 18:09:06 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 21B436620D; Tue, 25 Aug 2015 18:08:59 -0400 (EDT) In-Reply-To: (Alexander Shukaev's message of "Tue, 25 Aug 2015 17:06:37 +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:189176 Archived-At: > Do you mean that I can modify `my-search-function' in such a way that > the calls to `match-beginning' and `match-end' with group 0 happening > inside and after calls to `isearch-forward' and `isearch-backward' > will return the positions of the middle group excluding anchors? That's right. E.g. (set-match-data (list (match-beginning 1) (match-end 1))) or (set-match-data (cddr (match-data))) should get you started. Stefan