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

我的未来我决定 提交于 2020-01-05 04:37:12

问题


I am using emacs 25.3.2 and org-mode 8.2.10. For some reason whenever I try to add a new diary entry in the org-Agenda I get this error message

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

I have tried all types: day weekly, monthly and none worked. If I try to add the entry from emacs calendar it works fine (I end up in the diary file).

Relevant entries from my .emacs file are

;; 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)

and

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

I have searched online, and the best answer I found was how to describe the functions commandp and org-agenda-diary-entry, but I couldn't find anyone with the same type of issue and I cannot understand what the problem is. Thank you in advance for any help.


回答1:


This bug was caused by a renaming of diary functions. It was fixed in org-mode by the following commit:

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 dates from October 2014, just before this fix went in. I think it's time to upgrade.



来源:https://stackoverflow.com/questions/49333704/unable-to-enter-diary-entry-org-agenda-diary-entry-wrong-type-argument-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!