From e8429183d55a6b3541c4b51fb85b2439caec65f6 Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Tue, 21 May 2013 11:23:52 +0200 Subject: [PATCH] * todos.el (todos-read-file-name): Fix previous change to ensure it works when invoked outside of a Todos file. --- lisp/calendar/ChangeLog | 5 +++++ lisp/calendar/todos.el | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lisp/calendar/ChangeLog b/lisp/calendar/ChangeLog index 7cf8b2f9d15..4b68e41698d 100644 --- a/lisp/calendar/ChangeLog +++ b/lisp/calendar/ChangeLog @@ -1,3 +1,8 @@ +2013-05-21 Stephen Berman + + * todos.el (todos-read-file-name): Fix previous change to ensure + it works when invoked outside of a Todos file. + 2013-05-20 Stephen Berman * todos.el: Fixes concerning filtered items. diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index e7f619256c3..d8bf02b432a 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el @@ -1657,10 +1657,15 @@ otherwise, a new file name is allowed." (if archive todos-archives todos-files))) (file (completing-read prompt files nil mustmatch nil nil (if files - ;; If user hit RET without choosing - ;; a file, default to current file. + ;; If user hit RET without + ;; choosing a file, default to + ;; current or default file. (todos-short-file-name - todos-current-todos-file) + (or todos-current-todos-file + (and todos-show-current-file + todos-global-current-todos-file) + (todos-absolute-file-name + todos-default-todos-file))) ;; Trigger prompt for initial file. "")))) (unless (file-exists-p todos-directory) -- 2.39.5