+2013-01-04 Stephen Berman <Stephen.Berman@rub.de>
+
+ * calendar/todos.el (todos-reset-global-current-todos-file)
+ (todos-display-categories-1): Use absolute name of
+ todos-default-todos-file.
+
2013-01-04 Stephen Berman <Stephen.Berman@rub.de>
* calendar/todos.el (todos-insert-item): Fix copy and paste error
This function is added to `kill-buffer-hook' in Todos mode."
(let ((filename (file-truename (buffer-file-name))))
(setq todos-file-buffers (delete filename todos-file-buffers))
- (setq todos-global-current-todos-file (or (car todos-file-buffers)
- todos-default-todos-file))))
+ (setq todos-global-current-todos-file
+ (or (car todos-file-buffers)
+ (todos-absolute-file-name todos-default-todos-file)))))
(defvar todos-categories nil
"Alist of categories in the current Todos file.
;; to this file, so have to initialize Todos file and
;; categories variables in order e.g. to enable categories
;; display.
+ ;; FIXME: is this right?
(setq todos-default-todos-file (buffer-file-name))
(setq todos-categories (todos-make-categories-list t)))
;; With empty buffer (e.g. with new archive in
(defun todos-display-categories-1 ()
"Prepare buffer for displaying table of categories and item counts."
(unless (eq major-mode 'todos-categories-mode)
- (setq todos-global-current-todos-file (or todos-current-todos-file
- todos-default-todos-file))
+ (setq todos-global-current-todos-file
+ (or todos-current-todos-file
+ (todos-absolute-file-name todos-default-todos-file)))
(set-window-buffer (selected-window)
(set-buffer (get-buffer-create todos-categories-buffer)))
(kill-all-local-variables)