From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: What is the best way to signal the completion of a task? Date: Wed, 01 Jul 2009 17:03:21 +0200 Organization: Anevia SAS Message-ID: <7c3a9gigxy.fsf@pbourguignon.anevia.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246508197 21507 80.91.229.12 (2 Jul 2009 04:16:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Jul 2009 04:16:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 02 06:16:31 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MMDia-0007z2-Ge for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Jul 2009 06:16:16 +0200 Original-Received: from localhost ([127.0.0.1]:41082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MMDiZ-0000JE-Rt for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Jul 2009 00:16:15 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-a.proxad.net!nnrp16-1.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:jWgzLzlpLk5ngKHWZ5Be18e8yI4= Original-Lines: 45 Original-NNTP-Posting-Date: 01 Jul 2009 17:03:21 MEST Original-NNTP-Posting-Host: 88.170.236.224 Original-X-Trace: 1246460601 news-2.free.fr 16768 88.170.236.224:53618 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:170499 X-Mailman-Approved-At: Thu, 02 Jul 2009 00:15:34 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65718 Archived-At: Steven Shiells 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__