🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #189116

Re: Operating on lines containing a pattern

#189116
From: Aamod Sane
Date: Sat, 04 May 1991 20:18
33 lines
1562 bytes
baumgart@esquire.dpw.com (Steve Baumgarten) writes:

>In "vi" (boo! hiss!), you can do something like this:

>	:g/pattern/d

>to delete all the lines in a file that contain the pattern "pattern".

>Or this:

>	:g/pattern/s/p1/p2/

>to substitute p2 for p1 in all lines containing the pattern "pattern".

>Is there some way to do this in Emacs, short of writing elisp code?
>(Or if not, has someone already written appropriate elisp code?)

>Any suggestions?

>--
>   Steve Baumgarten             | "New York... when civilization falls apart,
>   Davis Polk & Wardwell        |  remember, we were way ahead of you."
>   baumgart@esquire.dpw.com     | 
>   cmcl2!esquire!baumgart       |                           - David Letterman

USE VIP :-) :-)

Aamod
-- 
sane@cs.uiuc.edu
         ==         / \  
-----    ==    *    \_/     -|||- 
         ==     
Technical Details
Message-ID: <1991May4.201809.1344@m.cs.uiuc.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!m.cs.uiuc.edu!sane
References: <BAUMGART.91May3100021@esquire.esquire.dpw.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,80ffebd709a40a03
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-05-04 13:49:54 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!wuarchive!m.cs.uiuc.edu!sane
From: sane@cs.uiuc.edu (Aamod Sane)
Newsgroups: gnu.emacs.help
Subject: Re: Operating on lines containing a pattern
Message-ID: <1991May4.201809.1344@m.cs.uiuc.edu>
Date: 4 May 91 20:18:09 GMT
References: <BAUMGART.91May3100021@esquire.esquire.dpw.com>
Sender: news@m.cs.uiuc.edu (News Database (admin-Mike Schwager))
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Lines: 33
Nntp-Posting-Host: clitus.cs.uiuc.edu