emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Making an agenda that includes scheduled-for-later tasks?
@ 2019-01-16 12:42 Leo Gaspard
  2019-01-25 19:26 ` Leo Gaspard
  2019-01-25 21:52 ` Stig Brautaset
  0 siblings, 2 replies; 6+ messages in thread
From: Leo Gaspard @ 2019-01-16 12:42 UTC (permalink / raw)
  To: emacs-orgmode

Hello all!

I am trying to make an agenda view of all tasks that don't have the
:Effort: property set, including tasks that are scheduled for later.

My init.el files includes the following lines (of interest is the "E"
agenda):
```
(setq org-agenda-custom-commands
      '(("U" "Unscheduled tasks"
	 todo '("TODO" "WAITING")
	 ((org-agenda-overriding-header "Unscheduled tasks")
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))))
	("E" "Effortless tasks"
	 todo '("TODO" "WAITING")
	 ((org-agenda-overriding-header "Effortless tasks")
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))))))
```

However, for some reason only tasks that are either not scheduled or
scheduled for some time in the past show up in this agenda. This makes
it useless, as the point is to remember to put in efforts for every
task *before* they are scheduled (and thus started)

Do you have an idea what I could have missed?

Thanking you in advance,
  Leo

PS: Also, I've noticed setting =todo '("TODO" "WAITING")= is apparently
not enough to get it to ignore the APPT-tagged items, so I've added the
filter to =org-agenda-skip-entry-if=. If you have an idea what I'm doing
wrong…

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

* Re: Making an agenda that includes scheduled-for-later tasks?
  2019-01-16 12:42 Making an agenda that includes scheduled-for-later tasks? Leo Gaspard
@ 2019-01-25 19:26 ` Leo Gaspard
  2019-01-25 22:10   ` Nick Dokos
  2019-01-25 21:52 ` Stig Brautaset
  1 sibling, 1 reply; 6+ messages in thread
From: Leo Gaspard @ 2019-01-25 19:26 UTC (permalink / raw)
  To: emacs-orgmode

Hello all!

Just trying to bump this question: How does one make an agenda view that
includes tasks that are already scheduled for later?

(more details in the quoted mail below)

Cheers,
  Leo

Leo Gaspard <orgmode@leo.gaspard.io> writes:

> Hello all!
>
> I am trying to make an agenda view of all tasks that don't have the
> :Effort: property set, including tasks that are scheduled for later.
>
> My init.el files includes the following lines (of interest is the "E"
> agenda):
> ```
> (setq org-agenda-custom-commands
>       '(("U" "Unscheduled tasks"
> 	 todo '("TODO" "WAITING")
> 	 ((org-agenda-overriding-header "Unscheduled tasks")
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))))
> 	("E" "Effortless tasks"
> 	 todo '("TODO" "WAITING")
> 	 ((org-agenda-overriding-header "Effortless tasks")
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))))))
> ```
>
> However, for some reason only tasks that are either not scheduled or
> scheduled for some time in the past show up in this agenda. This makes
> it useless, as the point is to remember to put in efforts for every
> task *before* they are scheduled (and thus started)
>
> Do you have an idea what I could have missed?
>
> Thanking you in advance,
>   Leo
>
> PS: Also, I've noticed setting =todo '("TODO" "WAITING")= is apparently
> not enough to get it to ignore the APPT-tagged items, so I've added the
> filter to =org-agenda-skip-entry-if=. If you have an idea what I'm doing
> wrong…

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

* Re: Making an agenda that includes scheduled-for-later tasks?
  2019-01-16 12:42 Making an agenda that includes scheduled-for-later tasks? Leo Gaspard
  2019-01-25 19:26 ` Leo Gaspard
@ 2019-01-25 21:52 ` Stig Brautaset
  2019-01-26  0:57   ` Leo Gaspard
  1 sibling, 1 reply; 6+ messages in thread
From: Stig Brautaset @ 2019-01-25 21:52 UTC (permalink / raw)
  To: Leo Gaspard, emacs-orgmode


