all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Asynchronous commands with eshell-command
Date: Tue, 27 Jan 2009 20:51:26 +0100	[thread overview]
Message-ID: <873af45xz5.fsf@tux.homenetwork> (raw)
In-Reply-To: eiyoefzq.fsf@vps203.linuxvps.org

Sebastian Tennant <sebyte@smolny.plus.com> writes:

> Quoth Thierry Volpiatto <thierry.volpiatto@gmail.com>:
>> Sebastian Tennant <sebyte@smolny.plus.com> writes:
>>
>>> Quoth Michael Heerdegen <michaelh@minet.uni-jena.de>:
>>>> 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.

>  http://article.gmane.org/gmane.emacs.sources/3147
>
> 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>

or

==> (tv-async-process "firefox" "http://www.emacswiki.org/cgi-bin/wiki")
#<process firefox>


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





  reply	other threads:[~2009-01-27 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26 19:39 Asynchronous commands with eshell-command Michael Heerdegen
2009-01-27 16:09 ` Sebastian Tennant
2009-01-27 16:40   ` Thierry Volpiatto
2009-01-27 18:55     ` Sebastian Tennant
2009-01-27 19:51       ` Thierry Volpiatto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-01-27 11:49 Nurullah Akkaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873af45xz5.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.