From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: Re: M-x occur bug: ^[^%]+' Date: Mon, 27 Jan 2003 12:04:35 +0100 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <200301270127.h0R1RlG03307@f7.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1043666941 11085 80.91.224.249 (27 Jan 2003 11:29:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 27 Jan 2003 11:29:01 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18d7Rj-0002rt-00 for ; Mon, 27 Jan 2003 12:28:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18d7LX-0007Rd-03 for gnu-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2003 06:22:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18d779-0005cO-00 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2003 06:07:43 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18d74s-0005Pp-00 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2003 06:05:38 -0500 Original-Received: from ns.suse.de ([213.95.15.193] helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18d74X-0005IZ-00 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2003 06:05:01 -0500 Original-Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 0322B149AC; Mon, 27 Jan 2003 12:04:36 +0100 (MET) Original-To: karl@freefriends.org (Karl Berry) X-Yow: World War Three can be averted by adherence to a strictly enforced dress code! In-Reply-To: <200301270127.h0R1RlG03307@f7.net> (karl@freefriends.org's message of "Sun, 26 Jan 2003 20:27:47 -0500") User-Agent: Gnus/5.090013 (Oort Gnus v0.13) Emacs/21.3.50 (ia64-suse-linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4329 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4329 karl@freefriends.org (Karl Berry) writes: |> Emacs 21.2, gnu/linux 2.4.18-14 (red hat 8.0). |> |> $ emacs -q --no-site testfile # contents of testfile below |> M-x occur RET |> ^[^%]+' RET |> |> Resulting *Occur* buffer: |> |> 3 lines matching "^[^%]+'" in buffer test/tmp. |> 38: \errhelp = \EMsimple |> 39: \errmessage{Undefined command `@end \endthing'}% |> 52: \errhelp = \EMsimple |> 53: \errmessage{This `@end #1' doesn't have a matching `@#1'}% |> 92:\let\, = \c |> 93:\let\dotaccent = \. |> 94:\def\ringaccent#1{{\accent23 #1}} |> 95:\let\tieaccent = \t |> 96:\let\ubaraccent = \b |> 97:\let\udotaccent = \d |> 98:\let\acuteaccent = \' % workaround aux file using ' as escape |> |> |> The three matches it found are correct (on lines 39, 53, and 98). |> However, it is also showing a number of lines that do not match. Note that [^%] includes the newline character, thus you have three matches each spanning multiple lines. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."