Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!gatech!bbn!bbn.com!fkittred From: fkittred@bbn.com (Fletcher Kittredge) Newsgroups: comp.emacs Subject: Re: run a Region through a Unix command Message-ID: <37069@bbn.COM> Date: 10 Mar 89 13:18:25 GMT References: <334@salt.UUCP> Sender: news@bbn.COM Reply-To: fkittred@BBN.COM (Fletcher Kittredge) Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 30 In article <334@salt.UUCP> dan@salt.UUCP (Dan Williams) writes: > > The JOVE editor has a capability to run a region selected from a >buffer through a unix command and replace the region with the output of the >command while the old region contents are sent to the cut buffer. > This is a highly desired capability around here but we need to do >it within GNU EMACS v18.51. I suspect that "Its in there.", or at least >easily done given someone has a little more Know-how with the beast than I. >Any pointers will be gladly accepted. ThanX > I think the command you really want is "command-apropos" (usually bound to "C-ha". This command will prompt you for a subject and return a list of functions which have that subject in their name. You can then use the other help commands to get more information. If you run command-apropos with the input of "command", "region" or "shell" you will find out about the command (shell-command-on-region) "Shell-command-on-region is usually bound to the key sequence ESC |. If you give in an argument, then it will replace the region with the output of the command, else it will display output in the other window. This command is documented in the GNU emacs 18 manual, page 201. It is also on the quick referance card. Both might be useful to you and are easily obtainable. fletcher