diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el index 192d1d6e6..8c0450772 100644 --- a/lisp/org-datetree.el +++ b/lisp/org-datetree.el @@ -63,7 +63,7 @@ tree can be found." (goto-char (prog1 (point) (widen)))))) (defun org-datetree-find-year-create (year) - (let ((re "^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)$") + (let ((re "^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\s-*$") match) (goto-char (point-min)) (while (and (setq match (re-search-forward re nil t))