emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Block agendas and filtering
@ 2013-03-06  3:46 Thomas Moyer
  2013-03-19 17:32 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Moyer @ 2013-03-06  3:46 UTC (permalink / raw)
  To: emacs-orgmode

Is it possible to have a block agenda that contains two daily/weekly
agendas that are "opposites" of each other, based on something like a
tag? For example I have my normal todo list things that are scheduled,
and then I have other regular things, like cleaning and taking care of
other tasks that occur every week. Below is an example

* Tasks
** File paperwork
SCHEDULED: <2013-05-17 Fri>
** Build model airplane
SCHEDULED: <2013-05-18 Sat>
* Regular chores    :chores:
** Dishes
<%%(member (calendar-day-of-week date) '(0 1 2 3 4 5 6))>
** Laundry
<%%(= 6 (calendar-day-of-week date))>

What I want is a block agenda, using two agenda blocks. The first will
*exclude* the entrys tagged as :chores: and the second will *include*
any entry that is tagged with :chores:.

Is there a way to accomplish this with tags, or maybe properties?

Thanks!

-Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Block agendas and filtering
  2013-03-06  3:46 Block agendas and filtering Thomas Moyer
@ 2013-03-19 17:32 ` Bastien
  2013-03-25  6:07   ` Samuel Wales
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2013-03-19 17:32 UTC (permalink / raw)
  To: Thomas Moyer; +Cc: emacs-orgmode

Hi Thomas,

Thomas Moyer <tommoyer@gmail.com> writes:

> What I want is a block agenda, using two agenda blocks. The first will
> *exclude* the entrys tagged as :chores: and the second will *include*
> any entry that is tagged with :chores:.
>
> Is there a way to accomplish this with tags, or maybe properties?

In your agenda custom command first block:

  ...
  (org-agenda-tag-filter ("+Tag"))
  ...

In your agenda custom command second block:

  ...
  (org-agenda-tag-filter ("-Tag"))
  ...

Not tested, but it should work -- not the -/+ before the tag itself,
that's what conditions tag filtering out/in.

HTH,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Block agendas and filtering
  2013-03-19 17:32 ` Bastien
@ 2013-03-25  6:07   ` Samuel Wales
  2013-03-25  6:11     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Wales @ 2013-03-25  6:07 UTC (permalink / raw)
  To: Bastien; +Cc: Thomas Moyer, emacs-orgmode

On 3/19/13, Bastien <bzg@altern.org> wrote:
>   (org-agenda-tag-filter ("+Tag"))

org-agenda-filter-preset?

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is NO hope without action.  This means YOU.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Block agendas and filtering
  2013-03-25  6:07   ` Samuel Wales
@ 2013-03-25  6:11     ` Bastien
  2013-03-25 11:35       ` Thomas Moyer
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2013-03-25  6:11 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Thomas Moyer, emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> On 3/19/13, Bastien <bzg@altern.org> wrote:
>>   (org-agenda-tag-filter ("+Tag"))
>
> org-agenda-filter-preset?

Both will work.  Note that `org-agenda-filter-preset' has
been renamed to `org-agenda-tag-filter-preset' a while ago.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Block agendas and filtering
  2013-03-25  6:11     ` Bastien
@ 2013-03-25 11:35       ` Thomas Moyer
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Moyer @ 2013-03-25 11:35 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

I got this working as I wanted, I had a problem with the custom agenda
commands that I had defined. Below is the agenda command that implements
the desired view.

("c" "Agenda and Home-related tasks"
          ((agenda "-chore")
           (tags "chore+TIMESTAMP=<today>")))

I think part of my problem was having a key binding defined twice (c in
this case), and org not warning about it. The two happened to be somewhat
similar, and so there was confusion on my part as to why it wasn't showing
the right thing.

Thanks for all of the help and suggestions.

-Tom


--
Thomas Moyer
tommoyer@gmail.com


On Mon, Mar 25, 2013 at 2:11 AM, Bastien <bzg@altern.org> wrote:

> Samuel Wales <samologist@gmail.com> writes:
>
> > On 3/19/13, Bastien <bzg@altern.org> wrote:
> >>   (org-agenda-tag-filter ("+Tag"))
> >
> > org-agenda-filter-preset?
>
> Both will work.  Note that `org-agenda-filter-preset' has
> been renamed to `org-agenda-tag-filter-preset' a while ago.
>
> --
>  Bastien
>

[-- Attachment #2: Type: text/html, Size: 1869 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-25 11:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06  3:46 Block agendas and filtering Thomas Moyer
2013-03-19 17:32 ` Bastien
2013-03-25  6:07   ` Samuel Wales
2013-03-25  6:11     ` Bastien
2013-03-25 11:35       ` Thomas Moyer

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).