]> git.eshelyaron.com Git - emacs.git/commitdiff
* todos.el (todos-read-file-name): Fix previous change to ensure
authorStephen Berman <stephen.berman@gmx.net>
Tue, 21 May 2013 09:23:52 +0000 (11:23 +0200)
committerStephen Berman <stephen.berman@gmx.net>
Tue, 21 May 2013 09:23:52 +0000 (11:23 +0200)
it works when invoked outside of a Todos file.

lisp/calendar/ChangeLog
lisp/calendar/todos.el

index 7cf8b2f9d15556decd8558a704cef13dcd70e386..4b68e41698d87e15cdece2f4c1233ac651523d6c 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-21  Stephen Berman  <stephen.berman@gmx.net>
+
+       * 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  <stephen.berman@gmx.net>
 
        * todos.el: Fixes concerning filtered items.
index e7f619256c3e375ba7b475259e84f45befc2f7f8..d8bf02b432a4e68535b12635db224905d5a9c3f3 100644 (file)
@@ -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)