From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorgen Grahn Newsgroups: gmane.emacs.help Subject: Re: Perldo in Emacs Date: 3 Mar 2011 09:45:54 GMT Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1299175021 10865 80.91.229.12 (3 Mar 2011 17:57:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2011 17:57:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 03 18:56:52 2011 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.69) (envelope-from ) id 1PvCle-0004ld-9E for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2011 18:56:52 +0100 Original-Received: from localhost ([127.0.0.1]:37886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvClZ-0006WW-Mw for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2011 12:56:45 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-X-Trace: individual.net 84U3dch7b2spDS7ac4/7IgNWe1QEkogLu87aZL+be0K87d85Yi Cancel-Lock: sha1:goW/3WXacsrjiURVfap+ytdqzgo= User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:185585 X-Mailman-Approved-At: Thu, 03 Mar 2011 12:55:53 -0500 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:79755 Archived-At: On Wed, 2011-03-02, Alberto Simões wrote: > Hello > > vim has a nice thing, it lets the user to use a command named > 'perldo', supply some code to it, and vim will process all the file > with perl, and include the output. > > My doubt is if there is something similar in Perl (I know we have send ^^^^ You mean Emacs here. > through pipe, but was expecting some dedicated method). > > If not, it should not be difficult to implement, but I really need > some help with the list. > It is a matter of running the buffer with > > perl -i -pe ' ... ' < buffer > newbuffer > > where ... is the perl code instroduced by the user in emacs > (minibuffer, probably). Just an observation: I find myself using 'perl -ne' just as often as 'perl -pe', so if vim only supports the former, it's a bit too limited for my taste. /Jorgen -- // Jorgen Grahn O o .