help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"M-x shell" (was: Re: Redirecting the output of a commend in "shell" int


From: Emanuel Berg
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Robert Thorpe <rt@robertthorpeconsulting.com> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]