From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: add INVERT to re-search-{forward, backward} Date: Mon, 25 Aug 2008 22:45:43 +0300 Organization: JURTA Message-ID: <877ia4anfc.fsf@jurta.org> References: <861wa92g6a.fsf@lifelogs.com> <87fxyni898.fsf@jurta.org> <86myjrl2jz.fsf_-_@lifelogs.com> <878wumj8zx.fsf@jurta.org> <48B2D679.9050206@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219694222 5023 80.91.229.12 (25 Aug 2008 19:57:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Aug 2008 19:57:02 +0000 (UTC) Cc: Ted Zlatanov , emacs-devel@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 25 21:57:52 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KXiBS-0000cT-SJ for ged-emacs-devel@m.gmane.org; Mon, 25 Aug 2008 21:57:03 +0200 Original-Received: from localhost ([127.0.0.1]:55491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXiAU-0007rY-0o for ged-emacs-devel@m.gmane.org; Mon, 25 Aug 2008 15:56:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXi9I-0007KP-3I for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXi9G-0007JA-8P for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:47 -0400 Original-Received: from [199.232.76.173] (port=58969 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXi9F-0007J6-UV for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:46 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]:2316) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KXi9E-0007Vi-Sq for emacs-devel@gnu.org; Mon, 25 Aug 2008 15:54:45 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1KXi9A-000PVr-Q5; Mon, 25 Aug 2008 22:54:41 +0300 In-Reply-To: <48B2D679.9050206@gmail.com> (Lennart Borgman's message of "Mon, 25 Aug 2008 17:57:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: c2436a487120708c9e0f2b31fdd4cc45 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 4900 [Aug 24 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102963 Archived-At: >> Instead of this, I think the change should be done at the occur level, >> since occur's algorithm is line-based and can skip lines that contain >> a given regexp. This could be similar to the algorithm used by the >> command `flush-lines' in the same file. `occur' currently works like the >> command `keep-lines' that keeps lines containing the specified regexp. >> But with a new INVERT argument, `occur' could work like `flush-lines' that >> keep everything except lines containing the specified regexp. > > This is also similar to grep etc. Yes, as a line-oriented tool, grep's -v --invert-match option is what could be modelled in occur. Then a negative prefix argument of `occur' could mean inverting the regexp and displaying non-matching lines. -- Juri Linkov http://www.jurta.org/emacs/