From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Inserting output from a program into a buffer Date: Sun, 21 Feb 2010 00:02:35 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1266814632 2787 80.91.229.12 (22 Feb 2010 04:57:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 22 Feb 2010 04:57:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 21 07:17:18 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nj4a5-000367-1N for geh-help-gnu-emacs@m.gmane.org; Sun, 21 Feb 2010 06:42:13 +0100 Original-Received: from localhost ([127.0.0.1]:47640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nj4a2-0003Vl-3P for geh-help-gnu-emacs@m.gmane.org; Sun, 21 Feb 2010 00:42:10 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!newsfeed.freenet.ag!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Injection-Date: Sun, 21 Feb 2010 05:02:35 +0000 (UTC) Injection-Info: barmar.motzarella.org; posting-host="+bxBiZT/p0ZLLuDb5H+JCw"; logging-data="26239"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+QtmfYUJv9jS1gxWNl7g78" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:el8l7G/izo2EQDfxCBGk9x6Apb4= Original-Xref: news.stanford.edu gnu.emacs.help:176925 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71997 Archived-At: In article , Tim Johnson wrote: > On 2010-02-21, Tim Landscheidt wrote: > > Tim Johnson wrote: > > > >> emacs 22.3.1 on slack 13.0/32-bit > > > >> Consider the following text: > > > >> [[10:00 11:27][14:43 14:57]] ;; ^output here > > > >> Given that I have selected: > >> "[[10:00 11:27][14:43 14:57]]" > >> as a region, I would like to send that region to an external application > >> and insert the output as indicated. > > > >> I've recently started using emacs again after several years, and have in > >> the past written quite a few elisp functions and keybindings for my own > >> use. The external application has already been written, I've used it > >> with vim and "r !" for years. > > > >> References to relevant and related elisp functions and scripts would > >> probably be sufficient, however, if someone has done this already - why > >> re-invent the wheel? > > > > Not exactly what you require, but > > C-u M-x shell-command-on-region RET will /replace/ the re- > > gion with the output of the shell-command operated on the > > original region. > Hi Tim: > Thanks for the reply. I had found that command, but unfortunately > replacing the region is the last thing I want to do. The end game is a > "time card", as you might guess from the data structure and the data > structure needs to remain intact. > Thanks Again! If you use it without the C-u modifier, the output will be put in the *Shell Output* buffer. You could use M-x insert-buffer to copy the output into the current buffer. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***