From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Mikhanosha Subject: Re: PATCH: include in-progress/started todos into daily agenda Date: Tue, 09 Oct 2007 15:18:55 -0400 Message-ID: <87lkacdrkw.wl%max@openchat.com> References: <87sl51dud4.wl%max@openchat.com> <55d1318f6088fa078680ae83a1dfe0ee@science.uva.nl> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfKbf-0000WV-1U for emacs-orgmode@gnu.org; Tue, 09 Oct 2007 15:19:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfKbZ-0000Vq-TI for emacs-orgmode@gnu.org; Tue, 09 Oct 2007 15:19:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfKbZ-0000Vk-NW for emacs-orgmode@gnu.org; Tue, 09 Oct 2007 15:18:57 -0400 Received: from p84-72.acedsl.com ([66.114.84.72] helo=momoland.openchat.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IfKbZ-0002Ka-6m for emacs-orgmode@gnu.org; Tue, 09 Oct 2007 15:18:57 -0400 In-Reply-To: <55d1318f6088fa078680ae83a1dfe0ee@science.uva.nl> 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: Carsten Dominik Cc: emacs-orgmode@gnu.org Hi Dominik, Carsten Dominik wrote: > > In 5.12 there will be a new variable `org-agenda-scheduled-leaders' that > determines the leading string of a scheduled item in the agenda display. > > If you customize > > (setq org-agenda-scheduled-leaders '("Start: " "Cont: ")) > > then your INPROGRESS item will look like this: > > Work: Start: TODO This task is scheduled for today > Work: Cont: INPROGRESS task was scheduled in past, not DONE. > > Maybe less distressing than Sched: 15x ? The above will probably work for me, I have to try it for a few days. To me the INPROGRESS thing is also about efficiency, as if I lets say have to put something aside, I just flip it back into TODO state with 1 t from agenda, but if I have it scheduled, to unschedule it I have to go to the item and remove the SCHEDULED line. Someone recently asked on a list for a command to unschedule a TODO, I would like to join this request. > Many thanks for your input, great that you produced a patch, sorry > for not using it. Its no problem, I'm posting posting patches mostly to generate discussion / give back to the "google it first" community (ppl who solve most of their problems by googling it and finding someone already posted a fix/patch/idea for it on some mailing list). Regards, Max > On Sep 26, 2007, at 22:50, Max Mikhanosha wrote: > > > I had always used the day/weekly/mothly agenda vs the searchable > > agenda separately and sometimes missed things because they were in one > > list but not another. For example when looking into a tags based > > agenda for :computer, I may have missed some other item that was > > scheduled for today but not tagged with computer, and via versa. > > > > The method described in the post titled "Not using GTD" post, where > > only the daily agenda is the primary agenda used solves this problem, > > but I don't like to schedule/reschedule my items all the time. > > > > So inspired by the "Not using GTD" post, proposed patch allows > > specifying a TODO type that would always be included into daily > > agenda on a current day, as if it was scheduled. > > > > So one can just mark items that need to be worked on doing the day as > > lets say "INPROGRESS" and they would stay in the daily agenda > > alongside/intermixed with the items scheduled for today until you > > close them. If you like to postpone the item, you put it as TODO > > again, and it would disappear. > > > > Proposed patch is as plain text below, feel free to rewrite/change > > as the method I've used may not have been optimal. > > > > Regards, > > Max > > > > diff -rp -x '*.orig' -x '*.elc' -x '*~' org-5.10a.orig/org.el > > org-5.10a/org.el > > *** org-5.10a.orig/org.el Wed Sep 26 13:33:20 2007 > > --- org-5.10a/org.el Wed Sep 26 16:33:52 2007 > > *************** When nil, only the days which actually h > > *** 2323,2328 **** > > --- 2323,2342 ---- > > :group 'org-agenda-daily/weekly > > :type 'boolean) > > > > + (defcustom org-agenda-show-inprogress-todos nil > > + "Non-nil means, include the TODO's of the type specified by > > + `org-inprogress-todos' into the daily agenda." > > + :group 'org-agenda-daily/weekly > > + :type 'boolean) > > + > > + (defcustom org-inprogress-todos "INPROGRESS" > > + "Specifies TODO type that would be automatically included into > > + the daily agenda when `org-agenda-show-inprogress-todos' is set. > > + You can specify more then one value separating them with |, for > > + example INPROGRESS|STARTED" > > + :group 'org-agenda-daily/weekly > > + :type 'string) > > + > > (defcustom org-agenda-format-date 'org-agenda-format-date-aligned > > "Format string for displaying dates in the agenda. > > Used by the daily/weekly agenda and by the timeline. This should be > > *************** NDAYS defaults to `org-agenda-ndays'." > > *** 18056,18062 **** > > (- sd (+ (if (< d 0) 7 0) d))))) > > (day-numbers (list start)) > > (inhibit-redisplay (not debug-on-error)) > > ! s e rtn rtnall file date d start-pos end-pos todayp nd) > > (setq org-agenda-redo-command > > (list 'org-agenda-list (list 'quote include-all) start-day ndays)) > > ;; Make the list of days > > --- 18070,18077 ---- > > (- sd (+ (if (< d 0) 7 0) d))))) > > (day-numbers (list start)) > > (inhibit-redisplay (not debug-on-error)) > > ! s e rtn rtnall file date d start-pos end-pos todayp nd > > ! args) > > (setq org-agenda-redo-command > > (list 'org-agenda-list (list 'quote include-all) start-day ndays)) > > ;; Make the list of days > > *************** NDAYS defaults to `org-agenda-ndays'." > > *** 18102,18117 **** > > (setq end-pos (point)))) > > (setq files thefiles > > rtnall nil) > > (while (setq file (pop files)) > > (catch 'nextfile > > (org-check-agenda-file file) > > ! (if org-agenda-show-log > > ! (setq rtn (org-agenda-get-day-entries > > ! file date > > ! :deadline :scheduled :timestamp :sexp :closed)) > > ! (setq rtn (org-agenda-get-day-entries > > ! file date > > ! :deadline :scheduled :sexp :timestamp))) > > (setq rtnall (append rtnall rtn)))) > > (if org-agenda-include-diary > > (progn > > --- 18117,18132 ---- > > (setq end-pos (point)))) > > (setq files thefiles > > rtnall nil) > > + (setq args '(:deadline :scheduled :timestamp :sexp)) > > + (when org-agenda-show-log > > + (push :closed args)) > > + (when org-agenda-show-inprogress-todos > > + (push :inprogress args)) > > (while (setq file (pop files)) > > (catch 'nextfile > > (org-check-agenda-file file) > > ! (setq rtn (apply 'org-agenda-get-day-entries > > ! file date args)) > > (setq rtnall (append rtnall rtn)))) > > (if org-agenda-include-diary > > (progn > > *************** the documentation of `org-diary'." > > *** 18606,18611 **** > > --- 18621,18632 ---- > > ;; The way we repeatedly append to `results' makes it O(n^2) > > :-( > > (while (setq arg (pop args)) > > (cond > > + ((and (eq arg :inprogress) > > + (equal date (calendar-current-date))) > > + (let ((org-select-this-todo-keyword > > + org-inprogress-todos)) > > + (setq rtn (org-agenda-get-todos)) > > + (setq results (append results rtn)))) > > ((and (eq arg :todo) > > (equal date (calendar-current-date))) > > (setq rtn (org-agenda-get-todos)) > > > > > > _______________________________________________ > > 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 > > > > > > -- > Carsten Dominik > Sterrenkundig Instituut "Anton Pannekoek" > Universiteit van Amsterdam > Kruislaan 403 > NL-1098SJ Amsterdam > phone: +31 20 525 7477 >