From b975ff7630dcf289a795a9eb0ec6f449d0efd621 Mon Sep 17 00:00:00 2001 From: Konubinix Date: Thu, 6 Nov 2014 11:02:23 +0100 Subject: [PATCH] Make use of `org-insert-heading' instead of inserting the * character * lisp/org-agenda.el (org-agenda-insert-diary-as-top-level): Make use of `org-insert-heading' instead of inserting the * character Therefore, the hooks associated to the insertion of a heading will be triggered. --- lisp/org-agenda.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b83c331..e719c00 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -9488,7 +9488,8 @@ a timestamp can be added there." (widen) (goto-char (point-max)) (or (bolp) (insert "\n")) - (insert "* " text "\n") + (org-insert-heading) + (insert text "\n") (if org-adapt-indentation (org-indent-to-column 2))) (defun org-agenda-insert-diary-make-new-entry (text) -- 2.1.4