help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: What is the best way to signal the completion of a task?


From: Pascal J. Bourguignon
Subject: Re: What is the best way to signal the completion of a task?
Date: Wed, 01 Jul 2009 17:03:21 +0200
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux)

Steven Shiells <ss215@hw.ac.uk> writes:

> 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__


reply via email to

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