From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: How to pause the relative timer Date: Thu, 8 Jan 2009 12:20:25 +0100 Message-ID: <46CB5C00-5214-4D42-8A17-23443EE9501A@uva.nl> References: <7bef1f890901040630r333dc928r547d77a195f2dc34@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKswB-0005pV-VI for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:20:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKsw9-0005nl-ON for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:20:31 -0500 Received: from [199.232.76.173] (port=34413 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKsw9-0005nG-9J for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:20:29 -0500 Received: from ug-out-1314.google.com ([66.249.92.173]:25799) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LKsw8-0006H1-R3 for emacs-orgmode@gnu.org; Thu, 08 Jan 2009 06:20:29 -0500 Received: by ug-out-1314.google.com with SMTP id 36so2360978uga.17 for ; Thu, 08 Jan 2009 03:20:27 -0800 (PST) In-Reply-To: <7bef1f890901040630r333dc928r547d77a195f2dc34@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Alan E. Davis" Cc: emacs-orgmode Mailinglist Hi Alan, pausing and continuing the timer is now in the latest git release. The command is `C-c C-x ,', fir both actions. ALso, the running timer is now shown in the mode line, use `C-u C-c C-x ,' to really stop the timer and to remove te display in the mode line. - Carsten On Jan 4, 2009, at 3:30 PM, Alan E. Davis wrote: > I jumped into some elisp, and eventually I might get it, but while I > think I'm close, my vacation is over, and I'm going to call "uncle". > > Here is some crummy code I started putting together to try to pause > the relative timer in org-timer.el. Can someone give me a nudge, > and suggest what's wrong? (Lot's, I'll wager!). I get the message > "time-to-seconds: Symbol's function definition is void: org-pause- > timer-time" when running org-aed-pause-timer-start after setting > with org-aed-pause-timer-pause. I'll bet there are better ways to > do this. I'll figure it out when I have time. > > > -------------------%-------------- > (defvar org-pause-timer-time nil > "t=X for stopped timer.") > > (defun org-aed-pause-timer-pause () > "Set the time at pause to a variable for later recovery > in org-aed-pause-timer-start" > (interactive) > (let (org-pause-timer-time (current-time)))) > > (defun org-aed-pause-timer-start () > "Recover pause start time, do the math, and restart at the new time" > (interactive) > (insert (format > org-timer-format > (org-timer-secs-to-hms > (floor > (- (time-to-seconds (current-time)) > (time-to-seconds (org-pause-timer-time)))))))) > ----------------------------X------------ > > > I have a plan, beyond the mere and obvious utility of being able to > pause the timer. With some help, I've burgled some code and gotten > a function to start vlc asynchronously on a video file from dired. > Eventually, I want to figure out how to pause the vlc process, and > pause the org-mode timer at the same time. > > It just occurred to me, however, that it would be even more > interesting to pause the video player and org-mode's timer would put > the pause time into the buffer, to accept a note. Hmmm... FOr that > I have to figure out how to remotely pause vlc and restart. Of > course, this kind of project could easily get out of hand. I'm > afraid it's beyond my programming ability, but it's already > interesting. > > Frivolous? If anyone wants to look at the "dired-vlc.el" code, I'll > send it, but I would think it's beyond this list's boundaries of > interest (if that's possible). > > Thanks for Org-mode, and thanks for being patient. > > Alan > > -- > Alan Davis > > "It's never a matter of liking or disliking ..." > ---Santa Ynez Chumash Medicine Man > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode