From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Pipe bash file contents to shell Date: Thu, 30 Jun 2011 20:01:29 +0200 Message-ID: <4E0CB9F9.5060100@easy-emacs.de> References: <31963679.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1309464860 23609 80.91.229.12 (30 Jun 2011 20:14:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Jun 2011 20:14:20 +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 Jun 30 22:14:16 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QcNct-0000tB-Cf for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jun 2011 22:14:15 +0200 Original-Received: from localhost ([::1]:57579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcNcs-0003Eh-68 for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jun 2011 16:14:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcLYU-0001GN-Ee for help-gnu-emacs@gnu.org; Thu, 30 Jun 2011 14:01:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcLYS-0001xO-Rc for help-gnu-emacs@gnu.org; Thu, 30 Jun 2011 14:01:34 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:61131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcLYS-0001xI-5Y for help-gnu-emacs@gnu.org; Thu, 30 Jun 2011 14:01:32 -0400 Original-Received: from [192.168.178.27] (brln-4dbc69f0.pool.mediaWays.net [77.188.105.240]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0LeFQH-1RLWWV0ZDB-00q9ml; Thu, 30 Jun 2011 20:01:30 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 In-Reply-To: <31963679.post@talk.nabble.com> X-Provags-ID: V02:K0:CzKn8/3kd0BMd+GsK6Lrjjb6ew4p6o3GhJMG8HT/665 znm2dnGetTVLMGcxblsF9YS5GBwPKb/EDRZ0hLlmT4224QySQq RUqfJvynlEe2GDrNyFUkICtgVvs51I2Kxnske+dXyq2TFEH4b0 ahylH5dGFLzHyEsOfI1mG03Cqyu7Hz5DAfgVZBYM5Xyq60Z7eQ V2PbYSkB+0GsOHJEEyBJ/+jvwnXc83C0JlFUp2wZdA= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81461 Archived-At: Am 30.06.2011 16:33, schrieb linuxfever: > > Hello all, > > I was wondering whether there is a way to pass contents of a bash script > file into a shell buffer in Emacs (23.2). For example, if my bash file > contains a single line "ls -al", I would like to highlight that line, and by > pressing a keybind, have the command executed and its output shown in the > shell buffer. > > Is it at all possible? Thanks for any suggestions! > > eh, correcting my previous messages. "shell-command-on-region" is here not the right starting point. So let me consider your question again: you have a bash-script. To which directory would `ls -al' point? How it's written? Basically it's possible. However, maybe to get the results you want, Emacs provides better ways, for example via dired. Andreas