From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: postponing todos Date: Tue, 21 Aug 2007 12:19:39 +0200 Message-ID: References: <878x8osm96.fsf@freemail.hu> <2151c7f8a47e69a374e5edbed368e83d@science.uva.nl> <87absyw3dt.fsf_-_@freemail.hu> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1INQpt-00084w-2l for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:19:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1INQpq-00084O-UI for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:19:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INQpp-000844-MQ for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:19:42 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1INQpp-0002C3-6A for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:19:41 -0400 In-Reply-To: <87absyw3dt.fsf_-_@freemail.hu> 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: ignotus@freemail.hu Cc: emacs-orgmode@gnu.org On Aug 11, 2007, at 16:29, ignotus@freemail.hu wrote: >>>>>> Regarding 'Re: [Orgmode] postponing todos'; Carsten Dominik adds: > > >>> I would like to have a solution for the following problem: I browse >>> TODOs in my agenda view and I would like to postpone them, so >>> agenda buffers don't list them until a certain date. [....] > >> This is what scheduling is for, and then you use the daily/weekly >> agenda instead of the todo list to see those entries. To schedule, >> [....] > > Dear Carsten, your reply was as always most helpful and full of > information, thanks. However that is not good for me. I use > org-tags-view all the time, because that way only those tasks get > listed > that I can actually do (based on context). I would like to have an > option, that when turned on means that org-tags-view lists all the > TODOs > that aren't scheduled in the future. This can be achieved, as has been shown by you and by Bastien, using special user-defined commands. Another option, maybe simpler, is to use the local options in agenda custom commands to insert a function into `org-agenda-skip-function'. For example, I can write this function: (defun org-agenda-skip-if-scheduled () "Function that can be used in `org-agenda-skip-function', to skip entries that have been scheduled." (let (beg end) (org-back-to-heading t) (setq beg (point)) ; beginning of headline (outline-next-heading) (setq end (point)) ; end of entry below heading (goto-char beg) (if (re-search-forward org-scheduled-time-regexp end t) end ; skip, and continue search after END nil ; Don't skip, use this entry. ))) and then define a custom command like this: (setq org-agenda-custom-commands '(("b" tags "@SHOP" ((org-agenda-skip-function org-agenda-skip-if-scheduled))))) org-agenda-skip-function should *never* be set with `setq' or so, but you can use the options field in custom commands to temporarily assign a value. The next version will have two functions, org-agenda-skip-if-scheduled and org-agenda-skip-if-scheduled-or-deadline built-in, so it will be easier to find entries that have no deadline and/or have not been scheduled. For your specific application, I guess you also have to look at the timestamp and see if it is in the future. Having seen your other lisp code, I guess you can do this yourself. Hope this helps. - Carsten