diff options
| author | Stephen Berman | 2013-01-05 00:28:17 +0100 |
|---|---|---|
| committer | Stephen Berman | 2013-01-05 00:28:17 +0100 |
| commit | a1a7d89e1a808bf3aaedb23fc0b556712a949854 (patch) | |
| tree | 41ea01a0ae8c95ab872c5517b1c04fc4091dc71b | |
| parent | 12983a8abdaa5a85eae1879252a213a829ebdf9c (diff) | |
| download | emacs-a1a7d89e1a808bf3aaedb23fc0b556712a949854.tar.gz emacs-a1a7d89e1a808bf3aaedb23fc0b556712a949854.zip | |
* calendar/todos.el (todos-reset-global-current-todos-file)
(todos-display-categories-1): Use absolute name of
todos-default-todos-file.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/calendar/todos.el | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8c52196c5ac..5ac573dc06b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | 2013-01-04 Stephen Berman <Stephen.Berman@rub.de> | 1 | 2013-01-04 Stephen Berman <Stephen.Berman@rub.de> |
| 2 | 2 | ||
| 3 | * calendar/todos.el (todos-reset-global-current-todos-file) | ||
| 4 | (todos-display-categories-1): Use absolute name of | ||
| 5 | todos-default-todos-file. | ||
| 6 | |||
| 7 | 2013-01-04 Stephen Berman <Stephen.Berman@rub.de> | ||
| 8 | |||
| 3 | * calendar/todos.el (todos-insert-item): Fix copy and paste error | 9 | * calendar/todos.el (todos-insert-item): Fix copy and paste error |
| 4 | from previous change. | 10 | from previous change. |
| 5 | 11 | ||
diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index 75af84b8812..f1876db459c 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el | |||
| @@ -954,8 +954,9 @@ the value of `todos-default-todos-file'. | |||
| 954 | This function is added to `kill-buffer-hook' in Todos mode." | 954 | This function is added to `kill-buffer-hook' in Todos mode." |
| 955 | (let ((filename (file-truename (buffer-file-name)))) | 955 | (let ((filename (file-truename (buffer-file-name)))) |
| 956 | (setq todos-file-buffers (delete filename todos-file-buffers)) | 956 | (setq todos-file-buffers (delete filename todos-file-buffers)) |
| 957 | (setq todos-global-current-todos-file (or (car todos-file-buffers) | 957 | (setq todos-global-current-todos-file |
| 958 | todos-default-todos-file)))) | 958 | (or (car todos-file-buffers) |
| 959 | (todos-absolute-file-name todos-default-todos-file))))) | ||
| 959 | 960 | ||
| 960 | (defvar todos-categories nil | 961 | (defvar todos-categories nil |
| 961 | "Alist of categories in the current Todos file. | 962 | "Alist of categories in the current Todos file. |
| @@ -1292,6 +1293,7 @@ With nil or omitted CATEGORY, default to the current category." | |||
| 1292 | ;; to this file, so have to initialize Todos file and | 1293 | ;; to this file, so have to initialize Todos file and |
| 1293 | ;; categories variables in order e.g. to enable categories | 1294 | ;; categories variables in order e.g. to enable categories |
| 1294 | ;; display. | 1295 | ;; display. |
| 1296 | ;; FIXME: is this right? | ||
| 1295 | (setq todos-default-todos-file (buffer-file-name)) | 1297 | (setq todos-default-todos-file (buffer-file-name)) |
| 1296 | (setq todos-categories (todos-make-categories-list t))) | 1298 | (setq todos-categories (todos-make-categories-list t))) |
| 1297 | ;; With empty buffer (e.g. with new archive in | 1299 | ;; With empty buffer (e.g. with new archive in |
| @@ -2298,8 +2300,9 @@ which is the value of the user option | |||
| 2298 | (defun todos-display-categories-1 () | 2300 | (defun todos-display-categories-1 () |
| 2299 | "Prepare buffer for displaying table of categories and item counts." | 2301 | "Prepare buffer for displaying table of categories and item counts." |
| 2300 | (unless (eq major-mode 'todos-categories-mode) | 2302 | (unless (eq major-mode 'todos-categories-mode) |
| 2301 | (setq todos-global-current-todos-file (or todos-current-todos-file | 2303 | (setq todos-global-current-todos-file |
| 2302 | todos-default-todos-file)) | 2304 | (or todos-current-todos-file |
| 2305 | (todos-absolute-file-name todos-default-todos-file))) | ||
| 2303 | (set-window-buffer (selected-window) | 2306 | (set-window-buffer (selected-window) |
| 2304 | (set-buffer (get-buffer-create todos-categories-buffer))) | 2307 | (set-buffer (get-buffer-create todos-categories-buffer))) |
| 2305 | (kill-all-local-variables) | 2308 | (kill-all-local-variables) |