emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Alan E. Davis" <lngndvs@gmail.com>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: How to pause the relative timer
Date: Mon, 5 Jan 2009 00:30:58 +1000	[thread overview]
Message-ID: <7bef1f890901040630r333dc928r547d77a195f2dc34@mail.gmail.com> (raw)

[-- Attachment #1.1: Type: text/plain, Size: 2272 bytes --]

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

(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"
  (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"
  (insert (format
         (- (time-to-seconds (current-time))
        (time-to-seconds (org-pause-timer-time))))))))

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 Davis

"It's never a matter of liking or disliking ..."
      ---Santa Ynez Chumash Medicine Man

[-- Attachment #1.2: Type: text/html, Size: 2827 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.

             reply	other threads:[~2009-01-04 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04 14:30 Alan E. Davis [this message]
2009-01-05 11:23 ` How to pause the relative timer Alan E. Davis
2009-01-05 21:02   ` Carsten Dominik
2009-01-08 11:20 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7bef1f890901040630r333dc928r547d77a195f2dc34@mail.gmail.com \
    --to=lngndvs@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).