We have tried searching the forum for any similar posts, but had no
success. Any suggestions would be greatly appreciated.
Thanks,
Steven
--
View this message in context: http://www.nabble.com/What-is-the-best-way-to-signal-the-completion-of-a-task--tp24289865p24289865.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
> I am part of a group who are writing some software that will be
> compatible with Emacs. Initially, the software is expected to be slow,
> and the user may wish to go and do something else. Currently, there
> are situations where there are no visible signs that the task has been
> completed. It is in these circumstances that we are unsure of the best
> way to notify the user that the task has been completed. We are
> looking for something simple and that will not annoy the user if they
> away doing other things.
>
> We have tried searching the forum for any similar posts, but had no
> success. Any suggestions would be greatly appreciated.
It would depend on how slow your software is.
If it takes days or weeks to complete, then it would be best if it ran
in background and offered some way to connect to it (eg. a socket),
and query its advancement and when done, its results.
Then you may write an emacs task that could connect to the background
task every five minutes or half an hour, query the advancement, and
display a percentage or a progress bar in the mode line.
When it's done, the user could invoke an emacs command to fetch the
results.
This mode of work would allow the user to close her emacs session, or
even log out, and connect a few days later to see how advanced your
process is.
If it takes only a few minutes, then you could use an emacs process
(eg. with comint), to launch the computing process, and expect the
results. If you want, your computing process could output percentages
of advancement before outputing the results, and you would write an
emacs process filter to display the advancement as you like.
--
__Pascal Bourguignon__
If the task is an asynchronous Emacs subprocess, then a sentinel is the
way to go. If the task is an operating system process, then you
probably need to use the file system to communicate its status to Emacs,
which can use a timer to check for the change.
--
Kevin Rodgers
Denver, Colorado, USA
I think you will have to describe a bit more how the software interact
with Emacs.
Hope this helps,
Steven
Steven Shiells wrote:
>
> I am part of a group who are writing some software that will be
> compatible with Emacs. Initially, the software is expected to be slow,
> and the user may wish to go and do something else. Currently, there
> are situations where there are no visible signs that the task has been
> completed. It is in these circumstances that we are unsure of the best
> way to notify the user that the task has been completed. We are
> looking for something simple and that will not annoy the user if they
> away doing other things.
>
> We have tried searching the forum for any similar posts, but had no
> success. Any suggestions would be greatly appreciated.
>
> Thanks,
>
> Steven
>
--
View this message in context: http://www.nabble.com/What-is-the-best-way-to-signal-the-completion-of-a-task--tp24289865p24292118.html
This sounds more or less like what flymake does. Maybe you should look
at how flymake does it and borrow some ideas there?
HTH,
Anselm
--
Anselm Helbig
mailto:anselm.helb...@googlemail.com