[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: postponing todos

From: Carsten Dominik
Subject: Re: [Orgmode] Re: postponing todos
Date: Tue, 21 Aug 2007 12:43:59 +0200

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, address@hidden 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
    (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
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

Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

reply via email to

[Prev in Thread] Current Thread [Next in Thread]