org-agenda: Fix adding diary entries

* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix
  adding adding diary entries the same day.

This is a follow-up to a1116aa54e.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/94638>
This commit is contained in:
Nicolas Goaziou 2015-02-05 10:00:46 +01:00
parent 55c0708bc4
commit 226639b239
1 changed files with 2 additions and 0 deletions

View File

@ -9506,7 +9506,9 @@ a timestamp can be added there."
(let ((col (current-column)))
(insert text)
(org-end-of-meta-data)
;; Ensure point is left on a blank line, at proper indentation.
(unless (bolp) (insert "\n"))
(unless (org-looking-at-p "^[ \t]*$") (save-excursion (insert "\n")))
(when org-adapt-indentation (org-indent-to-column col)))
(let ((org-show-following-heading t)
(org-show-siblings t)