批量重新安排组织议程项目保留日期
Bulk reschedule org agenda items preserving date
我有时会忘记做一个或多个每天同一时间发生的日常习惯,我需要将它们更新为最新的,这样我才能收到它们的 orgzly 通知。
我可以移动组织议程中的单个项目,保留 M-x org-agenda-date-later
的日期,并将其重新安排到当前日期以及存在的任何时间。
如果我尝试通过标记项目并执行 B f org-agenda-date-later
将其用作批量操作,我得到:
Debugger entered--Lisp error: (wrong-number-of-arguments #f(compiled-function (arg &optional what) (interactive "p") #<bytecode 0x1ad5eed>) 0)
org-agenda-date-later()
org-agenda-bulk-action(nil)
funcall-interactively(org-agenda-bulk-action nil)
call-interactively(org-agenda-bulk-action nil nil)
command-execute(org-agenda-bulk-action)
这告诉我 org-agenda-date-later
不是为了用作批量操作而编写的。一个解决方案是编写一个多次调用 org-agenda-date-later
的批量操作,但我不知道该怎么做。
我搜索了其他解决方案,并从 org mode FAQ:
中找到了 org 模式作者推荐的内容
(defun org-agenda-reschedule-to-today ()
(interactive)
(flet ((org-read-date (&rest rest) (current-time)))
(call-interactively 'org-agenda-schedule)))
这作为一个批量操作起作用,但它会失去计划项目的时间。这意味着我将不得不重新审视我的习惯,并在这样做之后重新安排每个习惯的时间,这很不方便。
org-agenda-bulk-custom-functions
您可以向其中添加键绑定和关联功能。因此,例如,在调用 org-agenda-bulk-action
之后为 D
添加绑定,您可以使用
(setq org-agenda-bulk-custom-functions
`((?D (lambda () (call-interactively 'org-agenda-date-later)))
,@org-agenda-bulk-custom-functions))
它将传递前缀,例如,允许 C-u -1 B D
将任务提前一天同时重新安排。
我有时会忘记做一个或多个每天同一时间发生的日常习惯,我需要将它们更新为最新的,这样我才能收到它们的 orgzly 通知。
我可以移动组织议程中的单个项目,保留 M-x org-agenda-date-later
的日期,并将其重新安排到当前日期以及存在的任何时间。
如果我尝试通过标记项目并执行 B f org-agenda-date-later
将其用作批量操作,我得到:
Debugger entered--Lisp error: (wrong-number-of-arguments #f(compiled-function (arg &optional what) (interactive "p") #<bytecode 0x1ad5eed>) 0)
org-agenda-date-later()
org-agenda-bulk-action(nil)
funcall-interactively(org-agenda-bulk-action nil)
call-interactively(org-agenda-bulk-action nil nil)
command-execute(org-agenda-bulk-action)
这告诉我 org-agenda-date-later
不是为了用作批量操作而编写的。一个解决方案是编写一个多次调用 org-agenda-date-later
的批量操作,但我不知道该怎么做。
我搜索了其他解决方案,并从 org mode FAQ:
中找到了 org 模式作者推荐的内容(defun org-agenda-reschedule-to-today ()
(interactive)
(flet ((org-read-date (&rest rest) (current-time)))
(call-interactively 'org-agenda-schedule)))
这作为一个批量操作起作用,但它会失去计划项目的时间。这意味着我将不得不重新审视我的习惯,并在这样做之后重新安排每个习惯的时间,这很不方便。
org-agenda-bulk-custom-functions
您可以向其中添加键绑定和关联功能。因此,例如,在调用 org-agenda-bulk-action
之后为 D
添加绑定,您可以使用
(setq org-agenda-bulk-custom-functions
`((?D (lambda () (call-interactively 'org-agenda-date-later)))
,@org-agenda-bulk-custom-functions))
它将传递前缀,例如,允许 C-u -1 B D
将任务提前一天同时重新安排。