From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeff Clough Newsgroups: gmane.emacs.help Subject: Re: elisp: `quit-process' and `sleep-for' Date: Tue, 24 Aug 2010 14:02:14 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291949167 19716 80.91.229.12 (10 Dec 2010 02:46:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 02:46:07 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 03:45:59 2010 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.69) (envelope-from ) id 1PQszf-0000r0-NS for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 03:45:59 +0100 Original-Received: from localhost ([127.0.0.1]:51635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQsze-0000MC-RZ for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 21:45:58 -0500 Original-Path: usenet.stanford.edu!newsfeed.esat.net!feeder.news.heanet.ie!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Injection-Date: Tue, 24 Aug 2010 18:02:16 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="VDM3607lx+ft0F522riMcQ"; logging-data="29770"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19p2TIQ9Djw3mFziOzwLbCW" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:XKD9tSNJNqdU9reS8w9p2qStb2A= sha1:DtJxnJa/P0QfYg8rZVnXvl3h66Y= Original-Xref: usenet.stanford.edu gnu.emacs.help:180934 X-Mailman-Approved-At: Thu, 09 Dec 2010 20:09:08 -0500 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:77222 Archived-At: Memnon Anon writes: > Hi, > > I am having trouble with this function: > > (defun set_timer (rtcopt value) > ; [...] > > (start-process "alarmclock-mp3" nil "/usr/bin/mplayer" "-quiet" music) > > (while (y-or-n-p "Snooze?") > (when (get-process "alarmclock-mp3") > (quit-process "alarmclock-mp3") > ; (debug) > (sleep-for 100000) > (sleep-for 5)) > (start-process "alarmclock-mp3" nil "/usr/bin/mplayer" "-quiet" music)) > (kill-emacs)) As a point of comparison, does this work as intended if you use delete-process instead of quit-process? Jeff