From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9681: Broken behaviour of re-search-backward (.+ matching only a single character) Date: Fri, 07 Oct 2011 09:02:18 -0400 Message-ID: References: <8762k21o09.fsf@gmail.com> <87ty7mymzw.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317992584 10441 80.91.229.12 (7 Oct 2011 13:03:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Oct 2011 13:03:04 +0000 (UTC) Cc: 9681@debbugs.gnu.org To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 07 15:03:00 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RCA4q-0003bs-Fd for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Oct 2011 15:03:00 +0200 Original-Received: from localhost ([::1]:52254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCA4p-0002Co-52 for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Oct 2011 09:02:59 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCA4j-0002Cb-5B for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2011 09:02:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCA4e-0003yK-GR for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2011 09:02:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCA4e-0003xo-D7 for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2011 09:02:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RCA4s-0006cZ-3b for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2011 09:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Oct 2011 13:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9681 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9681-submit@debbugs.gnu.org id=B9681.131799258125444 (code B ref 9681); Fri, 07 Oct 2011 13:03:02 +0000 Original-Received: (at 9681) by debbugs.gnu.org; 7 Oct 2011 13:03:01 +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 1RCA4o-0006cI-JI for submit@debbugs.gnu.org; Fri, 07 Oct 2011 09:03:01 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RCA4l-0006c0-Qz for 9681@debbugs.gnu.org; Fri, 07 Oct 2011 09:02:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAB34jk7O+JxS/2dsb2JhbABEqDyBBoFTAQEEAVYjBQsLNBIUGA0kiBG5BocxBKEOhEU X-IronPort-AV: E=Sophos;i="4.68,502,1312171200"; d="scan'208";a="140241964" Original-Received: from 206-248-156-82.dsl.teksavvy.com (HELO pastel.home) ([206.248.156.82]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 07 Oct 2011 09:02:19 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id B3C9E592D6; Fri, 7 Oct 2011 09:02:18 -0400 (EDT) In-Reply-To: <87ty7mymzw.fsf@gmail.com> ("=?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?="'s message of "Thu, 06 Oct 2011 20:48:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 07 Oct 2011 09:03:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52372 Archived-At: >> re-search-* stops at the first character position that has a match. >> And then it chooses the longest match at that position. > Thanks, but I'm not sure I understand what you mean here. Naturally, the > longest match for `re-search-backward' should be backward, not forward, Ah, yes, sorry for being unclear: the search for a match goes backward, but the matching itself goes forward. The docstring of re-search-backward is more clear about that: The match found is the one starting last in the buffer and yet ending before the origin of the search. > If I'm the only one who considers this behaviour broken (by design?[1]), It's not the ideal behavior, admittedly. It's even more obvious in `looking-back'. But fixing it would require the implementation of a backward regexp matcher. Stefan