From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: "M-x shell" (was: Re: Redirecting the output of a commend in "shell" into a buffer) Date: Sat, 06 Sep 2014 06:39:58 +0200 Organization: Aioe.org NNTP Server Message-ID: <87egvp4b1d.fsf@debian.uxu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409978425 3281 80.91.229.3 (6 Sep 2014 04:40:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2014 04:40:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 06 06:40:20 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XQ7nP-0004gu-VH for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Sep 2014 06:40:20 +0200 Original-Received: from localhost ([::1]:32863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQ7nP-0004Fu-7A for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Sep 2014 00:40:19 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: P0uMB9BthHuWo8+BJXB4Mw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:AOxgf5YBbkTq831pJzXwv2XUjj0= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:207391 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:99666 Archived-At: Robert Thorpe writes: > You could modify these or advice them. Or you could > rebind RET. For example, suppose you create a new > "pseudo-command" called "buf". You write: "buf ls > RET" in the shell buffer. Your function finds the > "buf" at the beginning of the command string. It then > cuts out the rest and sends it to shell-command which > puts it in a separate buffer. Welcome back Mr. Thorpe, yes, but that would be in-Emacs, right? If so, isn't the eshell better? OT (or on topic): I would like a shell prompt in Emacs, but not like the IELM, instead as M-x, only the whole command and arguments! I did a thing on this with the help of an individual on this list: http://user.it.uu.se/~embe8573/conf/emacs-init/shell-cli.el It works for most cases... Try: man ls, find-file file.txt - only with replace regexp and such sometimes it works, sometimes not, I think because of quoting. Anyway such a feature should definitely be included in vanilla Emacs. For long commands it is just so much better to write it on one plate, instead of RET-ing it away on bit at a time, only at the second argument you have already forgotten what you were doing --- and, it is much easier to correct mistakes on the whole line than - yeah, how do you do that (repeat, but almost) in Emacs if a command didn't work and you know it is because of the second of third argument? Just think you had to do that in the shell - write one command/argument at a time, and RET for each? -- underground experts united