emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: ignotus@freemail.hu, emacs-orgmode@gnu.org
Subject: Re: Re: postponing todos
Date: Tue, 21 Aug 2007 12:43:59 +0200	[thread overview]
Message-ID: <54364bf1d0a7b502a17e72aaebb6287f@science.uva.nl> (raw)
In-Reply-To: <fdfd0bf367bf3f35cc14c9679a447853@science.uva.nl>

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

  reply	other threads:[~2007-08-21 10:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 15:42 postponing todos ignotus
2007-08-06 23:18 ` Bastien
2007-08-07  0:56   ` Bastien
2007-08-07  8:41   ` ignotus
2007-08-07  1:47 ` Eddward DeVilla
2007-08-07  8:25   ` ignotus
2007-08-07 17:13     ` Bastien
2007-08-07 20:03     ` Christian Egli
2007-08-07 20:14 ` Christian Egli
2007-08-09  5:05 ` Carsten Dominik
2007-08-11 14:29   ` ignotus
2007-08-21 10:19     ` Carsten Dominik
2007-08-21 10:43       ` Carsten Dominik [this message]
2007-08-21 11:33       ` Bastien
2007-08-11 15:31   ` ignotus
2007-08-11 16:34     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54364bf1d0a7b502a17e72aaebb6287f@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=ignotus@freemail.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).