unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Sending marked text to external program?
@ 2008-03-14 16:00 Uwe Scholz
  2008-03-14 16:58 ` Brendan Halpin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Uwe Scholz @ 2008-03-14 16:00 UTC (permalink / raw)
  To: help-gnu-emacs

Hello all!

I wondered if it is possible to mark a peace of text or a hole line end
send it to an external programm, for example "boxes", and include the
output in the active buffer (or maybe a new one).

Is this possible? If yes, how? Does a shortcut exist for this task?

Greatings,
Uwe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Sending marked text to external program?
  2008-03-14 16:00 Sending marked text to external program? Uwe Scholz
@ 2008-03-14 16:58 ` Brendan Halpin
  2008-03-14 17:13 ` Giorgos Keramidas
  2008-03-19  1:00 ` Xavier Maillard
  2 siblings, 0 replies; 4+ messages in thread
From: Brendan Halpin @ 2008-03-14 16:58 UTC (permalink / raw)
  To: help-gnu-emacs

Try M-| , which is shell-command-on-region 

With a prefix argument it replaces the region with the result: mark a
section of text, and do C-u M-| wc RET and see what happens. 

Brendan
-- 
Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
mailto:brendan.halpin@ul.ie  http://www.ul.ie/sociology/brendan.halpin.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Sending marked text to external program?
  2008-03-14 16:00 Sending marked text to external program? Uwe Scholz
  2008-03-14 16:58 ` Brendan Halpin
@ 2008-03-14 17:13 ` Giorgos Keramidas
  2008-03-19  1:00 ` Xavier Maillard
  2 siblings, 0 replies; 4+ messages in thread
From: Giorgos Keramidas @ 2008-03-14 17:13 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, 14 Mar 2008 17:00:10 +0100, Uwe Scholz <nurfuernews@web.de> wrote:
> Hello all!
>
> I wondered if it is possible to mark a peace of text or a hole line end
> send it to an external programm, for example "boxes", and include the
> output in the active buffer (or maybe a new one).
>
> Is this possible? If yes, how? Does a shortcut exist for this task?

`C-u M-|' runs `shell-command-on-region'.

If you use M-| without a prefix argument, it shows the output of the
external filter command in a new buffer.  If you run `C-u M-|', then the
output of the filter command replaces the region in the current buffer.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Sending marked text to external program?
  2008-03-14 16:00 Sending marked text to external program? Uwe Scholz
  2008-03-14 16:58 ` Brendan Halpin
  2008-03-14 17:13 ` Giorgos Keramidas
@ 2008-03-19  1:00 ` Xavier Maillard
  2 siblings, 0 replies; 4+ messages in thread
From: Xavier Maillard @ 2008-03-19  1:00 UTC (permalink / raw)
  To: Uwe Scholz; +Cc: help-gnu-emacs


   Is this possible? If yes, how? Does a shortcut exist for this task?

I won't comment on the other solutions but if you are interested
in doing this sort of thing very frequently, I recommend you to
have a look on eev-mode which does this and more.

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-19  1:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 16:00 Sending marked text to external program? Uwe Scholz
2008-03-14 16:58 ` Brendan Halpin
2008-03-14 17:13 ` Giorgos Keramidas
2008-03-19  1:00 ` Xavier Maillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).