Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

0 views
Skip to first unread message

Steven Shiells

unread,
Jul 1, 2009, 9:32:51 AM7/1/09
to Help-gn...@gnu.org

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--tp24289865p24289865.html
Sent from the Emacs - Help mailing list archive at Nabble.com.

Pascal J. Bourguignon

unread,
Jul 1, 2009, 11:03:21 AM7/1/09
to
Steven Shiells <ss...@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__

Kevin Rodgers

unread,
Jul 1, 2009, 10:31:09 PM7/1/09
to help-gn...@gnu.org
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.

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

Lennart Borgman

unread,
Jul 1, 2009, 11:26:33 AM7/1/09
to Steven Shiells, Help-gn...@gnu.org
On Wed, Jul 1, 2009 at 3:32 PM, Steven Shiells<ss...@hw.ac.uk> 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.


I think you will have to describe a bit more how the software interact
with Emacs.


Steven Shiells

unread,
Jul 1, 2009, 11:45:43 AM7/1/09
to Help-gn...@gnu.org

More info about the software -- The software takes a source file, performs
some functions on the source file and in some cases highlights sections of
the source file, and others times does nothing. The case we are worried
about is when there is no highlighting to be carried out.

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

Anselm Helbig

unread,
Jul 2, 2009, 2:01:18 AM7/2/09
to
At Wed, 1 Jul 2009 08:45:43 -0700 (PDT),

Steven Shiells <ss...@hw.ac.uk> wrote:
>
>
> More info about the software -- The software takes a source file, performs
> some functions on the source file and in some cases highlights sections of
> the source file, and others times does nothing. The case we are worried
> about is when there is no highlighting to be carried out.

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

0 new messages