我有一个任务的预定开始日期和完成任务的工作量,
例如,在 N=5 以下的情况下,开始日期为 <2016-01-27 星期三>
如何根据 scheduled_date+5days 自动计算截止日期?
最后我有以下内容:
DEADLINE: <2016-02-03 Wed> SCHEDULED: <2016-01-27 Wed>
最佳答案
下面的例子调用org-schedule
;用户输入所需的日期/时间;然后将 5 天的时移添加到最后插入的时间戳,并且该值由 org-deadline
以编程方式使用。如果用户希望小时/分钟出现在截止日期的时间戳中,则将 with-hm
设置为 t
。
[如果用户希望截止日期与计划日期的时间完全相同,则需要做一些额外的工作。目前,截止日期默认为午夜。]
(defun schedule-me ()
(interactive)
(org-schedule nil)
(let* (
(timeshift 5)
(time
(org-time-from-absolute
(+
timeshift
(org-time-string-to-absolute org-last-inserted-timestamp))))
(with-hm nil)
(fmt (funcall (if with-hm 'cdr 'car) org-time-stamp-formats)) )
(org-deadline nil (format-time-string fmt time))))
关于emacs - 组织模式 : how to calculate dynamic deadlines,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32479979/