all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Spawning autonomous shell commands
@ 2012-09-27 21:00 Hilary
  2012-09-28  7:06 ` Eli Zaretskii
       [not found] ` <mailman.9895.1348816018.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Hilary @ 2012-09-27 21:00 UTC (permalink / raw)
  To: help-gnu-emacs

This may be partly a windoze question. I use this on a windoze box:

(defun espeak-region ()
   "Send the region to espeak"
   (interactive)
   (shell-command-on-region (region-beginning) (region-end) "espeak -v 
mb-en1 -p 50 -s 150 --stdin ")
   )

It works, but it locks up emacs until espeak has finished reading the 
text. Is there a way of spawning espeak as an autonomous process which 
can finish in its own time?

-- 
Hilary S


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

* Re: Spawning autonomous shell commands
  2012-09-27 21:00 Spawning autonomous shell commands Hilary
@ 2012-09-28  7:06 ` Eli Zaretskii
       [not found] ` <mailman.9895.1348816018.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2012-09-28  7:06 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hilary <hils@newearth.demon.co.uk.invalid>
> Date: Thu, 27 Sep 2012 22:00:59 +0100
> 
> This may be partly a windoze question. I use this on a windoze box:
> 
> (defun espeak-region ()
>    "Send the region to espeak"
>    (interactive)
>    (shell-command-on-region (region-beginning) (region-end) "espeak -v 
> mb-en1 -p 50 -s 150 --stdin ")
>    )
> 
> It works, but it locks up emacs until espeak has finished reading the 
> text. Is there a way of spawning espeak as an autonomous process which 
> can finish in its own time?

See 'start-process' and 'process-send-region'.



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

* Re: Spawning autonomous shell commands
       [not found] ` <mailman.9895.1348816018.855.help-gnu-emacs@gnu.org>
@ 2012-09-28 17:49   ` Hilary
  2012-09-28 19:17     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Hilary @ 2012-09-28 17:49 UTC (permalink / raw)
  To: help-gnu-emacs

On 2012-09-28 08:06, Eli Zaretskii wrote:
>> From: Hilary <hils@newearth.demon.co.uk.invalid>
>> Date: Thu, 27 Sep 2012 22:00:59 +0100
>>
>> This may be partly a windoze question. I use this on a windoze box:
>>
>> (defun espeak-region ()
>>     "Send the region to espeak"
>>     (interactive)
>>     (shell-command-on-region (region-beginning) (region-end) "espeak -v
>> mb-en1 -p 50 -s 150 --stdin ")
>>     )
>>
>> It works, but it locks up emacs until espeak has finished reading the
>> text. Is there a way of spawning espeak as an autonomous process which
>> can finish in its own time?
>
> See 'start-process' and 'process-send-region'.

Thanks for the suggestion. It looks as though those aren't implemented 
in the windoze port, but async-shell-command is. Presumably it's 
possible to make up an async-shell-command-on-region function from the 
relevent parts of simple.el.

-- 
Hilary S


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

* Re: Spawning autonomous shell commands
  2012-09-28 17:49   ` Hilary
@ 2012-09-28 19:17     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2012-09-28 19:17 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hilary <hils@newearth.demon.co.uk.invalid>
> Date: Fri, 28 Sep 2012 18:49:19 +0100
> 
> > See 'start-process' and 'process-send-region'.
> 
> Thanks for the suggestion. It looks as though those aren't implemented 
> in the windoze port

Of course, they are.  What made you think they aren't?

> but async-shell-command is. Presumably it's possible to make up an
> async-shell-command-on-region function from the relevent parts of
> simple.el.

Yes, that's another way to go.



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

end of thread, other threads:[~2012-09-28 19:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 21:00 Spawning autonomous shell commands Hilary
2012-09-28  7:06 ` Eli Zaretskii
     [not found] ` <mailman.9895.1348816018.855.help-gnu-emacs@gnu.org>
2012-09-28 17:49   ` Hilary
2012-09-28 19:17     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.