From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: tea-time? Date: Fri, 17 Jul 2009 09:24:00 +0200 Message-ID: <8763drn567.fsf@bzg.ath.cx> References: <871vpr6ky5.fsf@online.de> <87ab4f6ja9.fsf@kassiopeya.MSHEIMNETZ> <20524da70907162056h22637e0byee429770336b73de@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRhnl-0003Nq-Dg for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 03:24:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRhng-0003NZ-Od for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 03:24:16 -0400 Received: from [199.232.76.173] (port=59528 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRhng-0003NW-Lm for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 03:24:12 -0400 Received: from mx20.gnu.org ([199.232.41.8]:46099) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MRhng-0007sN-49 for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 03:24:12 -0400 Received: from wf-out-1314.google.com ([209.85.200.171]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRhnf-0000b9-Bb for emacs-orgmode@gnu.org; Fri, 17 Jul 2009 03:24:11 -0400 Received: by wf-out-1314.google.com with SMTP id 23so210219wfg.24 for ; Fri, 17 Jul 2009 00:24:10 -0700 (PDT) In-Reply-To: <20524da70907162056h22637e0byee429770336b73de@mail.gmail.com> (Samuel Wales's message of "Thu, 16 Jul 2009 20:56:06 -0700") 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: Samuel Wales Cc: emacs-orgmode@gnu.org, henry atting Samuel Wales writes: > It is said that tea-time.el is integrated into org, but I have not > found it in the manual or in customize yet, at least not in a direct > way. AFAIK what was implemented so far is a way to display the clocking time against the effort estimate. > My understanding is that tea-time is something that tells you X, Y > minutes from now. If you have an effort estimate, this is what it does in the modeline: it tells you that your running clock is 9 minute and that the effort is one hour. > If it was integrated into org, that suggests to me that I can tell org > that I have to do something in one hour from now, and org will somehow > notify me. With an effort estimate already in place, this is what it does. And when you reach the amount of estimated effort, you get a warning. > It also suggests the possibility that the modeline will count down > just as it currently counts up in the clock. > > But aside from a series of steps, such as create a task, set a time, > run org-agenda-to-appt, or some type of steps involving effort > estimates that I have not investigated yet, I don't know how to tell > org to tell me X in Y minutes. The steps are these: - create a task - add an effort estimate - clock in Let me know if this needs to be refined. > Is there a way to tell org, "say X in Y minutes"? If not, what are > the relative merits of appt-add and tea-time and the series of steps? What I find not practical in the current set up is that you have to set an effort estimate *manually* in order to get something like tea-time provides. I added a new hook on the repo: org-clock-in-prepare-hook which makes it easy to modify the task effort property. Examples: --8<---------------cut here---------------start------------->8--- ;; Using this hook will set a default effort estimate of 1:00 ;; to each task you clock in and has no effort property. (add-hook 'org-clock-in-prepare-hook 'my-org-mode-add-default-effort) (defvar org-clock-default-effort "1:00") (defun my-org-mode-add-default-effort () "Add a default effort estimation." (unless (org-entry-get (point) "Effort") (org-set-property "Effort" org-clock-default-effort))) --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- ;;; Using this hook will let the user (add-hook 'org-clock-in-prepare-hook 'my-org-mode-ask-effort) (defun my-org-mode-ask-effort () "Ask for an effort estimate when clocking in." (unless (org-entry-get (point) "Effort") (let ((effort (completing-read "Effort: " (org-entry-get-multivalued-property (point) "Effort")))) (unless (equal effort "") (org-set-property "Effort" effort))))) --8<---------------cut here---------------end--------------->8--- I have pushed this example to org-hacks.org on Worg. HTH, -- Bastien