From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: postponing todos Date: Tue, 21 Aug 2007 12:43:59 +0200 Message-ID: <54364bf1d0a7b502a17e72aaebb6287f@science.uva.nl> 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 1INRDP-00028x-A8 for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:44:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1INRDO-00028i-Kb for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:44:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INRDO-00028f-Es for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:44:02 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1INRDO-0000n2-1h for emacs-orgmode@gnu.org; Tue, 21 Aug 2007 06:44:02 -0400 In-Reply-To: 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: ignotus@freemail.hu, emacs-orgmode@gnu.org My apologies, my previous post contains two errors. On Aug 21, 2007, at 12:19, Carsten Dominik wrote: > > 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 This must be "(1- end)" instead of "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-if-scheduled must be quoted, thus: (setq org-agenda-custom-commands '(("b" tags "@SHOP" ((org-agenda-skip-function 'org-agenda-skip-if-scheduled))))) - Carsten > > 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 > > > > _______________________________________________ > Emacs-orgmode mailing 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