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: regexp does not work as documented Date: Tue, 06 May 2008 21:04:19 -0400 Message-ID: References: <87k5i8ukq8.fsf@stupidchicken.com> <200805062335.59206.bruno@clisp.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210122322 29414 80.91.229.12 (7 May 2008 01:05:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 May 2008 01:05:22 +0000 (UTC) Cc: David Koppelman , 192@emacsbugs.donarmstrong.com, Chong Yidong , emacs-devel@gnu.org To: Bruno Haible Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 07 03:05:55 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JtY5z-00011d-Od for ged-emacs-devel@m.gmane.org; Wed, 07 May 2008 03:05:54 +0200 Original-Received: from localhost ([127.0.0.1]:58930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtY5H-0003ZK-Re for ged-emacs-devel@m.gmane.org; Tue, 06 May 2008 21:04:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtY5E-0003Z5-GD for emacs-devel@gnu.org; Tue, 06 May 2008 21:04:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtY5C-0003Yk-3e for emacs-devel@gnu.org; Tue, 06 May 2008 21:04:35 -0400 Original-Received: from [199.232.76.173] (port=44811 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtY5B-0003Yh-Tg for emacs-devel@gnu.org; Tue, 06 May 2008 21:04:33 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JtY5B-00027X-FJ for emacs-devel@gnu.org; Tue, 06 May 2008 21:04:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoFAJudIEhMCqqd/2dsb2JhbACBU6tP X-IronPort-AV: E=Sophos;i="4.27,445,1204520400"; d="scan'208";a="20001743" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 06 May 2008 21:04:19 -0400 Original-Received: from pastel.home ([76.10.170.157]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id NGL75019; Tue, 06 May 2008 21:04:19 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 688597FFC; Tue, 6 May 2008 21:04:19 -0400 (EDT) In-Reply-To: <200805062335.59206.bruno@clisp.org> (Bruno Haible's message of "Tue, 6 May 2008 23:35:59 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96622 Archived-At: > As an end user, for testing the effect of a regexp on a buffer interactively, > I would prefer to have a "volatile" coloring (i.e. one that disappears at the > next buffer modification) but is correct, rather than a documented-to-be-wrong > coloring that updates itself correctly during buffer modifications. Less > functionality but implemented correctly. Actually, we can get the combination of the two. hilight-changes (c|sh)ould use its own loop with re-search-forward, even when font-lock is enabled. This way the highlighting would be initially correct, and in some cases it would also be correctly preserved/discovered later on. This would only be used for regexp that can span multiple lines, so highlight-changes (c|sh)ould analyse the regexp to see if there's a possibility for it to match multiple lines. Stefan