* Re: Running Perl Scripts in Emacs (on buffer)
[not found] <mailman.322.1063746910.21628.help-gnu-emacs@gnu.org>
@ 2003-09-16 23:12 ` Kevin Rodgers
2003-09-17 0:10 ` Dan Anderson
[not found] ` <mailman.334.1063757444.21628.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Kevin Rodgers @ 2003-09-16 23:12 UTC (permalink / raw)
Dan Anderson wrote:
> Is it possible to execute a perl script on a buffer? (Whether it's
> through something like M-x perl-script or binding the perl script to a
> lisp function).
Does the buffer contain the script itself or the data you want to script
to read as standard input? Either way, you want to use `C-x h' to mark
the whole buffer as the region, then `M-|' to pipe it to a program
(either the perl interpreter itself, or a Perl script).
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Running Perl Scripts in Emacs (on buffer)
2003-09-16 23:12 ` Running Perl Scripts in Emacs (on buffer) Kevin Rodgers
@ 2003-09-17 0:10 ` Dan Anderson
[not found] ` <mailman.334.1063757444.21628.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Dan Anderson @ 2003-09-17 0:10 UTC (permalink / raw)
Cc: help-gnu-emacs
> Does the buffer contain the script itself or the data you want to script
> to read as standard input?
No. Without going into a shell and saving (or trying to convert my Perl
scripts into elisp) I want to just run an arbitrary perl script on a
buffer.
-Dan
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.334.1063757444.21628.help-gnu-emacs@gnu.org>]
* Re: Running Perl Scripts in Emacs (on buffer)
[not found] ` <mailman.334.1063757444.21628.help-gnu-emacs@gnu.org>
@ 2003-09-30 22:12 ` Kai Grossjohann
2003-10-08 4:59 ` Artist
0 siblings, 1 reply; 6+ messages in thread
From: Kai Grossjohann @ 2003-09-30 22:12 UTC (permalink / raw)
Dan Anderson <dan@mathjunkies.com> writes:
> No. Without going into a shell and saving (or trying to convert my Perl
> scripts into elisp) I want to just run an arbitrary perl script on a
> buffer.
C-x h M-| foo.pl RET
Does this help?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Running Perl Scripts in Emacs (on buffer)
2003-09-30 22:12 ` Kai Grossjohann
@ 2003-10-08 4:59 ` Artist
2003-10-08 15:44 ` Barry Margolin
0 siblings, 1 reply; 6+ messages in thread
From: Artist @ 2003-10-08 4:59 UTC (permalink / raw)
Kai Grossjohann <kai.grossjohann@gmx.net> wrote in message news:<86ad8mx6wo.fsf@slowfox.dyndns.org>...
> Dan Anderson <dan@mathjunkies.com> writes:
>
> > No. Without going into a shell and saving (or trying to convert my Perl
> > scripts into elisp) I want to just run an arbitrary perl script on a
> > buffer.
>
> C-x h M-| foo.pl RET
>
> Does this help?
How do you supply the buffer data to your perl program in this case?
What would be the arguments?
Let's say I have a file and I like to replace some words via perl
program, how I would do that?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Running Perl Scripts in Emacs (on buffer)
2003-10-08 4:59 ` Artist
@ 2003-10-08 15:44 ` Barry Margolin
0 siblings, 0 replies; 6+ messages in thread
From: Barry Margolin @ 2003-10-08 15:44 UTC (permalink / raw)
In article <de3ad953.0310072059.7cc70e5d@posting.google.com>,
Artist <googleartist@yahoo.com> wrote:
>Kai Grossjohann <kai.grossjohann@gmx.net> wrote in message
>news:<86ad8mx6wo.fsf@slowfox.dyndns.org>...
>> Dan Anderson <dan@mathjunkies.com> writes:
>>
>> > No. Without going into a shell and saving (or trying to convert my Perl
>> > scripts into elisp) I want to just run an arbitrary perl script on a
>> > buffer.
>>
>> C-x h M-| foo.pl RET
>>
>> Does this help?
>
>How do you supply the buffer data to your perl program in this case?
>What would be the arguments?
The buffer data will be piped to the script's standard input. M-| prompts
for a command line to execute, so you type the arguments in that prompt.
>
>Let's say I have a file and I like to replace some words via perl
>program, how I would do that?
C-x h M-| scriptname oldword newword
--
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Running Perl Scripts in Emacs (on buffer)
@ 2003-09-16 21:14 Dan Anderson
0 siblings, 0 replies; 6+ messages in thread
From: Dan Anderson @ 2003-09-16 21:14 UTC (permalink / raw)
Is it possible to execute a perl script on a buffer? (Whether it's
through something like M-x perl-script or binding the perl script to a
lisp function).
Thanks,
-Dan
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-08 15:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.322.1063746910.21628.help-gnu-emacs@gnu.org>
2003-09-16 23:12 ` Running Perl Scripts in Emacs (on buffer) Kevin Rodgers
2003-09-17 0:10 ` Dan Anderson
[not found] ` <mailman.334.1063757444.21628.help-gnu-emacs@gnu.org>
2003-09-30 22:12 ` Kai Grossjohann
2003-10-08 4:59 ` Artist
2003-10-08 15:44 ` Barry Margolin
2003-09-16 21:14 Dan Anderson
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).