[comp.emacs] run a Region through a Unix command

dan@salt.uucp (Dan Williams) (03/10/89)

	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 


 _______________________________________________________
|   FRP: It's not just a game, it's an adventure!       |
|   Dan Williams 		 uunet!salt!dan		|
|   MCDONNELL DOUGLAS 	 Denver CO			|
|   Any opinions expressed by me are not the 		|
|   opinions of McDonnell Douglas.			|

fkittred@bbn.com (Fletcher Kittredge) (03/10/89)

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

conway@hpdtl.HP.COM (Daniel F. Conway) (03/16/89)

/ hpdtl:comp.emacs / fkittred@bbn.com (Fletcher Kittredge) /  5:18 am  Mar 10, 1989 /

> 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.

Where can I get the quick reference card?  Free Software Foundation?  Or have
I missed seeing it in the distribution?

> fletcher
> ----------
> 

Dan Conway

gph@hpsemc.HP.COM (Old run-down actor) (03/24/89)

conway@hpdtl.HP.COM (Daniel F. Conway)writes:

>Where can I get the quick reference card?  Free Software Foundation?  Or have
>I missed seeing it in the distribution?

   It's in the back of the Gnu emacs manual.

   -gph

fkittred@bbn.com (Fletcher Kittredge) (03/24/89)

In article <6930008@hpdtl.HP.COM> conway@hpdtl.HP.COM (Daniel F. Conway) writes:
>/ hpdtl:comp.emacs / fkittred@bbn.com (Fletcher Kittredge) /  5:18 am  Mar 10, 1989 /
>
>> 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.
>
>Where can I get the quick reference card?  Free Software Foundation?  Or have
>I missed seeing it in the distribution?
>
>Dan Conway
>

You missed it, it is in "etc" called refcard.tex. It is also available from
the Free Software Foundation.

regards,
fletcher

Fletcher E. Kittredge  fkittred@bbn.com

conway@hpdtl.HP.COM (Daniel F. Conway) (03/28/89)

> >
> >Where can I get the quick reference card?  Free Software Foundation?  Or have
> >I missed seeing it in the distribution?
> >
> >Dan Conway
> >
/ fkittred@bbn.com (Fletcher Kittredge) replies:
> 
> You missed it, it is in "etc" called refcard.tex. It is also available from
> the Free Software Foundation.
> 
> regards,
> fletcher
> 
> Fletcher E. Kittredge  fkittred@bbn.com
> 
> 
Thanks.

Dan