all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Newbie: Submit whole buffer and capture output
@ 2007-12-17 14:33 Matthew.Pettis
  2007-12-18  4:28 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Matthew.Pettis @ 2007-12-17 14:33 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Want to learn Emacs to have a powerful editor on *nix...

I code perl scripts, and I want to find out how to submit a whole
buffer (with a shebang at top) to the shell and capture the output
somewhere in Emacs -- probably the *command shell* window, which I
know nothing about other than the name.

Can someone point me in the right direction?  Googling hasn't helped
me here...

tia,
Matt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Newbie: Submit whole buffer and capture output
  2007-12-17 14:33 Newbie: Submit whole buffer and capture output Matthew.Pettis
@ 2007-12-18  4:28 ` Eli Zaretskii
  2007-12-18  6:27   ` Daniel Pittman
  2007-12-19  2:37 ` Matthew.Pettis
  2008-03-19  1:00 ` Xavier Maillard
  2 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2007-12-18  4:28 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Matthew.Pettis@gmail.com" <Matthew.Pettis@gmail.com>
> Date: Mon, 17 Dec 2007 06:33:28 -0800 (PST)
> 
> I code perl scripts, and I want to find out how to submit a whole
> buffer (with a shebang at top) to the shell and capture the output
> somewhere in Emacs -- probably the *command shell* window, which I
> know nothing about other than the name.

You want "M-|".  Invoke Perl in a way that makes it read the script
from its standard input.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Newbie: Submit whole buffer and capture output
  2007-12-18  4:28 ` Eli Zaretskii
@ 2007-12-18  6:27   ` Daniel Pittman
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Pittman @ 2007-12-18  6:27 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Matthew.Pettis@gmail.com" <Matthew.Pettis@gmail.com>
>> Date: Mon, 17 Dec 2007 06:33:28 -0800 (PST)
>> 
>> I code perl scripts, and I want to find out how to submit a whole
>> buffer (with a shebang at top) to the shell and capture the output
>> somewhere in Emacs -- probably the *command shell* window, which I
>> know nothing about other than the name.
>
> You want "M-|".  Invoke Perl in a way that makes it read the script
> from its standard input.

...alternately, after saving the script to disk, one of:

  M-x compile perl ./myscript.pl
  M-! perl ./myscript.pl

Those might do what you want.

Regards,
        Daniel
-- 
Daniel Pittman <daniel@cybersource.com.au>           Phone: 03 9428 6922
1/130-132 Stawell St, Richmond              Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Newbie: Submit whole buffer and capture output
  2007-12-17 14:33 Newbie: Submit whole buffer and capture output Matthew.Pettis
  2007-12-18  4:28 ` Eli Zaretskii
@ 2007-12-19  2:37 ` Matthew.Pettis
  2008-03-19  1:00 ` Xavier Maillard
  2 siblings, 0 replies; 6+ messages in thread
From: Matthew.Pettis @ 2007-12-19  2:37 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks All,

Helpful stuff... I cross-posted this at perlmonks.org, and got some
good responses there, too... for reference:

http://perlmonks.org/?node_id=657525

thanks,
matt

On Dec 17, 8:33 am, "Matthew.Pet...@gmail.com"
<Matthew.Pet...@gmail.com> wrote:
> Hi,
>
> Want to learn Emacs to have a powerful editor on *nix...
>
> I code perl scripts, and I want to find out how to submit a whole
> buffer (with a shebang at top) to the shell and capture the output
> somewhere in Emacs -- probably the *command shell* window, which I
> know nothing about other than the name.
>
> Can someone point me in the right direction?  Googling hasn't helped
> me here...
>
> tia,
> Matt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Newbie: Submit whole buffer and capture output
  2007-12-17 14:33 Newbie: Submit whole buffer and capture output Matthew.Pettis
  2007-12-18  4:28 ` Eli Zaretskii
  2007-12-19  2:37 ` Matthew.Pettis
@ 2008-03-19  1:00 ` Xavier Maillard
  2008-03-19 17:31   ` Joel J. Adamson
  2 siblings, 1 reply; 6+ messages in thread
From: Xavier Maillard @ 2008-03-19  1:00 UTC (permalink / raw)
  To: Matthew.Pettis@gmail.com; +Cc: help-gnu-emacs


   Can someone point me in the right direction?  Googling hasn't helped
   me here...

There is something called eev-mode (just google for it). It does
this and even more. It looks complex at first, but once mastered,
it is of great help for all repetitive shell tasks.

Sadly it is not part of GNU Emacs, I wish it was !

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Newbie: Submit whole buffer and capture output
  2008-03-19  1:00 ` Xavier Maillard
@ 2008-03-19 17:31   ` Joel J. Adamson
  0 siblings, 0 replies; 6+ messages in thread
From: Joel J. Adamson @ 2008-03-19 17:31 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: help-gnu-emacs, Matthew.Pettis@gmail.com

Xavier Maillard <xma@gnu.org> writes:

>    Can someone point me in the right direction?  Googling hasn't helped
>    me here...
>
> There is something called eev-mode (just google for it). It does
> this and even more. It looks complex at first, but once mastered,
> it is of great help for all repetitive shell tasks.

Do you want shell-command-on-buffer?

Joel

-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu

The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-19 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17 14:33 Newbie: Submit whole buffer and capture output Matthew.Pettis
2007-12-18  4:28 ` Eli Zaretskii
2007-12-18  6:27   ` Daniel Pittman
2007-12-19  2:37 ` Matthew.Pettis
2008-03-19  1:00 ` Xavier Maillard
2008-03-19 17:31   ` Joel J. Adamson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.