Leo Gaspard <orgmode@leo.gaspard.io> writes:
> Hello all!
>
> I am trying to make an agenda view of all tasks that don't have the
> :Effort: property set, including tasks that are scheduled for later.
>
> My init.el files includes the following lines (of interest is the "E"
> agenda):
> ```
> (setq org-agenda-custom-commands
>       '(("U" "Unscheduled tasks"
> 	 todo '("TODO" "WAITING")
> 	 ((org-agenda-overriding-header "Unscheduled tasks")
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))))
> 	("E" "Effortless tasks"
> 	 todo '("TODO" "WAITING")
> 	 ((org-agenda-overriding-header "Effortless tasks")
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))))))
> ```
>
> However, for some reason only tasks that are either not scheduled or
> scheduled for some time in the past show up in this agenda.

Does changing your "E" entry to this help at all?

,----
| (setq org-agenda-custom-commands
|       '(("U" "Unscheduled tasks"
| 	 todo '("TODO" "WAITING")
| 	 ((org-agenda-overriding-header "Unscheduled tasks")
| 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))))
| 	("E" "Effortless tasks"
| 	 todo '("TODO" "WAITING")
| 	 ((org-agenda-overriding-header "Effortless tasks")
| 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))
| 	  (org-agenda-todo-ignore-scheduled nil)
| 	  (org-agenda-todo-ignore-deadlines nil)
| 	  (org-agenda-todo-ignore-timestamp nil)))))
`----

By the way, the documentation for the `org-agenda-custom-commands'
variable says that the third entry should be "a single keyword for TODO
keyword searches", so the '("TODO" "WAITING") you have may be partly why
things are not working how you expect? You may want to try a compound
one like this:

,----
| (setq org-agenda-custom-commands
|       '(("U" "Unscheduled tasks"
| 	 todo '("TODO" "WAITING")
| 	 ((org-agenda-overriding-header "Unscheduled tasks")
| 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))))
| 	("E" "Effortless tasks"
| 	 ((todo "TODO")
| 	  (todo "WAITING"))
| 	 ((org-agenda-overriding-header "Effortless tasks")
| 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))
| 	  (org-agenda-todo-ignore-scheduled nil)
| 	  (org-agenda-todo-ignore-deadlines nil)
| 	  (org-agenda-todo-ignore-timestamp nil)))))
`----

Regards,

Stig

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

* Re: Making an agenda that includes scheduled-for-later tasks?
  2019-01-25 19:26 ` Leo Gaspard
@ 2019-01-25 22:10   ` Nick Dokos
  2019-01-26  0:51     ` Leo Gaspard
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2019-01-25 22:10 UTC (permalink / raw)
  To: emacs-orgmode

Leo Gaspard <orgmode@leo.gaspard.io> writes:

> Hello all!
>
> Just trying to bump this question: How does one make an agenda view that
> includes tasks that are already scheduled for later?
>
> (more details in the quoted mail below)
>
> Cheers,
>   Leo
>
> Leo Gaspard <orgmode@leo.gaspard.io> writes:
>
>> Hello all!
>>
>> I am trying to make an agenda view of all tasks that don't have the
>> :Effort: property set, including tasks that are scheduled for later.
>>
>> My init.el files includes the following lines (of interest is the "E"
>> agenda):
>> ```
>> (setq org-agenda-custom-commands
>>       '(("U" "Unscheduled tasks"
>> 	 todo '("TODO" "WAITING")

[General disclaimer: I can never remember what goes where in org-agenda-custom-commands, and it's
 all untested. Tread carefully.]
 
I don't think the "todo" type can do that. You might want to use the "tags" type with a search
- see

        (info "(org) Matching tags and properties")


It should be something like

       tags "TODO=TODO|WAITING"

or maybe

       tags "TODO=\"TODO|WAITING\""

or maybe

       tags "TODO=\"TODO\"|TODO=\"WAITING\""

(or maybe something else :-) ).

>> 	 ((org-agenda-overriding-header "Unscheduled tasks")
>> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled))))
>> 	("E" "Effortless tasks"
>> 	 todo '("TODO" "WAITING")
>> 	 ((org-agenda-overriding-header "Effortless tasks")
>> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))))))
>> ```
>>
>> However, for some reason only tasks that are either not scheduled or
>> scheduled for some time in the past show up in this agenda. This makes
>> it useless, as the point is to remember to put in efforts for every
>> task *before* they are scheduled (and thus started)
>>
>> Do you have an idea what I could have missed?

