[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: todo-mode error "todo-category-select: Search failed: ..."
From: |
Stephen Berman |
Subject: |
Re: todo-mode error "todo-category-select: Search failed: ..." |
Date: |
24 Jan 2002 16:54:49 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Klaus Zeitler <kzeitler@lucent.com> writes:
> In GNU Emacs 21.1.1 (hppa2.0-hp-hpux10.20, OSF/Motif Version 1.2.6)
[...]
> 1. start emacs with options -q --no-site-file
> 2. M-x todo-insert-item "entry1"
> specify a category e.g. "cat1"
> 3. type s and q to save and quit
> 4. M-x todo-show
> shows the item in category "Todo" instead of category "cat1"
> and now entering "+" i.e. todo-forward-category results in error:
>
> todo-category-select: Search failed: "^\\*/\\* --- cat1$"
>
> the todo-do file contains:
>
> -*- mode: todo; todo-categories: ("Todo" "cat1" "Todo" "Todo"); -*-
> */* --- Todo
> */* 2001-12-07 15:08 kzeitler: entry1
> --- End
> */*
> ---------------------------------------------------------------------------
>
> i.e. the new category "cat1" is entered in the list of categories but the
> item is entered in the block of "Todo" items and there's no block
> for "cat1" items.
>
> Besides the variable todo-categories in the mode header
> looks a bit odd too: ("Todo" "cat1" "Todo" "Todo")
The following patch fixes this problem (to do this it was convenient
to eliminate the default "Todo" category, so you just have to specify
an initial category; I hope that's acceptable). In fixing this I also
noticed that the original code for todo-insert-item with a prefix
argument does just the opposite of what the docstring says; I've now
made it comply with the docstring.
--Steve Berman
*** todo-mode.el Tue Jan 15 15:58:49 2002 (version 1.50)
--- todo-mode.el Thu Jan 24 16:31:35 2002
***************
*** 609,618 ****
(current-category (nth todo-category-number todo-categories))
(category
(if arg
! current-category
! (completing-read (concat "Category [" current-category "]: ")
! (todo-category-alist) nil nil nil
! history current-category))))
(todo-add-item-non-interactively new-item category))))
(defalias 'todo-cmd-inst 'todo-insert-item)
--- 727,736 ----
(current-category (nth todo-category-number todo-categories))
(category
(if arg
! (completing-read (concat "Category [" current-category "]: ")
! (todo-category-alist) nil nil nil
! history current-category)
! current-category)))
(todo-add-item-non-interactively new-item category))))
(defalias 'todo-cmd-inst 'todo-insert-item)
***************
*** 954,963 ****
(defun todo-initial-setup ()
"Set up things to work properly in TODO mode."
! (find-file todo-file-do)
! (erase-buffer)
! (todo-mode)
! (todo-add-category "Todo"))
(provide 'todo-mode)
--- 1202,1213 ----
(defun todo-initial-setup ()
"Set up things to work properly in TODO mode."
! (let ((first (read-from-minibuffer "Enter a new category: ")))
! (find-file todo-file-do)
! (erase-buffer)
! (todo-mode)
! (todo-add-category first)
! (write-file todo-file-do)))
(provide 'todo-mode)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: todo-mode error "todo-category-select: Search failed: ...",
Stephen Berman <=