From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard KLINDA Subject: Re: Re: how to do this org-agenda command? Date: Sat, 07 Feb 2009 15:31:07 +0100 Message-ID: <87hc36qpxw.fsf@gmail.com> References: <87fxir55ud.fsf@gmail.com> <87zlgyqwra.fsf@gmail.com> <87vdrmque7.fsf@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 1LVoFY-00024H-4x for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 09:33:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVoFW-00021X-DU for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 09:33:39 -0500 Received: from [199.232.76.173] (port=56603 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVoFW-00021K-4A for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 09:33:38 -0500 Received: from viefep18-int.chello.at ([62.179.121.38]:52486) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LVoFV-0006zc-Ir for emacs-orgmode@gnu.org; Sat, 07 Feb 2009 09:33:37 -0500 Received: from edge02.upc.biz ([192.168.13.237]) by viefep18-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20090207143334.NOOZ16852.viefep18-int.chello.at@edge02.upc.biz> for ; Sat, 7 Feb 2009 15:33:34 +0100 Received: from ignotus by localhost with local (masqmail 0.2.21) id 1LVoD5-8Bt-00 for ; Sat, 07 Feb 2009 15:31:07 +0100 In-Reply-To: (Manish's message of "Sat, 7 Feb 2009 18:43:15 +0530") 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: emacs-orgmode@gnu.org >>>>> Regarding 'Re: [Orgmode] Re: how to do this org-agenda command?'; Manish adds: > How about switching the TODO state when you clock in to a task and > adding a block to the custom agenda to inlude tasks with that state? > --8<---------------cut here---------------start------------->8--- > (setq org-clock-in-switch-to-state "STARTED") > --8<---------------cut here---------------end--------------->8--- Thanks, in the end I wrote a hackish org-agenda-skip-function for my needs. Thank you for your input. ,---- | (defun rk-org-agenda-skip-not-interesting () | "Skip not interesting TODO entries, only keep: | - [#A] priority entries, | - scheduled for today entries, | - entries that are clocked in. | Ripped from org-agenda-skip-if function." | (let (beg end m) | (org-back-to-heading t) | (setq beg (point) | end (progn (outline-next-heading) (1- (point)))) | (goto-char beg) | (and (and | ;; CLOCKED IN entries | (not (save-excursion | (when (re-search-forward "^ +CLOCK: \\[.*?\\]$" end t) | (beginning-of-line) | (not (re-search-forward "--" (line-end-position) t)) | ))) | ;; PRIORITY [#A] entries | (not (save-excursion | (re-search-forward "\\[#A\\]" end t))) | ;; SCHEDULED FOR (TO)DAY entries | (not (save-excursion | (when (re-search-forward org-ts-regexp | end t) | (calendar-date-equal (org-date-to-gregorian | (time-to-days | (org-time-string-to-time (match-string 0)))) | date | ))))) | end))) `---- Usage example: ,---- | ... | (alltodo "" ((org-agenda-skip-function | 'rk-org-agenda-skip-not-interesting))) | ... `---- -- Richard