From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: Using the agenda to calculate how much work I have scheduled Date: Thu, 15 Jan 2009 22:38:50 +0530 Message-ID: References: <20090115025608.GA11407@owl.prv.maya.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNViC-0004Oq-Nx for emacs-orgmode@gnu.org; Thu, 15 Jan 2009 12:08:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNViA-0004N1-Bv for emacs-orgmode@gnu.org; Thu, 15 Jan 2009 12:08:56 -0500 Received: from [199.232.76.173] (port=56060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNViA-0004Mw-2D for emacs-orgmode@gnu.org; Thu, 15 Jan 2009 12:08:54 -0500 Received: from ti-out-0910.google.com ([209.85.142.191]:18413) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LNVi9-0000it-Aj for emacs-orgmode@gnu.org; Thu, 15 Jan 2009 12:08:53 -0500 Received: by ti-out-0910.google.com with SMTP id u5so719206tia.10 for ; Thu, 15 Jan 2009 09:08:51 -0800 (PST) In-Reply-To: <20090115025608.GA11407@owl.prv.maya.com> Content-Disposition: inline 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: Christopher DeMarco Cc: emacs-orgmode@gnu.org On Thu, Jan 15, 2009 at 8:26 AM, Christopher DeMarco wrote: > I want to have a realistic expectation of what I can accomplish in a > day. So I want each TODO to have a time estimate of how long I think > it will take, and for the agenda to add them all up and tell me how > terrible my day is going to be. > > First attempt: I found wonderful code on Sacha Chua's blog[1] which > does this, but org-agenda-get-day-entries seems to return *all* "TODO" > entries -- but I want to limit to entries which have only one state > ("TODO", not "WAITING" or "DONE"). Is that possible? > > Is there a better way of doing this, with my limited Lisp? I have > looked at the Effort property, but I can't see how to use that from > within an agenda view -- and the ability to know "what time it is > now", and to therefore know how I fare in my daily plan, is important > to me. You can blame me for the lack of a tutorial/article on this topic since this has been pending on me for quite a while now. But that does not answer your question, so let me just attempt to get you going in right direction. 1. Define effort_all global property like below. You can define the time periods for your requirements. ,----[ Effort_ALL property ] | (setq org-global-properties (quote (("Effort_ALL" . "00:00 00:10 00:20 00:30 01:00 01:30 02:00 02:30 03:00 04:00 05:00 06:00 07:00 08:00")))) `---- 2. Define the column format for column view like below. You can add more columns like TODO keyword, CATEGORY, DEADLINE etc. as well. ,----[ Column view format ] | (setq org-columns-default-format "%60ITEM(Task) %5Effort(Estim){:} %5CLOCKSUM(Clock)) `---- 3. Add some tasks to an org file. (No need to add any effort estimates at this time, though you may want to add tags.) ,----[ todo.org ] | * Big task | *** Phase 1 | ***** Task 1.1 | ***** Task 1.2 | ***** Task 1.3 | *** Phase 2 | ***** Task 2.1 | ***** Task 2.2 `---- 4. While in todo.org, switch to column view with C-c C-x C-c. It changes to a table/matrix like view. Now navigate to Estim column. You can fill the effort estimate now by cycling through the effort estimate values defined in org-global-properties. Adding effort estimate this way will add a property named "Effort" automagically to the task. The effort will be summed at each level automatically up to the highest level. You can exit the column view by pressing a "q". 6. Once you are done estimatinig efforts, you can start scheduling/deadlining tasks. Now to what you've been really waiting for :). Go to the agenda for the day by "C-c a a" as usual and switch to column view with "C-c C-x C-c" and you should see the efforts for each task *and* total effort scheduled for each day (e.g. for weekly view.) You may want to configure these additional variables to your taste: 1. org-agenda-columns-add-appointments-to-effort-sum 2. org-agenda-sorting-strategy Now you can choose to reschedule/reestimate tasks as you see fit. You can easily reschedule tasks from the column view itself by S-/ /if/ you add "%SCHEDULED(Time) %DEADLINE" also to org-columns-default-format. Note that the effects of change in SCHEDULED or DEADLINE is not reflected immediately unlike changes in the effort (you can refresh the view by pressing "g" in the column view.). Hope this gives you some ideas if not exactly what you were looking for. -- Manish Life is beautiful.* * Conditions apply.