When I create an agenda item that is scheduled for say:
* TODO Item
  SCHEDULED: <2023-09-19 Tue>

then I set a deadline for that item
* TODO Item
   SCHEDULED: <2023-09-19 Tue> DEADLINE: <2023-10-03 Tue>

notice the deadline for the item is two weeks from the scheduled date,

I get this error:

Debugger entered--Lisp error: (wrong-type-argument stringp (timestamp
(:type active :raw-value "<2023-10-03 Tue>" :year-start 2023 :month-start
10 :day-start 3 :hour-start nil :minute-start nil :year-end 2023 :month-end
10 :day-end 3 :hour-end nil :minute-end nil :begin 115 :end 132 :post-blank
1)))

string-match("\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\)\\(
+..." (timestamp (:type active :raw-value "<2023-10-03 Tue>" :year-start
2023 :month-start 10 :day-start 3 :hour-start nil :minute-start nil
:year-end 2023 :month-end 10 :day-end 3 :hour-end nil :minute-end nil
:begin 115 :end 132 :post-blank 1)))
  org-parse-time-string((timestamp (:type active :raw-value "<2023-10-03
Tue>" :year-start 2023 :month-start 10 :day-start 3 :hour-start nil
:minute-start nil :year-end 2023 :month-end 10 :day-end 3 :hour-end nil
:minute-end nil :begin 115 :end 132 :post-blank 1)))
  org-time-string-to-time((timestamp (:type active :raw-value "<2023-10-03
Tue>" :year-start 2023 :month-start 10 :day-start 3 :hour-start nil
:minute-start nil :year-end 2023 :month-end 10 :day-end 3 :hour-end nil
:minute-end nil :begin 115 :end 132 :post-blank 1)))
  #f(compiled-function (el) #<bytecode 0x1678a316b7f7957e>)((headline
