Fix bug with invisible agenda items

Peter Westlake writes:

> This is quite obscure, and an odd corner case, but here it is.
>
> If you have an item which is:
>
> - a TODO
> - scheduled
> - ordered
> - blocked by a child TODO
>
> then it leaves an empty line in the agenda.
>
> Here's a test case:
> ,----
> | * Press t r on this line in the agenda
> |   SCHEDULED: <2009-09-02 Wed>
> |   :PROPERTIES:
> |   :ORDERED:  t
> |   :END:
> | *** TODO Report invisible scheduled items
> `----
>
> C-a a a will show an agenda with "Scheduled: Press t r ...".
> Press "t" on that line to add a TODO.
> Press "r" to redisplay, and see the line go blank.
>
> Peter.
This commit is contained in:
Carsten Dominik 2009-09-03 06:18:38 +02:00
parent 19572f393a
commit 0f9ad773c0
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-09-03 Carsten Dominik <carsten.dominik@gmail.com>
* org-agenda.el (org-agenda-dim-blocked-tasks): Make sure the
invisibility overlay starts on the newline.
2009-09-02 Carsten Dominik <carsten.dominik@gmail.com>
* org-protocol.el (org-protocol-store-link)

View File

@ -2573,7 +2573,9 @@ bind it in the options section.")
:from 'todo
:to 'done)))))))
(if org-blocked-by-checkboxes (setq invis1 nil))
(setq b (if invis1 (max (point-min) (1- (point))) (point))
(setq b (if invis1
(max (point-min) (1- (point-at-bol)))
(point-at-bol))
e (point-at-eol)
ov (org-make-overlay b e))
(if invis1