From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kgold@watson.ibm.com (kgold) Newsgroups: gmane.emacs.help Subject: Re: how to %g/notice/d Date: 16 Jul 2004 13:09:05 GMT Organization: IBM T.J. Watson Research Center Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1089984171 32731 80.91.224.253 (16 Jul 2004 13:22:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jul 2004 13:22:51 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 16 15:22:39 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BlSfe-0006Wr-00 for ; Fri, 16 Jul 2004 15:22:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BlSiB-0003Ig-Hq for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jul 2004 09:25:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.visi.com!petbe.visi.com!news.octanews.net!ash.uu.net!an02.austin.ibm.com!ausnews.austin.ibm.com!newsfeed.btv.ibm.com!news.btv.ibm.com!alpha.watson.ibm.com!kgold Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: alpha.watson.ibm.com Original-X-Trace: news.btv.ibm.com 1089983345 20878 9.2.16.245 (16 Jul 2004 13:09:05 GMT) Original-X-Complaints-To: news@btv.ibm.com Original-NNTP-Posting-Date: 16 Jul 2004 13:09:05 GMT X-Newsreader: xrn 9.02 Original-Xref: shelby.stanford.edu gnu.emacs.help:124332 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19668 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19668 "Chang PilHun" writes: > I want to delete all lines that includes 'notice' string. > in vim, I can do that by :%g/notice/d > How to in emacs? Besides the "right" way to do it, I use keyboard macros all the time for tasks like this, where it might take longer to find the right command than to do the edit. The keyboard macro would be: - search for "notice" - go to the beginning of the line - kill the line Issue a command to execute the macro 1000 times and you're done. If you don't know about keyboard macros, you're missing a great emacs feature.