all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
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	[thread overview]
Message-ID: <87egvp4b1d.fsf@debian.uxu> (raw)
In-Reply-To: mailman.8358.1409958182.1147.help-gnu-emacs@gnu.org

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	other threads:[~2014-09-06  4:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.8358.1409958182.1147.help-gnu-emacs@gnu.org>
2014-09-06  4:39 ` Emanuel Berg [this message]
2014-09-07 20:42   ` "M-x shell" (was: Re: Redirecting the output of a commend in "shell" into a buffer) Marcin Borkowski
     [not found]   ` <mailman.8415.1410122578.1147.help-gnu-emacs@gnu.org>
2014-09-07 21:36     ` Emanuel Berg
2014-09-08  4:51       ` "M-x shell" Alex Kost
     [not found]       ` <mailman.8436.1410151900.1147.help-gnu-emacs@gnu.org>
2014-09-08 21:41         ` Emanuel Berg
2014-09-08 23:20   ` "M-x shell" (was: Re: Redirecting the output of a commend in "shell" into a buffer) Robert Thorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egvp4b1d.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.