浏览代码

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 年之前
父节点
当前提交
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)