From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Bash Script Editing Mode? Date: Thu, 07 Aug 2008 23:06:03 +0200 Message-ID: <87myjomt6s.fsf@tux.homenetwork> References: <361d08d2-b456-49c9-a578-53d1aaaf0b0f@a8g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218143444 16001 80.91.229.12 (7 Aug 2008 21:10:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Aug 2008 21:10:44 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: formido Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 07 23:11:34 2008 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 1KRCld-0001g7-Sd for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Aug 2008 23:11:30 +0200 Original-Received: from localhost ([127.0.0.1]:41725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRCkh-0000Yj-VX for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Aug 2008 17:10:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRCjD-0007mi-OE for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 17:08:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRCjC-0007lP-SZ for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 17:08:59 -0400 Original-Received: from [199.232.76.173] (port=55298 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRCjC-0007l7-No for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 17:08:58 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.173]:45439) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KRCjC-0001Vv-7m for help-gnu-emacs@gnu.org; Thu, 07 Aug 2008 17:08:58 -0400 Original-Received: by ug-out-1314.google.com with SMTP id l31so372498ugc.48 for ; Thu, 07 Aug 2008 14:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=NE36Nk5waw7+aF3C80b7RsaAA3bhhg3YmR+XWevomYM=; b=Fe8hIqE8W0rSCvFN5+IfquMHEhxXUQFdKKK4tVZefwbxB/yDkSYnB+YoVz0QViAhQW mGO+3TzS5JmCwAXBbEkX70v0k0BzEy7CKn9MGMRjsDE8FFXV25oBMid6qxeOtkymUUiL UxQE/62RtEDAvfxTsK/hJkxpY9M6x0A95qUZ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=AK8F23fXTMglI9DgZf6qD4Ih9YsOEPcFiom72+eag8O4aAhDmh5u0Y8tbEShYM0sce JySwmCYZ0JQDvmd0EUu05fHLX9Kx6oUEtqo+XpZbxm+aoWsBjA9Gq1tpJpxSS8QR8Doc 46u7mcOIrpRtkePux0hg6nJWi8ECjKr/1eq8M= Original-Received: by 10.67.15.2 with SMTP id s2mr1911956ugi.27.1218143336175; Thu, 07 Aug 2008 14:08:56 -0700 (PDT) Original-Received: from tux.homenetwork ( [77.197.77.142]) by mx.google.com with ESMTPS id y1sm2376628uge.10.2008.08.07.14.08.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 07 Aug 2008 14:08:55 -0700 (PDT) In-Reply-To: <361d08d2-b456-49c9-a578-53d1aaaf0b0f@a8g2000prf.googlegroups.com> (formido@gmail.com's message of "Thu, 7 Aug 2008 13:21:40 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:56258 Archived-At: formido writes: > There's a shell mode, but it has a prompt and doesn't help you > incrementally create a shell script as efficiently as it could, unless > I'm missing something. Is there any shell script mode that works more > like the elisp, python, or erlang repls, where you can execute your > choice of several lines at once and you can go back and edit and > execute the lines in situ? If I write a bash function, editing and > reloading the function is a painful process. I'm looking for something > a little bit like the Mac's BBEdit shell worksheets (only better). > > I considered altering the usual shell mode, but it would take more > than slight edits, so I'm hoping something's already out there. For > example, one should be able to go back to a function, tweak it, and > reload with a minimum of keyboard fuss. > > Michael > May be that help: ,----[ C-h f shell-command-on-region RET ] | shell-command-on-region is an interactive compiled Lisp function in | `simple.el'. | | It is bound to M-|, . | | (shell-command-on-region start end command &optional output-buffer | replace error-buffer display-error-buffer) | | Execute string command in inferior shell with region as input. | Normally display output (if any) in temp buffer `*Shell Command Output*'; | Prefix arg means replace the region with it. Return the exit code of | command. | | To specify a coding system for converting non-ASCII characters | in the input and output to the shell command, use C-x RET c | before this command. By default, the input (from the current buffer) | is encoded in the same coding system that will be used to save the file, | `buffer-file-coding-system'. If the output is going to replace the region, | then it is decoded from that same coding system. | | The noninteractive arguments are start, end, command, | output-buffer, replace, error-buffer, and display-error-buffer. | Noninteractive callers can specify coding systems by binding | `coding-system-for-read' and `coding-system-for-write'. | | If the command generates output, the output may be displayed | in the echo area or in a buffer. | If the output is short enough to display in the echo area | (determined by the variable `max-mini-window-height' if | `resize-mini-windows' is non-nil), it is shown there. Otherwise | it is displayed in the buffer `*Shell Command Output*'. The output | is available in that buffer in both cases. | | If there is output and an error, a message about the error | appears at the end of the output. | | If there is no output, or if output is inserted in the current buffer, | then `*Shell Command Output*' is deleted. | | If the optional fourth argument output-buffer is non-nil, | that says to put the output in some other buffer. | If output-buffer is a buffer or buffer name, put the output there. | If output-buffer is not a buffer and not nil, | insert output in the current buffer. | In either case, the output is inserted after point (leaving mark after it). | | If replace, the optional fifth argument, is non-nil, that means insert | the output in place of text from start to end, putting point and mark | around it. | | If optional sixth argument error-buffer is non-nil, it is a buffer | or buffer name to which to direct the command's standard error output. | If it is nil, error output is mingled with regular output. | If display-error-buffer is non-nil, display the error buffer if there | were any errors. (This is always t, interactively.) | In an interactive call, the variable `shell-command-default-error-buffer' | specifies the value of error-buffer. | | This function is advised. | | Before-advice `shell-command-on-region-with-completion': | Defined in shell-command.el, to enable tab-completion of commands | and dir/filenames within the input context. This advice also makes | `shell-command-on-region' to use this current buffer as its input when | a region is visible and inactive. | Its prompt string is kept by `shell-command-on-region-prompt' and | `shell-command-on-region-prompt-if-region-inactive'. | | [back] `---- -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France