Skip site navigation (1)Skip section navigation (2)
Date:      21 Feb 2000 09:50:39 -0500
From:      Lowell Gilbert <lowell@world.std.com>
To:        mark@dogma.freebsd-uk.eu.org, Mark Ovens <Mark.Ovens@uk.radan.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Running shell commands in Emacs
Message-ID:  <rd63dqmk3sw.fsf@world.std.com>
In-Reply-To: Mark Ovens's message of Mon, 21 Feb 2000 11:25:22 %2B0000
References:  <38B120A2.7E104808@uk.radan.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Ovens <mark.ovens@uk.radan.com> writes:

> Is it possible to run a shell command from within emacs and have the
> output written to the current buffer at the cursor position, as the ex
> command ``r!'' in vi?, which is useful for adding the output of ``uname
> -a'' or ``dmesg'' into an e-mail, for instance. 
> 
> I know there is ``shell-command'' but that writes the output to a new
> buffer (*Shell Command Output*) so you then have to cut 'n' paste.

If you specify the (optional) second parameter to shell-command, the
output will be inserted in the current buffer.  "C-u shell-command"
should be sufficient to do what you want.

You really should ask emacs questions in an emacs forum, though...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?rd63dqmk3sw.fsf>