无法输入日记条目 org-agenda-diary-entry:错误类型参数:commandp、insert-diary-entry

Unable to enter diary entry org-agenda-diary-entry: Wrong type argument: commandp, insert-diary-entry

我使用的是 emacs 25.3.2 和 org-mode 8.2.10。出于某种原因,每当我尝试在组织议程中添加新的日记条目时,我都会收到此错误消息

org-agenda-diary-entry: Wrong type argument: commandp, insert-diary-entryInvalid face reference: nil

我尝试了所有类型:每周一天、每月和 none。如果我尝试从 emacs 日历添加条目,它工作正常(我最终在日记文件中)。

我的 .emacs 文件中的相关条目是

;; Calendar/diary controls
;; This code has to be at the beggining to ensure an european date-style format
(add-hook 'calendar-load-hook
              (lambda ()
                (calendar-set-date-style 'european)))
(set-default 'truncate-lines t)
(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)

(setq org-agenda-include-diary t)           ; agenda stuff
(setq org-agenda-files (list "~/org/NOTES.org"))    ; agenda stuff

我在网上搜索过,我找到的最佳答案是如何描述函数 commandp 和 org-agenda-diary-entry,但我找不到任何人有相同类型的问题,我不明白是什么问题是。预先感谢您的帮助。

此错误是由日记功能重命名引起的。它已通过以下提交在 org-mode 中修复:

commit 685d3ba4af8cbb45447bb0b6c215a7135e7ed77e
Author: Florian Beck <fb@miszellen.de>
Date:   Sat Nov 15 19:14:27 2014 +0100

    Replace obsolete aliases of calendar functions

    * lisp/org-agenda.el (org-agenda-diary-entry): Replace obsolete functions.

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 7632e1b17..b4b0a24de 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9473,13 +9473,13 @@ entries in that Org-mode file."
                   (message "Diary entry: [d]ay [w]eekly [m]onthly [y]early [a]nniversary [b]lock [c]yclic")
                   (read-char-exclusive)))
           (cmd (cdr (assoc char
-               '((?d . insert-diary-entry)
...
+               '((?d . diary-insert-entry)
...

8.2.10 是 2014 年 10 月发布的,就在那次修复之前。我认为是时候升级了。