From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24801: 25.1; Reverse regexp search highlighting Date: Thu, 27 Oct 2016 05:33:52 +0300 Message-ID: <83mvhqtt9r.fsf@gnu.org> References: <4efa49bf-c223-4148-a291-12a722db033c@default> <8737jispf7.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477535740 25054 195.159.176.226 (27 Oct 2016 02:35:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2016 02:35:40 +0000 (UTC) Cc: 24801@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 27 04:35:35 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzaX8-0002SC-CT for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Oct 2016 04:35:10 +0200 Original-Received: from localhost ([::1]:38587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzaXA-0006hZ-PX for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Oct 2016 22:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzaX4-0006fd-Ne for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 22:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzaX0-0000WQ-QL for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 22:35:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43193) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzaX0-0000WJ-Lq for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 22:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bzaX0-0002VK-FU for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 22:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Oct 2016 02:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24801 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24801-submit@debbugs.gnu.org id=B24801.14775356439556 (code B ref 24801); Thu, 27 Oct 2016 02:35:02 +0000 Original-Received: (at 24801) by debbugs.gnu.org; 27 Oct 2016 02:34:03 +0000 Original-Received: from localhost ([127.0.0.1]:58587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzaW3-0002U4-E7 for submit@debbugs.gnu.org; Wed, 26 Oct 2016 22:34:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzaW0-0002TZ-Q8 for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 22:34:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzaVr-0008IF-Nc for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 22:33:55 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzaVr-0008I2-KB; Wed, 26 Oct 2016 22:33:51 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2820 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bzaVq-0001Bw-8h; Wed, 26 Oct 2016 22:33:50 -0400 In-reply-to: <8737jispf7.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:125059 Archived-At: > From: npostavs@users.sourceforge.net > Date: Wed, 26 Oct 2016 18:42:20 -0400 > Cc: 24801@debbugs.gnu.org > > > I see this behavior in Emacs 23 and later, but not in Emacs 22 and > > before, so I'm guessing this change is maybe intentional. But it's not > > clear to me why it would be. > > `(elisp) Regexp Search', under `re-search-backward' says: > > This function is analogous to `re-search-forward', but they are not > simple mirror images. `re-search-forward' finds the match whose > beginning is as close as possible to the starting point. If > `re-search-backward' were a perfect mirror image, it would find the > match whose end is as close as possible. However, in fact it > finds the match whose beginning is as close as possible (and yet > ends before the starting point). The reason for this is that > matching a regular expression at a given spot always works from > beginning to end, and starts at a specified beginning position. > > A true mirror-image of `re-search-forward' would require a special > feature for matching regular expressions from end to beginning. > It's not worth the trouble of implementing that. > > And the texi source says the same at tag emacs-22.1; I've only built > Emacs back to 23.4 though, so I can't test it. I see the same behavior in all versions, including 22.x and 21.4.