From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: era@iki.fi Newsgroups: gmane.emacs.bugs Subject: Re: Occur buglet Date: 10 Mar 2004 10:27:29 +0200 Organization: People Who Are Not Old Enough For Unix (Honorary Member Emeritus) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87r7w1qfcw.fsf@era.iki.fi> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1079154893 24774 80.91.224.253 (13 Mar 2004 05:14:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 Mar 2004 05:14:53 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 13 06:14:46 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B21Tx-0000dC-00 for ; Sat, 13 Mar 2004 06:14:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1XwJ-00015A-1F for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Mar 2004 16:42:03 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B0z4T-0003JT-Ts for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2004 03:28:09 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B0z3w-0003EH-7B for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2004 03:28:07 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B0z3v-0003EB-Ok for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2004 03:27:35 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1B0z3r-0007Cc-00 for ; Wed, 10 Mar 2004 09:27:31 +0100 Original-Received: from fsgw.f-secure.com ([193.110.108.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Mar 2004 09:27:31 +0100 Original-Received: from era by fsgw.f-secure.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Mar 2004 09:27:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Original-To: bug-gnu-emacs@gnu.org Original-Lines: 25 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: fsgw.f-secure.com Mail-Copies-To: nobody User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list 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 Xref: main.gmane.org gmane.emacs.bugs:7255 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7255 On Fri, 05 Mar 2004 14:50:50 -0500, Morten Welinder posted to bug-gnu-emacs: > 1 line matching "^[+][^+]" in buffer *scratch*. > 2:+ > : hi > It is debatable whether there should be a match -- grep would not have > found it -- but the listed thing is not one line, but two. The string which matches [^+] is the newline of line 2. Emacs regex negated classes will include newline unless you explicitly exclude it. The regex [^+\n] matches what you'd express as [^+] in grep. Since grep is line-oriented, but Emacs is buffer-oriented, this distinction makes sense. Furthermore, there is nowhere any assertion that occur and grep should match exactly the same things -- there are numerous other differences, all of which are hopefully adequately documented. /* era */ -- The email address era the contact information Just for kicks, imagine at iki dot fi is heavily link on my home page at what it's like to get spam filtered. If you 500 pieces of spam for want to reach me, see instead. each wanted message.