emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Ido Magal <ido@idomagal.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Custom Agenda that partially skips entries
Date: Sun, 10 Apr 2011 08:30:47 -0400	[thread overview]
Message-ID: <87oc4eb85k.fsf@norang.ca> (raw)
In-Reply-To: <BANLkTi=SRp0TGAqabwd4V84SFw86JU_B3g@mail.gmail.com> (Ido Magal's message of "Sat, 9 Apr 2011 22:58:25 -0700")

Ido Magal <ido@idomagal.com> writes:

> I'd appreciate assistance in constructing a custom agenda that
> accomplishes the following (if possible):
>
> 1. Block of week's agenda.
> 2. Block of "next" items that have no schedule ( items that don't
> show up in block 1 )
>
> This is my starting point:
>
> (setq org-agenda-custom-commands
>       '(("n" "Next tasks"
> ((todo "next")))
> ("A" "agenda"
> ((agenda "" ((org-agenda-ndays 7)))
>  (todo "next")
>  ))
> ))
>
> The problem here is that I get duplicates because _all_ 'next' items
> show up in the second block.  I'd rather that only unscheduled items
> showed there.
>
> I thought that this would do it, but it fails:
>
> (setq org-agenda-custom-commands
>       '(("n" "Next tasks"
> ((todo "next")))
> ("A" "agenda"
> ((agenda "" ((org-agenda-ndays 7)))
>  ((todo "next")
>   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline
> 'scheduled)))
>  ))
> ))
>
> Thanks in advance.

Hi Ido,

In the second block set the variable org-agenda-todo-ignore-scheduled to
either 'future or 'all to avoid listing items with a scheduled date.

This is part of my block agenda for next tasks:

   (tags-todo "-WAITING-CANCELLED/!NEXT|STARTED"
	      ((org-agenda-overriding-header "Available to Work on Now")
	       (org-agenda-skip-function 'bh/skip-projects)
	       (org-agenda-todo-ignore-scheduled 'future)
	       (org-agenda-todo-ignore-deadlines 'future)
	       (org-tags-match-list-sublevels t)
	       (org-agenda-sorting-strategy
		'(effort-up category-keep))))

HTH,
Bernt

  reply	other threads:[~2011-04-10 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-10  5:58 Custom Agenda that partially skips entries Ido Magal
2011-04-10 12:30 ` Bernt Hansen [this message]
2011-04-10 23:28   ` Ido Magal

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=87oc4eb85k.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=ido@idomagal.com \
    /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).