(:raw-value "Today's Dentist" :begin 80 :end 162 :pre-blank 0
:contents-begin 105 :contents-end 160 :robust-begin nil :robust-end nil
:level 2 :priority nil :tags nil :todo-keyword #("TODO" 0 4 (wrap-prefix
#("*** " 0 4 (face org-indent)) line-prefix #("*" 0 1 (face org-indent))
face ((:foreground "#FFAAAA") org-level-2) fontified t)) :todo-type todo
:post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil
:post-affiliated 80 :deadline (timestamp (:type active :raw-value
"<2023-10-03 Tue>" :year-start 2023 :month-start 10 :day-start 3
:hour-start nil :minute-start nil :year-end 2023 :month-end 10 :day-end 3
:hour-end nil :minute-end nil :begin 115 :end 132 :post-blank 1))
:scheduled (timestamp (:type active :raw-value "<2023-09-19 Tue>"
:year-start 2023 :month-start 9 :day-start 19 :hour-start nil :minute-start
nil :year-end 2023 :month-end 9 :day-end 19 :hour-end nil :minute-end nil
:begin 143 :end 159 :post-blank 0)) :title (#("Today's Dentist" 0 15
(:parent (headline #3)))) :parent (headline (:raw-value "Appointments"
:begin 1 :end 162 :pre-blank 1 :contents-begin 80 :contents-end 160
:robust-begin 82 :robust-end 158 :level 1 :priority nil :tags
(#("@appointment" 0 12 (fontified t face ... mouse-face highlight keymap
... line-prefix "" wrap-prefix ...))) :todo-keyword nil :todo-type nil
:post-blank 2 :footnote-section-p nil :archivedp nil :commentedp nil
:post-affiliated 1 :title (#("Appointments" 0 12 (:parent ...))) :parent
(org-data (:begin 1 :contents-begin 1 :contents-end 160 :end 162
:robust-begin 3 :robust-end 158 :post-blank 2 :post-affiliated 1 :path
"/Users/carloftambuatco/Documents/Org/Personal/Appo..." :mode org-data
:CATEGORY "Appointments" :parent nil :cached t :org-element--cache-sync-key
nil)) :cached t :org-element--cache-sync-key nil)) :cached t
:org-element--cache-sync-key nil)))
  org-element-cache-map(#f(compiled-function (el) #<bytecode
0x1678a316b7f7957e>) :next-re "\\<SCHEDULED: *<\\([^>]+\\)>" :fail-re
"\\<SCHEDULED: *<\\([^>]+\\)>" :narrow t)
  org-agenda-get-scheduled((#("  Appointments:In  14 d.:  TODO Today'..." 0
27 (done-face org-agenda-done undone-face org-upcoming-distant-deadline
face org-upcoming-distant-deadline date (9 19 2023) type
"upcoming-deadline" todo-state #("TODO" 0 4 (wrap-prefix ... line-prefix
... face ... fontified t)) priority 4986 ts-date 738796 effort-minutes nil
effort nil warntime nil org-hd-marker #<marker (moves after insertion) at
80 in Appointments.org> org-marker #<marker (moves after insertion) at 115
in Appointments.org> help-echo "mouse-2 or RET jump to org file ~/Docu..."
org-complex-heading-regexp "^\\(\\*+\\)\\(?:
+\\(CANCELLED\\|DONE\\|FAIL\\..." org-todo-regexp
"\\(CANCELLED\\|DONE\\|FAIL\\|IN_PROGRESS\\|..." org-not-done-regexp
"\\(IN_PROGRESS\\|T\\(?:EST\\(?:ING\\)?\\|ODO..." mouse-face highlight
dotime nil ...) 27 62 (done-face org-agenda-done undone-face
org-upcoming-distant-deadline face org-upcoming-distant-deadline date (9 19
2023) type "upcoming-deadline" todo-state #("TODO" 0 4 (wrap-prefix ...
line-prefix ... face ... fontified t)) priority 4986 ts-date 738796
warntime nil org-hd-marker #<marker (moves after insertion) at 80 in
Appointments.org> org-marker #<marker (moves after insertion) at 115 in
Appointments.org> help-echo "mouse-2 or RET jump to org file ~/Docu..."
org-complex-heading-regexp "^\\(\\*+\\)\\(?:
+\\(CANCELLED\\|DONE\\|FAIL\\..." org-todo-regexp
"\\(CANCELLED\\|DONE\\|FAIL\\|IN_PROGRESS\\|..." org-not-done-regexp
"\\(IN_PROGRESS\\|T\\(?:EST\\(?:ING\\)?\\|ODO..." mouse-face highlight
dotime nil format ((... ... ... ... ...) (format " %s %s%s%s" ... ... ...
...)) extra "In  14 d.: " ...) 62 74 (done-face org-agenda-done undone-face
org-upcoming-distant-deadline date (9 19 2023) type "upcoming-deadline"
todo-state #("TODO" 0 4 (wrap-prefix ... line-prefix ... face ... fontified
t)) priority 4986 ts-date 738796 effort-minutes nil effort nil warntime nil
org-hd-marker #<marker (moves after insertion) at 80 in Appointments.org>
org-marker #<marker (moves after insertion) at 115 in Appointments.org>
help-echo "mouse-2 or RET jump to org file ~/Docu..."
org-complex-heading-regexp "^\\(\\*+\\)\\(?:
+\\(CANCELLED\\|DONE\\|FAIL\\..." org-todo-regexp
"\\(CANCELLED\\|DONE\\|FAIL\\|IN_PROGRESS\\|..." org-not-done-regexp
"\\(IN_PROGRESS\\|T\\(?:EST\\(?:ING\\)?\\|ODO..." dotime nil format ((...
... ... ... ...) (format " %s %s%s%s" ... ... ... ...)) extra "In  14 d.: "
...) 74 76 (done-face org-agenda-done undone-face
org-upcoming-distant-deadline face org-upcoming-distant-deadline date (9 19
2023) type "upcoming-deadline" todo-state #("TODO" 0 4 (wrap-prefix ...
line-prefix ... face ... fontified t)) priority 4986 ts-date 738796
effort-minutes nil effort nil warntime nil org-hd-marker #<marker (moves
after insertion) at 80 in Appointments.org> org-marker #<marker (moves
after insertion) at 115 in Appointments.org> help-echo "mouse-2 or RET jump
to org file ~/Docu..." org-complex-heading-regexp "^\\(\\*+\\)\\(?:
+\\(CANCELLED\\|DONE\\|FAIL\\..." org-todo-regexp
"\\(CANCELLED\\|DONE\\|FAIL\\|IN_PROGRESS\\|..." org-not-done-regexp
"\\(IN_PROGRESS\\|T\\(?:EST\\(?:ING\\)?\\|ODO..." mouse-face highlight
dotime nil ...))))

org-agenda-get-day-entries("/Users/carloftambuatco/Documents/Org/Personal/Appo..."
(9 19 2023) :deadline :scheduled :timestamp :sexp)
  apply(org-agenda-get-day-entries
"/Users/carloftambuatco/Documents/Org/Personal/Appo..." (9 19 2023)
(:deadline :scheduled :timestamp :sexp))
  org-agenda-list(nil)
  funcall-interactively(org-agenda-list nil)
  call-interactively(org-agenda-list nil nil)
  command-execute(org-agenda-list)

Then when I set the deadline to more than 14 days from the scheduled date:

* TODO Item
   SCHEDULED: <2023-09-19 Tue> DEADLINE: <2023-10-04 Wed>

Agenda works as normal.
When org agenda is in deadline display mode, I notice it
displays deadlines that are within 2 weeks of the current date.
This seems to be some kind of hard coded error.

Reply via email to