Просмотр исходного кода

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 a1116aa54ee4befd8fa52e3f92207db200ebfd59.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/94638>
Nicolas Goaziou 10 лет назад
Родитель
Сommit
226639b239
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      lisp/org-agenda.el

+ 2 - 0
lisp/org-agenda.el

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