From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.help Subject: Re: Newbie: Submit whole buffer and capture output Date: Tue, 18 Dec 2007 17:27:14 +1100 Organization: Cybersource: Australia's Leading Linux and Open Source Solutions Company Message-ID: <87zlw81prx.fsf@enki.rimspace.net> References: <4b90cdc3-ab54-40f8-bf51-c5919f5ac754@d21g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197961552 2053 80.91.229.12 (18 Dec 2007 07:05:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2007 07:05:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 18 08:06:04 2007 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.50) id 1J4WVn-0005ds-Vs for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Dec 2007 08:05:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4WVU-0008P0-CW for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Dec 2007 02:04:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4WV9-0008Od-J4 for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 02:04:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4WV8-0008OH-De for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 02:04:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4WV8-0008OD-6W for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 02:04:26 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J4WV7-0004o9-M5 for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 02:04:25 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1J4WFi-0005FY-Bw for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 06:48:30 +0000 Original-Received: from nat20.cyber.com.au ([203.7.155.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Dec 2007 06:48:30 +0000 Original-Received: from daniel by nat20.cyber.com.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Dec 2007 06:48:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nat20.cyber.com.au User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:EyY+Bp9N/e1mFpMTybG5FH5/t4g= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:50168 Archived-At: Eli Zaretskii writes: >> From: "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 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