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#6388: Should not match data be set on misses? Date: Thu, 10 Jun 2010 09:04:08 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276176610 23128 80.91.229.12 (10 Jun 2010 13:30:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Jun 2010 13:30:10 +0000 (UTC) To: 6388@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 10 15:30:09 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 1OMhpg-0004Ye-TA for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Jun 2010 15:30:09 +0200 Original-Received: from localhost ([127.0.0.1]:48776 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMhny-0003VW-Js for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Jun 2010 09:28:22 -0400 Original-Received: from [140.186.70.92] (port=33639 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMhnr-0003Uo-OM for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2010 09:28:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMhnq-0002rS-Jc for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2010 09:28:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44578) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMhnq-0002rN-Fl for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2010 09:28:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OMhRO-000338-8Y; Thu, 10 Jun 2010 09:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Jun 2010 13:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6388 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6388-submit@debbugs.gnu.org id=B6388.127617505611710 (code B ref 6388); Thu, 10 Jun 2010 13:05:02 +0000 Original-Received: (at 6388) by debbugs.gnu.org; 10 Jun 2010 13:04:16 +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 1OMhQe-00032p-Hc for submit@debbugs.gnu.org; Thu, 10 Jun 2010 09:04:16 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMhQc-00032j-C9 for 6388@debbugs.gnu.org; Thu, 10 Jun 2010 09:04:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar8FACd/EExMCqeQ/2dsb2JhbACSUYwKcr4WhRgEjHY X-IronPort-AV: E=Sophos;i="4.53,398,1272859200"; d="scan'208";a="67751751" Original-Received: from 76-10-167-144.dsl.teksavvy.com (HELO pastel.home) ([76.10.167.144]) by ironport2-out.pppoe.ca with ESMTP; 10 Jun 2010 09:04:09 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id D81858056; Thu, 10 Jun 2010 09:04:08 -0400 (EDT) In-Reply-To: (Eli Zaretskii's message of "Wed, 09 Jun 2010 22:03:08 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 10 Jun 2010 09:05:02 -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:37650 Archived-At: > I'm closing this bug report because the ELisp manual explicitly > documents the current behavior: > Every successful search sets the match data. Therefore, you should > query the match data immediately after searching, before calling any > other function that might perform another search. Alternatively, you > may save and restore the match data (*note Saving Match Data::) around > the call to functions that could perform another search. > A search which fails may or may not alter the match data. In the > past, a failing search did not do this, but we may change it in the > future. So don't try to rely on the value of the match data after a > failing search. > Patches welcome to "change this in the future" (unless Stefan or > Yidong object to such a change). Yes, there was a long discussion about this a few years ago. The main obstacle to such a change are: - it breaks some code. - it is not tremendously useful. - it is difficult to detect code that relies on the current behavior (so it's difficult to output a warning to help in the migration). The current behavior is not tremendously useful either, of course, but it has the advantage of being what we've used for many years. Stefan