From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.help Subject: inserting output of shell-command (was: Major usability issue) Date: Mon, 02 Sep 2002 21:04:19 +0100 Organization: funfunfun Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030997673 14004 127.0.0.1 (2 Sep 2002 20:14:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 2 Sep 2002 20:14:33 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17lxai-0003dl-00 for ; Mon, 02 Sep 2002 22:14:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lxcD-0003IG-00; Mon, 02 Sep 2002 16:16:05 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!m837-mp1.cvx1-a.swa.dial.ntli.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: m837-mp1.cvx1-a.swa.dial.ntli.net (213.105.231.69) Original-X-Trace: fu-berlin.de 1030997218 56887107 213.105.231.69 (16 [97657]) X-No-Yes: No Mail-Copies-To: nobody User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.90 (i386-mingw-windows98.2222) Cancel-Lock: sha1:Ot1HkuYeXg/wUmTxawtqMNcSVSk= Original-Xref: nntp.stanford.edu gnu.emacs.help:104405 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:971 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:971 Bruce Korb wrote: > For years I have captured the output of a shell command and inserted > it into my document. The latest distributions of Linux now carry a > version of emacs that makes doing that non-obvious. I'm sure it is > doable, but it is really important to just be able to ALT-| then > type a command and be able to use a mouse click to capture the text. > I haven't read emacs lisp macros yet in order to reverse-engineer > what has been done; but I shouldn't have to either. :-( /----[ C-h k M-! ] | M-! runs the command shell-command | which is an interactive compiled Lisp function in `simple'. | (shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER) | | Execute string COMMAND in inferior shell; display output, if any. | With prefix argument, insert the COMMAND's output at point. | [...] \---- So you probably want to be typing something like C-1 M-! at the correct point in your buffer. -- lawrence mitchell