Maybe (org-agenda-span 'month)?

>>
>> Thanking you in advance,
>>   Leo
>>
>> PS: Also, I've noticed setting =todo '("TODO" "WAITING")= is apparently
>> not enough to get it to ignore the APPT-tagged items, so I've added the
>> filter to =org-agenda-skip-entry-if=. If you have an idea what I'm doing
>> wrong…
>
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler

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

* Re: Making an agenda that includes scheduled-for-later tasks?
  2019-01-25 22:10   ` Nick Dokos
@ 2019-01-26  0:51     ` Leo Gaspard
  0 siblings, 0 replies; 6+ messages in thread
From: Leo Gaspard @ 2019-01-26  0:51 UTC (permalink / raw)
  To: Nick Dokos, emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:
>        tags "TODO=\"TODO\"|TODO=\"WAITING\""

Thank you! This one worked great :)

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

* Re: Making an agenda that includes scheduled-for-later tasks?
  2019-01-25 21:52 ` Stig Brautaset
@ 2019-01-26  0:57   ` Leo Gaspard
  0 siblings, 0 replies; 6+ messages in thread
From: Leo Gaspard @ 2019-01-26  0:57 UTC (permalink / raw)
  To: Stig Brautaset, emacs-orgmode

Stig Brautaset <stig@brautaset.org> writes:
> Does changing your "E" entry to this help at all?
>
> ,----
> | 	("E" "Effortless tasks"
> | 	 todo '("TODO" "WAITING")
> | 	 ((org-agenda-overriding-header "Effortless tasks")
> | 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))
> | 	  (org-agenda-todo-ignore-scheduled nil)
> | 	  (org-agenda-todo-ignore-deadlines nil)
> | 	  (org-agenda-todo-ignore-timestamp nil)))))
> `----

Thank you, it worked great! I wonder whether the documentation of
=org-agenda-custom-commands= could be expanded around the =settings=
parameter, so as to make it easier to find this solution by oneself? I
don't know myself the list of settings that could go there, though, so
couldn't really write it myself unfortunately :/

> By the way, the documentation for the `org-agenda-custom-commands'
> variable says that the third entry should be "a single keyword for TODO
> keyword searches", so the '("TODO" "WAITING") you have may be partly why
> things are not working how you expect? You may want to try a compound
> one like this:

> ,----
> | 	("E" "Effortless tasks"
> | 	 ((todo "TODO")
> | 	  (todo "WAITING"))
> | 	 ((org-agenda-overriding-header "Effortless tasks")
> | 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp ":Effort:" 'todo '("APPT")))
> | 	  (org-agenda-todo-ignore-scheduled nil)
> | 	  (org-agenda-todo-ignore-deadlines nil)
> | 	  (org-agenda-todo-ignore-timestamp nil)))))
> `----

This works, however it splits the =TODO= and =WAITING= tasks in two
different sections in the display. I think Nick's solution is a bit
closer to what I tried to do here, as it mixes the two keywords in one.

Thank you!
  Leo

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

end of thread, other threads:[~2019-01-26  0:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 12:42 Making an agenda that includes scheduled-for-later tasks? Leo Gaspard
2019-01-25 19:26 ` Leo Gaspard
2019-01-25 22:10   ` Nick Dokos
2019-01-26  0:51     ` Leo Gaspard
2019-01-25 21:52 ` Stig Brautaset
2019-01-26  0:57   ` Leo Gaspard

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