From owner-freebsd-questions Mon Feb 21 6:50:50 2000 Delivered-To: freebsd-questions@freebsd.org Received: from europe.std.com (europe.std.com [199.172.62.20]) by hub.freebsd.org (Postfix) with ESMTP id BCFC937BDF4 for ; Mon, 21 Feb 2000 06:50:46 -0800 (PST) (envelope-from lowell@world.std.com) Received: from world.std.com (lowell@world-f.std.com [199.172.62.5]) by europe.std.com (8.9.3/8.9.3) with ESMTP id JAA20085; Mon, 21 Feb 2000 09:50:40 -0500 (EST) Received: (from lowell@localhost) by world.std.com (8.9.3/8.9.3) id JAA05411; Mon, 21 Feb 2000 09:50:39 -0500 (EST) To: mark@dogma.freebsd-uk.eu.org, Mark Ovens Cc: freebsd-questions@freebsd.org Subject: Re: Running shell commands in Emacs References: <38B120A2.7E104808@uk.radan.com> From: Lowell Gilbert Date: 21 Feb 2000 09:50:39 -0500 In-Reply-To: Mark Ovens's message of Mon, 21 Feb 2000 11:25:22 +0000 Message-ID: Lines: 15 X-Mailer: Gnus v5.5/Emacs 20.2 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mark Ovens 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