Ihor Radchenko writes: > Morgan Smith writes: > >> lisp/org-agenda.el (org-agenda-get-scheduled): Consolidate deadline >> fetching code. Don't check if deadline is shown when >> 'org-agenda-skip-scheduled-if-deadline-is-shown' has a value of >> 'repeated-after-deadline'. >> >> Currently when 'org-agenda-skip-scheduled-if-deadline-is-shown' has a >> value of 'repeated-after-deadline' then there is no effect. This is >> because when 'org-agenda-get-scheduled' is run on later dates, the >> previous deadlines are not put in 'deadline-pos'. > > May you please provide a detailed reproducer demonstrating the bug you > are trying to fix? Such reproducer could be a basis of a new test. See a detailed reproducer attached to this mail. It has a task defined as this: * TODO task SCHEDULED: <2017-03-06 Mon +2d> DEADLINE: <2017-03-10> Running said reproducer currently fails as follows (the numbers are the days of the month). (string-equal "06\nScheduled: task\n08\nScheduled: task\n10\nScheduled: task\nDeadline: task\n" "06\nScheduled: task\n08\nScheduled: task\n10\nScheduled: task\nDeadline: task\n12\nScheduled: task\n") As you can see, we expect to not see anything scheduled after the deadline if 'org-agenda-skip-scheduled-if-deadline-is-shown' is set to 'repeated-after-deadline', however, we actually see that things continue to be scheduled. Hence the bug is that that option currently does nothing.