* Reproduction Call ~org-deadline~ with a warning period like so:
(org-deadline nil "<2021-07-20 Tue -1d>") ;; => DEADLINE: <2021-07-20 Tue> * Expected Deadline gets added with the warning period provided. * Actual Deadline gets added without the provided warning period. * Discussion I've opened a Emacs Stackexchange question regarding this: https://emacs.stackexchange.com/questions/66765/how-to-insert-an-org-deadline-from-lisp-with-a-warning-period/ And got told the following by Nick D: #+begin_quote I think this is a bug: the function ~org--deadline-or-schedule~ saves a repeater (e.g ~+2d~ ) and adds it back at the end, but the regexp does not match a warning period (e.g. ~-2d~) so it drops it. You should probably report it with ~M-x org-submit-bug-report~. #+end_quote * Version info Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19 Package: Org mode version 9.4.6 (9.4.6-10-gee652a-elpaplus @ /home/fap/.emacs.d/elpa/org-plus-contrib-20210712/)