Emacs org-mode: how to avoid duplicate lines in agenda, when items is scheduled AND has deadline

You can set org-agenda-skip-deadline-prewarning-if-scheduled to t or a small number.

Documentation:
Non-nil means skip deadline prewarning when entry is also scheduled.

This will apply on all days where a prewarning for the deadline would be shown, but not at the day when the entry is actually due. On that day, the deadline will be shown anyway.

This variable may be set to nil, t, or a number which will then give the number of days before the actual deadline when the prewarnings should resume.


The variable org-agenda-skip-scheduled-if-deadline-is-shown can be used to hide scheduled todos in the agenda if they also have a deadline and are already displayed with the deadline.

I chose the value Not when scheduled today so that at least on the day the item is scheduled, I see it twice and then can delete the scheduled date.

Documentation:

Org Agenda Skip Scheduled If Deadline Is Shown

Non-nil means skip scheduling line if same entry shows because of deadline.

In the agenda of today, an entry can show up multiple times because it is both scheduled and has a nearby deadline, and maybe a plain time stamp as well. When this variable is t, then only the deadline is shown and the fact that the entry is scheduled today or was scheduled previously is not shown. When this variable is nil, the entry will be shown several times. When the variable is the symbol `not-today', then skip scheduled previously, but not scheduled today.