* Perldo in Emacs
@ 2011-03-02 21:17 Alberto Simões
2011-03-03 4:32 ` Yuri Khan
[not found] ` <mailman.6.1299126767.20537.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: Alberto Simões @ 2011-03-02 21:17 UTC (permalink / raw)
To: help-gnu-emacs
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
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).
Thanks
ambs
--
Alberto Simões
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Perldo in Emacs
2011-03-02 21:17 Perldo in Emacs Alberto Simões
@ 2011-03-03 4:32 ` Yuri Khan
[not found] ` <mailman.6.1299126767.20537.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 4+ messages in thread
From: Yuri Khan @ 2011-03-03 4:32 UTC (permalink / raw)
To: help-gnu-emacs
2011/3/3 Alberto Simões <hashashin@gmail.com>:
> 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).
shell-command-on-region will almost do what you want, you will just
need to pass it a newly created buffer for output.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Perldo in Emacs
[not found] <mailman.0.1299100662.27501.help-gnu-emacs@gnu.org>
@ 2011-03-03 9:45 ` Jorgen Grahn
0 siblings, 0 replies; 4+ messages in thread
From: Jorgen Grahn @ 2011-03-03 9:45 UTC (permalink / raw)
To: help-gnu-emacs
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 <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Perldo in Emacs
[not found] ` <mailman.6.1299126767.20537.help-gnu-emacs@gnu.org>
@ 2011-03-03 18:32 ` Vagn Johansen
0 siblings, 0 replies; 4+ messages in thread
From: Vagn Johansen @ 2011-03-03 18:32 UTC (permalink / raw)
To: help-gnu-emacs
Yuri Khan <yurivkhan@gmail.com> writes:
> 2011/3/3 Alberto Simões <hashashin@gmail.com>:
>
>> 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).
>
> shell-command-on-region will almost do what you want, you will just
> need to pass it a newly created buffer for output.
>
Type C-u first
C-u M-| ..
--
Vagn Johansen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-03 18:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 21:17 Perldo in Emacs Alberto Simões
2011-03-03 4:32 ` Yuri Khan
[not found] ` <mailman.6.1299126767.20537.help-gnu-emacs@gnu.org>
2011-03-03 18:32 ` Vagn Johansen
[not found] <mailman.0.1299100662.27501.help-gnu-emacs@gnu.org>
2011-03-03 9:45 ` Jorgen Grahn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).