From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Negative occur Date: Wed, 28 Nov 2007 09:03:17 -0800 Message-ID: References: <205e9241-c824-46b0-af01-26ad3fcd0d97@y20g2000hsy.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1196269723 5300 80.91.229.12 (28 Nov 2007 17:08:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2007 17:08:43 +0000 (UTC) To: , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 18:08:51 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IxQOs-0004W8-CC for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Nov 2007 18:08:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxQOc-0003id-On for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Nov 2007 12:08:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IxQK5-00081B-OA for help-gnu-emacs@gnu.org; Wed, 28 Nov 2007 12:03:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IxQK3-0007z0-0I for help-gnu-emacs@gnu.org; Wed, 28 Nov 2007 12:03:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxQK2-0007yt-P4 for help-gnu-emacs@gnu.org; Wed, 28 Nov 2007 12:03:38 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IxQK1-00033m-Pk for help-gnu-emacs@gnu.org; Wed, 28 Nov 2007 12:03:38 -0500 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id lASH3JaI021510; Wed, 28 Nov 2007 11:03:20 -0600 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id lAS9NY7a012585; Wed, 28 Nov 2007 10:03:16 -0700 Original-Received: from dhcp-4op11-4op12-west-130-35-178-158.us.oracle.com by acsmt350.oracle.com with ESMTP id 3392411711196269396; Wed, 28 Nov 2007 09:03:16 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <205e9241-c824-46b0-af01-26ad3fcd0d97@y20g2000hsy.googlegroups.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:49649 Archived-At: > > > 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