[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous commands with eshell-command

From: Thierry Volpiatto
Subject: Re: Asynchronous commands with eshell-command
Date: Tue, 27 Jan 2009 20:51:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Sebastian Tennant <address@hidden> writes:

> Quoth Thierry Volpiatto <address@hidden>:
>> Sebastian Tennant <address@hidden> writes:
>>> Quoth Michael Heerdegen <address@hidden>:
>>>> Does anybody know how to start external commands asynchronously with
>>>> `eshell-command'? I tried `xterm &' for example, which works but also
>>>> raises an error.
>>>> The source code seems to support the asynchronous case, but I don't
>>>> know what to type.
>>> Where's Thierry Volpiatto when you need him :)
>> I am here again!
> Great :)
>> But i am not a specialist of eshell, just a user that use always
>> eshell-command instead of shell-command (M-!) because it's much more
>> powerful: It accept elisp code, shell code, the both mixed, alias, all
>> completion and more.
> The fact it is so powerful is what puts me off.  I can sees days, and
> even weeks, disappearing as I get more and more into it :)
>> But if you want to make more complex async commands, why not creating
>> a specialized function using start-process/start-process-shell-command
>> with another sentinel-function that use set-process-sentinel ?
> Hmm... like interactive-asynchronous-shell-command? :)

Yes i saw you wrote something about async shell-command ;)
I will have a look.

> I suspect Michael knows all about these kinds of methods and is being a
> little braver than I am in starting to explore the capabilities of
> eshell.

Some simple thing like that can call any external process async:

| (defun tv-async-process (process &rest args)
|   (apply #'start-process process nil process
|          args))

==> (tv-async-process "xterm" "-e" "lynx")
#<process xterm>


==> (tv-async-process "firefox" "";)
#<process firefox>

A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France

reply via email to

[Prev in Thread] Current Thread [Next in Thread]