unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: era@iki.fi
Subject: Re: Occur buglet
Date: 10 Mar 2004 10:27:29 +0200	[thread overview]
Message-ID: <87r7w1qfcw.fsf@era.iki.fi> (raw)
In-Reply-To: E1AzLLO-0007Bo-BD@fencepost.gnu.org

On Fri, 05 Mar 2004 14:50:50 -0500, Morten Welinder <terra@gnu.org>
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    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.

      parent reply	other threads:[~2004-03-10  8:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-05 19:50 Occur buglet Morten Welinder
2004-03-09 23:16 ` Andreas Schwab
2004-03-10  8:27 ` era [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r7w1qfcw.fsf@era.iki.fi \
    --to=era@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).