Subject: bug#25473: 26.0.50; org-agenda tries to invoke insert-diary-entry, which does not exist

From: Kyle Meyer <[email-masked]>
Date: Wed, 18 Jan 2017 11:00:47 -0500

Jens Lechtenboerger <[email-masked]> writes:

> I cannot create new diary entries from the org agenda view.
>
> Recipe from 'emacs -Q':
>
> M-x org-agenda
> Press 'a' (agenda for current week)
> Press 'i' (create diary entry)
> Press 'd' (choose daily entry)
>
> Observe message: "org-agenda-diary-entry: Wrong type argument:
> commandp, insert-diary-entry"
>
> Note that in diary-lib.el there is a function diary-insert-entry,
> not insert-diary-entry.

685d3ba4a (Replace obsolete aliases of calendar functions, 2014-11-15)
in the Org mode repo switched the commands over to the diary prefix.
Here's the patch for that, with the paths adjusted so that it can be
applied to the Emacs repo without using -p<n>.

--8<---------------cut here---------------start------------->8---
From: Florian Beck <[email-masked]>
Date: Sat, 15 Nov 2014 19:14:27 +0100
Subject: [PATCH] Replace obsolete aliases of calendar functions

* lisp/org/org-agenda.el (org-agenda-diary-entry): Replace obsolete functions.
---
 lisp/org/org-agenda.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 7632e1b17..b4b0a24de 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -9473,13 +9473,13 @@ (defun org-agenda-diary-entry ()
                   (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)
-			      (?w . insert-weekly-diary-entry)
-			      (?m . insert-monthly-diary-entry)
-			      (?y . insert-yearly-diary-entry)
-			      (?a . insert-anniversary-diary-entry)
-			      (?b . insert-block-diary-entry)
-			      (?c . insert-cyclic-diary-entry)))))
+			    '((?d . diary-insert-entry)
+			      (?w . diary-insert-weekly-entry)
+			      (?m . diary-insert-monthly-entry)
+			      (?y . diary-insert-yearly-entry)
+			      (?a . diary-insert-anniversary-entry)
+			      (?b . diary-insert-block-entry)
+			      (?c . diary-insert-cyclic-entry)))))
           (oldf (symbol-function 'calendar-cursor-to-date))
           ;; (buf (get-file-buffer (substitute-in-file-name diary-file)))
           (point (point))
--
2.11.0

--8<---------------cut here---------------end--------------->8---

--
Kyle