all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <spamfilteraccount@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Negative occur
Date: Wed, 28 Nov 2007 09:03:17 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICMEKFEBAA.drew.adams@oracle.com> (raw)
In-Reply-To: <205e9241-c824-46b0-af01-26ad3fcd0d97@y20g2000hsy.googlegroups.com>

> > > Is there a command like occur which shows non-matching lines? It would
> > > come in handy for me for the work I'm doing.
> >
> > > It's a useful a feature and not hard to implement, so I'm sure it's
> > > already in Emacs in some form only I'm overlooking it.
> >
> > You could try running "occur" with the pattern "^" (which matches
> > every line), then prune the results with M-x delete-matching-lines RET
>
> Yep, there are workarounds. :) But it seems a very basic feature,
> so I'd be surprised if Emacs didn't have it. We have keep-lines
> and flush-lines after all, so it would be logical to have the
> same for occur.

I realize that your suggestion is that this be added to Emacs. I agree.

FYI - In Icicles, just do this:  C-' foobar C-~

That shows and lets you visit all lines that do not match the regexp
"foobar". `C-'' is `icicle-occur'. `C-~' complements the current set of
matches.

You can also then match additional regexps, dynamically, just by typing
them, separated by `S-SPC' or `C-~'. `S-SPC' means AND (set intersection)
and `C-~' means AND NOT (set complement). Each applies to the current set of
matches. Example:

 C-' foobar C-~ toto S-SPC titi C-~ tata

That shows and lets you visit all lines that do not contain "foobar", do
contain "toto", do not contain "titi", and do contain "tata". You get the
idea: you can get what you want by progressively narrowing the search space.

http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Search_Commands%2c_Overview

  reply	other threads:[~2007-11-28 17:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-28 10:15 Negative occur spamfilteraccount
2007-11-28 10:21 ` David Kastrup
2007-11-28 10:53   ` spamfilteraccount
2007-11-28 17:03     ` Drew Adams [this message]
2007-11-29 11:44     ` spamfilteraccount
     [not found] <mailman.4263.1196269422.18990.help-gnu-emacs@gnu.org>
2007-11-28 18:54 ` Ted Zlatanov
2007-11-28 22:52   ` Drew Adams
     [not found] <mailman.4275.1196290389.18990.help-gnu-emacs@gnu.org>
2007-11-29 15:58 ` Ted Zlatanov
2007-11-29 17:25   ` Drew Adams
     [not found] <mailman.4315.1196357177.18990.help-gnu-emacs@gnu.org>
2007-11-29 18:27 ` spamfilteraccount
2007-12-05 17:44   ` Mathias Dahl

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

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

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICMEKFEBAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=spamfilteraccount@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.