[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] org-add-planning-info does not respect org-scheduled-string or
From: |
Ihor Radchenko |
Subject: |
Re: [BUG] org-add-planning-info does not respect org-scheduled-string or org-deadline-string |
Date: |
Fri, 26 Nov 2021 18:42:26 +0800 |
Matt Micheletti <mattdmicheletti@gmail.com> writes:
> ...
> do not respect the usage of the org-scheduled-string or org-deadline-string
> values when prompting the user to enter a schedule or deadline timestamp
> leading to confusion amongst the inconsistent UI/UX when those strings are
> changed (as Org Mode permits).
Why do you think that Org mode permits changing the planning keywords?
This part of syntax is not meant to be changed. See
https://orgmode.org/worg/dev/org-syntax.html
> Recommend changing to
>
> ```
> (defun org-add-planning-info (what &optional time &rest remove)
> ;; Omitted for brevity...
> ;; If necessary, get the time from the user
> (or time (org-read-date nil 'to-time nil
> (cl-case what
> (deadline org-deadline-string)
> (scheduled org-scheduled-string)
> (otherwise nil))
> default-time default-input)))))
> ```
This is a good idea, though we should use org-element-deadline-keyword
and org-element-scheduled-keyword instead.
Generally, we need to obsolete org-deadline-string and friends in favour
of constants defined in org-element.el
I think Nicolas is already working on this task.
Best,
Ihor